/* ==========================================================
   Learn Spanish — site styles
   Colours follow the original site: orange, black, white, light grey
   ========================================================== */
:root {
    --primary: #e85c0d;        /* Orange from the original site */
    --primary-dark: #c44b07;
    --primary-light: #ff8a3d;
    --primary-soft: rgba(232, 92, 13, .1);
    --nav-bg: #e85c0d;
    --dark: #111111;
    --text: #333333;
    --muted: #666666;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .08);
    --shadow-hover: 0 22px 45px rgba(0, 0, 0, .14);
    --ease: cubic-bezier(.2, .8, .2, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 { color: var(--dark); font-weight: 700; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
::selection { background: var(--primary); color: var(--white); }

/* Responsive safety: never let content (or animations starting off-screen) widen the page.
   overflow-x: clip (unlike hidden) keeps position: sticky working. */
main { overflow-x: clip; }
/* Bootstrap's g-5 gutter (3rem) is wider than the container padding on small screens */
@media (max-width: 991.98px) {
    .row.g-5 { --bs-gutter-x: 1.5rem; }
}

/* ---------- Preloader ---------- */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    background: var(--nav-bg);
    transition: opacity .5s, visibility .5s;
}
#preloader img { width: 150px; animation: logoPulse 1.4s ease-in-out infinite; }
#preloader.loaded { opacity: 0; visibility: hidden; }
.loader-dots { display: flex; gap: .5rem; }
.loader-dots span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--white);
    animation: dotBounce 1s infinite ease-in-out;
}
.loader-dots span:nth-child(2) { animation-delay: .15s; }
.loader-dots span:nth-child(3) { animation-delay: .3s; }

@keyframes logoPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes dotBounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-10px); opacity: 1; } }

/* ---------- Buttons ---------- */
.btn { border-radius: 50px; font-weight: 600; transition: all .3s var(--ease); }
.btn-lg { padding: .8rem 1.8rem; font-size: 1rem; }
.btn-accent { background: var(--primary); color: var(--white); border: none; }
.btn-accent:hover, .btn-accent:focus { background: var(--primary-dark); color: var(--white); transform: translateY(-2px); box-shadow: 0 10px 25px rgba(232, 92, 13, .35); }
.btn-primary-custom { background: var(--dark); color: var(--white); padding: .7rem 1.6rem; }
.btn-primary-custom:hover { background: var(--primary); color: var(--white); transform: translateY(-2px); }
.btn-outline-light:hover { transform: translateY(-2px); }
.btn-light { color: var(--primary); }
.btn-light:hover { color: var(--primary-dark); transform: translateY(-2px); }

/* Shine sweep on hover */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-20deg);
}
.btn-shine:hover::after { animation: shine .8s; }
@keyframes shine { to { left: 130%; } }

/* Pulsing ring for the main call to action */
.pulse { animation: pulseRing 2.2s infinite; }
@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(232, 92, 13, .6); }
    70% { box-shadow: 0 0 0 16px rgba(232, 92, 13, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 92, 13, 0); }
}


/* ---------- Top bar above the menu: day, date, live time (scrolls away; the menu stays sticky) ---------- */
.top-bar { background: var(--dark); color: rgba(255,255,255,.85); font-size: .85rem; font-weight: 600; }
.top-bar .container { display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; padding-top: .45rem; padding-bottom: .45rem; }
.top-bar i { color: var(--nav-bg); margin-right: .35rem; }
#topTime { font-variant-numeric: tabular-nums; }   /* digits keep the same width, so the text doesn't jump every second */
@media (max-width: 575.98px) {
    .top-bar { font-size: .75rem; }
    .top-bar .container { justify-content: space-between; gap: .75rem; }
}

/* ---------- Navbar ---------- */
.main-nav {
    background: var(--nav-bg);
    box-shadow: 0 2px 15px rgba(0,0,0,.12);
    padding: .4rem 0;
    transition: padding .3s, box-shadow .3s;
}
.main-nav.scrolled { padding: .15rem 0; box-shadow: 0 6px 25px rgba(0,0,0,.2); }
.navbar-brand { padding: 0; margin-right: 1.5rem; display: flex; align-items: center; gap: .75rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; color: var(--white); }
.brand-name { font-size: 1.85rem; font-weight: 700; letter-spacing: -.01em; }
.brand-call { font-size: 1rem; font-weight: 700; margin-top: .2rem; }
.main-nav.scrolled .brand-name { font-size: 1.5rem; }
.brand-name { transition: font-size .3s; }
/* 8 menu tabs: on 1200–1399px laptops show just the logo (no text) and tighten the tabs; below 1200px the ☰ menu is used */
@media (max-width: 1399.98px) and (min-width: 1200px) {
    .brand-text { display: none; }
    .main-nav .nav-link { font-size: .92rem; padding: .5rem .55rem !important; }
    .main-nav .nav-link::before { left: .55rem; right: .55rem; }
}
@media (max-width: 575.98px) { .brand-name { font-size: 1.35rem; } .brand-call { font-size: .8rem; } }
.site-logo { height: 72px; width: auto; display: block; transition: height .3s, transform .3s; }
.main-nav.scrolled .site-logo { height: 54px; }
@media (max-width: 991.98px) { .site-logo { height: 58px; } }

.main-nav .nav-link {
    position: relative;
    color: var(--white);
    font-weight: 600;
    font-size: .95rem;
    padding: .5rem .7rem !important;
}
/* Animated underline */
.main-nav .nav-link::before {
    content: '';
    position: absolute;
    left: .7rem; right: .7rem; bottom: .2rem;
    height: 2px;
    background: var(--dark);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--ease);
}
.main-nav .nav-link:hover::before, .main-nav .nav-link.active::before { transform: scaleX(1); }
.main-nav .nav-link:hover, .main-nav .nav-link:focus, .main-nav .nav-link.show, .main-nav .nav-link.active { color: var(--dark); }

.main-nav .dropdown-menu {
    border: none;
    border-top: 3px solid var(--dark);
    border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow-hover);
    padding: .5rem;
    min-width: 270px;
}
.main-nav .dropdown-item { border-radius: 8px; font-size: .9rem; padding: .45rem .9rem; transition: all .2s; white-space: normal; }
.main-nav .dropdown-item:hover, .main-nav .dropdown-item.active { background: var(--primary-soft); color: var(--primary); padding-left: 1.2rem; }
.navbar-toggler { border: none; font-size: 1.5rem; color: var(--white); }
.navbar-toggler:focus { box-shadow: none; }

/* Nested sub-menus (e.g. Spanish Phrases → Spanish Supermarket → …) */
.dropdown-submenu { position: relative; }
.dropdown-submenu > .submenu-toggle { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.dropdown-submenu > .submenu-toggle::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: .75rem;
    transition: transform .2s;
}
.main-nav .submenu { border-top: none; border-left: 3px solid var(--primary); border-radius: 0 12px 12px 12px; }

@media (min-width: 1200px) {
    .main-nav .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; animation: dropIn .25s var(--ease); }
    .main-nav .submenu { top: -.5rem; left: 100%; margin-left: .25rem; }
    .dropdown-submenu:hover > .submenu { display: block; animation: dropIn .2s var(--ease); }
    /* Long lists of pages (no further sub-menus) scroll instead of running off short screens */
    .main-nav .submenu:not(:has(.dropdown-submenu)) { max-height: calc(100vh - 20px); overflow-y: auto; }
    /* Keep a hover bridge so the submenu doesn't close in the gap */
    .dropdown-submenu::after { content: ''; position: absolute; top: 0; right: -.5rem; width: .5rem; height: 100%; }
}
@keyframes dropIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1199.98px) {
    .main-nav .navbar-collapse { padding: .5rem 0 1rem; max-height: calc(100vh - 80px); overflow-y: auto; }
    .main-nav .nav-link::before { display: none; } /* no underline in the phone menu */
    .main-nav .dropdown-menu { box-shadow: none; }
    .main-nav .submenu { position: static; margin: .25rem 0 .25rem 1rem; box-shadow: none; }
    .dropdown-submenu.open > .submenu { display: block; }
    .dropdown-submenu.open > .submenu-toggle::after { transform: rotate(90deg); }
}


