/*
Theme Name: ICAO Aviation English
Theme URI: https://icaotest.org
Author: ICAO Aviation English
Description: Lightweight block theme for icaotest.org. Colours, type and spacing live in theme.json, every page is built from core blocks and editable in the Site Editor, and the Inter font is self-hosted. Site features (enquiry form, cookie notice, search and social meta) live in the companion ICAO Site plugin.
Version: 2.0.3
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: icao-aviation
Tags: block-patterns, full-site-editing, one-column, custom-colors, editor-style, education
*/

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Jumps to #courses, #fees and so on stop below the sticky header (and the admin bar when logged in). */
html { scroll-behavior: smooth; scroll-padding-top: calc(4.5rem + var(--wp-admin--admin-bar--height, 0px)); -webkit-text-size-adjust: 100%; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
html, body { overflow-x: clip; }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
:where(.wp-site-blocks) > footer { margin-block-start: 0; }
.wp-block-post-content > .alignfull { margin-block: 0; }
/* Leads keep a readable line length where they sit in normal flow (section intros, columns). Placed
   straight inside a constrained group they take that group's content width, like any paragraph. */
.is-layout-flow > .lead { max-width: 62ch; }
.spaced { margin-block-start: 2.2rem !important; }
.spaced-lg { margin-block-start: 3.4rem !important; }

/* Block styles registered in functions.php */
.is-style-kicker { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wp--preset--color--brand); }
.is-style-note { background: #fff7e6; border: 1px dashed var(--wp--preset--color--accent); border-radius: 12px; padding: 0.9rem 1.1rem; font-size: 0.88rem; color: #6b4a00; margin-bottom: 1.6rem; }
.wp-block-group.is-style-card, .wp-block-quote.is-style-card, .wp-block-details.is-style-card { background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--line); border-radius: 16px; padding: clamp(18px, 2.2vw, 26px); box-shadow: var(--wp--preset--shadow--card); }
.wp-block-group.is-style-card > * { margin-block: 0; }
.wp-block-group.is-style-card > * + * { margin-block-start: 0.4rem; }
.wp-block-group.is-style-card p { color: var(--wp--preset--color--ink-soft); }

/* Buttons */
.wp-element-button, .wp-block-button__link { transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover { transform: translateY(-2px); }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; border: 2px solid currentColor; color: var(--wp--preset--color--brand); box-shadow: none; padding: 0.85rem 1.4rem; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--brand); border-color: var(--wp--preset--color--brand); color: var(--wp--preset--color--white); }
.wp-block-button.is-style-outline > .wp-block-button__link.has-white-color:hover { background: rgba(255, 255, 255, 0.08); border-color: currentColor; }

/* ---------- Header ---------- */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; } }
@media screen and (max-width: 600px) { body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }
.site-header { background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--wp--preset--color--line); }
.site-header .bar { gap: 1rem; padding-block: 0.7rem; }
.brand { position: relative; padding-left: 52px; min-height: 40px; display: flex; flex-direction: column; justify-content: center; }
.brand > * { margin: 0 !important; }
.brand::before { content: "AE"; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 11px; background: var(--wp--preset--gradient--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; letter-spacing: 0.02em; }
.brand .wp-block-site-title a::after { content: ""; position: absolute; inset: 0; }
.nav-desktop { display: none !important; }
.nav-desktop .wp-block-navigation__container { gap: 1.3rem; }
.nav-desktop .wp-block-navigation-item__content:hover, .footer-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--brand); }
.header-cta .wp-block-button__link { padding: 0.6rem 1.05rem; font-size: 0.9rem; }
.nav-mobile { position: relative; }
.nav-mobile > summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border: 1px solid var(--wp--preset--color--line); border-radius: 12px; display: grid; place-items: center; font-size: 0; color: transparent; }
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile > summary::before { content: "\2630"; font-size: 1.2rem; color: var(--wp--preset--color--ink); }
.nav-mobile .panel { position: absolute; right: 0; top: 52px; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 14px; box-shadow: var(--wp--preset--shadow--card); padding: 0.6rem; min-width: 210px; display: grid; margin: 0; }
.nav-mobile .panel > * { margin: 0 !important; }
.nav-mobile .wp-block-navigation__container { gap: 0; align-items: stretch; }
.nav-mobile .wp-block-navigation-item, .nav-mobile .wp-block-navigation-item__content { width: 100%; }
.nav-mobile .panel a { display: block; padding: 0.62rem 0.8rem; border-radius: 9px; color: var(--wp--preset--color--ink); text-decoration: none; font-weight: 600; }
.nav-mobile .panel a:hover { background: var(--wp--preset--color--surface); }
@media (min-width: 980px) { .nav-desktop { display: flex !important; } .nav-mobile { display: none; } }
@media (max-width: 560px) { .site-header .wp-block-site-tagline, .site-header .header-cta { display: none !important; } .wp-block-site-title { font-size: 0.98rem !important; } }

