/* Base */
:root {
    /* Softer light theme (reduced brightness, smoother contrast) */
    --bg: #eef2f7; /* slightly darker off-white with blue tint */
    --card: #ffffff; /* cards */
    --elev: #f1f4f8; /* elevated subtle background */
    --text: #0b1220; /* deep slate */
    --muted: #546274; /* slate-600 */
    --primary: #ff6b35; /* flame orange */
    --primary-600: #f45418; /* darker flame */
    --secondary: #1e40af; /* refined blue */
    --focus: #2a5be7; /* focus blue */
    --ring: rgba(42, 91, 231, 0.22); /* focus ring */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    /* Gentle layered gradient (less bright, smoother) */
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(29, 78, 216, 0.08), transparent 60%),
        radial-gradient(900px 500px at 110% 20%, rgba(255, 107, 53, 0.08), transparent 60%),
        linear-gradient(180deg, #eef2f7 0%, #e6edf5 55%, #e1e8f2 100%);
    background-attachment: fixed;
	color: var(--text);
	line-height: 1.6;
	/* Reserve space for fixed header */
	padding-top: 62px;
}

.container {
	width: min(1200px, 92%);
	margin: 0 auto;
}

/* Header */

.site-header {
	position: fixed;
	top: 0;
	background: #ffffff; /* solid for contrast across displays */
	backdrop-filter: blur(4px);
	border-bottom: 1px solid #dbe2ee; /* stronger divider */
	box-shadow: 0 2px 10px rgba(2, 6, 23, 0.06); /* subtle depth */
	z-index: 10;
	left: 0; right: 0;
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 0;
	gap: 20px;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	text-decoration: none;
	font-weight: 700;
	letter-spacing: 0.4px;
}
.brand-logo { width: 40px; height: 40px; }
.brand-name { font-size: 20px; font-weight: 700; }

.site-nav { 
	display: flex; 
	align-items: center; 
	gap: 24px; 
	flex: 1;
	justify-content: flex-end;
}
.site-nav ul { 
	list-style: none; 
	display: flex; 
	gap: 20px; 
	margin: 0; 
	padding: 0; 
	align-items: center; 
}
.site-nav a { 
	color: var(--text); 
	text-decoration: none; 
	opacity: 0.9; 
	display: inline-flex; 
	align-items: center;
	font-weight: 500;
	transition: opacity 0.2s ease;
}
.site-nav a:hover { opacity: 1; }
.btn-small { padding: 10px 16px; font-size: 14px; font-weight: 600; }

/* Header controls */
.header-controls { 
	display: flex; 
	gap: 12px; 
	align-items: center; 
	margin-left: 20px;
}

/* Currency dropdown */
.currency-dropdown-wrapper { position: relative; }
.currency-select {
	background: transparent; border: 1px solid #dbe2ee; color: var(--muted);
	padding: 6px 8px; border-radius: 6px; font-size: 11px; font-weight: 600;
	cursor: pointer; transition: all 0.2s; min-width: 50px;
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #9aa4b2 50%), linear-gradient(135deg, #9aa4b2 50%, transparent 50%);
	background-position: calc(100% - 8px) calc(50% - 2px), calc(100% - 4px) calc(50% - 2px);
	background-size: 4px 4px, 4px 4px;
	background-repeat: no-repeat;
	padding-right: 20px;
}
.currency-select:hover { background-color: #f1f4f8; border-color: var(--primary); color: var(--primary); }
.currency-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2); }

