/**
 * Academia – Header, Footer & FAB Styles
 * Version: 24 – 2026-06-24 (academy sidebar video reuses .video-overlay-info for a
 *   name/country overlay; .academy-sidebar-video set position:relative to anchor it.)
 * Version: 23 – 2026-06-24 (added .video-carousel: student-stories carousel for
 *   course pages — scroll-snap track + arrow buttons, 3/2/1.2 cards per breakpoint.)
 * Version: 22 – 2026-06-23 (mobile mega menu → drill-down: top items get a ›
 *   chevron and slide their panel in over the root list with an injected
 *   "← Back" row; root items + language switcher hidden while drilled in.
 *   Pairs with header-custom.php V8.)
 * Version: 21 – 2026-06-23 (mobile: language switcher moved into the hamburger
 *   menu — top-row copy hidden, in-nav copy shown inline while the menu is open;
 *   the hamburger now sits on the top row. Pairs with header-custom.php V6.)
 * Version: 20 – 2026-06-23 (stronger logo border kill: border+outline+box-shadow
 *   !important on the link, its focus/active states and the images, since the
 *   black box around the mobile icon survived the first attempt)
 * Version: 19 – 2026-06-23 (mobile header fits one row again: header gap 16→8px,
 *   logos gap 6px, Cervantes 38→30px with less lead gap, CTA padding trimmed;
 *   plus killed the stray GeneratePress border around the logo image)
 * Version: 18 – 2026-06-23 (Cervantes badge is now phone-only: hidden on desktop
 *   (wordmark already carries it), shown beside the icon logo on mobile at 38px)
 * Version: 17 – 2026-06-22 (mobile header: switched to a compact icon logo
 *   (.header-logo-mobile) on phones and hid the wordmark, so logo + Cervantes
 *   badge + CTA + language + burger fit one row; desktop keeps the wordmark)
 * Version: 16 – 2026-06-22 (mobile logo was shrinking to a sliver — .academia-logos
 *   no longer flexes/shrinks, .header-logo gets a fixed 150px (132px ≤480) and
 *   max-width:none, CTA made compact so the top row fits)
 * Version: 15 – 2026-06-22 (mobile: added body.mobile-menu-open scroll lock so
 *   swipes scroll the menu, not the page; pairs with the academia.js v3.1 toggle
 *   rewrite that fixed the two-tap open + out-of-sync .open class)
 * Version: 14 – 2026-06-22 (mobile: open menu was cut off + unscrollable because
 *   the whole header is position:sticky; made .main-navigation ul.open scroll
 *   internally — max-height + overflow-y:auto, refined to the exact height by a
 *   small script in header-custom.php)
 * Version: 13 – 2026-06-21 (cosmetic: removed GeneratePress sub-menu background +
 *   borders that bled into the mega panel — background:transparent + border:none on
 *   the mega <ul>s, <li>s and links; the white panel now shows cleanly)
 * Version: 12 – 2026-06-21 (column headings aligned to top — align-items:start on the
 *   grid, was inheriting align-items:center)
 * Version: 11 – 2026-06-21 (course links unclickable — GP pointer-events:none on
 *   ul ul, inherited by column links; added pointer-events:auto)
 * Version: 10 – 2026-06-21 (GP floats the nested sub-menu <ul> + forces height:0 →
 *   float:none + height:auto on .mega-panel__cols / .mega-col__links)
 * Version: 9 – 2026-06-21 (float:none on .mega-col / .mega-col__item — insufficient alone)
 * Version: 8 – 2026-06-21 (.mega-col__links display:block; mobile panel position:static)
 * Version: 7 – 2026-06-21 (neutralise GP sub-menu hiding: position/left/right/width/
 *   opacity/visibility on the mega <ul>s; panel absolute at higher specificity)
 * Version: 6 – 2026-06-21 (added MEGA MENU styles)
 * Version: 5 – 2026-06-04
 *
 * Änderungen v3.0:
 *  - Footer-Klassen an neue footer-custom.php angepasst
 *    (.academia-footer, .footer-columns, .footer-contact-col, .footer-menu-col)
 *  - Social Icons in Bottom Bar (nicht mehr in Spalte 4)
 *  - FAB Hover: weiß+blau statt dunkelblau
 *  - Cervantes-Logo Styles hinzugefügt
 *  - localStorage-Flash-Fix: .academia-promo-dismissed
 */