/* ---------- Home: hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 400px at 80% 0%, rgba(14, 92, 138, 0.55), transparent 70%); pointer-events: none; }
.hero > * { position: relative; z-index: 2; }
.hero h1 { color: #fff; }
.hero .lead { max-width: 56ch; }
.hero .cta-row { margin-block: 1.6rem 1rem !important; gap: 0.8rem; }
.hero .note { font-size: 0.9rem; max-width: 52ch; }
.hero-media { position: relative; }
.hero-media .wp-block-image { margin: 0; }
.hero-media .wp-block-image img { border-radius: 20px; box-shadow: var(--wp--preset--shadow--photo); }
.hero-badge { position: absolute; left: -8px; bottom: -18px; background: #fff; color: var(--wp--preset--color--ink); border-radius: 14px; padding: 0.75rem 1rem; box-shadow: var(--wp--preset--shadow--card); font-weight: 700; font-size: 0.86rem; max-width: 230px; margin: 0 !important; z-index: 3; }
.hero-badge p { margin: 0; line-height: 1.4; }
.hero-badge strong { display: block; font-size: 1.45rem; color: var(--wp--preset--color--brand); line-height: 1.1; }
@media (max-width: 560px) {
	.hero-badge { position: static; margin-top: 1rem !important; max-width: none; }
	.cta-row .wp-block-button, .cta-row .wp-block-button__link { width: 100%; }
}

/* Two-column sections */
.wp-block-columns.split { margin-bottom: 0; }
.split .wp-block-image { margin: 0; }
.media img, .wp-block-image.media img { border-radius: 16px; }

/* Stats strip */
.stats { gap: 1px !important; background: var(--wp--preset--color--line); border-block: 1px solid var(--wp--preset--color--line); margin-block: 0 !important; }
.stats .stat { background: var(--wp--preset--color--surface); padding: 1.4rem 1.1rem; text-align: center; }
.stats .stat > * { margin: 0; }
.stat-number { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; color: var(--wp--preset--color--brand); letter-spacing: -0.03em; line-height: 1.2; }
.stat-label { font-size: 0.86rem; color: var(--wp--preset--color--ink-soft); max-width: 22ch; margin: 0.25rem auto 0 !important; }

/* Cards */
.num { font-size: 0.78rem !important; font-weight: 800; color: var(--wp--preset--color--accent) !important; letter-spacing: 0.14em; }
.level { border-top: 5px solid var(--wp--preset--color--brand) !important; }
.level .tag { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; background: #e8f2f9; color: var(--wp--preset--color--brand-dark) !important; padding: 0.28rem 0.6rem; border-radius: 999px; margin-bottom: 0.3rem !important; }
.level h3 em { font-style: normal; font-size: 0.9rem; font-weight: 600; color: var(--wp--preset--color--ink-soft); }
.level .retest { margin-top: 1rem !important; padding-top: 0.8rem; border-top: 1px dashed var(--wp--preset--color--line); font-size: 0.85rem; }
.intro-center { text-align: center; }
.stack > * { margin: 0; }

/* Courses */
.wp-block-group.is-style-card.course { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.course > .wp-block-image { margin: 0; }
.course > .wp-block-image img { border-radius: 0; }
.course .body { padding: clamp(18px, 2.2vw, 24px); display: flex; flex-direction: column; flex: 1; margin: 0 !important; }
.course .body > * { margin: 0; }
.course .body > * + * { margin-top: 0.4rem; }
.course .who { font-size: 0.8rem; font-weight: 700; color: var(--wp--preset--color--brand) !important; text-transform: uppercase; letter-spacing: 0.08em; }
.course ul { margin: 0.9rem 0 0; padding-left: 1.1rem; color: var(--wp--preset--color--ink-soft); font-size: 0.94rem; }
.course li { margin-bottom: 0.35rem; }
.course .len { margin-top: auto !important; padding-top: 1rem; font-size: 0.85rem; font-weight: 600; }

/* About */
.who-row { gap: 1rem; margin-bottom: 1.4rem; }
.who-row .avatar { width: 104px; height: 104px; flex: 0 0 104px; border-radius: 50%; display: grid; place-items: center; background: var(--wp--preset--gradient--brand); color: #fff; font-weight: 800; font-size: 1.5rem; box-shadow: var(--wp--preset--shadow--card); margin: 0; }
.who-name > * { margin: 0 !important; }
.who-name strong { font-size: 1.05rem; }
.who-role { font-size: 0.86rem; color: var(--wp--preset--color--ink-soft); }
.split .wp-block-column > .is-style-card { margin-top: 1.4rem; }
.quals { padding-left: 1.1rem; margin: 0; color: var(--wp--preset--color--ink-soft); }
.quals li { margin-bottom: 0.4rem; }

/* Testimonials */
.wp-block-quote.is-style-card { border-left: 4px solid var(--wp--preset--color--accent); margin: 0; }
.wp-block-quote.is-style-card p { font-size: 1.02rem; color: var(--wp--preset--color--ink); margin: 0; }
.wp-block-quote.is-style-card cite { display: block; margin-top: 0.9rem; font-size: 0.86rem; font-style: normal; font-weight: 600; color: var(--wp--preset--color--ink-soft); }

/* Post cards (home, blog, more posts) */
.post-cards > .wp-block-post { position: relative; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 16px; box-shadow: var(--wp--preset--shadow--card); transition: transform 0.15s ease; }
.post-cards > .wp-block-post:hover { transform: translateY(-3px); }
.post-cards .wp-block-post-featured-image { margin: 0; }
.post-cards .wp-block-post-featured-image img { border-radius: 0; }
.post-cards .body { padding: clamp(16px, 2vw, 22px); margin: 0 !important; }
.post-cards .body > * { margin: 0; }
.post-cards .wp-block-post-title { margin: 0.4rem 0 0.35rem; font-size: var(--wp--preset--font-size--large); }
.post-cards .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.post-cards .wp-block-post-excerpt__excerpt { color: var(--wp--preset--color--ink-soft); margin: 0; }
.wp-block-query-pagination { margin-top: 2.4rem; font-weight: 700; gap: 1rem; }

/* Fees */
.wp-block-group.is-style-card.fee { display: flex; flex-direction: column; position: relative; }
.fee.is-featured { border-color: var(--wp--preset--color--brand) !important; box-shadow: var(--wp--preset--shadow--raised) !important; }
.fee .flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--wp--preset--color--brand); color: #fff !important; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.3rem 0.8rem; border-radius: 999px; white-space: nowrap; margin: 0 !important; }
.fee .price { font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-top: 0.5rem !important; color: var(--wp--preset--color--ink) !important; }
.fee .price-note { font-size: 0.85rem; font-weight: 600; margin-top: 0.4rem !important; }
.fee .ticks { list-style: none; margin: 1rem 0 !important; padding: 0; font-size: 0.92rem; color: var(--wp--preset--color--ink-soft); }
.fee .ticks li { padding-left: 1.4rem; position: relative; margin-bottom: 0.45rem; }
.fee .ticks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--wp--preset--color--accent); }
.fee .wp-block-buttons { margin-top: auto !important; }

