/* ==========================================
   HEADER PRELOADER (SKELETON FIX)
   ========================================== */
#master-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 80px; /* Desktop height */
    background-color: #141B2D; /* Your master menu dark blue */
    z-index: 9999;
}

@media (max-width: 768px) {
    #master-header {
        min-height: 60px; /* Mobile height */
    }
}

/* ==========================================
   MASTER SLIM HERO & BREADCRUMB (ULTRA-PREMIUM)
   ========================================== */

/* 1. FULL WIDTH & GAP FIX */
.master-slim-hero {
    width: 100%;
    max-width: 100%; 
    margin: -5px 0 0 0 !important; 
    padding: 30px 20px 20px 20px;
    background: linear-gradient(to bottom, #111827, #1a233a); 
    border-top: 1px solid rgba(197, 160, 89, 0.4); 
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    position: relative;
    z-index: 50; 
}

/* 2. REFINED TYPOGRAPHY */
.master-hero-header {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 1150px; /* Keeps the text perfectly aligned with your page content */
}

.master-hero-header h1 {
    font-family: 'Montserrat', sans-serif !important; /* Clean, modern, industrial */
    font-size: clamp(22px, 3vw, 32px) !important;
    font-weight: 800 !important;
    margin: 0 0 8px 0 !important;
    color: #ffffff !important; /* Crisp white for ultimate contrast */
    letter-spacing: 1px;
    text-transform: uppercase !important;
    border: none !important;
}

.master-hero-header p {
    font-family: "Segoe UI", sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #c5a059 !important; 
    letter-spacing: 2px !important;
    margin: 0 !important;
    text-transform: uppercase !important;
    text-align: center !important; /* Forces the text to stay perfectly centered */
    width: 100%;
    display: block;
}

/* 3. BREADCRUMB STYLING */
.master-breadcrumb {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start; /* Aligns content to the left */
    gap: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #8892a3; 
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-left: 50px; /* Matches the 50px padding of your main menu */
    margin: 0; /* Removes centering */
}

.master-breadcrumb a {
    color: #a1b0cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.master-breadcrumb a:hover {
    color: #ffffff;
}

.master-breadcrumb .bc-sep {
    color: #4a5568;
    font-size: 9px;
}

.master-breadcrumb .bc-current {
    color: #c5a059 !important; /* Active page in sharp gold */
}

/* 4. DROPDOWN VISIBILITY & LUXURY FIX */
.arrow-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-bottom: 15px; /* Creates an invisible bridge for your mouse! */
    margin-bottom: -15px; /* Prevents the padding from messing up your layout */
}

.blinking-arrow {
    animation: bcBlink 1.5s infinite;
    cursor: pointer;
    padding: 0 4px;
    color: #c5a059 !important;
}

@keyframes bcBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.bc-grid-dropdown {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%; /* Snaps flush to the invisible bridge */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff;
    border-top: 3px solid #c5a059;
    border-radius: 4px;
    padding: 15px;
    width: max-content;
    min-width: 320px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    z-index: 999999 !important; 
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    pointer-events: none;
}

/* Trigger hover from the wrapper */
.arrow-dropdown-wrapper:hover .bc-grid-dropdown,
.bc-grid-dropdown:hover {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto !important; 
}

/* Dropdown Inner Styling */
.bc-grid-header {
    font-size: 11px;
    color: #141B2D;
    font-weight: 800;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
    text-align: center;
}

.bc-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bc-grid-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.bc-grid-item i {
    color: #c5a059;
    font-size: 14px;
}

.bc-grid-item:hover {
    background: #141B2D;
    color: #fff;
    border-color: #c5a059;
}


/* 5. MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    /* Safely shrinks the body padding to match your smaller mobile header! */
    body {
        padding-top: 60px !important; 
    }

    .master-slim-hero {
        /* REMOVED the negative margin that was causing the overlap */
        margin-top: 0 !important;
        padding-top: 35px !important; 
    }
    
    .master-hero-header h1 {
        font-size: 24px !important;
    }
    .master-breadcrumb {
        justify-content: center !important;
        padding-left: 0 !important;
    }
    .bc-grid-dropdown {
        min-width: 280px;
        padding: 10px;
    }
    .bc-grid-container {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SUB-PIXEL GAP KILLER (REMOVES WHITE HAIRLINE UNDER MENU)
   ========================================================================== */

/* --- ULTIMATE HAIRLINE & BOTTOM GAP FIX (UNIFIED) --- */
.master-slim-hero, 
.hero {
    margin-top: -10px !important; 
    min-height: auto !important; 
    padding-top: 45px !important; 
    padding-bottom: 20px !important; 
    position: relative;
    z-index: 50 !important; /* FIX: Raises hero and dropdown OVER the image grid */
    display: flex;
    flex-direction: column;
    justify-content: center;
}
/* Ensure the header has no ghost-lines */
#master-header {
    border-bottom: none !important;
    box-shadow: none !important;
}

/* --- MASTER GRCA POPUP STYLES --- */
.popup-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: #ffffff;
    width: 95%;
    max-width: 1200px;
    height: 85vh; 
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    overflow: hidden; 
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10001;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.close-btn:hover {
    color: white;
    background-color: #e74c3c;
}

.popup-iframe {
    width: 100%;
    height: calc(100% + 250px); /* The cookie banner clipping hack */
    border: none;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* --- MOBILE FIX FOR COOKIE BANNER CLIPPING --- */
@media screen and (max-width: 768px) {
    .popup-iframe {
        /* The banner text wraps on mobile, making it much taller. 
           We must push it down further to keep it out of sight. */
        height: calc(100% + 450px) !important; 
    }
}