/*
 Theme Name:   Hello Elementor Child - Riscatto Next
 Theme URI:    https://riscatto.edu
 Description:  Hello Elementor Child Theme for Riscatto Radiant Sanctuary. Fully aligned with official brand manual.
 Author:       Antigravity
 Template:     hello-elementor
 Version:      1.2.0
 Text Domain:  hello-elementor-child
*/

/* ================================================================ */
/* 0. ELEMENTOR & WP NORMALIZATION (Must be first)                */
/* ================================================================ */

/* Force our background on all WP body states */
html body.radiant-sanctuary-theme,
html body.radiant-sanctuary-theme .site-content,
html body.radiant-sanctuary-theme #content,
html body.radiant-sanctuary-theme .page-content,
html body.radiant-sanctuary-theme main {
    background-color: #fffafa !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Prevent Elementor from adding an unwanted top margin to the first section */
.elementor-section.elementor-top-section:first-child { margin-top: 0 !important; }

/* Ensure our reveal animation always works */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s cubic-bezier(0.165, 0.84, 0.44, 1),
                transform 0.9s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.reveal.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ---------------------------------------------------------------- */
/* 1. DESIGN TOKENS (Radiant Sanctuary)                           */
/* ---------------------------------------------------------------- */
:root {
    /* Client Color Palette (Refined) */
    --primary: #0C6980; /* Deep Teal */
    --primary-bright: #00C2C0; /* Bright Cyan */
    --primary-container: #005062;
    --secondary: #F4A64E; /* Amber */
    --secondary-earth: #885B4E; /* Official Terracotta */
    --tertiary: #E5A6A0; /* Muted Rose */
    --surface-warm: #DBBBB4; /* Taupe */
    
    /* Metallic Gradients */
    --gradient-gold: linear-gradient(135deg, #CF9E4D 0%, #F4A64E 50%, #CF9E4D 100%);
    --gradient-rose-gold: linear-gradient(135deg, #E5A6A0 0%, #DBBBB4 50%, #C48E82 100%);
    
    --background: #fffafa;
    --surface-low: #fdf5f2;
    --surface-lowest: #ffffff;
    --on-surface: #1A1A1A;
    --outline-variant: rgba(191, 200, 204, 0.15);
    
    /* Typography Tokens */
    --font-headline: 'Newsreader', serif;
    --font-body: 'Biryani', sans-serif;
    --font-size-h1: 4.2rem;
    --font-size-h2: 3.2rem;
    --font-size-h3: 2rem;
    --font-size-body-lg: 1.15rem;
    --font-size-body: 1rem;
    --font-size-label: 0.7rem;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;
    --spacing-hero: 120px;
    
    /* Shadows */
    --shadow-ambient: 0 32px 48px rgba(51, 17, 11, 0.04);
    --shadow-ambient-hover: 0 40px 64px rgba(51, 17, 11, 0.08);
}

/* ---------------------------------------------------------------- */
/* 2. BASE STYLES & LAYOUT                                       */
/* ---------------------------------------------------------------- */
body {
    background-color: var(--background);
    color: var(--on-surface);
    font-family: var(--font-body);
    line-height: 1.7;
    font-size: var(--font-size-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headline);
    font-weight: 300;
    color: var(--primary-container);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

a { text-decoration: none; color: inherit; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section { padding: var(--spacing-xl) 0; }

/* ---------------------------------------------------------------- */
/* 3. HEADER & NAVIGATION                                         */
/* ---------------------------------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.5s ease;
    padding: 20px 0;
    background: transparent;
}

.header.scrolled {
    padding: 12px 0;
    background: rgba(255, 248, 246, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

/* ---------------------------------------------------------------- */
/* 3. NAVIGATION & MEGA MENU                                      */
/* ---------------------------------------------------------------- */
.riscatto-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 18px 0;
    background: transparent;
}

.riscatto-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.riscatto-nav-desktop {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto; /* Pushes the menu to the right */
}

.riscatto-nav-item { position: relative; display: flex; align-items: center; }

.riscatto-nav-item > a {
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--primary-container);
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.riscatto-nav-item:hover > a { opacity: 1; color: var(--primary-bright); }

/* Mega Menu Synchronization */
.riscatto-mega-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 720px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 36px;
    z-index: 9999;
    border-radius: 20px;
    border: 1px solid rgba(191,200,204,0.3);
    pointer-events: none; /* Prevent accidental triggers during transition */
}

.riscatto-nav-item:hover .riscatto-mega-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto !important;
}

.mega-grid {
    display: grid;
    grid-template-columns: 1.5fr 2.5fr;
    gap: var(--spacing-lg);
}

.mega-column h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--secondary-earth);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

.mega-list { list-style: none; padding: 0; }
.mega-list li { margin-bottom: 12px; }
.mega-list a { font-family: var(--font-headline); font-size: 1.1rem; color: var(--primary-container); transition: color 0.3s; }
.mega-list a:hover { color: var(--primary-bright); }

.mega-featured { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }

/* ---------------------------------------------------------------- */
/* 4. COMPONENTS & GLASS                                          */
/* ---------------------------------------------------------------- */
.glass {
    background: rgba(255, 248, 246, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--outline-variant);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-gold);
    color: #1A1A1A;
    padding: 12px 36px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(244, 166, 78, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(244, 166, 78, 0.25);
    filter: brightness(1.05);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-rose-gold);
    color: #1A1A1A;
    padding: 12px 36px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

/* Logo Sizing */
.logo-img { height: 60px; width: auto; display: block; }
.footer-logo .logo-img { height: 80px; }

/* ---------------------------------------------------------------- */
/* 5. FOOTER STYLES                                               */
/* ---------------------------------------------------------------- */
.footer {
    background-color: #1A1615;
    background-image: radial-gradient(circle at top, rgba(255,255,255,0.06) 0%, transparent 80%);
    color: white;
    padding: 80px 0 40px;
}

.footer-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* Changed to allow wrapping */
    gap: 40px;
    margin-bottom: 60px;
}