/* ---------- Floating letters (decorative) ---------- */
.floating-letters { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.floating-letters span {
    position: absolute;
    font-size: 3.5rem;
    font-weight: 800;
    color: rgba(255,255,255,.06);
    animation: floatY 9s ease-in-out infinite;
}
.floating-letters span:nth-child(1) { top: 12%; left: 6%; }
.floating-letters span:nth-child(2) { top: 65%; left: 12%; font-size: 5rem; animation-delay: -2s; }
.floating-letters span:nth-child(3) { top: 20%; left: 46%; font-size: 2.5rem; animation-delay: -4s; }
.floating-letters span:nth-child(4) { top: 75%; left: 52%; animation-delay: -1s; }
.floating-letters span:nth-child(5) { top: 8%; right: 8%; font-size: 4.5rem; animation-delay: -3s; }
.floating-letters span:nth-child(6) { top: 55%; right: 4%; animation-delay: -5s; }
.floating-letters span:nth-child(7) { top: 85%; right: 30%; font-size: 3rem; animation-delay: -6s; }
@keyframes floatY {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-25px) rotate(8deg); }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 6rem 0 8rem;
    color: var(--white);
    background: var(--dark);
    overflow: hidden;
}
.hero-blob { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.blob-1 { width: 420px; height: 420px; background: rgba(232, 92, 13, .45); top: -80px; right: -60px; animation: blobMove 12s ease-in-out infinite; }
.blob-2 { width: 300px; height: 300px; background: rgba(232, 92, 13, .25); bottom: -100px; left: 10%; animation: blobMove 15s ease-in-out infinite reverse; }
@keyframes blobMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 30px) scale(1.1); }
    66% { transform: translate(30px, -20px) scale(.95); }
}
.hero-title { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.15; color: var(--white); margin-bottom: 1rem; font-weight: 800; }
.hero-title span {
    color: var(--primary);
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 4s linear infinite;
}
@keyframes gradientText { to { background-position: 200% center; } }

.typed-line { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; min-height: 2.4rem; }
.typed-word { color: var(--primary-light); }
.typed-cursor { color: var(--primary-light); animation: blink .8s step-end infinite; margin-left: 2px; }
.typed-meaning {
    display: inline-block;
    font-size: .95rem;
    font-weight: 400;
    color: rgba(255,255,255,.6);
    margin-left: .5rem;
    transition: opacity .3s;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-lead { font-size: 1.1rem; color: rgba(255,255,255,.85); max-width: 560px; }
.hero-contact { display: inline-flex; align-items: center; gap: .9rem; }
.hero-contact > i {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 1.2rem;
    animation: ring 2.5s ease-in-out infinite;
}
@keyframes ring {
    0%, 60%, 100% { transform: rotate(0); }
    65%, 75%, 85% { transform: rotate(-15deg); }
    70%, 80%, 90% { transform: rotate(15deg); }
}
.hero-contact small { display: block; color: rgba(255,255,255,.7); }
.hero-contact a { color: var(--white); font-weight: 700; font-size: 1.15rem; }

.hero-image { position: relative; z-index: 1; max-width: 500px; margin: 0 auto; }
.hero-ring {
    position: absolute;
    inset: -18px;
    border: 2px dashed rgba(232, 92, 13, .6);
    border-radius: 26px;
    animation: spinSlow 30s linear infinite;
    z-index: -1;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
.hero-image img {
    width: 100%;
    border-radius: 20px;
    border: 6px solid var(--white);
    box-shadow: 0 25px 50px rgba(0,0,0,.4);
}
.hero-image-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--white);
    color: var(--dark);
    padding: .75rem 1.1rem;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,.25);
    animation: floatY 5s ease-in-out infinite;
}
.badge-bottom { left: -1.5rem; bottom: -1.5rem; }
.badge-top { right: -1.5rem; top: -1.5rem; animation-delay: -2.5s; }
.hero-image-badge i {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: var(--primary);
    color: var(--white);
}
.hero-image-badge strong { display: block; font-size: .95rem; line-height: 1.2; }
.hero-image-badge small { color: var(--muted); }
@media (max-width: 575.98px) {
    .badge-bottom { left: .5rem; bottom: -1.25rem; }
    .badge-top { right: .5rem; top: -1.25rem; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
    position: relative;
    padding: 4.5rem 0 4rem;
    background:
        radial-gradient(circle at 90% 20%, rgba(232, 92, 13, .45) 0%, transparent 40%),
        radial-gradient(circle at 5% 100%, rgba(232, 92, 13, .25) 0%, transparent 35%),
        var(--dark);
    color: var(--white);
    overflow: hidden;
}
.page-hero h1 { color: var(--white); font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; margin-bottom: .75rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.page-hero .lead { color: rgba(255,255,255,.8); max-width: 720px; margin: 0; }
.page-hero .breadcrumb { margin-bottom: 1rem; font-size: .9rem; }
.page-hero .breadcrumb a { color: rgba(255,255,255,.75); }
.page-hero .breadcrumb a:hover { color: var(--primary-light); }
.page-hero .breadcrumb-item.active { color: var(--primary-light); }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }
.hero-flag { width: 64px; height: auto; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }

/* ---------- Stats ---------- */
.stats { margin-top: -3.5rem; position: relative; z-index: 2; }
.stats .row { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-hover); overflow: hidden; }
.stat { padding: 1.75rem 1rem; border-right: 1px solid #eee; transition: background .3s; }
.stat:hover { background: var(--primary-soft); }
.stat:last-child { border-right: none; }
.stat-icon { font-size: 1.4rem; color: var(--primary); margin-bottom: .4rem; transition: transform .4s; }
.stat:hover .stat-icon { transform: scale(1.25) rotate(-8deg); }
.stat-value { font-size: 2.1rem; font-weight: 800; color: var(--dark); line-height: 1.2; }
.stat-label { font-size: .88rem; color: var(--muted); }
@media (max-width: 767.98px) {
    .stat:nth-child(2) { border-right: none; }
    .stat:nth-child(-n+2) { border-bottom: 1px solid #eee; }
}

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; position: relative; }
.section-alt { background: var(--light-bg); }
.section-heading { max-width: 660px; margin: 0 auto 3rem; }
.section-heading h2, .section h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.section-heading p { color: var(--muted); }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--primary);
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: .6rem;
}
.eyebrow::before { content: ''; width: 24px; height: 2px; background: currentColor; }
.eyebrow-light { color: var(--primary-light); }

/* ---------- Feature cards ---------- */
.feature-card {
    position: relative;
    background: var(--white);
    border: 1px solid #ececec;
    border-radius: var(--radius);
    padding: 2rem;
    overflow: hidden;
    transition: transform .4s var(--ease), box-shadow .4s, border-color .4s;
}
.feature-card::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s var(--ease);
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); border-color: transparent; }
.feature-card:hover::after { transform: scaleX(1); }
.feature-icon {
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 18px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
    transition: all .4s var(--ease);
}
.feature-card:hover .feature-icon { background: var(--primary); color: var(--white); transform: rotate(-8deg) scale(1.08); border-radius: 50%; }
.feature-card h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.feature-card p { margin: 0; font-size: .95rem; }

/* ---------- Flip cards ---------- */
.flip-card { perspective: 1000px; height: 170px; cursor: pointer; outline: none; }
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform .7s var(--ease); transform-style: preserve-3d; }
.flip-card:hover .flip-inner, .flip-card:focus .flip-inner, .flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border-radius: var(--radius);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: var(--shadow);
    padding: 1rem;
    text-align: center;
}
.flip-front { background: var(--white); border: 2px solid var(--primary-soft); }
.flip-front i { font-size: 1.8rem; color: var(--primary); }
.flip-front span { font-weight: 800; font-size: 1.15rem; color: var(--dark); }
.flip-front small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.flip-back { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--white); transform: rotateY(180deg); }
.flip-back span { font-weight: 700; font-size: 1.15rem; }
.flip-back .speak-btn { background: rgba(255,255,255,.2); color: var(--white); margin: 0; }

