/*
Theme Name: Bullion247
Theme URI: https://www.codeoptix.in
Author: Sandeep Kumar
Author URI: https://www.codeoptix.in
Description: Bullion247 Custom Theme. Native WordPress Customizer support for all sections.
Version: 5.0
Text Domain: bullion247
*/

/* =======================================================
   1. VARIABLES & GLOBAL RESET
   ======================================================= */
:root {
    /* COLORS */
    --brand-navy: #002b49;
    --brand-gold: #c5a059;
    --brand-gold-light: #e0d0b0;
    --brand-gold-hover: #b48f4d;
    --light-cream: #fdfaf5; 
    --footer-text: #88a0b0;
    --section-grey: #f4f4f4;

    /* SPACING VARIABLES */
    --spacing-desktop: 40px;
    --spacing-mobile: 30px;

    /* FONTS */
    --fnt-Family-Body: 'Source Sans 3', 'Freight Sans Pro', Arial, sans-serif;
    --fnt-Family-Title: 'Playfair Display', 'Miller Display', 'Times New Roman', serif;
}

html { overflow-x: unset; }
body { 
    max-width: 100%; 
    overflow-x: hidden; 
    font-family: var(--fnt-Family-Body); 
    color: #333; 
}

h1, h2, h3, h4, h5, .serif { font-family: var(--fnt-Family-Title); }
a { text-decoration: none; transition: all 0.3s ease; }