/* Language switcher */
.language-switcher { display: flex; gap: 4px; }
.lang-btn {
	background: transparent; border: 1px solid #dbe2ee; color: var(--muted);
	padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
	cursor: pointer; transition: all 0.2s;
}
.lang-btn:hover { background: #f1f4f8; border-color: var(--secondary); color: var(--secondary); }
.lang-btn.active { background: var(--secondary); border-color: var(--secondary); color: white; }

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 18px;
	border-radius: 10px;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	font-weight: 600;
}
.btn-primary { background: var(--primary); color: #0b0f1a; }
.btn-primary:hover { background: var(--primary-600); }
.btn-secondary { background: #edf3ff; color: var(--secondary); border-color: #c8d8ff; }
.btn-secondary:hover { background: #e2ecff; }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(28px, 5vw, 48px); line-height: 1.1; margin: 0 0 16px; }
.hero p { color: var(--muted); margin: 0 0 18px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { display: grid; place-items: center; }
.flame {
	width: 240px; height: 240px; border-radius: 50%; position: relative; overflow: hidden; transform: rotate(-6deg);
	/* Layered fills: subtle blue base glow + soft white + outer orange haze */
	background:
		radial-gradient(120px 90px at 50% 72%, rgba(33, 82, 214, 0.18), transparent 72%), /* blue base glow */
		radial-gradient(50% 50% at 50% 50%, rgba(255,107,53,0.10), transparent 70%), /* outer warm haze */
		#ffffff;
	box-shadow: 0 18px 40px rgba(2, 6, 23, 0.08), 0 0 60px rgba(30, 64, 175, 0.10);
}
.flame::before, .flame::after { content: ""; position: absolute; }
/* Main teardrop flame */
.flame::before {
	inset: 14% 18% 20% 16%;
	border-radius: 65% 35% 60% 40% / 50% 60% 40% 50%;
	background: radial-gradient(circle at 48% 38%, #ffe58a 0%, #ffb04a 42%, #ff6b35 70%, rgba(255, 107, 53, 0.0) 72%);
	filter: blur(1.2px);
	animation: flame-flicker 3.6s ease-in-out infinite;
}
/* Inner hot core */
.flame::after {
	inset: 30% 34% 36% 34%;
	border-radius: 60% 40% 60% 40% / 40% 60% 40% 60%;
	background: radial-gradient(circle at 50% 45%, #fff3b0 0%, #ffce5a 45%, rgba(255, 155, 30, 0.85) 70%, rgba(255, 127, 17, 0.0) 72%);
	filter: blur(0.5px);
	animation: core-pulse 2.8s ease-in-out infinite;
}
@keyframes flame-flicker {
	0%, 100% { transform: translateY(0) scale(1.02); opacity: 0.95; }
	35% { transform: translateY(-3px) scale(1.06); opacity: 0.9; }
	65% { transform: translateY(2px) scale(0.99); opacity: 0.92; }
}
@keyframes core-pulse {
	0%, 100% { transform: scale(1); opacity: 0.95; }
	50% { transform: scale(0.97); opacity: 0.85; }
}

/* Sections */
section { padding: 40px 0; }
h2 { font-size: 28px; margin: 0 0 16px; }
.price-note { color: var(--muted); margin-top: -6px; }

/* Ensure in-page links stop below the fixed header */
#apply { scroll-margin-top: 85px; }
#courses { scroll-margin-top: 100px; }
#how-it-works { scroll-margin-top: 100px; }

.course-grid { display: grid; grid-template-columns: repeat( auto-fit, minmax(240px, 1fr) ); gap: 16px; margin-top: 18px; }
.course-card {
    background: linear-gradient(180deg, var(--card), var(--elev));
    border: 1px solid #e6ebf2;
    border-radius: 14px; padding: 16px;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.05);
}
.course-card h3 { margin: 0 0 8px; font-size: 18px; }
.course-card p { margin: 0; color: var(--muted); }

.how-list { margin: 0; padding-left: 20px; color: var(--text); }
.how-list li { margin: 6px 0; }

/* Form */
form { margin-top: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.form-field { grid-column: span 6; display: flex; flex-direction: column; gap: 6px; }
.form-field.checkbox-field { grid-column: span 12; flex-direction: row; align-items: center; gap: 10px; }
.phone-field { grid-column: span 6; }
.address1-field { grid-column: span 6; }
.address2-field { grid-column: span 6; }
.message-field { grid-column: span 4; }
.form-grid .form-field:has(.courses-fieldset) { grid-column: span 8; }
.form-grid .form-field:has(#country),
.form-grid .form-field:has(#city),
.form-grid .form-field:has(#postcode) { grid-column: span 4; }
.phone-row { display: grid; grid-template-columns: 220px 1fr; gap: 8px; }
.phone-col { display: flex; flex-direction: column; }
.phone-col .error { display: none; margin-top: 6px; }
/* Custom country code dropdown */
.country-code-wrapper {
	position: relative;
}

#countryCode {
	background-image: linear-gradient(45deg, transparent 50%, #9aa4b2 50%), linear-gradient(135deg, #9aa4b2 50%, transparent 50%);
	background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 40px;
}

.country-code-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border: 1px solid #d3dbe7;
	border-radius: 10px;
	box-shadow: 0 8px 20px rgba(2, 6, 23, 0.1);
	z-index: 1000;
	display: none;
	max-height: 300px;
	overflow: hidden;
}

.country-code-dropdown.show {
	display: block;
}

.country-code-search {
	padding: 12px;
	border-bottom: 1px solid #e6ebf2;
}

.country-code-search input {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #d3dbe7;
	border-radius: 6px;
	font-size: 14px;
}

.country-code-options {
	max-height: 240px;
	overflow-y: auto;
}

.country-option {
	padding: 10px 12px;
	cursor: pointer;
	border-bottom: 1px solid #f1f4f8;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.country-option:hover {
	background: #f8fafc;
}

.country-option:last-child {
	border-bottom: none;
}

.country-option.hidden {
	display: none;
}
.courses-fieldset { border: 1px solid #334155; border-radius: 12px; padding: 12px; margin-top: 19px; }
.courses-fieldset legend { padding: 0 6px; color: var(--muted); }
.courses-checkboxes { display: grid; grid-template-columns: repeat( 3, minmax(200px, 1fr) ); gap: 10px 12px; }
/* Tidy pill-style course options */
.courses-checkboxes label {
	display: flex; align-items: center; gap: 10px;
	background: #fafcff; border: 1px solid #dbe2ee; border-radius: 12px;
	padding: 10px 12px; margin: 0; font-size: 14px; line-height: 1.35;
	box-shadow: 0 1px 2px rgba(2, 6, 23, 0.04);
	text-wrap: balance;
	min-height: 48px;
}
.courses-checkboxes input[type="checkbox"] { flex-shrink: 0; accent-color: var(--primary); }
/* Make notes visually align with courses height */
.message-field textarea { min-height: 164px; }

select#countryCode { max-height: 280px; overflow-y: auto; }
.form-field label { font-weight: 600; }
.form-field input, .form-field select, .form-field textarea {
    background: #ffffff;
    color: var(--text);
    border: 1px solid #d3dbe7;
    border-radius: 10px;
    padding: 12px 12px;
    outline: none;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 4px var(--ring); }
.error { color: #fca5a5; min-height: 16px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.price-inline { color: var(--muted); margin: 0; }
.form-status { margin-top: 10px; }

/* Summary alert for validation */

.form-alert {
	margin: 12px 0;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid rgba(239, 68, 68, 0.25);
	background: #fff5f5;
	color: #b91c1c;
}
.form-alert ul { margin: 6px 0 0; padding-left: 20px; }
.form-alert strong { color: #fca5a5; }

/* Hide inline errors when using summary alert */
.error { display: none; color: #b91c1c; min-height: 16px; }

/* Success popup */
.success-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	backdrop-filter: blur(4px);
}

.success-popup-content {
	background: white;
	border-radius: 16px;
	padding: 40px;
	text-align: center;
	max-width: 400px;
	width: 90%;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
	from {
		opacity: 0;
		transform: scale(0.8) translateY(-20px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.success-icon {
	width: 60px;
	height: 60px;
	background: #10b981;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30px;
	color: white;
	margin: 0 auto 20px;
	font-weight: bold;
}

.success-popup h3 {
	color: var(--text);
	margin: 0 0 12px;
	font-size: 24px;
	font-weight: 700;
}

.success-popup p {
	color: var(--muted);
	margin: 0 0 24px;
	line-height: 1.5;
}

.success-popup .btn {
	margin: 0;
}

/* Footer */
.site-footer { border-top: 1px solid rgba(2, 6, 23, 0.08); margin-top: 20px; background: linear-gradient(180deg, transparent, #f2f5fb 60%); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; flex-wrap: wrap; gap: 20px; }
.footer-left { flex: 1; }
.footer-brand { margin: 0; }
.muted { color: var(--muted); }

/* Social media links */
.footer-social {
	display: flex;
	gap: 16px;
	align-items: center;
}

/* CPD Certification */
.footer-certification {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: 20px;
}

.cpd-certificate {
	height: 35px;
	width: auto;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s ease;
}

.cpd-certificate:hover {
	transform: scale(1.05);
}

.certification-text {
	font-size: 10px;
	line-height: 1.3;
	color: var(--muted);
	margin: 0;
}

.certification-text a {
	color: var(--primary);
	text-decoration: none;
	font-weight: 500;
}

.certification-text a:hover {
	text-decoration: underline;
}

.cert-number {
	font-weight: 600;
	color: var(--primary);
	font-family: monospace;
}

.social-link {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--muted);
	text-decoration: none;
	padding: 8px 12px;
	border-radius: 8px;
	transition: all 0.2s ease;
	font-size: 14px;
	font-weight: 500;
}

.social-link:hover {
	color: var(--primary);
	background-color: rgba(255, 107, 53, 0.1);
	transform: translateY(-1px);
}

.social-link svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* Responsive */
/* Mobile responsiveness */
@media (max-width: 768px) {
	.header-inner {
		padding: 12px 0;
		gap: 16px;
	}
	
	.brand {
		gap: 8px;
	}
	
	.brand-logo { width: 32px; height: 32px; }
	.brand-name { font-size: 18px; }
	
	.site-nav {
		gap: 16px;
	}
	
	.site-nav ul {
		gap: 16px;
	}
	
	.site-nav a {
		font-size: 14px;
	}
	
	.btn-small { 
		padding: 8px 12px; 
		font-size: 13px; 
	}
	
	.header-controls {
		gap: 8px;
		margin-left: 12px;
	}
	
	.currency-select {
		font-size: 10px;
		padding: 4px 6px;
		min-width: 45px;
	}
	
	.lang-btn {
		padding: 4px 8px;
		font-size: 11px;
	}
	
	/* Footer mobile adjustments */
	.footer-inner {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 16px;
	}
	
	.footer-left {
		order: 2;
	}
	
	.footer-social {
		order: 1;
		gap: 12px;
	}
	
	.footer-certification {
		order: 3;
		margin-left: 0;
		margin-top: 8px;
		flex-direction: column;
		text-align: center;
		gap: 8px;
	}
	
	.cpd-certificate {
		height: 30px;
	}
	
	.social-link {
		padding: 6px 10px;
		font-size: 13px;
	}
	
	.social-link svg {
		width: 18px;
		height: 18px;
	}
}

@media (max-width: 900px) {
	.hero-inner { grid-template-columns: 1fr; }
	.hero-art { order: -1; }
}
@media (max-width: 900px) {
	.courses-checkboxes { grid-template-columns: repeat(2, minmax(200px, 1fr)); }
}
@media (max-width: 640px) {
	/* Header adjustments for very small screens */
	.header-inner {
		flex-wrap: wrap;
		gap: 12px;
	}
	
	.brand {
		flex-shrink: 0;
	}
	
	.site-nav {
		order: 3;
		width: 100%;
		justify-content: center;
		margin-top: 8px;
	}
	
	.site-nav ul {
		gap: 12px;
	}
	
	.header-controls {
		order: 2;
		margin-left: auto;
		margin-right: 0;
	}
	
	/* Form adjustments */
	.form-field { grid-column: span 12; }
	.btn { width: 100%; }
	.phone-row { grid-template-columns: 1fr; }
	.phone-field { grid-column: span 12; }
	.address1-field, .address2-field, .message-field { grid-column: span 12; }
	.message-field textarea { min-height: 140px; }
	.courses-checkboxes { grid-template-columns: 1fr; }
}