/* ============================================================================
   CSS CUSTOM PROPERTIES (überschreiben/ergänzen falls nötig)
   ========================================================================= */

:root {
    --color-brand-primary:   #004f80;
    --color-brand-secondary: #008fdd;
    --color-accent:          #ffe033;
    --color-brand-hover:     #2d6599;
    --color-white:           #ffffff;
    --color-text:            #383838;
    --radius-btn:            50px;
    --radius-social:         8px;
    --transition-default:    all 0.3s ease;
}

/* ============================================================================
   PROMO BANNER
   ========================================================================= */

/* Flash-Schutz: Klasse wird synchron im <head> gesetzt (functions.php)     */
.academia-promo-dismissed #academia-promo-banner {
    display: none !important;
}

.academia-promo-banner {
    background-color: var(--color-accent);
    color: #000000;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    position: relative;
    z-index: 1010;
}

/* Admin-Bar Offset */
.admin-bar .academia-promo-banner { margin-top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .academia-promo-banner { margin-top: 46px; }
}

.academia-promo-banner .container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.academia-promo-banner .promo-text {
    flex: 1;
    text-align: center;
}

.academia-promo-banner .promo-close {
    position: absolute;
    right: 0;
    background: transparent;
    border: none;
    color: #000;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1;
}
.academia-promo-banner .promo-close:hover { opacity: 1; }

/* Ausblenden nach Klick */
.academia-promo-banner.dismissed { display: none !important; }

/* ============================================================================
   STICKY HEADER WRAPPER
   ========================================================================= */

.academia-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* GP-Standard-Header ausblenden (wird in functions.php als inline CSS gesetzt,
   hier für Vollständigkeit dokumentiert) */

/* ============================================================================
   INSIDE HEADER (Flex-Row)
   ========================================================================= */

.academia-inside-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 32px;
}

/* ============================================================================
   LOGOS (Main + Cervantes)
   ========================================================================= */

.academia-logos {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.academia-logos .main-logo {
    display: block;
    line-height: 0;
}

.academia-logos .header-logo {
    width: 220px;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
    display: block;
}

/* The compact icon logo is phone-only; desktop uses the wordmark above. */
.academia-logos .header-logo-mobile {
    display: none;
}

/* Kill any stray border/outline/shadow a theme (GeneratePress) or the browser
   puts on the linked logo image — the black box around the mobile icon came
   from there, not from us. Covers the link, its focus state, and the images. */
.academia-logos,
.academia-logos a,
.academia-logos a:focus,
.academia-logos a:focus-visible,
.academia-logos a:active,
.academia-logos img,
.academia-logos .main-logo,
.academia-logos .header-logo,
.academia-logos .header-logo-mobile,
.academia-logos .cervantes-logo {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.academia-logos .cervantes-logo {
    /* Phone-only: the desktop wordmark (logo-*-cervantes-color.png) already
       carries the Cervantes mark, so the separate badge is hidden here and
       re-enabled in the mobile media query below. */
    display: none;
    height: auto;
    width: auto;
    max-height: 44px;
    max-width: 110px;
    object-fit: contain;
    opacity: 0.9;
}

/* ============================================================================
   NAVIGATION
   ========================================================================= */

.main-navigation {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
    align-items: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: #383838;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    white-space: nowrap;
    border-radius: 6px;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
    color: var(--color-brand-secondary);
    background-color: rgba(0, 143, 221, 0.06);
}

/* Chevron für Items mit Sub-Menü */
.main-navigation .menu-item-has-children > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    margin-left: 2px;
    transition: transform 0.2s;
}

.main-navigation .menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Dropdown */
.main-navigation .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--color-white);
    min-width: 220px;
    padding: 8px 0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition-default);
    z-index: 100;
}

.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu li { width: 100%; }

.main-navigation .sub-menu a {
    padding: 10px 20px;
    display: block;
    width: 100%;
    border-radius: 0;
    font-weight: 400;
}

.main-navigation .sub-menu a:hover {
    background-color: rgba(0, 143, 221, 0.06);
}

/* ============================================================================
   MEGA MENU  (top item flagged with CSS class "mega mega-{key}")
   The panel is anchored to the header .container so it spans the content width
   and aligns with the logo/edges. The trigger <li> is made position:static so
   its absolute panel uses the .container as containing block.
   ========================================================================= */

.academia-header-wrapper .container { position: relative; }

.main-navigation .menu-item.mega { position: static; }