/* ---------- Speak button ---------- */
.speak-btn {
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .8rem;
    margin-right: .5rem;
    vertical-align: middle;
    transition: all .25s;
}
.speak-btn:hover { background: var(--primary); color: var(--white); transform: scale(1.12); }
.speak-btn.speaking { background: var(--primary); color: var(--white); animation: pulseRing 1s infinite; }
.speak-btn.demo { width: 24px; height: 24px; font-size: .7rem; margin: 0 .2rem; cursor: default; }
.no-speech .speak-btn, .no-speech .audio-hint { display: none !important; }

/* ---------- Course cards ---------- */
.course-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem 1.6rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--light-bg);
    display: flex;
    flex-direction: column;
    transition: transform .4s var(--ease), border-color .3s, box-shadow .4s;
}
.course-card:hover { transform: translateY(-10px); border-top-color: var(--primary); box-shadow: var(--shadow-hover); }
.course-icon { font-size: 2.2rem; color: var(--primary); margin-bottom: 1rem; transition: transform .4s; display: inline-block; }
.course-card:hover .course-icon { transform: scale(1.15) translateY(-3px); }
.course-card h3 { font-size: 1.25rem; }
.course-card p { font-size: .93rem; }
.course-card ul { font-size: .9rem; margin-bottom: 1.25rem; }
.course-card li { margin-bottom: .35rem; }
.course-card li i { color: var(--primary); margin-right: .35rem; }
.course-link { margin-top: auto; font-weight: 700; }
.course-link i, .topic-link i { transition: transform .25s; }
.course-link:hover i, .topic-card:hover .topic-link i, .post-card:hover .topic-link i { transform: translateX(6px); }

/* ---------- Steps ---------- */
.steps-row { position: relative; }
@media (min-width: 768px) {
    .steps-row::before {
        content: '';
        position: absolute;
        /* centre of the circles: column top gap + .step padding-top + half the 80px circle */
        top: calc(var(--bs-gutter-y) + 1rem + 40px); left: 18%; right: 18%;
        border-top: 2px dashed rgba(232, 92, 13, .35);
    }
}
.step { padding: 1rem 1.5rem; position: relative; }
.step-num {
    position: relative;
    width: 80px; height: 80px;
    margin: 0 auto 1.25rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 1.6rem;
    box-shadow: 0 0 0 10px rgba(232, 92, 13, .12);
    transition: transform .4s var(--ease);
}
.step:hover .step-num { transform: scale(1.1) rotate(10deg); }
.step h3 { font-size: 1.2rem; }