/* Explicit column widths for desktop */
.footer-col-1 { flex: 2 1 300px; }
.footer-col-2 { flex: 1 1 150px; }
.footer-col-3 { flex: 1 1 150px; }
.footer-col-4 { flex: 2 1 300px; }

.footer-desc { opacity: 0.5; font-family: var(--font-headline); font-style: italic; font-size: 0.9rem; line-height: 1.6; max-width: 320px; }
.footer-column h4 { color: var(--secondary); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 24px; font-weight: 700; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 14px; }
.footer-links a { opacity: 0.6; font-size: 0.9rem; transition: all 0.3s; }
.footer-links a:hover { opacity: 1; color: var(--secondary); }

.newsletter-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 32px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.newsletter-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    margin-bottom: 16px;
    outline: none;
    font-size: 0.9rem;
}

.footer-bottom { 
    border-top: 1px solid rgba(255, 255, 255, 0.08); 
    padding-top: 40px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 0.75rem; 
    opacity: 0.5; 
}

/* Mobile Adjustments (Increased Breakpoint & Specificity) */
@media screen and (max-width: 1024px) {
    .footer { padding-top: 60px !important; }
    .footer-grid { 
        flex-direction: column !important; 
        flex-wrap: wrap !important;
        gap: 50px !important; 
    }
    .footer-column { 
        flex: 1 1 auto !important; 
        width: 100% !important; 
        max-width: 100% !important;
    }
    .footer-desc { max-width: 100% !important; }
    
    .footer-bottom { 
        flex-direction: column !important; 
        gap: 24px !important; 
        text-align: center !important; 
        align-items: center !important;
    }
    .footer-bottom div { 
        flex-wrap: wrap !important; 
        justify-content: center !important; 
        gap: 20px !important; 
    }
}

/* ---------------------------------------------------------------- */
/* 6. LMS & ANIMATIONS                                            */
/* ---------------------------------------------------------------- */
/* ---------------------------------------------------------------- */
/* 7. PERFORMANCE & CONSOLIDATED STYLES (Riscatto Optimization)    */
/* ---------------------------------------------------------------- */

/* Toggle Icons Visibility & Styling Fix */
.riscatto-menu-toggle, .riscatto-cart-toggle { 
    display: none; 
    background: transparent !important;
    border: none !important;
    color: var(--primary-container) !important;
    padding: 0 !important;
    cursor: pointer;
    box-shadow: none !important;
}
.riscatto-header .icon-close { display: none !important; }
.riscatto-header.menu-open .icon-close { display: block !important; }
.riscatto-header.menu-open .icon-hamburger { display: none !important; }