/* GLOBAL HEADING SIZES */
h2 { font-size: 2.2rem; margin-bottom: 20px; line-height: 1.2; color: var(--brand-navy); }
p { font-size: 1rem; line-height: 1.6; color: #555; }

/* WP RESET FOR ADMIN BAR */
body.admin-bar .navbar.sticky-top { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .navbar.sticky-top { top: 46px; } }

/* --- BUTTONS --- */
.btn, .btn-navy, .btn-gold, .btn-navy-block, .register-btn, .ticker-btn {
    border-radius: 10px !important;
    transition: all 0.3s ease-in-out !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

/* Navy Button */
.btn-navy { background-color: var(--brand-navy); color: white; padding: 12px 30px; }
.btn-navy:hover { background-color: var(--brand-gold); color: white; transform: translateY(-2px); }

/* Gold Button */
.btn-gold { background-color: var(--brand-gold); color: white; padding: 12px 30px; }
.btn-gold:hover { background-color: var(--brand-navy); color: white; transform: translateY(-2px); }

/* Block Button */
.btn-navy-block { 
    background-color: var(--brand-navy); color: white; 
    padding: 12px 25px; display: inline-block; text-align: center; 
}
.btn-navy-block:hover { background-color: var(--brand-gold); color: white; text-decoration: none; transform: translateY(-2px); }

/* Outline Button */
.btn-outline-navy {
    border: 2px solid var(--brand-navy);
    color: var(--brand-navy);
    padding: 12px 35px;
    background: transparent;
}
.btn-outline-navy:hover {
    background: var(--brand-navy);
    color: white;
}

/* --- UNIFIED SPACING CLASS --- */
.section-padding { 
    padding-top: var(--spacing-mobile) !important; 
    padding-bottom: var(--spacing-mobile) !important; 
} 

/* =======================================================
   2. HEADER & NAVIGATION
   ======================================================= */
.top-header { padding: 10px 0; background: #fff; }
.header-logo img { height: 60px; width: auto; /* Fix for WP Custom Logo */ }
.contact-info { font-size: 13px; font-weight: 600; color: #333; letter-spacing: 0.5px; }
.contact-info span { margin-right: 20px; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 15px; }
.search-box { position: relative; width: 200px; }
.search-box input { width: 100%; border: 1px solid #eee; padding: 6px 30px 6px 10px; font-size: 13px; background: #fafafa; font-family: var(--fnt-Family-Body); border-radius: 6px; }
.search-box i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #999; font-size: 12px; }
.header-icon { font-size: 18px; color: #333; cursor: pointer; }

/* NAVBAR */
.navbar { padding: 0; background: white; transition: box-shadow 0.3s ease; z-index: 1020; }
a.nav-link.register-btn {
    color: var(--brand-navy) !important;
    font-weight: bold;
    font-size: 16px;
    border: 1px solid #cfb26c !important;
    padding: 10px !important;
}
.section-six { margin-top: 60px; }

@media (min-width: 992px) {
    .navbar-nav .nav-link { 
        font-size: 14px; font-weight: 700; text-transform: uppercase; color: var(--brand-navy) !important; 
        padding: 16px 28px !important; letter-spacing: 0.5px; border-right: 1px solid #f6f6f5;
    }
    .navbar-nav .nav-item:last-child .nav-link { border-right: none; }
    .register-btn { 
        color: #002b49 !important; border-right: none !important; 
        padding: 16px 30px !important; 
    }
    .register-btn:hover { 
        background-color: transparent !important; 
        color: var(--brand-gold) !important; 
        border-color: var(--brand-navy) !important;
    }
    
    /* --- MEGA MENU LOGIC --- */
    .nav-item.dropdown:hover .dropdown-menu { display: block; margin-top: 0; }
    
    /* Full Width Mega Menu */
    .has-mega-menu .dropdown-menu { 
        width: 100vw; left: 50% !important; 
        transform: translateX(-50%) !important; 
        border: none; border-radius: 0; 
        background-color: var(--brand-navy); 
        padding: 40px 0; z-index: 1000; 
    }
    
    .has-mega-menu h6 { 
        color: var(--brand-gold); 
        text-transform: uppercase; 
        font-size: 12px; font-weight: 700; 
        margin-bottom: 15px; 
        border-bottom: 1px solid rgba(255,255,255,0.1); 
        padding-bottom: 5px; 
    }
    
    /* Links inside Mega Menu */
    .has-mega-menu a { 
        color: white !important; 
        font-size: 12px; 
        padding: 5px 0; 
        display: block; 
        font-weight: 300; 
        text-decoration: none;
    }
    .has-mega-menu a:hover { color: var(--brand-gold) !important; }
    
    /* Standard Dropdown (Non-Mega) */
    .dropdown-menu:not(.mega-menu) { border-radius: 0; border: none; box-shadow: 0 5px 15px rgba(0,0,0,0.1); padding: 15px; }
    .dropdown-menu:not(.mega-menu) .dropdown-item { font-size: 12px; text-transform: uppercase; color: var(--brand-navy); padding: 8px 15px; font-weight: 700; }
    .dropdown-menu:not(.mega-menu) .dropdown-item:hover { color: var(--brand-gold); background: transparent; }

    /* Linear Single Line Menu (Services) */
    .linear-menu-container {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 60px; /* Space between items */
    }
    .linear-menu-link {
        color: #fff !important;
        font-size: 14px !important; 
        font-weight: 700 !important;
        text-transform: uppercase;
        letter-spacing: 1px;
        padding: 0 !important;
        transition: color 0.3s ease;
        text-decoration: none;
        display: inline-block;
    }
    .linear-menu-link:hover {
        color: var(--brand-gold) !important;
        text-decoration: none;
    }
}

/* --- MOBILE MENU --- */
.offcanvas { max-width: 85%; z-index: 1055; } 
.offcanvas-header { border-bottom: 1px solid #eee; padding: 15px 20px; }
.offcanvas-title img { height: 40px; }
.mobile-nav { padding: 0; }
.mobile-nav li { list-style: none; }
.mobile-nav li a { display: block; width: 100%; padding: 15px 20px; background: none; border: none; border-bottom: 1px solid #f5f5f5; font-size: 14px; font-weight: 700; text-transform: uppercase; color: var(--brand-navy); text-align: left; }
.mobile-nav li a:hover { color: var(--brand-gold); }

.navbar-toggler { border: none; padding: 0; font-size: 1.5rem; color: var(--brand-navy); }
.navbar-toggler:focus { box-shadow: none; }

/* =======================================================
   3. COMPONENTS (Ticker, Hero, Content)
   ======================================================= */

/* TICKER */
.ticker-section { border-bottom: 1px solid #eee; background: #fff; position: relative; }
.ticker-wrapper { display: flex; align-items: center; padding: 5px 0; overflow: hidden; }
.ticker-btn { background: none; border: 1px solid #eee; color: var(--brand-navy); width: 25px; height: 25px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 5px !important; }
.ticker-btn:hover { background: var(--brand-gold); color: #fff; border-color: var(--brand-gold); }
.ticker-window { overflow-x: auto; white-space: nowrap; flex-grow: 1; margin: 0 10px; scrollbar-width: none; }
.ticker-window::-webkit-scrollbar { display: none; }
.ticker-content { display: inline-flex; gap: 30px; }
.ticker-item { font-size: 11px; font-weight: 700; color: #555; text-transform: uppercase; display: flex; align-items: center; gap: 5px; }
.ticker-val { transition: color 0.5s ease; }
.val-up { color: #28a745; }
.val-down { color: #dc3545; }

/* HERO */
.carousel-item { height: 600px; background-position: center; background-size: cover; position: relative; }
.carousel-caption { bottom: 25%; text-align: left; left: 10%; right: auto; width: 50%; }
.hero h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 30px; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); color: #fff; }

/* CONTENT BOXES */
.service-card h2 { color: var(--brand-navy); margin: 20px 0; }
.icon-service img { width: 100%;  object-fit: cover; margin-bottom: 20px; }
.icon-service h5 { color: var(--brand-navy); font-size: 1.5rem; margin-bottom: 5px; }
.find-out-more { color: var(--brand-gold); text-decoration: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--brand-gold); }

/* SELL SECTION */
.section-two { position: relative; }
.sell-bg-layer { position: absolute; top:-35px; bottom: -35px; left: 0; width: 65%; background-color: var(--light-cream); z-index: 1; }
.sell-content-row { position: relative; z-index: 2; }
.sell-text-content { padding: 40px; }
.sell-gold-img { width: 100%; height: 100%; object-fit: cover; min-height: 500px; display: block; box-shadow: 10px 10px 30px rgba(0,0,0,0.05); }
.sell-eyebrow { font-size: 0.75rem; letter-spacing: 2px; font-weight: 700; color: #333; margin-bottom: 15px; display: block; text-transform: uppercase; }
.sell-title { font-size: 2.5rem; color: #000; margin-bottom: 25px; }

/* HISTORY SECTION */
.section-three { 
    position: relative; 
    background-color: #fff; 
    overflow: visible; 
    z-index: 10; 
}
.history-content-wrapper { position: relative; z-index: 2;  }

.eyebrow-text { font-size: 0.8rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #333; margin-bottom: 10px; display: block; }
.history-title { font-size: 42px; color: var(--brand-gold); margin-bottom: 30px; line-height: 1.1; }
.drop-cap { float: left; font-size: 4.5rem; line-height: 0.8; color: var(--brand-gold); font-family: var(--fnt-Family-Title); margin-right: 15px; margin-top: 5px; }
.find-more-link-top { display: inline-block; color: var(--brand-gold); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--brand-gold); margin-bottom: 15px; }
.framed-image { border: 1px solid #e0d0b0; padding: 15px; background: #fff; width: 100%; height: auto; box-shadow: 0 10px 30px rgba(0,0,0,0.08); display: block; position: relative; z-index: 20; }

/* MAP SECTION */
.map-section { 
    position: relative; 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    min-height: 500px; 
    display: flex; 
    align-items: flex-end; 
    z-index: 1; 
}
.map-overlay-box { background: #fff; padding: 20px; box-shadow: 0 15px 40px rgba(0,0,0,0.05); position: relative; z-index: 5; border-radius: 4px; }
.map-overlay-box h3 { font-size: 2rem; margin-bottom: 20px; }
.gold-border-text { border-left: 3px solid var(--brand-gold); padding-left: 20px; font-size: 12px; font-weight: 600; text-transform: uppercase; line-height: 1.6; color: #333; margin-bottom: 30px; }
.partners-row { display: flex; align-items: center; gap: 30px; }

/* NEWS SECTION */
.section-last { background-color: var(--section-grey); color: var(--brand-navy); }
.section-last h2 { color: var(--brand-navy); font-size: 2.2rem; }
.featured-wrapper { position: relative; margin-bottom: 50px; }
.featured-img { width: 70%; display: block; height: auto; border-radius: 6px; }
.featured-box {
    background: var(--brand-gold);
    color: white;
    padding: 50px;
    width: 40%;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-radius: 6px;
}
.f-eyebrow { display: inline-block; border-bottom: 2px solid rgba(255,255,255,0.3); padding-bottom: 5px; margin-bottom: 20px; font-size: 14px; text-transform: uppercase; font-weight: 600; letter-spacing: 1px; }
.f-title { font-size: 1.75rem; line-height: 1.2; margin-bottom: 20px; font-family: var(--fnt-Family-Title); color: white; }
.f-meta { font-size: 13px; opacity: 0.8; margin-bottom: 20px; display: block; }
.f-desc { font-size: 15px; line-height: 1.6; margin-bottom: 30px; font-weight: 300; color: rgba(255,255,255,0.9); }
.f-read-more { color: white; text-transform: uppercase; font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.f-read-more:hover { color: var(--brand-navy); }

.focus-grid-item h5 { color: var(--brand-gold); font-size: 12px; text-transform: uppercase; font-weight: 700; margin-bottom: 10px; }
.focus-grid-item h3 { color: var(--brand-navy); font-size: 1.4rem; margin-bottom: 15px; line-height: 1.3; font-family: var(--fnt-Family-Title); }
.focus-grid-item .meta { color: #666; font-size: 12px; margin-bottom: 20px; display: block; }
.focus-grid-item .read-btn { color: var(--brand-navy); font-size: 12px; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid transparent; transition: 0.3s; }
.focus-grid-item .read-btn:hover { border-color: var(--brand-gold); color: var(--brand-gold); }
.focus-logo-text { font-family: var(--fnt-Family-Title); font-style: italic; font-size: 24px; color: var(--brand-navy); border-right: 1px solid #ccc; padding-right: 5px; margin-right: 5px; }
.focus-sub-text {
    font-size: 18px;
    color: #000000;
    line-height: 1.2;
    font-weight: 600;
    font-style: italic;
}

/* =======================================================
   4. FOOTER
   ======================================================= */
footer { background-color: var(--brand-navy); color: white; padding: 50px 0 20px; }
.footer-col { padding-left: 20px; height: 100%; margin-bottom: 20px; }
footer h5 { font-size: 1.2rem; margin-bottom: 15px; color: #fff; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
footer ul { padding-left: 0; list-style: none; }
footer ul li { margin-bottom: 5px; } 
footer ul li a { color: #fff; text-decoration: none; font-size: 13px; font-weight: 300; line-height: 1.8; transition: 0.3s; }
footer ul li a:hover { color: var(--brand-gold); padding-left: 5px; }
.footer-contact-item { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 10px; display: flex; align-items: start; gap: 10px; }
.footer-contact-item i { color: var(--brand-gold); margin-top: 2px; }
.degussa-section { text-align: center; margin: 20px 0 15px; }
.degussa-logo { height: 45px; margin-bottom: 10px; }
.cities { font-size: 10px; color: var(--footer-text); letter-spacing: 3px; text-transform: uppercase; }
.cities span { color: var(--brand-gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 11px; color: var(--footer-text); text-align: center; }
.footer-bottom p { margin: 0; color: #fff; }

/* =======================================================
   5. RESPONSIVE
   ======================================================= */

/* Desktop */
@media (min-width: 992px) {
    .section-padding { padding-top: var(--spacing-desktop) !important; padding-bottom: var(--spacing-desktop) !important; }
    .sell-text-content { padding: 80px 40px; }
    .history-text-col { padding-left: 40px; }
    .watermark-1796 {
        position: absolute; top: 50px; left: 250px; width: 100%; text-align: center; font-size: 13vw;
        font-family: var(--fnt-Family-Title); color: #fcf8f0; z-index: 0; line-height: 0.8; pointer-events: none;
    }
    .image-overlap-col { top: 150px; text-align: right; position: relative; }
    .find-more-link-top { width: 100%; text-align: left; max-width: 500px; margin-left: auto; display: block; margin-left: 0px; }
    .map-overlay-box { top: 5em; }
    .mobile-only-text-section { display: none; } 
    a.custom-logo-link {
    display: none;
}
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .navbar-nav .nav-link { padding: 10px !important; }
    .featured-img { width: 100%; height: auto; }
    .featured-box { position: relative; width: 100%; top: auto; right: auto; transform: none; margin-top: -30px; padding: 40px; }
    .sell-bg-layer { width: 100%; }
}

/* Mobile */
@media (max-width: 767px) {
    .section-padding, .newsroom-bg, .map-section { padding-top: var(--spacing-mobile) !important; padding-bottom: var(--spacing-mobile) !important; }
    .container { padding-left: 20px; padding-right: 20px; }
    .top-header { display: none; }
    .navbar-brand img { height: 40px; }
    .register-btn { margin: 10px 15px; }
    .footer-col { border-left: none; padding-left: 0; margin-bottom: 30px; text-align: left; }
    .footer-contact-item { justify-content: flex-start; }
    
    h1, h2, h3, h4, h5, .hero h1, .sell-title, .history-title, .newsroom-title, .f-title, footer h5 { 
        font-size: 24px !important; line-height: 1.3 !important; margin-bottom: 15px !important; margin-top: 0 !important;
    }
    p, .sell-desc, .history-desc, .service-card p, .f-desc { font-size: 15px !important; line-height: 1.6 !important; }
    .btn, .btn-navy, .btn-gold, .btn-navy-block, .btn-outline-navy { font-size: 12px !important; padding: 12px 20px !important; width: 100%; margin-bottom: 10px; display: block; }

    .carousel-item { height: 350px !important; }
    .carousel-caption { bottom: 15%; width: 90%; left: 5%; }
    .sell-bg-layer, .history-text-col, .watermark-1796 { display: none; }
    .sell-gold-img { min-height: 250px; margin-top: 20px; border-radius: 10px; }
    .image-overlap-col { margin-bottom: 20px; margin-top: 0; }
    .framed-image { width: 100%; margin: 0 auto; z-index: 20; }
    .mobile-only-text-section { display: block; margin-top: 30px; }
    
    .map-section { 
        min-height: auto; 
        display: block; 
        background-position: top center; 
        background-size: 100% auto; 
        background-repeat: no-repeat;
        margin-top: 0; 
        padding-top: 250px !important; 
    }
    .map-overlay-box { margin: 0; width: 100%; box-shadow: none; border: 1px solid #eee; }
    
    .featured-img { width: 100%; height: auto; border-radius: 10px 10px 0 0; }
    .featured-box { position: relative; width: 100%; transform: none; top: auto; right: auto; margin-top: 0; padding: 30px; border-radius: 0 0 10px 10px; }
    .focus-logo-container { flex-direction: column; align-items: flex-start; gap: 10px; }
    
    .sell-text-content { padding: 40px; padding-left: 0px; padding-right: 0px; }
}


/* --- AJAX SEARCH DROPDOWN --- */
.search-box {
    position: relative; /* Ensures dropdown stays under input */
}

#datafetch {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 9999;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-radius: 0 0 6px 6px;
    display: none; /* Hidden by default */
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
}

#datafetch ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#datafetch ul li {
    border-bottom: 1px solid #f5f5f5;
    margin: 0;
}

#datafetch ul li a {
    display: flex;
    align-items: center;
    padding: 10px;
    font-size: 13px;
    color: var(--brand-navy);
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

#datafetch ul li a:hover {
    background-color: var(--light-cream);
    color: var(--brand-gold);
}

#datafetch img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

#datafetch span.search-title {
    display: block;
    line-height: 1.2;
}

#datafetch span.search-meta {
    display: block;
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    margin-top: 2px;
}

.section-last .f-desc p {
    color: #fff !important;
}