/* ============================================
   COMPONENTS - SonnerStudio Design System
   ============================================ */

/* ============================================
   HEADER BANNER (Lightning)
   ============================================ */

.header-banner {
    width: 100%;
    height: 300px;
    background-image: url('../assets/images/header-banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.header-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    pointer-events: none;
}

@media (max-width: 768px) {
    .header-banner {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .header-banner {
        height: 150px;
    }
}

/* ============================================
   SITE HEADER & NAVIGATION
   ============================================ */

.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
    z-index: var(--z-sticky);
    transition: background-color var(--transition-base);
}

/* 
   Container: Full Width, Items Left-Aligned by default.
   We use margin-left: auto on the Nav to push it to the right.
*/
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    height: 80px;
    position: relative;
    width: 100% !important;
    /* Force full width */
    max-width: 100% !important;
    /* Override standard container limit */
    padding: 0 20px;
    /* Standard padding from edge */
    margin: 0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity var(--transition-base);
    margin-right: 20px;
    /* Space between logo and nav area */
    flex-shrink: 0;
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    height: 60px;
    /* Increased for better visibility of horizontal branding */
    width: auto;
    max-width: 280px;
    /* Prevent it from being too wide */
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.02);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-title {
    font-size: 18px;
    font-weight: var(--weight-black);
    color: var(--accent-gold);
    letter-spacing: 1px;
    text-shadow: var(--shadow-sm);
}

.logo-subtitle {
    font-size: 9px;
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Main Navigation (Desktop) */
.main-nav {
    display: flex;
    align-items: center;
    /* 
       Dynamic Gap using Viewport Width (vw):
       - Scales fluidly with screen width.
       - Ensures larger gaps on wide screens (filling space).
       - Keeps gaps robust for variable word lengths.
       - 1.5vw is approx 28px at 1920px and 20px at 1366px.
    */
    gap: 1.5vw;
    margin-left: auto;
    /* Pushes the nav to the RIGHT edge */
    margin-right: 15px;
    /* Safety margin */
    flex-wrap: nowrap;
}

.main-nav a {
    font-size: 14px;
    font-weight: var(--weight-bold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 0;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    position: relative;
    white-space: nowrap;
    text-align: center;
}

.main-nav a:hover {
    color: var(--accent-gold);
}

.main-nav a.active {
    color: var(--accent-gold);
    font-weight: var(--weight-bold);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-gold);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--border-medium);
    color: var(--accent-gold);
    font-size: 24px;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    margin-left: auto;
    /* Ensure it stays right on mobile too */
}

.mobile-menu-toggle:hover {
    background-color: rgba(255, 215, 0, 0.1);
    border-color: var(--accent-gold);
}

/* RESPONSIVE: Switch to Hamburger earlier (1450px) to absolutely prevent cutoff */
@media (max-width: 1450px) {
    .main-nav {
        display: none;
        /* Hide standard nav */
    }

    .mobile-menu-toggle {
        display: block;
        /* Show hamburger */
    }

    /* Mobile Menu Active State */
    .main-nav.active {
        display: flex;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: var(--bg-secondary);
        border-bottom: 1px solid var(--border-subtle);
        padding: var(--space-md);
        gap: var(--space-sm);
        height: auto;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        margin-left: 0;
        /* Reset margin for mobile list */
    }

    .main-nav.active a {
        width: 100%;
        text-align: center;
        padding: 15px;
        font-size: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* ============================================
   SITE FOOTER
   ============================================ */

.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-xl) 0 var(--space-lg);
    margin-top: var(--space-2xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-section h3 {
    font-size: var(--text-h4);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.footer-section h4 {
    font-size: var(--text-small);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: var(--space-sm);
}

.footer-section p {
    font-size: var(--text-small);
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.footer-section a {
    display: block;
    font-size: var(--text-small);
    color: var(--text-tertiary);
    margin-bottom: var(--space-xs);
    transition: color var(--transition-base);
}

.footer-section a:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.footer-bottom p {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-small);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: #000000;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-lightning);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-medium);
}

.btn-secondary:hover {
    background-color: var(--bg-quaternary);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.btn-ghost {
    background: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
}

.btn-ghost:hover {
    background-color: rgba(255, 215, 0, 0.1);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--accent-gold);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--accent-lightning);
}

.card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: var(--space-sm);
}

.card-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--accent-gold);
}

.card-title {
    font-size: var(--text-h3);
    font-weight: var(--weight-extrabold);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.card-text {
    font-size: var(--text-body);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: var(--space-xl) 0;
}

.section-title {
    font-size: var(--text-h2);
    font-weight: var(--weight-extrabold);
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-xl);
    text-shadow: var(--shadow-md);
}

.section-subtitle {
    font-size: var(--text-h4);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-lg);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    text-align: center;
    padding: var(--space-2xl) 0;
}

.hero-title {
    font-size: var(--text-hero);
    font-weight: var(--weight-black);
    color: var(--accent-gold);
    margin-bottom: var(--space-md);
    line-height: 1.1;
    text-shadow: var(--shadow-md);
}

.hero-subtitle {
    font-size: var(--text-h3);
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
    text-shadow: var(--shadow-sm);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

/* ============================================
   CUSTOM LANGUAGE SELECTOR
   ============================================ */

.custom-select-wrapper {
    position: relative;
    user-select: none;
    margin-right: 0;
    z-index: 1100;
    flex-shrink: 0;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    min-width: 130px;
    justify-content: space-between;
}

.custom-select-trigger:hover,
.custom-select-wrapper.open .custom-select-trigger {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.flag-icon {
    width: 22px;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.arrow {
    font-size: 10px;
    opacity: 0.7;
    margin-left: 8px;
    transition: transform 0.3s;
}

.custom-select-wrapper.open .arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.custom-options {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 220px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

/* Scrollbar Style */
.custom-options::-webkit-scrollbar {
    width: 6px;
}

.custom-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.custom-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 20px;
    /* Slide effect */
}

.custom-option.selected {
    background: rgba(212, 175, 55, 0.2);
    color: var(--accent-gold);
    border-left: 3px solid var(--accent-gold);
}

.custom-option .flag-icon {
    width: 20px;
}

/* Mobile Adjustment for Dropdown Trigger */
@media (max-width: 768px) {
    .custom-select-trigger {
        padding: 8px 12px;
        min-width: unset;
    }

    .custom-select-trigger span:not(.arrow) {
        display: none;
        /* Hide text on very small screens, keep flag */
    }
}