.riscatto-mobile-overlay {
    position: fixed;
    inset: 0;
    /* FIX: Use a truly opaque background so page content doesn't bleed through */
    background: #FAF7F4; /* solid cream, matches --bg-primary */
    z-index: 9999;  /* above WooCommerce, Elementor, and admin bar */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* don't block clicks when invisible */
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.4s;
    padding: 40px;
    box-sizing: border-box;
    overflow-y: auto; /* allow scroll if menu is taller than viewport */
}
.riscatto-header.menu-open .riscatto-mobile-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.riscatto-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 32px;
    text-align: center;
}
.riscatto-mobile-nav a {
    font-family: var(--font-headline);
    font-size: 2rem;
    color: var(--primary-container);
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}
.riscatto-header.menu-open .riscatto-mobile-nav a { opacity: 1; transform: translateY(0); }

/* Stagger link animations */
.riscatto-header.menu-open .riscatto-mobile-nav a:nth-child(1) { transition-delay: 0.1s; }
.riscatto-header.menu-open .riscatto-mobile-nav a:nth-child(2) { transition-delay: 0.15s; }
.riscatto-header.menu-open .riscatto-mobile-nav a:nth-child(3) { transition-delay: 0.2s; }
.riscatto-header.menu-open .riscatto-mobile-nav a:nth-child(4) { transition-delay: 0.25s; }
.riscatto-header.menu-open .riscatto-mobile-nav a:nth-child(5) { transition-delay: 0.3s; }

@media screen and (max-width: 1024px) {
    .riscatto-nav-desktop { display: none !important; }
    .riscatto-menu-toggle, .riscatto-cart-toggle { display: flex !important; }
    /* Fix: Cart toggle needs relative positioning so the badge badge stays inside it */
    .riscatto-cart-toggle { position: relative !important; }
    /* Fix: Mobile actions wrapper should not be position:relative — prevents badge bleed-out */
    .riscatto-cart-toggle span[style] {
        position: absolute !important;
        top: -4px !important;
        right: -4px !important;
    }
}