.main-navigation .mega-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-top: none;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
    padding: 30px 0 22px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition-default);
    z-index: 100;
}

.main-navigation .menu-item.mega:hover > .mega-panel,
.main-navigation .menu-item.mega:focus-within > .mega-panel,
.main-navigation .menu-item.mega.is-open > .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Inner layout: columns (left, flexible) + preview image (right, fixed) */
.main-navigation .mega-panel__inner {
    display: flex;
    align-items: flex-start;
    gap: 36px;
    padding: 0 28px;
}

.main-navigation .mega-panel__cols {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 32px;
    align-items: start; /* override .main-navigation ul { align-items:center } so column headings line up at the top */
}

.main-navigation .mega-col { position: relative; }

/* Drill-in "Back" button (injected by header-custom.php) — hidden everywhere
   except inside the open mobile sub-panel (revealed in the ≤768 block below). */
.main-navigation .mega-back { display: none; }

.main-navigation .mega-col__title {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: var(--color-brand-secondary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.main-navigation .mega-col__links {
    display: block; /* override the generic .main-navigation ul { display:flex } */
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Links inside columns – override the generic .main-navigation a paddings */
.main-navigation .mega-col__item > a {
    display: block;
    width: 100%;
    padding: 6px 0;
    font-size: 15px;
    font-weight: 400;
    color: #383838;
    border-radius: 6px;
    white-space: normal;
    background: transparent;
    border: none;
    pointer-events: auto;
}

.main-navigation .mega-col__item > a:hover {
    color: var(--color-brand-secondary);
    background: transparent;
}

/* Preview image on the right */
.main-navigation .mega-panel__aside {
    flex: 0 0 280px;
    max-width: 280px;
    align-self: stretch;
}

.main-navigation .mega-panel__aside img {
    width: 100%;
    height: 100%;
    max-height: 230px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* Footer action links below the columns */
.main-navigation .mega-panel__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin: 20px 28px 0;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.main-navigation .mega-panel__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-brand-secondary);
    background: transparent;
}

.main-navigation .mega-panel__action:hover {
    background: transparent;
    text-decoration: underline;
}

/* ----------------------------------------------------------------------------
   FIX – neutralise GeneratePress parent-theme sub-menu hiding.
   GeneratePress applies  position:absolute; left:-99999px; opacity:0;
   visibility:hidden; width:200px  to every nested <ul> inside .main-navigation.
   Our mega panel uses nested <ul>s (.mega-panel__cols, .mega-col__links); we
   never declared those properties, so GP filled them in and pushed the columns
   off-screen. Re-declare them here so the columns sit in normal flow. Show/hide
   is driven solely by the panel (its own opacity/visibility), so the lists just
   inherit the panel's visibility. Higher specificity than GP's "ul ul" → no
   !important needed.
   ------------------------------------------------------------------------- */
.main-navigation .menu-item.mega > .mega-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
}

.main-navigation .menu-item.mega .mega-panel__cols,
.main-navigation .menu-item.mega .mega-col__links {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    width: auto;
    min-width: 0;
    float: none;  /* GP floats nested <ul> sub-menus too → would collapse height */
    height: auto; /* GP forces height:0 on the hidden sub-menu <ul> */
    pointer-events: auto; /* GP sets pointer-events:none on hidden sub-menus → links unclickable */
    background: transparent; /* GP gives sub-menu <ul> a (grey) background */
    border: none;            /* GP borders sub-menu <ul> */
    box-shadow: none;
    opacity: 1;
    visibility: inherit; /* follow the panel's hidden/visible state */
    overflow: visible;
}

/* GeneratePress floats nav <li> (float:left) for its horizontal menu. Our mega
   column items and link items are <li>s too; once the link list became a block
   (V8) the float kicked in and collapsed the parent <ul>s to height 0 (floats
   don't contribute height), so the columns rendered but the panel stayed one
   line tall. Reset float on every mega list item. */
.main-navigation .menu-item.mega .mega-col,
.main-navigation .menu-item.mega .mega-col__item {
    float: none;
    border: none;            /* GP puts borders/dividers on sub-menu <li> */
    background: transparent;  /* GP gives sub-menu <li> a background */
}

/* Mobile Hamburger (versteckt auf Desktop) */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--color-text);
    padding: 8px;
}

/* ============================================================================
   HEADER EXTRAS (CTA + Language Switcher)
   ========================================================================= */