/* FAQ */
.faq-list > * + * { margin-block-start: 0.7rem; }
.wp-block-details.is-style-card { padding: 1rem 1.15rem; border-radius: 12px; box-shadow: none; }
.wp-block-details.is-style-card > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.wp-block-details.is-style-card > summary::-webkit-details-marker { display: none; }
.wp-block-details.is-style-card > summary::after { content: "+"; font-size: 1.35rem; line-height: 1; color: var(--wp--preset--color--brand); flex: 0 0 auto; }
.wp-block-details.is-style-card[open] > summary::after { content: "-"; }
.wp-block-details.is-style-card p { margin: 0.8rem 0 0; color: var(--wp--preset--color--ink-soft); }

/* Contact */
.contact h2 { color: #fff; }
.contact a { color: var(--wp--preset--color--sky); }
.contact-list { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 0.9rem; }
.contact-list li { position: relative; padding-left: 1.9rem; font-size: 0.95rem; color: var(--wp--preset--color--mist); }
.contact-list li::before { position: absolute; left: 0; top: 0.1rem; content: "\2691"; }
.contact-list li:nth-child(2)::before { content: "\23F0"; }
.contact-list strong { display: block; color: #fff; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }
.panel-card { background: #fff; color: var(--wp--preset--color--ink); border-radius: 16px; padding: clamp(20px, 2.6vw, 30px); box-shadow: var(--wp--preset--shadow--card); }

/* ---------- Single post ---------- */
.article .back { margin-bottom: 0.2rem; }
.article .back a { font-weight: 700; text-decoration: none; }
.article .wp-block-post-title { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.article .wp-block-post-date { color: var(--wp--preset--color--ink-soft); font-size: 0.9rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.article .wp-block-post-featured-image { margin-block: 1.6rem; }
.article .wp-block-post-featured-image img { border-radius: 16px; }
.article .wp-block-post-content p { font-size: 1.06rem; }
.article .wp-block-post-content h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-block: 2.4rem 0.7rem; }
.article .wp-block-post-content ol.refs { padding-left: 1.4rem; }
.article .wp-block-post-content ol.refs li { font-size: 0.95rem; margin-bottom: 0.55rem; color: var(--wp--preset--color--ink-soft); }
.article .wp-block-post-content figure { margin-block: 1.6rem; }
.article .wp-block-post-content figure img { border-radius: 16px; }
.article .wp-block-post-content figcaption { font-size: 0.85rem; color: var(--wp--preset--color--ink-soft); }
.article .post-cta { margin-top: 2.4rem !important; }

/* Privacy table */
.cookie-table table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.cookie-table th, .cookie-table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 0.5rem; text-align: left; }
.cookie-table thead { border-bottom: 0; }
.cookie-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 2.6rem; font-size: 0.85rem; }
.site-footer > * { margin-block: 0; }
.footer-nav .wp-block-navigation__container { gap: 1rem; }
.footer-nav a { color: #a9c6da; }
.site-footer .copyright { margin-top: 1.2rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { header.wp-block-template-part, footer.wp-block-template-part, .cta-row { display: none; } }