/* Consolidated from Footer.php (Mobile Side-by-Side Fix) */
@media screen and (max-width: 1024px) {
    .footer-grid {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 60px 0px !important;
        display: flex !important;
        text-align: center !important;
    }
    .footer-column {
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .footer-col-1, .footer-col-4 { width: 100% !important; }
    .footer-col-2, .footer-col-3 { width: 50% !important; flex: 1 1 50% !important; }
    
    .newsletter-btn {
        width: 100% !important;
        border-radius: 100px !important;
        height: auto !important;
        padding: 16px 30px !important;
    }
}

/* Consolidated from Front-Page.php (Hero & Grids) */
@media screen and (max-width: 991px) {
    .riscatto-hero-grid { grid-template-columns: 1fr !important; gap: 40px !important; text-align: center; }
    .riscatto-hero-text { order: 2; display: flex; flex-direction: column; align-items: center; }
    .riscatto-hero-image { order: 1; padding-bottom: 20px !important; }
    .riscatto-hero-quote { left: 50% !important; transform: translateX(-50%) !important; width: 80% !important; bottom: -20px !important; }
}

@media screen and (max-width: 768px) {
    .riscatto-section-grid, .riscatto-store-grid, .riscatto-courses-grid { 
        grid-template-columns: 1fr !important; 
        gap: 40px !important; 
    }
    .riscatto-tienda-header { flex-direction: column !important; align-items: flex-start !important; gap: 16px !important; }
}
/* ---------------------------------------------------------------- */
/* 8. WOOCOMMERCE RESPONSIVE (Cart & Checkout)                     */
/* ---------------------------------------------------------------- */

/* Prevent any WooCommerce container from overflowing */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

@media screen and (max-width: 768px) {

    /* Global overflow guard */
    body.woocommerce-cart,
    body.woocommerce-checkout {
        overflow-x: hidden;
    }

    /* --- CART TABLE: Convert to stacked card list --- */
    .woocommerce-cart table.cart,
    .woocommerce-cart table.cart thead,
    .woocommerce-cart table.cart tbody,
    .woocommerce-cart table.cart th,
    .woocommerce-cart table.cart td,
    .woocommerce-cart table.cart tr {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .woocommerce-cart table.cart thead { display: none !important; }
    .woocommerce-cart table.cart td {
        text-align: right !important;
        padding: 12px 16px 12px 50% !important;
        position: relative !important;
        border-bottom: 1px solid rgba(191,200,204,0.2) !important;
    }
    .woocommerce-cart table.cart td::before {
        content: attr(data-title);
        position: absolute;
        left: 16px;
        width: 45%;
        text-align: left;
        font-family: var(--font-body);
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--primary-container);
        opacity: 0.5;
        top: 50%;
        transform: translateY(-50%);
    }
    .woocommerce-cart table.cart td.product-thumbnail { padding: 12px 16px !important; text-align: left !important; }
    .woocommerce-cart table.cart td.product-thumbnail::before { display: none !important; }
    .woocommerce-cart td.product-thumbnail img { width: 64px !important; }
    .woocommerce-cart table.cart td.product-remove { text-align: right !important; padding: 10px 16px !important; }
    .woocommerce-cart table.cart td.product-remove::before { display: none !important; }
    .woocommerce-cart .actions { display: block !important; width: 100% !important; box-sizing: border-box !important; }

    /* --- CART COLLATERALS: Stack coupon + totals --- */
    .woocommerce-cart .cart-collaterals {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
        width: 100% !important;
    }
    .woocommerce-cart .cart_totals,
    .woocommerce-cart .coupon,
    .woocommerce-cart .cart-collaterals .cross-sells {
        width: 100% !important;
        float: none !important;
        box-sizing: border-box !important;
    }
    .woocommerce-cart .cart_totals table { width: 100% !important; }

    /* --- CHECKOUT: Force single-column layout --- */

    /* The main wrapper that holds customer_details + order_review */
    .woocommerce-checkout form.checkout {
        display: flex !important;
        flex-direction: column !important;
        gap: 32px !important;
    }

    /* The col2-set holds billing + shipping side by side */
    .woocommerce-checkout .col2-set {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
    .woocommerce-checkout .col2-set .col-1,
    .woocommerce-checkout .col2-set .col-2 {
        float: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 !important;
    }

    /* customer_details and order_review are flex siblings */
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout #order_review {
        float: none !important;
        width: 100% !important;
        margin-right: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* Order review table */
    .woocommerce-checkout .woocommerce-checkout-review-order-table,
    .woocommerce-checkout .woocommerce-checkout-review-order-table th,
    .woocommerce-checkout .woocommerce-checkout-review-order-table td {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    /* Input fields go full width */
    .woocommerce-checkout .form-row-first,
    .woocommerce-checkout .form-row-last {
        float: none !important;
        width: 100% !important;
        padding-right: 0 !important;
    }

    /* Payment section */
    .woocommerce-checkout #payment { 
        padding: 20px 16px !important; 
        box-sizing: border-box !important;
        width: 100% !important;
    }

    /* Place order button: full width, finger-tap friendly */
    .woocommerce-checkout #place_order {
        width: 100% !important;
        display: block !important;
    }
    /* *** REAL FIX: Target the ACTUAL plugin grid classes (discovered via DOM inspection) *** */

    /* CHECKOUT: .wc-co-grid uses a CSS grid with fixed pixel column widths */
    .wc-co-wrap,
    .wc-co-grid {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .wc-co-grid > *,
    .wc-co-aside,
    .wc-co-form-card {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    /* CART: .wc-cart-aside holds the "Resumen del Pedido" with fixed width */
    .wc-cart-aside,
    .wc-cart-summary-card {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        display: block !important;
        box-sizing: border-box !important;
        position: static !important;
    }
    /* Also override any parent that creates side-by-side cart layout */
    .woocommerce-cart .woocommerce > *,
    .woocommerce-cart form.woocommerce-cart-form ~ * {
        width: 100% !important;
        float: none !important;
        display: block !important;
        box-sizing: border-box !important;
    }
}

/* ---------------------------------------------------------------- */
/* 9. ADDITIONAL MOBILE REFINEMENTS (from UX audit)                */
/* ---------------------------------------------------------------- */

@media screen and (max-width: 480px) {

    /* FIX: Tienda grid → single column on small phones */
    .riscatto-store-grid {
        grid-template-columns: 1fr !important;
    }

    /* FIX: Community events card — button goes full-width */
    .riscatto-event-card {
        flex-wrap: wrap !important;
        gap: 16px !important;
        align-items: flex-start !important;
    }
    .riscatto-event-card .riscatto-btn,
    .riscatto-event-card a[class*="btn"],
    .riscatto-event-card .riscatto-event-cta {
        width: 100% !important;
        text-align: center !important;
        flex: 1 0 100% !important;
    }

    /* FIX: Homepage hero — show content without initial scroll */
    .riscatto-hero,
    .riscatto-hero-section {
        min-height: 70vh !important;
        height: auto !important;
    }
    .riscatto-hero-grid {
        min-height: unset !important;
    }

    /* FIX: Cart aside — belt-and-suspenders for small phones */
    .wc-cart-aside,
    .wc-cart-summary-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        float: none !important;
        position: static !important;
        display: block !important;
    }
}

/* ---------------------------------------------------------------- */
/* 10. LANGUAGE SWITCHER (Minimalist ES | EN)                     */
/* ---------------------------------------------------------------- */
.riscatto-lang-switcher-desktop {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-right: 15px !important;
    padding-right: 15px !important;
    border-right: 1px solid rgba(0, 80, 98, 0.1) !important;
}

/* Hide the mobile actions switcher on desktop FORCEFULLY */
.riscatto-lang-switcher {
    display: none !important;
}

button.lang-btn, .lang-btn {
    background: transparent !important;
    border: none !important;
    color: #005062 !important;
    font-family: 'Biryani', sans-serif !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    opacity: 0.4 !important;
    transition: all 0.3s ease !important;
    padding: 4px 2px !important;
    letter-spacing: 0.1em !important;
    box-shadow: none !important;
    min-height: unset !important;
    line-height: 1 !important;
    outline: none !important;
    margin: 0 !important;
}

.riscatto-lang-switcher-desktop .lang-btn:hover,
.riscatto-lang-switcher-desktop .lang-btn.active,
.riscatto-lang-switcher .lang-btn:hover,
.riscatto-lang-switcher .lang-btn.active {
    opacity: 1 !important;
    color: #CF9E4D !important;
    background: transparent !important;
}

.lang-divider {
    color: #005062 !important;
    opacity: 0.2 !important;
    font-size: 0.6rem !important;
    margin: 0 2px !important;
}

/* Mobile Language Switcher Positioning */
@media screen and (max-width: 1024px) {
    .riscatto-nav-desktop { display: none !important; }
    .riscatto-lang-switcher-desktop {
        display: none !important;
    }
    
    .riscatto-lang-switcher {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        margin-right: 10px !important;
        padding-right: 10px !important;
        border-right: 1px solid rgba(0, 80, 98, 0.1) !important;
    }
}

/* Mobile Overlay Language Switcher */
.riscatto-lang-switcher-mobile {
    margin-top: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    border-top: 1px solid rgba(0, 80, 98, 0.05) !important;
    padding-top: 30px !important;
}

.riscatto-lang-switcher-mobile .lang-btn {
    font-size: 0.8rem !important;
    opacity: 0.5 !important;
}

.riscatto-lang-switcher-mobile .lang-btn.active {
    opacity: 1 !important;
    color: #CF9E4D !important;
}


/* Language Switcher Refinement */
.lang-btn {
    background: transparent !important;
    border: none !important;
    color: #005062 !important;
    font-family: 'Biryani', sans-serif !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    opacity: 0.35 !important;
    transition: all 0.3s ease !important;
    padding: 0 4px !important;
    letter-spacing: 0.05em !important;
    box-shadow: none !important;
    min-height: unset !important;
    line-height: normal !important;
}

.lang-btn.active {
    opacity: 1 !important;
    border-bottom: 1.5px solid #cfae5e !important; /* Gold underline for active */
}

.lang-btn:hover {
    opacity: 0.8 !important;
}

.lang-divider {
    color: #005062 !important;
    font-size: 0.65rem !important;
    opacity: 0.35 !important;
    margin: 0 2px !important;
}


/* ============================================
   FIX FULL WIDTH LAYOUT - Riscatto
   ============================================ */

/* Elementor boxed sections */
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: 1400px !important;
}

/* Footer container */
body .container {
  max-width: 1400px !important;
}

/* Plugin STM LMS */
body #main .stm_lms_courses_wrapper,
body .stm_lms_courses_wrapper {
  max-width: 1400px !important;
}