/* ---------- Flag tiles ---------- */
.flag-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 1.1rem .5rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    color: var(--dark);
    font-size: .85rem;
    font-weight: 600;
    text-align: center;
    transition: all .3s var(--ease);
}
.flag-tile .flag { width: 56px; height: auto; border-radius: 6px; box-shadow: 0 4px 10px rgba(0,0,0,.15); transition: transform .4s var(--ease); }
.flag-tile:hover { background: var(--primary); color: var(--white); transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.flag-tile:hover .flag { transform: scale(1.12) rotate(-4deg); }

/* ---------- Quiz ---------- */
.quiz-section { background: var(--dark); color: rgba(255,255,255,.85); overflow: hidden; }
.quiz-section::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 92, 13, .35), transparent 70%);
    top: -150px; left: -150px;
}
.quiz-section h2 { color: var(--white); }
.quiz-section .section-heading p { color: rgba(255,255,255,.65); }
.quiz-card { position: relative; background: var(--white); color: var(--text); border-radius: 22px; box-shadow: 0 30px 60px rgba(0,0,0,.4); overflow: hidden; }
.quiz-progress { height: 6px; background: #eee; }
.quiz-progress-bar { height: 100%; width: 0; background: var(--primary); transition: width .5s var(--ease); }
.quiz-body, .quiz-result { padding: 2.25rem; }
.quiz-count { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); margin-bottom: .5rem; }
.quiz-question { font-size: 1.4rem; margin-bottom: 1.5rem; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 575.98px) { .quiz-options { grid-template-columns: 1fr; } }
.quiz-option {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.1rem;
    border: 2px solid #eee;
    border-radius: 12px;
    background: var(--white);
    font-weight: 600;
    text-align: left;
    transition: all .25s;
}
.quiz-option .opt-letter {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--light-bg);
    font-size: .85rem;
}
.quiz-option:hover:not(:disabled) { border-color: var(--primary); transform: translateX(4px); }
.quiz-option.correct { border-color: #198754; background: #e9f7ef; animation: pop .4s; }
.quiz-option.correct .opt-letter { background: #198754; color: var(--white); }
.quiz-option.wrong { border-color: #dc3545; background: #fdecee; animation: shake .4s; }
.quiz-option.wrong .opt-letter { background: #dc3545; color: var(--white); }
.quiz-body.fade-swap { animation: fadeSlide .4s var(--ease); }
.quiz-result { text-align: center; animation: fadeSlide .5s var(--ease); }
.quiz-trophy { font-size: 3.5rem; color: var(--primary); animation: bounceIn .8s var(--ease); }
@keyframes pop { 50% { transform: scale(1.05); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounceIn { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* ---------- Topic / post cards ---------- */
.topic-card, .post-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid #ececec;
    border-radius: var(--radius);
    color: var(--text);
    transition: transform .4s var(--ease), box-shadow .4s, border-color .3s;
}
.topic-card { overflow: hidden; }
.topic-card:hover, .post-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); border-color: transparent; color: var(--text); }
.topic-thumb {
    position: relative;
    height: 180px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    font-size: 2.5rem;
}
.topic-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.topic-card:hover .topic-thumb img { transform: scale(1.08); }
.thumb-flag { position: absolute; left: 1rem; bottom: 1rem; width: 44px !important; height: auto !important; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.topic-body, .post-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.topic-card h3, .post-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.topic-card p, .post-card p { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .post-excerpt { -webkit-line-clamp: 5; }
.topic-link { margin-top: auto; font-weight: 700; color: var(--primary); }
.topic-meta { font-size: .8rem; color: var(--muted); margin-bottom: .5rem; }
.post-card { overflow: hidden; border-top: 4px solid var(--primary); }

.hub-section + .hub-section { margin-top: 3.5rem; }
.hub-heading { display: flex; align-items: baseline; gap: .75rem; font-size: 1.5rem; margin-bottom: 1.5rem; padding-bottom: .75rem; border-bottom: 2px solid #eee; }
.hub-heading span { position: relative; }
.hub-heading span::after { content: ''; position: absolute; left: 0; bottom: calc(-.75rem - 2px); width: 100%; height: 2px; background: var(--primary); }
.hub-heading small { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* ---------- Video playlists ---------- */
.video-card { background: var(--white); border: 1px solid #ececec; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .4s var(--ease), box-shadow .4s; }
.video-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.video-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: none; background: var(--dark); overflow: hidden; cursor: pointer; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: transform .6s var(--ease), opacity .3s; }
.video-thumb:hover img { transform: scale(1.06); opacity: 1; }
.video-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play-btn {
    position: absolute; top: 50%; left: 50%;
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 1.4rem;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 0 rgba(232, 92, 13, .6);
    animation: pulseRing 2.2s infinite;
    transition: transform .3s var(--ease);
}
.video-thumb:hover .play-btn { transform: translate(-50%, -50%) scale(1.12); }
.video-badge { position: absolute; top: .75rem; right: .75rem; background: rgba(0,0,0,.75); color: var(--white); font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 6px; }
.video-info { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.video-tag { align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--primary); background: var(--primary-soft); padding: .2rem .6rem; border-radius: 50px; margin-bottom: .5rem; }
.video-info h3 { font-size: 1.08rem; margin-bottom: .75rem; }
.yt-link { margin-top: auto; font-size: .85rem; font-weight: 600; color: var(--muted); }
.yt-link i { color: #ff0000; }
.yt-link:hover { color: var(--dark); }

/* Magnific Popup video lightbox */
.mfp-bg { background: #000; }
.mfp-fade.mfp-bg { opacity: 0; transition: opacity .2s ease-out; }
.mfp-fade.mfp-bg.mfp-ready { opacity: .88; }
.mfp-fade.mfp-bg.mfp-removing { opacity: 0; }
.mfp-fade.mfp-wrap .mfp-content { opacity: 0; transform: scale(.94); transition: opacity .25s ease-out, transform .25s ease-out; }
.mfp-fade.mfp-wrap.mfp-ready .mfp-content { opacity: 1; transform: scale(1); }
.mfp-fade.mfp-wrap.mfp-removing .mfp-content { opacity: 0; transform: scale(.94); }
.mfp-iframe-holder .mfp-content { max-width: 1100px; }
.mfp-iframe-scaler iframe { border-radius: 12px; box-shadow: 0 25px 60px rgba(0,0,0,.6); }
.mfp-video-title { position: absolute; left: 0; right: 0; bottom: -2.5rem; color: var(--white); font-weight: 700; font-size: 1.05rem; text-align: center; }
.mfp-iframe-holder .mfp-close { width: 44px; height: 44px; line-height: 44px; top: -50px; right: 0; padding: 0; border-radius: 50%; background: var(--primary); opacity: 1; text-align: center; }
.mfp-iframe-holder .mfp-close:hover { background: var(--primary-dark); }

/* ---------- Pagination ---------- */
.pagination .page-link { color: var(--dark); border-radius: 10px !important; margin: .2rem; border: 1px solid #e5e5e5; min-width: 42px; text-align: center; }
.pagination .page-link:hover { background: var(--primary-soft); color: var(--primary); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: var(--white); }

.hub-search { position: relative; max-width: 520px; margin: 0 auto; }
.hub-search i { position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.hub-search .form-control { border-radius: 50px; padding: .85rem 1.25rem .85rem 3rem; border: 2px solid #eee; }
.hub-search .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 .25rem rgba(232, 92, 13, .12); }

/* ---------- Article pages ---------- */
.article-intro {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: var(--light-bg);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.intro-icon {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--primary);
    color: var(--white);
    font-size: 1.4rem;
}
.article-intro .lead { font-size: 1.05rem; }
.article-intro h2 { font-size: 1.25rem; line-height: 1.45; }
.audio-hint { font-size: .88rem; color: var(--muted); }
.audio-hint > i { color: var(--primary); margin-right: .3rem; }
.read-aloud-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-bottom: 2rem; }
.read-aloud-btn.reading { background: var(--dark); animation: pulseRing 1.5s infinite; }

/* Original page content */
.content-body { font-size: 1.02rem; }
.content-body h2, .content-body h3, .content-body h4, .content-body h5 { margin: 2rem 0 .9rem; line-height: 1.35; }
.content-body h2 { font-size: 1.5rem; }
.content-body h3 { font-size: 1.3rem; }
.content-body h4 { font-size: 1.18rem; padding-left: .9rem; border-left: 4px solid var(--primary); }
.content-body h5 { font-size: 1.05rem; }
.content-body > :first-child, .content-body .row > div > :first-child { margin-top: 0; }
.content-body p { margin-bottom: 1rem; }
.content-body ul, .content-body ol { padding-left: 1.4rem; margin-bottom: 1.25rem; }
.content-body li { margin-bottom: .4rem; }
.content-body li::marker { color: var(--primary); }
.content-body img { max-width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.content-body a { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(232, 92, 13, .35); text-underline-offset: 3px; }
.content-body .vocab-table { margin-bottom: 1.5rem; }
.content-body .vocab-table td:first-child strong { color: var(--primary); }
.content-body td .speak-btn { width: 26px; height: 26px; font-size: .7rem; margin-right: .4rem; }
/* Phrase pages: photo shown full width under the heading box */
/* Same look as images inside page content: rounded corners + soft shadow, no cropping */
.feature-image { margin: 0 0 1.5rem; }
.feature-image img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.content-body .vocab-table { width: 100%; }
.post-content p { font-size: 1.05rem; line-height: 1.85; }

/* English speaker buttons use a dark style so they stand apart from Spanish (orange) */
.speak-btn.speak-en { background: rgba(17, 17, 17, .08); color: var(--dark); }
.speak-btn.speak-en:hover, .speak-btn.speak-en.speaking { background: var(--dark); color: var(--white); }
.flip-speak { display: flex; gap: .75rem; margin-top: .25rem; }
.speak-pair { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 700; }
.flip-back .speak-btn.speak-en { background: rgba(255,255,255,.2); color: var(--white); }

.content-block { margin-bottom: 2.5rem; }
.content-block h2 { font-size: 1.4rem; display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.block-num {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .95rem;
}
.vocab-table { border-radius: 14px; border: 1px solid #ececec; box-shadow: var(--shadow); }
.vocab-table table { margin: 0; }
.vocab-table thead th {
    background: var(--dark);
    color: var(--white);
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .85rem 1rem;
    border: none;
}
.vocab-table td { padding: .75rem 1rem; border-color: #f0f0f0; }
.vocab-table td.es { font-weight: 700; color: var(--dark); white-space: nowrap; }
.vocab-table tbody tr { transition: background .2s; }
.vocab-table tbody tr:hover { background: var(--primary-soft); }
@media (max-width: 575.98px) { .vocab-table td.es { white-space: normal; } }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: .75rem; margin-bottom: .7rem; }
.check-list li > i { color: var(--primary); margin-top: .3rem; }

.tip-box {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: #fff7f1;
    border: 1px dashed rgba(232, 92, 13, .5);
    border-radius: 12px;
    font-size: .95rem;
}
.tip-box > i { color: var(--primary); font-size: 1.3rem; animation: glow 2s ease-in-out infinite; }
@keyframes glow { 50% { transform: scale(1.15); filter: drop-shadow(0 0 6px rgba(232, 92, 13, .6)); } }

.article-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #eee; }
.article-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 48%;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: var(--light-bg);
    color: var(--dark);
    font-weight: 600;
    font-size: .92rem;
    transition: all .3s var(--ease);
}
.article-nav-link small { display: block; color: var(--muted); font-weight: 400; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.article-nav-link.next { text-align: right; margin-left: auto; }
.article-nav-link:hover { background: var(--primary); color: var(--white); }
.article-nav-link:hover small { color: rgba(255,255,255,.8); }

.sidebar-sticky { position: sticky; top: 110px; }
.side-card { background: var(--white); border: 1px solid #ececec; border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.side-card h3 { font-size: 1.05rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.side-card h3 i { color: var(--primary); }
.side-list { list-style: none; padding: 0; margin: 0; max-height: 380px; overflow-y: auto; }
.side-list a { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 8px; color: var(--text); font-size: .9rem; transition: all .2s; }
.side-list a i { color: var(--primary); font-size: .75rem; }
.side-list a:hover, .side-list a.active { background: var(--primary-soft); color: var(--primary); padding-left: .9rem; }
.side-list a.active { font-weight: 700; }
.flag-sm { width: 22px; border-radius: 3px; }
.facts-card dl { margin: 0; }
.facts-card dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.facts-card dd { font-weight: 700; color: var(--dark); margin-bottom: .8rem; }
.facts-card dd:last-child { margin-bottom: 0; }
.cta-card { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--white); border: none; text-align: center; position: relative; overflow: hidden; }
.cta-card h3 { color: var(--white); justify-content: center; }
.cta-card-icon { font-size: 2.5rem; margin-bottom: .75rem; animation: floatY 4s ease-in-out infinite; display: inline-block; }
.cta-phone { display: block; margin-top: .9rem; color: var(--white); font-weight: 700; }
.cta-phone:hover { color: var(--dark); }

.not-found-icon { font-size: 5rem; color: var(--primary); margin-bottom: 1rem; animation: floatY 4s ease-in-out infinite; }

/* ---------- CTA band ---------- */
.cta-band { padding: 0 0 5rem; }
.cta-inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 3rem;
    border-radius: 24px;
    background: linear-gradient(120deg, var(--primary), var(--primary-dark));
    color: var(--white);
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(232, 92, 13, .3);
}
.cta-inner::before, .cta-inner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.cta-inner::before { width: 260px; height: 260px; top: -120px; right: -60px; animation: floatY 7s ease-in-out infinite; }
.cta-inner::after { width: 160px; height: 160px; bottom: -80px; left: 30%; animation: floatY 9s ease-in-out infinite reverse; }
.cta-inner > * { position: relative; z-index: 1; }
.cta-inner h2 { color: var(--white); font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .4rem; }
@media (max-width: 575.98px) { .cta-inner { padding: 2rem 1.5rem; } }

/* ---------- FAQ ---------- */
.faq-art { font-size: 8rem; line-height: 1; margin-top: 1rem; animation: floatY 6s ease-in-out infinite; }
.faq-art i { color: rgba(232, 92, 13, .15); }
.faq-accordion .accordion-item { border: 1px solid #ececec; border-radius: 14px !important; margin-bottom: .9rem; overflow: hidden; }
.faq-accordion .accordion-button { font-weight: 700; color: var(--dark); padding: 1.1rem 1.25rem; box-shadow: none; }
.faq-accordion .accordion-button:not(.collapsed) { background: var(--primary); color: var(--white); }
.faq-accordion .accordion-button:not(.collapsed)::after { filter: brightness(0) invert(1); }
.faq-accordion .accordion-button:focus { box-shadow: none; }

/* ---------- Contact ---------- */
.contact-section { background: var(--dark); color: rgba(255,255,255,.85); overflow: hidden; }
.contact-section h2 { color: var(--white); }
.contact-info li { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.contact-info i {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(232, 92, 13, .18);
    color: var(--primary-light);
    transition: all .3s;
}
.contact-info li:hover i { background: var(--primary); color: var(--white); transform: scale(1.1); }
.contact-info a { color: var(--white); }
.contact-info a:hover { color: var(--primary-light); }

.contact-tile {
    display: block;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--white);
    border: 1px solid #ececec;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text);
    transition: all .4s var(--ease);
}
.contact-tile:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); color: var(--text); }
.contact-tile-icon {
    width: 70px; height: 70px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 1.7rem;
    margin-bottom: 1rem;
    box-shadow: 0 0 0 8px var(--primary-soft);
    transition: transform .5s var(--ease);
}
.contact-tile:hover .contact-tile-icon { transform: rotateY(360deg); }
.contact-tile h3 { font-size: 1.15rem; margin-bottom: .25rem; }
.contact-tile p { margin: 0; color: var(--muted); word-break: break-word; }

.job-card {
    padding: 1.25rem 1.4rem;
    border-radius: 14px;
    background: var(--light-bg);
    border-left: 4px solid var(--primary);
    margin-bottom: 1rem;
    transition: transform .3s var(--ease), box-shadow .3s;
}
.job-card:hover { transform: translateX(6px); box-shadow: var(--shadow); }
.job-card h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.job-card h3 i { color: var(--primary); margin-right: .4rem; }
.job-card p { margin: 0; font-size: .92rem; }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border-radius: 22px; padding: 2.25rem; box-shadow: 0 20px 50px rgba(0,0,0,.15); color: var(--text); }
.contact-section .form-card { box-shadow: 0 25px 60px rgba(0,0,0,.45); }
.form-title { font-size: 1.3rem; margin-bottom: 1.25rem; }
.form-title i { color: var(--primary); margin-right: .4rem; }
.form-card .form-label { font-weight: 600; font-size: .88rem; color: var(--dark); margin-bottom: .3rem; }
.form-card .req { color: var(--primary); }
.form-card .input-group-text { background: var(--light-bg); border-color: #dddddd; color: var(--primary); width: 44px; justify-content: center; transition: all .25s; }
.form-card .input-group:focus-within .input-group-text { background: var(--primary); color: var(--white); border-color: var(--primary); }
.form-card .form-control, .form-card .form-select { border-color: #dddddd; padding: .65rem .85rem; transition: border-color .25s, box-shadow .25s; }
.form-card .form-control:focus, .form-card .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(232, 92, 13, .15); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(232, 92, 13, .15); border-color: var(--primary); }
@media (max-width: 575.98px) { .form-card { padding: 1.5rem; } }

/* jQuery Validation states */
.form-card label.error { display: block; width: 100%; color: #dc3545; font-size: .8rem; margin-top: .3rem; font-weight: 400; animation: fadeSlide .3s; }
.form-card .form-control.error, .form-card .form-select.error { border-color: #dc3545; }
.form-card .input-group:has(.error) .input-group-text { border-color: #dc3545; color: #dc3545; }
.form-card .form-control.valid, .form-card .form-select.valid { border-color: #198754; }
.form-card .form-check-input.error { border-color: #dc3545; }
.form-card .shake { animation: shake .4s; }
.form-alert { animation: fadeSlide .4s; }

/* ---------- Footer (simple, no animation) ---------- */
.site-footer { background: #000000; color: rgba(255,255,255,.65); padding: 3.5rem 0 1.5rem; font-size: .92rem; }
.footer-logo { height: 80px; width: auto; }
.site-footer h6 { color: var(--white); text-transform: uppercase; letter-spacing: .1em; font-size: .82rem; margin-bottom: 1rem; }
.site-footer ul li { margin-bottom: .5rem; }
.site-footer a { color: rgba(255,255,255,.65); }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.contact-list i { color: var(--primary); width: 22px; }
.site-footer hr { border-color: rgba(255,255,255,.15); margin: 2rem 0 1.25rem; }
.copyright { text-align: center; font-size: .85rem; }

/* ---------- Floating buttons ---------- */
.back-to-top, .whatsapp-float {
    position: fixed;
    right: 1.25rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--white);
    box-shadow: var(--shadow-hover);
    z-index: 1030;
    transition: all .3s var(--ease);
}
.back-to-top { bottom: 5.5rem; width: 44px; height: 44px; background: var(--dark); opacity: 0; visibility: hidden; transform: translateY(15px); }
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary); color: var(--white); }
.whatsapp-float { bottom: 1.25rem; width: 56px; height: 56px; background: #25d366; font-size: 1.8rem; animation: pulseGreen 2.5s infinite; }
.whatsapp-float:hover { color: var(--white); transform: scale(1.1); }
@keyframes pulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .6); }
    70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Phone layout tweaks ---------- */
@media (max-width: 767.98px) {
    .section { padding: 3rem 0; }
    .hero { padding: 3.5rem 0 6rem; }
    .page-hero { padding: 2.5rem 0 2.25rem; }
    .section-heading { margin-bottom: 2rem; }
    .cta-band { padding-bottom: 3rem; }

    /* Heading box: drop the icon so the text gets the full width */
    .article-intro { padding: 1.1rem 1.25rem; }
    .article-intro .intro-icon { display: none; }
    .article-intro h2 { font-size: 1.08rem; }

    /* Contact tiles: compact rows instead of tall cards */
    .contact-tile { display: grid; grid-template-columns: 52px 1fr; column-gap: 1rem; align-items: center; text-align: left; padding: 1rem 1.25rem; }
    .contact-tile-icon { grid-row: span 2; width: 52px; height: 52px; font-size: 1.3rem; margin: 0; box-shadow: 0 0 0 6px var(--primary-soft); }
    .contact-tile h3 { font-size: 1.05rem; margin: 0; align-self: end; }
    .contact-tile p { align-self: start; overflow-wrap: anywhere; }

    .whatsapp-float { width: 50px; height: 50px; font-size: 1.6rem; right: 1rem; bottom: 1rem; }
    .back-to-top { right: 1.4rem; bottom: 4.75rem; }
    .content-body { font-size: 1rem; }
    .vocab-table td, .vocab-table thead th { padding: .6rem .7rem; }
}

/* ---------- Phone fields with country code (intl-tel-input) ---------- */
.iti { display: block; width: 100%; }
.iti .form-control { padding-left: 66px !important; }
.iti__flag-container { padding: 1px; }
.iti__selected-flag { padding: 0 8px 0 12px; border-radius: .375rem 0 0 .375rem; background: var(--light-bg); border-right: 1px solid #dddddd; }
.iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag { background: var(--primary-soft); }
.iti__country-list { z-index: 1050; min-width: 280px; max-width: 85vw; overflow-x: hidden; border-radius: 10px; border: 1px solid #e5e5e5; box-shadow: var(--shadow-hover); font-size: .9rem; }
.iti__country.iti__highlight { background: var(--primary-soft); }
.form-card .iti:has(.error) .iti__selected-flag { border-right-color: #dc3545; }

/* ---------- Footer on phones: centred and compact ---------- */
@media (max-width: 767.98px) {
    .site-footer { padding: 2.5rem 0 8.5rem; text-align: center; font-size: .9rem; } /* bottom space for the floating buttons */
    .site-footer .row { --bs-gutter-y: 1.75rem; }
    .footer-logo { height: 64px; }
    .site-footer p.mt-3 { max-width: 320px; margin-left: auto; margin-right: auto; }
    .site-footer h6 { margin-bottom: .75rem; }
    .site-footer ul li { margin-bottom: .4rem; }
    .contact-list li { display: flex; justify-content: center; align-items: center; gap: .4rem; }
    .contact-list i { width: auto; }
    .site-footer hr { margin: 1.75rem 0 1rem; }
    .copyright { font-size: .8rem; }
}

/* Hide the sidebar "Learn faster with a teacher" card on phones (the CTA band below the page covers it) */
@media (max-width: 767.98px) {
    .side-card.cta-card { display: none; }
}

/* CTA band on phones: same look as the sidebar "Learn faster" card */
@media (max-width: 767.98px) {
    .cta-inner { flex-direction: column; align-items: stretch; text-align: center; gap: 1.25rem; padding: 2rem 1.5rem; }
    .cta-inner > .d-flex { flex-direction: column; align-items: stretch; gap: .9rem !important; }
    .cta-inner .btn-light { width: 100%; padding: .6rem 1rem; font-size: 1rem; }
    .cta-inner .btn-outline-light { border: none; background: transparent; padding: 0; font-weight: 700; font-size: 1.05rem; }
    .cta-inner .btn-outline-light:hover { color: var(--dark); transform: none; }
}

/* reCAPTCHA checkbox: scale down slightly on very narrow phones so it never overflows */
.recaptcha-box { min-height: 78px; }
.recaptcha-error { display: block; color: #dc3545; font-size: .8rem; margin-top: .3rem; }
@media (max-width: 400px) {
    .recaptcha-box { transform: scale(.88); transform-origin: left top; height: 69px; min-height: 0; }
}

/* Contact form placed inside page content: keep its own styling (not the article text styles) */
.content-body .form-card { margin-top: 1.5rem; font-size: 1rem; }
.content-body .form-card .form-title { margin: 0 0 1.25rem; }
.content-body .form-card a { font-weight: inherit; text-decoration: none; }


/* ---------- Video popup: bottom-left card (same place and style as the earlier floating video) ---------- */
.video-popup-box {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    width: 220px;
    max-width: calc(100vw - 6rem);       /* leaves room for the WhatsApp button on the right */
    z-index: 1040;
    background: var(--dark);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .35);
    animation: popupSlideUp .35s ease-out;
}
.video-popup-box[hidden] { display: none; }
.video-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .4rem .75rem;
    background: var(--primary);
    color: var(--white);
    font-size: .85rem;
    font-weight: 700;
}
.video-popup-close { border: none; background: transparent; color: var(--white); font-size: 1.4rem; line-height: 1; padding: 0 .25rem; }
.video-popup-close:hover { color: var(--dark); }
.video-popup-frame { position: relative; aspect-ratio: 9 / 16; max-height: 60vh; background: #000; }
.video-popup-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@keyframes popupSlideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 767.98px) {
    .video-popup-box { width: 150px; left: .75rem; bottom: .75rem; border-radius: 10px; }
    .video-popup-header { padding: .3rem .5rem; font-size: .72rem; }
}
/* ---------- Visitor counter: top-right card below the sticky menu (same look and float as the hero badges) ---------- */
.visitor-box {
    position: fixed;
    right: 1.5rem;
    top: 165px;                         /* top bar (~36px) + menu (~85px) + room for the 25px float (floatY) */
    z-index: 1019;                      /* just under the sticky menu (1020), so its dropdowns open on top */
    animation: visitorIn .6s cubic-bezier(.34, 1.56, .64, 1) both, floatY 5s ease-in-out .6s infinite;
}
.visitor-box[hidden] { display: none; }
.visitor-box i { position: relative; animation: glow 2.5s ease-in-out infinite; }
.visitor-box strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.visitor-box small { display: flex; align-items: center; gap: .35rem; }
/* Pulsing green "live" dot */
.visitor-live { width: 8px; height: 8px; border-radius: 50%; background: #25d366; animation: livePulse 1.8s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .7); } 70%, 100% { box-shadow: 0 0 0 7px rgba(37, 211, 102, 0); } }
.visitor-close {
    position: absolute;
    top: -.5rem; right: -.5rem;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    border: none; border-radius: 50%;
    background: var(--dark);
    color: var(--white);
    font-size: .95rem; line-height: 1;
    padding: 0;
    opacity: 0;
    transition: opacity .2s, background .2s;
}
.visitor-box:hover .visitor-close, .visitor-close:focus { opacity: 1; }
.visitor-close:hover { background: var(--primary); }
@keyframes visitorIn { from { opacity: 0; transform: translateX(60px) scale(.8); } to { opacity: 1; transform: none; } }
@media (max-width: 991.98px) {
    .visitor-box { top: 140px; right: .75rem; padding: .5rem .75rem; gap: .5rem; }
    .visitor-box i { width: 32px; height: 32px; font-size: .85rem; }
    .visitor-box strong { font-size: .95rem; }
    .visitor-box small { font-size: .72rem; }
    .visitor-close { opacity: 1; }      /* no hover on phones */
}
/* Video popup sound controls (YouTube hides its own controls in small players) */
.video-popup-actions { display: inline-flex; align-items: center; gap: .35rem; }
.video-popup-sound { border: none; background: transparent; color: var(--white); font-size: .95rem; line-height: 1; padding: 0 .25rem; }
.video-popup-sound:hover { color: var(--dark); }
.video-popup-unmute {
    position: absolute;
    left: 50%;
    bottom: 12%;
    transform: translateX(-50%);
    z-index: 2;
    border: none;
    border-radius: 50px;
    background: rgba(0, 0, 0, .75);
    color: var(--white);
    font-size: .78rem;
    font-weight: 700;
    padding: .45rem .8rem;
    white-space: nowrap;
    animation: pulseRing 2s infinite;
}
.video-popup-unmute[hidden] { display: none; }
@media (max-width: 767.98px) {
    .video-popup-unmute { font-size: .68rem; padding: .35rem .6rem; }
}
.video-popup-header > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 767.98px) {
    .video-popup-box { width: 165px; }
    .video-popup-header > span:first-child .fa-circle-play { display: none; }
    .video-popup-header { font-size: .7rem; gap: .25rem; }
    .video-popup-close { font-size: 1.15rem; }
    .video-popup-sound { font-size: .85rem; }
}


/* ---------- Hero: "Chat Now" pill above the heading (links to the members chat room) ---------- */
.chat-now-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
    padding: .5rem 1.1rem .5rem .9rem;
    border: 1px solid rgba(232, 92, 13, .6);
    border-radius: 50px;
    background: rgba(232, 92, 13, .15);
    color: var(--white);
    font-size: .95rem;
    box-shadow: 0 0 0 0 rgba(232, 92, 13, .5);
    animation: chatNowGlow 2.5s ease-out infinite;
    transition: background .25s, transform .25s;
}
.chat-now-btn:hover { background: var(--primary); color: var(--white); transform: translateY(-2px); }
.chat-now-btn > .fa-comments { color: var(--primary-light); }
.chat-now-btn:hover > .fa-comments { color: var(--white); }
.chat-now-sub { color: rgba(255,255,255,.75); font-size: .85rem; padding-left: .5rem; border-left: 1px solid rgba(255,255,255,.3); }
.chat-now-arrow { font-size: .8rem; transition: transform .25s; }
.chat-now-btn:hover .chat-now-arrow { transform: translateX(4px); }
.chat-now-dot { width: 9px; height: 9px; border-radius: 50%; background: #25d366; animation: livePulse 1.8s infinite; }
@keyframes chatNowGlow { 0% { box-shadow: 0 0 0 0 rgba(232, 92, 13, .5); } 70%, 100% { box-shadow: 0 0 0 12px rgba(232, 92, 13, 0); } }
@media (max-width: 400px) { .chat-now-sub { display: none; } }

/* ---------- Chat room: join / login / subscribe pages ---------- */
.chat-auth { background: var(--light-bg); }
.chat-steps { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-bottom: 1.25rem; font-size: .85rem; color: var(--muted); }
.chat-steps span { display: inline-flex; align-items: center; gap: .4rem; }
.chat-steps b {
    width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #e9e9e9; color: var(--muted); font-size: .75rem;
}
.chat-steps .active { color: var(--dark); font-weight: 700; }
.chat-steps .active b { background: var(--primary); color: var(--white); }
.chat-steps .done b { background: #25d366; color: var(--white); }
.form-section { margin: .5rem 0 0; padding-bottom: .5rem; border-bottom: 1px solid #eee; font-size: .9rem; font-weight: 700; color: var(--dark); }
.form-section i { color: var(--primary); margin-right: .35rem; }
.form-card .pw-toggle { border: 1px solid #dddddd; border-left: none; background: var(--white); color: var(--muted); }
.form-card .pw-toggle:hover { color: var(--primary); }
/* Password strength bar */
.pw-meter { height: 4px; margin-top: .4rem; border-radius: 4px; background: #eee; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }
.pw-meter[data-score="0"] span, .pw-meter[data-score="1"] span { width: 25%; background: #dc3545; }
.pw-meter[data-score="2"] span { width: 50%; background: #fd7e14; }
.pw-meter[data-score="3"] span { width: 75%; background: #ffc107; }
.pw-meter[data-score="4"] span { width: 100%; background: #25d366; }

.chat-benefits { background: var(--dark); color: rgba(255,255,255,.85); border-radius: 22px; padding: 2rem; box-shadow: 0 20px 50px rgba(0,0,0,.15); }
.chat-price { text-align: center; padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.chat-price-badge { display: inline-block; padding: .25rem .8rem; border-radius: 50px; background: var(--primary); color: var(--white); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.chat-price-amount { margin: .6rem 0 .25rem; color: var(--white); font-size: 2.6rem; font-weight: 800; line-height: 1; }
.chat-price-amount small { font-size: 1rem; font-weight: 600; color: rgba(255,255,255,.7); }
.chat-price p { font-size: .88rem; }
.chat-benefit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.chat-benefit-list li { display: flex; gap: .85rem; }
.chat-benefit-list i {
    flex: 0 0 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: rgba(232, 92, 13, .18); color: var(--primary-light);
}
.chat-benefit-list strong { display: block; color: var(--white); font-size: .95rem; }
.chat-benefit-list span { font-size: .85rem; }
.chat-userbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.5rem; }
.chat-userbar i { color: var(--primary); }
.paypal-box { max-width: 420px; margin: 0 auto; min-height: 120px; }
.paypal-loading { padding: 2.5rem 0; color: var(--muted); font-size: .9rem; }
.membership-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
    margin-bottom: 1.5rem; padding: .85rem 1.25rem;
    border-radius: 14px; background: rgba(37, 211, 102, .1); border: 1px solid rgba(37, 211, 102, .35);
}
.membership-bar i { color: #1a9e4b; margin-right: .35rem; }
.membership-bar.is-cancelled { background: var(--primary-soft); border-color: rgba(232, 92, 13, .35); }
.membership-bar.is-cancelled i { color: var(--primary); }
.membership-bar .btn-link { color: var(--muted); font-size: .85rem; }
.membership-bar .btn-link:hover { color: #dc3545; }

/* ---------- Chat room ---------- */
.chat-room { display: grid; grid-template-columns: 1fr 260px; gap: 1.25rem; align-items: start; }
.chat-main { display: flex; flex-direction: column; height: min(70vh, 640px); background: var(--white); border-radius: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.1); overflow: hidden; }
.chat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem 1.1rem; background: var(--dark); color: var(--white); font-weight: 700; }
.chat-head i { color: var(--primary-light); margin-right: .35rem; }
.chat-tools { display: flex; align-items: center; gap: .75rem; font-weight: 500; font-size: .85rem; }
.chat-tools .form-select { width: auto; padding-top: .2rem; padding-bottom: .2rem; font-size: .82rem; }
.chat-tools .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: .85rem; background: var(--light-bg); }
.chat-empty { margin: auto; color: var(--muted); font-size: .92rem; text-align: center; }
.chat-msg { max-width: 78%; align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.chat-meta { font-size: .75rem; color: var(--muted); margin-bottom: .2rem; }
.chat-meta strong { color: var(--dark); margin-right: .4rem; }
.chat-msg.bot .chat-meta i, .chat-msg.bot .chat-meta strong { color: var(--primary); }
.chat-bubble { display: inline-block; padding: .55rem .85rem; border-radius: 16px 16px 16px 4px; background: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,.06); white-space: pre-wrap; word-wrap: break-word; text-align: left; }
.chat-msg.mine .chat-bubble { background: var(--primary); color: var(--white); border-radius: 16px 16px 4px 16px; }
.chat-msg.bot .chat-bubble { background: #fff4ec; border: 1px solid rgba(232, 92, 13, .2); }
.chat-translation { margin-top: .3rem; padding: .35rem .7rem; border-left: 3px solid var(--primary); background: var(--white); border-radius: 6px; font-size: .88rem; color: #444; white-space: pre-wrap; text-align: left; }
.chat-translate-btn { border: none; background: none; padding: .15rem 0; font-size: .75rem; color: var(--muted); }
.chat-translate-btn:hover { color: var(--primary); }
.chat-typing { padding: .3rem 1.1rem; font-size: .8rem; color: var(--muted); background: var(--light-bg); }
.chat-typing span { display: inline-block; width: 6px; height: 6px; margin-right: 2px; border-radius: 50%; background: var(--primary); animation: dotBounce 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
.chat-notice { padding: .5rem 1.1rem; font-size: .85rem; background: #fff8e1; color: #7a5b00; }
.chat-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid #eee; background: var(--white); }
.chat-form textarea { resize: none; border-radius: 14px; max-height: 140px; }
.chat-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(232, 92, 13, .12); }
.chat-form .btn { border-radius: 50%; width: 46px; height: 46px; flex: 0 0 46px; padding: 0; align-self: flex-end; }
.chat-side { background: var(--white); border-radius: 22px; padding: 1.25rem; box-shadow: 0 20px 50px rgba(0,0,0,.1); }
.chat-side h6 { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.chat-side .badge { background: var(--primary); }
.chat-online { list-style: none; padding: 0; margin: 0 0 1rem; max-height: 220px; overflow-y: auto; font-size: .9rem; }
.chat-online li { padding: .3rem 0; border-bottom: 1px dashed #eee; }
.chat-bot-card { display: flex; gap: .75rem; padding: .85rem; border-radius: 14px; background: #fff4ec; font-size: .85rem; }
.chat-bot-card i { color: var(--primary); font-size: 1.3rem; margin-top: .15rem; }
.chat-usage { margin-top: 1rem; font-size: .8rem; color: var(--muted); }
@media (max-width: 991.98px) {
    .chat-room { grid-template-columns: 1fr; }
    .chat-side { order: -1; padding: 1rem; }
    .chat-online { max-height: 90px; }
    .chat-msg { max-width: 90%; }
}
.chat-speak { margin: 0 0 0 .4rem; width: 28px; height: 28px; }

/* ---------- Posts page: square image cards, click to enlarge ---------- */
.post-card { display: block; height: 100%; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--dark); transition: transform .3s var(--ease), box-shadow .3s; }
.post-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,.15); color: var(--primary); }
.post-image { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--light-bg); overflow: hidden; }
.post-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.post-card:hover .post-image img { transform: scale(1.05); }
.post-zoom {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(17, 17, 17, .35); color: var(--white); font-size: 1.8rem;
    opacity: 0; transition: opacity .3s;
}
.post-card:hover .post-zoom, .post-card:focus-visible .post-zoom { opacity: 1; }
.post-title { display: block; padding: .85rem 1rem; font-weight: 700; font-size: .95rem; text-align: center; }

/* ---------- Footer SMS sign-up (compact) ---------- */
.sms-subscribe { max-width: 340px; margin-top: 1.25rem; }
.sms-subscribe-title { display: block; margin-bottom: .45rem; font-size: .8rem; font-weight: 600; color: var(--white); }
.sms-subscribe-title i { color: var(--primary); margin-right: 4px; }
/* no overflow:hidden here, or the country dropdown list would be cut off */
.sms-subscribe-row { display: flex; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: rgba(255,255,255,.06); transition: border-color .2s; }
.sms-subscribe-row:focus-within { border-color: var(--primary); }
.sms-subscribe-row .iti { flex: 1; min-width: 0; }
.sms-subscribe-row input { width: 100%; min-width: 0; padding: 7px 10px; border: 0; background: transparent; color: var(--white); font-size: .8rem; outline: none; }
.sms-subscribe-row .iti input { padding-left: 84px; }          /* room for the flag + dial code */
.sms-subscribe-row input::placeholder { color: rgba(255,255,255,.45); }
.sms-subscribe-row .iti__selected-flag { background: transparent !important; border-radius: 8px 0 0 8px; }
.sms-subscribe-row .iti__selected-dial-code { color: rgba(255,255,255,.8); font-size: .8rem; }
.sms-subscribe-row .iti__arrow { border-top-color: rgba(255,255,255,.6); }
.sms-subscribe-row .iti__country-list { color: #222; font-size: .8rem; max-width: 300px; }
.sms-subscribe-row button { padding: 7px 14px; border: 0; border-radius: 0 7px 7px 0; background: var(--primary); color: var(--white); font-size: .75rem; font-weight: 700; cursor: pointer; transition: background .2s; }
.sms-subscribe-row button:hover { background: var(--primary-dark); }
.sms-subscribe-row button:disabled { opacity: .7; cursor: wait; }
.sms-subscribe-terms { margin: .5rem 0 0; font-size: .65rem; line-height: 1.5; color: rgba(255,255,255,.5); }
.site-footer .sms-subscribe-terms a { color: rgba(255,255,255,.75); text-decoration: underline; }
.sms-subscribe-msg { margin: .4rem 0 0; font-size: .75rem; }
.sms-subscribe-msg:empty { display: none; }
.sms-subscribe-msg.is-ok { color: #4ADE80; }
.sms-subscribe-msg.is-error { color: #F87171; }
.sms-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }   /* honeypot */
@media (max-width: 991.98px) { .sms-subscribe { max-width: 100%; } }
/* ---------- Messenger: conversation list (group room + private lessons) and the open conversation ---------- */
.messenger { display: grid; grid-template-columns: 300px 1fr; gap: 1.25rem; align-items: stretch; }
.messenger .chat-main { height: min(75vh, 680px); }
.msgr-list { display: flex; flex-direction: column; height: min(75vh, 680px); overflow-y: auto; background: var(--white); border-radius: 22px; padding: 1rem; box-shadow: 0 20px 50px rgba(0,0,0,.1); }
.msgr-section { margin: .75rem .25rem .5rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.msgr-section:first-child { margin-top: 0; }
.msgr-section i { color: var(--primary); margin-right: .3rem; }
.msgr-new { padding: .15rem .6rem; font-size: .78rem; border-radius: 50px; text-transform: none; letter-spacing: 0; }
.msgr-item { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem .65rem; border: none; border-radius: 14px; background: none; text-align: left; transition: background .2s; }
.msgr-item:hover { background: var(--light-bg); }
.msgr-item.active { background: var(--primary-soft); }
.msgr-avatar { flex: 0 0 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff4ec; color: var(--primary); }
.msgr-avatar.room { background: var(--primary); color: var(--white); }
.msgr-text { display: flex; flex-direction: column; min-width: 0; }
.msgr-text strong { font-size: .92rem; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msgr-text small { font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: .3rem; }
.msgr-list .chat-online { margin: .25rem 0 .5rem 3.4rem; font-size: .82rem; max-height: 110px; }
.msgr-list .chat-online li { padding: .15rem 0; border: none; }
.msgr-lessons { flex: 1; }
.msgr-empty { margin: .5rem .25rem; font-size: .85rem; color: var(--muted); }
.msgr-list .chat-usage { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed #eee; }
.msgr-back { display: none; border: none; background: none; color: var(--white); font-size: 1.1rem; padding: 0 .5rem 0 0; }
.chat-head .lesson-title { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.chat-head .lesson-title #lessonTitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.chat-head .btn-outline-light { padding: .15rem .45rem; font-size: .8rem; }
.lesson-start { display: flex; flex-direction: column; align-items: center; gap: .5rem; max-width: 420px; line-height: 1.5; }
.lesson-start i { font-size: 2rem; color: var(--primary); }
.chat-msg.pending { opacity: .6; }
/* Microphone + voice */
.chat-form .mic-btn { flex: 0 0 46px; width: 46px; height: 46px; padding: 0; border-radius: 50%; background: var(--light-bg); color: var(--primary); align-self: flex-end; }
.chat-form .mic-btn:hover { background: var(--primary-soft); }
.chat-form .mic-btn.listening { background: #dc3545; color: var(--white); animation: livePulse 1.2s infinite; }
.chat-form .mic-lang { flex: 0 0 auto; width: auto; align-self: flex-end; height: 46px; padding: .25rem 1.6rem .25rem .6rem; border-radius: 14px; font-size: .85rem; }
.speak-reply { margin-left: .4rem; width: 28px; height: 28px; border: none; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: .75rem; vertical-align: bottom; }
.speak-reply:hover, .speak-reply.speaking { background: var(--primary); color: var(--white); }
.speak-reply.speaking { animation: pulseRing 1s infinite; }
@media (max-width: 991.98px) {
    /* Phones/tablets: the list fills the screen; opening a conversation shows it instead (with a back arrow) */
    .messenger { grid-template-columns: 1fr; }
    .messenger .msgr-list { height: auto; max-height: 75vh; }
    .messenger .msgr-pane { display: none; }
    .messenger.pane-open .msgr-list { display: none; }
    .messenger.pane-open .msgr-pane:not(.d-none) { display: flex; }
    .msgr-back { display: inline-block; }
    .chat-head .lesson-title #lessonTitle { max-width: 38vw; }
}
.chat-free-note { margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }
.chat-free-note i { color: #25d366; margin-right: .3rem; }
.msgr-section.d-flex { gap: .5rem; }
.msgr-section.d-flex > span { line-height: 1.3; }
.msgr-new { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
/* Messenger never wider than the screen (long lesson titles / messages shrink instead of stretching the layout) */
.messenger > *, .messenger .chat-head > *, .messenger .chat-form textarea { min-width: 0; }
.messenger .chat-msg { max-width: 85%; }
.messenger .chat-bubble { overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .messenger .chat-head { gap: .4rem; padding: .6rem .8rem; }
    .messenger .chat-form { gap: .35rem; padding: .5rem; }
    .chat-form .mic-btn, .chat-form .btn-accent { flex-basis: 42px; width: 42px; height: 42px; }
    .chat-form .mic-lang { height: 42px; padding-right: 1.4rem; }
}