.academia-header-extras {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* CTA-Button */
.btn-enroll {
    padding: 11px 22px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: var(--radius-btn);
    background-color: var(--color-brand-secondary);
    color: var(--color-white) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.btn-enroll:hover {
    background-color: var(--color-brand-primary);
    box-shadow: 0 4px 12px rgba(0, 79, 128, 0.25);
    color: var(--color-white) !important;
}

/* ============================================================================
   LANGUAGE SWITCHER
   ========================================================================= */

.academia-language-switcher { position: relative; }

.academia-language-switcher .lang-current {
    background: transparent;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    color: var(--color-text);
}

.academia-language-switcher .lang-current:hover {
    border-color: var(--color-brand-secondary);
    background-color: rgba(0, 143, 221, 0.06);
}

.academia-language-switcher .lang-current img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

.academia-language-switcher .lang-current .fa-chevron-down {
    font-size: 10px;
    transition: transform 0.2s;
}

.academia-language-switcher:hover .lang-current .fa-chevron-down {
    transform: rotate(180deg);
}

.academia-language-switcher .lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--color-white);
    min-width: 180px;
    padding: 8px 0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition-default);
    z-index: 100;
}

.academia-language-switcher:hover .lang-dropdown,
.academia-language-switcher .lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.academia-language-switcher .lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--color-text);
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 14px;
}

.academia-language-switcher .lang-item:hover {
    background-color: rgba(0, 143, 221, 0.06);
}

.academia-language-switcher .lang-item img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

/* The in-hamburger copy of the switcher (rendered inside .main-navigation for
   mobile) is mobile-only — keep it out of the desktop nav bar entirely. */
.main-navigation .academia-language-switcher { display: none; }

/* ============================================================================
   FOOTER – GP Container Reset
   ========================================================================= */

.site-footer {
    padding: 0 !important;
    margin: 0 !important;
    background: var(--color-deepblue-600, #004874) !important;
}

.site-footer .inside-footer {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================================================
   FOOTER – Outer Wrapper
   ========================================================================= */

.academia-footer {
    background-color: var(--color-deepblue-600, #004874);
    color: var(--color-white);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.academia-footer a {
    color: var(--color-white);
    text-decoration: none;
    transition: opacity 0.2s;
}

.academia-footer a:hover {
    opacity: 0.8;
}

/* ============================================================================
   FOOTER – 4-Spalten Grid
   ========================================================================= */

.footer-columns {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

/* ============================================================================
   FOOTER – Spalte 1: Logo + Kontakt
   ========================================================================= */

.footer-contact-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Logo-Gruppe (Hauptlogo + Cervantes nebeneinander) */
.footer-logo-group {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-logo {
    width: 220px;
    height: auto;
    max-height: 70px;
    object-fit: contain;
    object-position: left center;
    display: block;
    flex-shrink: 0;
}

.footer-cervantes-logo {
    height: auto;
    width: auto;
    max-height: 48px;
    max-width: 80px;
    object-fit: contain;
    opacity: 0.85;
    /* Optionale Trennung */
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Kontakt-Items */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    line-height: 1.65;
    font-size: 14px;
}

.footer-contact .contact-item i {
    font-size: 17px;
    margin-top: 3px;
    min-width: 18px;
    width: 18px;
    color: var(--color-white);
    flex-shrink: 0;
    text-align: center;
}

.footer-contact .contact-item span,
.footer-contact .contact-item a {
    color: rgba(255, 255, 255, 0.9);
    flex: 1;
}

/* ============================================================================
   FOOTER – Menü-Spalten (2, 3, 4)
   ========================================================================= */

.footer-menu-col {
    display: flex;
    flex-direction: column;
}

.footer-title {
    color: var(--color-white);
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    /* Kein Border: saubereres Look per SOLL */
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-list li { margin: 0; }

.footer-list a {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}

.footer-list a:hover {
    color: var(--color-white);
    opacity: 1;
    padding-left: 4px;
}

/* ============================================================================
   FOOTER – Bottom Bar (Copyright links · Social Icons rechts)
   ========================================================================= */

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.55);
    padding-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-copyright {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

/* Social Icons Gruppe */
.footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Basis für alle Social Buttons */
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 18px;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
}

.social-btn:hover {
    transform: translateY(-3px);
    opacity: 1;
    color: var(--color-white);
}

/* Instagram – Outline Square (Rahmen, transparenter Hintergrund) */
.social-instagram {
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    background: transparent;
}

.social-instagram:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Facebook – Outline Square (matches Instagram/Twitter/YouTube) */
.social-facebook {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 10px;
}

.social-facebook:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Twitter/X – Outline Square (same style as Instagram) */
.social-twitter {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 10px;
}

.social-twitter:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* YouTube – Outline Square (same style as Instagram) */
.social-youtube {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 10px;
}

.social-youtube:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Email – White Circle (nur FAB, nicht mehr im Footer-Social-Row) */
.social-email {
    background: #ffffff;
    color: #008fdd !important;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.social-email:hover {
    background: rgba(255, 255, 255, 0.92);
    color: #008fdd !important;
    transform: translateY(-3px) scale(1.05);
}

/* ============================================================================
   FAB – Floating Action Button
   Default:  weißer Kreis, blaues Icon
   Hover:    Pill-Expansion, bleibt weiß, blauer Border + Text
   ========================================================================= */

.academia-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.fab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--color-white);
    color: var(--color-brand-secondary);
    width: 58px;
    height: 58px;
    border-radius: 29px;
    border: 2px solid transparent;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    transition: var(--transition-default);
    overflow: hidden;
    white-space: nowrap;
    font-size: 22px;
}

.fab-button i {
    flex-shrink: 0;
    min-width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-button .fab-text {
    font-size: 15px;
    font-weight: 600;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: var(--transition-default);
    margin-left: 0;
    color: var(--color-brand-secondary);
}

/* Hover: Pill-Expansion – weiß + blauer Rand (laut SOLL Screenshot) */
.fab-button:hover {
    width: auto;
    padding: 0 22px 0 18px;
    border-color: var(--color-brand-secondary);
    box-shadow: 0 6px 20px rgba(0, 143, 221, 0.3);
    color: var(--color-brand-secondary);
}

.fab-button:hover .fab-text {
    max-width: 120px;
    opacity: 1;
    margin-left: 10px;
}

.fab-button:active { transform: scale(0.95); }

/* ============================================================================
   FOOTER – SLIM VARIANTE (für Booking-/spezielle Seiten)
   ========================================================================= */

.footer-slim .academia-footer .footer-columns { display: none; }
.footer-slim .academia-footer { padding: 24px 0; margin-top: 0; }
.footer-slim .academia-footer .footer-bottom { border-top: none; padding-top: 0; }

/* ============================================================================
   RESPONSIVE
   ========================================================================= */

/* Tablet */
@media (max-width: 1100px) {
    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }

    .academia-inside-header { gap: 16px; }

    .main-navigation a { font-size: 14px; padding: 8px 8px; }

    .btn-enroll { padding: 10px 16px; font-size: 14px; }
}

/* Mobile */
@media (max-width: 768px) {

    /* Header */
    .academia-inside-header {
        flex-wrap: wrap;
        padding: 12px 0;
        gap: 8px;                /* was 16px — tighten so the top row fits one line */
    }

    .academia-logos {
        flex: 0 0 auto;          /* size to the logo — never squeeze it to a sliver */
        gap: 6px;
    }

    /* Phones: hide the wordmark, show the compact icon logo (per-site
       logo-{slug}-mobile-color.png). Small enough that the Cervantes badge,
       CTA, language switcher and burger all fit on one row. */
    .academia-logos .header-logo { display: none; }

    .academia-logos .header-logo-mobile {
        display: block;
        height: 44px;
        width: auto;
        max-width: none;
    }

    .academia-logos .cervantes-logo {
        display: block;          /* re-enable on phones (desktop has it in the wordmark) */
        max-height: 30px;        /* smaller in view, to save the row width */
        padding-left: 4px;       /* less gap before the badge */
    }

    /* Compact CTA so the row stays on one line. */
    .btn-enroll {
        padding: 8px 12px;
        font-size: 13px;
    }

    .main-navigation {
        order: 4;
        width: 100%;
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
    }

    .main-navigation ul {
        display: none; /* wird per JS geöffnet */
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 8px 0;
    }

    .main-navigation ul.open {
        display: flex;
        /* The whole header is position:sticky, so a menu taller than the
           viewport gets pinned and its lower part is unreachable. Make the
           open menu scroll internally instead. The max-height is a safe
           fallback; the inline script below refines it to the exact space
           below the header (handles the promo banner being present or not). */
        max-height: calc(100vh - 110px);
        max-height: calc(100dvh - 110px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* Lock the page behind the open mobile menu (class toggled in academia.js)
       so swipes scroll the menu itself, not the page underneath. */
    body.mobile-menu-open { overflow: hidden; }

    /* ---- Language switcher: off the top row, into the hamburger menu --------
       The top-row copy (in .academia-header-extras) is hidden; the copy inside
       .main-navigation shows only while the menu is open, with the languages
       listed inline (the hover-dropdown behaviour is overridden). */
    .academia-header-extras .academia-language-switcher { display: none; }

    body.mobile-menu-open .main-navigation .academia-language-switcher {
        display: block;
        width: 100%;
        margin: 4px 0 8px;
        padding: 12px 16px 4px;
        border-top: 1px solid rgba(0, 0, 0, 0.12);
    }
    body.mobile-menu-open .main-navigation .academia-language-switcher .lang-current {
        display: none;                /* no toggle button needed; list languages directly */
    }
    body.mobile-menu-open .main-navigation .academia-language-switcher .lang-dropdown {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 4px 20px;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        min-width: 0;
    }
    body.mobile-menu-open .main-navigation .academia-language-switcher .lang-item {
        padding: 8px 0;
    }

    .main-navigation a {
        padding: 10px 16px;
        width: 100%;
        border-radius: 0;
    }

    .main-navigation .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0 0 0 16px;
    }

    /* ---- Mega menu → DRILL-DOWN within the drawer ---------------------------
       Tapping a top item slides its panel in over the root list; an injected
       "← Back" row returns to the root. .is-open / .submenu-open are toggled by
       the inline script in header-custom.php. */

    /* Top mega items get a "drill in" chevron on the right. */
    .main-navigation .menu-item.mega > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .main-navigation .menu-item.mega > a::after {
        content: "\203A";               /* › */
        font-size: 22px;
        line-height: 1;
        opacity: 0.45;
        margin-left: 12px;
    }

    /* Panel sits in flow; hidden until its item is open. */
    .main-navigation .menu-item.mega > .mega-panel {
        position: static;
        left: auto;
        right: auto;
        top: auto;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        display: none;
    }
    .main-navigation .menu-item.mega.is-open > .mega-panel {
        display: block;
        animation: megaDrillIn 0.22s ease;
    }

    /* Drill-in view: the drawer shows ONLY the open panel (+ its Back row). */
    #primary-menu.submenu-open > li { display: none; }
    #primary-menu.submenu-open > li.is-open { display: block; }
    #primary-menu.submenu-open > li.is-open > a { display: none; }
    /* Language switcher hidden while drilled in (FIGMA sub-panels show none). */
    .main-navigation.submenu-open .academia-language-switcher { display: none !important; }

    /* The injected "← Back" row (only inside the open sub-panel). */
    #primary-menu.submenu-open .mega-back {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        background: none;
        border: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        margin: 0 0 6px;
        padding: 12px 16px;
        font-size: 15px;
        font-weight: 600;
        color: var(--secondary-brand, #008fdd);
        cursor: pointer;
    }
    #primary-menu.submenu-open .mega-back::before {
        content: "\2190";               /* ← */
        font-size: 18px;
        line-height: 1;
    }

    @keyframes megaDrillIn {
        from { opacity: 0; transform: translateX(18px); }
        to   { opacity: 1; transform: translateX(0); }
    }

    .main-navigation .mega-panel__inner {
        flex-direction: column;
        gap: 0;
        padding: 0 0 0 16px;
    }

    .main-navigation .mega-panel__cols {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .main-navigation .mega-panel__aside { display: none; } /* hide image on mobile */

    .main-navigation .mega-col { padding: 6px 0 10px; }

    .main-navigation .mega-col__title { margin-bottom: 4px; }

    .main-navigation .mega-col__item > a { padding: 8px 0 8px 12px; }

    .main-navigation .mega-panel__footer {
        flex-direction: column;
        gap: 12px;
        margin: 8px 0 0;
        padding: 12px 0 4px 16px;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 3;
    }

    /* Footer */
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-contact-col { align-items: flex-start; }

    /* FAB */
    .academia-fab { bottom: 20px; right: 20px; }

    .fab-button {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .fab-button:hover {
        width: 52px;
        padding: 0;
        border-color: transparent;
    }

    .fab-button .fab-text { display: none; }
}

@media (max-width: 480px) {
    .academia-header-extras { gap: 8px; }
    .btn-enroll { padding: 9px 14px; font-size: 13px; }

    /* Trim the icon logo a touch more on very narrow phones. */
    .academia-logos .header-logo-mobile { height: 40px; }
    .academia-logos .cervantes-logo { max-height: 28px; }

    .footer-logo { max-width: 160px; }
    .social-btn { width: 38px; height: 38px; font-size: 17px; }
    .social-email { width: 42px; height: 42px; }
}

/* ============================================================================
   PRINT
   ========================================================================= */

@media print {
    .academia-promo-banner,
    .academia-fab,
    .academia-header-extras,
    .footer-social,
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* ── Global FAQ accordion fix ────────────────────────────────────────────────
   Layout fixes that ensure FAQ works regardless of template.
   Visual styles (colors, padding, borders) are in faq.css. */
.faq-item {
    display: block;
    width: 100%;
}
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}
.faq-question span {
    flex: 1;
    text-align: left;
}
.faq-question i,
.faq-question .fa-chevron-down {
    flex-shrink: 0;
    margin-left: 16px;
}
.faq-answer {
    display: none;      /* closed by default — faq.css opens via .faq-item.active */
    width: 100%;
    box-sizing: border-box;
}
.faq-item.active .faq-answer {
    display: block;
}
/* Teachers proposal content FAQ */
.tp-cfaq__item {
    display: block;
    width: 100%;
}
.tp-cfaq__question {
    display: flex;
    width: 100%;
    box-sizing: border-box;
}

/* ── Global Video Card styles ────────────────────────────────────────────────
   Used by academia_render_videos() on all page templates.
   Duplicates key rules from home-sections.css so videos work everywhere. */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* ---- Student-stories carousel (course pages) ----------------------------
   Horizontal scroll-snap track + arrows. Reuses .video-card; only the wrapper
   differs from the homepage .video-grid. JS (academia.js) drives the arrows. */
.video-carousel { position: relative; }
.video-carousel__track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;            /* Firefox */
    padding: 12px 4px;                /* room for card shadow/hover-lift */
}
.video-carousel__track::-webkit-scrollbar { display: none; } /* WebKit */
.video-carousel__track .video-card {
    flex: 0 0 calc((100% - 48px) / 3); /* 3 visible (two 24px gaps) */
    scroll-snap-align: start;
}
.video-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e6e6e6;
    background: #fff;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
    transition: background .2s, opacity .2s;
}
.video-carousel__nav:hover { background: #f3f6fa; }
.video-carousel__nav--prev { left: 8px; }
.video-carousel__nav--next { right: 8px; }
.video-carousel__nav[disabled] { opacity: 0; pointer-events: none; }

@media (max-width: 968px) {
    .video-carousel__track .video-card { flex-basis: calc((100% - 24px) / 2); } /* 2 visible */
}
@media (max-width: 640px) {
    .video-carousel__track .video-card { flex-basis: 82%; } /* ~1.2 visible (peek) */
    .video-carousel__nav { display: none; }                 /* swipe instead */
}
.video-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.10);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.video-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}
.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .2s;
}
.video-card:hover .video-thumbnail img { opacity: .85; }

.video-thumbnail .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,.92);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
    transition: transform .2s, background .2s;
    z-index: 2;
}
.video-card:hover .play-button {
    transform: translate(-50%,-50%) scale(1.1);
    background: #fff;
}
.video-thumbnail .play-button .fa-play {
    color: var(--color-primary, #004f80);
    font-size: 20px;
    margin-left: 4px;
}

.video-thumbnail .badge-yellow {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ffe033;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 2;
}

.video-overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    z-index: 2;
}
.video-overlay-info .video-name {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
}
.video-overlay-info .video-country {
    display: block;
    color: rgba(255,255,255,.80);
    font-size: 12px;
    margin-top: 2px;
}

/* Academy-page sidebar video reuses .video-overlay-info (name/country). Ensure
   the card is the positioning context so the overlay anchors to it. */
.academy-sidebar-video { position: relative; }

/* ── Video Modal ──────────────────────────────────────────────────────────── */
.academia-video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.88);
    align-items: center;
    justify-content: center;
}
.academia-video-modal.is-open { display: flex; }
.academia-video-modal__inner {
    position: relative;
    width: 90vw;
    max-width: 900px;
    aspect-ratio: 16/9;
}
.academia-video-modal__inner iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 6px;
}
.academia-video-modal__close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}

/* Old GP-based footer styles removed – footer-custom.php + .academia-footer handle all footer styling */
