/*
Theme Name: Al Ide Marketing
Theme URI: https://bjjh.us/alide/
Author: You
Description: Custom theme for Al Ide Marketing LLC
Version: 1.0.1
Text Domain: al-ide-marketing
*/

/* --- 1. VARIABLES --- */
:root {
    --brand-blue: #204899; 
    --brand-red: #a00000;  
    --gray-base: #adb5bd;
    --gray-bg: #f8f9fa;
    --brand-white: #ffffff;
}

/* --- 2. GLOBAL STYLES --- */
body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--gray-bg); 
    padding-top: 155px; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    overflow-x: hidden;
}

/* --- 2.5 HEADER & TYPOGRAPHY OVERRIDES --- */
h2.display-6, .section-title {
    color: var(--brand-blue) !important;
    font-weight: 800 !important;
}

h4.text-uppercase, .sub-section-title, h5.text-uppercase {
    color: var(--brand-red) !important;
    font-weight: 700 !important;
}

hr.mx-auto {
    background-color: var(--brand-red) !important;
    opacity: 1 !important;
    height: 5px !important;
    border: none;
}

/* --- 3. NAVBAR & HAMBURGER --- */
.navbar { 
    background-color: #fff !important; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important; 
    min-height: 120px; 
    border-top: 5px solid var(--brand-blue) !important; 
    border-bottom: 5px solid var(--brand-blue) !important; 
    z-index: 1050; 
}

.navbar-brand img { 
    height: 80px; 
    width: auto; 
}

.company-name-text { 
    font-size: 1.75rem; 
    color: var(--brand-blue) !important; 
    font-weight: 800; 
}

.nav-link { 
    color: #555 !important; 
    font-weight: 600; 
    font-size: 1.1rem; 
    margin-left: 1rem; 
    padding: 0.5rem 1rem; 
}

.nav-link:hover, .nav-link.active { 
    color: var(--brand-blue) !important; 
}

.navbar-toggler { 
    border: 2px solid var(--brand-blue) !important; 
    padding: 5px 10px !important; 
    border-radius: 8px !important;
    background-color: transparent !important;
}

/* Clean SVG Hamburger Icon with Blue/Red/Blue Lines */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23204899' stroke-width='3.5' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24'/%3E%3Cpath stroke='%23a00000' stroke-width='3.5' stroke-linecap='round' stroke-miterlimit='10' d='M4 16h24'/%3E%3Cpath stroke='%23204899' stroke-width='3.5' stroke-linecap='round' stroke-miterlimit='10' d='M4 24h24'/%3E%3C/svg%3E") !important;
    display: block !important;
    width: 28px !important;
    height: 28px !important;
    background-size: 100% 100% !important;
    border: none !important;
}

/* --- MOBILE SPECIFIC CSS --- */
@media (max-width: 991.98px) {
    /* Allow layout components to wrap so dropdown can fall underneath safely */
    .navbar .container {
        flex-wrap: wrap !important;
    }
    
    .navbar {
        min-height: auto !important;
        padding: 0.75rem !important;
    }
    
    /* Allow the brand container to shrink but stay on the top line row row */
    .navbar-brand {
        max-width: 80%;
        margin-right: 0;
        display: flex;
        align-items: center;
    }

    /* Shrink the logo graphics */
    .navbar-brand img {
        height: 45px !important;
        flex-shrink: 0;
    }

    /* Scale text down to fit layout parameters */
    .company-name-text {
        font-size: 1.1rem !important;
    }

    .broker-subtitle {
        font-size: 0.65rem !important;
        letter-spacing: 0.5px !important;
    }

    .header-categories {
        display: block !important;
        font-size: 0.55rem !important;
        white-space: normal !important; 
        line-height: 1.1 !important;
        text-align: center;
        margin-top: 2px !important;
    }

    /* Keep the toggle switch container anchored to the right side row */
    .navbar-toggler {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 38px !important;
        min-width: 44px !important;
        padding: 4px 6px !important;
        flex-shrink: 0; 
        margin-left: auto;
    }

    /* Force mobile collapsible drawer container to full width below logo layout row */
    .navbar-collapse {
        flex-basis: 100%;
        flex-grow: 1;
        padding-top: 1rem;
        padding-bottom: 0.5rem;
    }

    .navbar-nav {
        text-align: left;
        width: 100%;
    }

    .nav-link {
        margin-left: 0 !important;
        padding: 0.75rem 0.5rem !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    body {
        padding-top: 115px !important;
    }
}

/* --- 4. DISTRIBUTOR & PARTNER CARDS (Clickable & Glow) --- */
.distributor-item, .partner-card { 
    transition: all 0.3s ease; 
    border: 5px solid transparent !important; 
    background-color: #fff;
    cursor: pointer;
    text-decoration: none !important;
    display: block;
}

.distributor-item:hover, .partner-card:hover { 
    background-color: #ffffff; 
    border-top-color: var(--brand-blue) !important; 
    border-bottom-color: var(--brand-blue) !important; 
    border-left-color: var(--brand-red) !important; 
    border-right-color: var(--brand-red) !important; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.distributor-logo, .partner-logo { 
    max-width: 100%; max-height: 80px; object-fit: contain; 
    filter: grayscale(100%); opacity: 0.6; transition: all 0.3s ease; 
}

.distributor-item:hover .distributor-logo, .partner-card:hover .partner-logo { 
    filter: grayscale(0%); opacity: 1; transform: scale(1.05); 
}

.btn-dist-link, .btn-partner-link { 
    display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; 
    text-decoration: none; color: var(--brand-blue); border: 2px solid var(--brand-blue); 
    padding: 4px 15px; border-radius: 50px; transition: all 0.3s ease; 
}

.distributor-item:hover .btn-dist-link, .partner-card:hover .btn-partner-link { 
    background-color: var(--brand-blue); color: #fff !important; 
}

/* --- 5. STATE NAVIGATION (Our Reach Buttons) --- */
.state-nav-bar { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; padding: 0 15px; }
.state-nav-btn { 
    border: 2px solid #dee2e6; background: #fff; color: #555; font-weight: 700; 
    padding: 8px 25px; border-radius: 50px; transition: all 0.3s ease; cursor: pointer; 
}

.state-nav-btn:hover, .state-nav-btn.is-hovered { 
    border-color: var(--brand-blue); background-color: var(--brand-blue) !important; 
    color: #fff !important; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(32, 72, 153, 0.3);
}

.state-nav-btn.active-state-link { 
    background-color: var(--brand-blue) !important; border-color: var(--brand-blue) !important; color: #fff !important; 
}

/* --- 6. INTERACTIVE MAP (SVG Logic) --- */
.map-container-svg { width: 100%; display: flex; align-items: center; justify-content: center; overflow: visible; }
#map-svg { width: 100%; height: auto; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1)); overflow: visible; }

.state-active { 
    fill: var(--gray-base); stroke: #ffffff; stroke-width: 1.5px; 
    cursor: pointer; transition: 0.3s; transform-origin: center; transform-box: fill-box; 
}

.state-label { 
    fill: #ffffff; font-weight: 800; font-size: 14px; text-anchor: middle; 
    dominant-baseline: central; transition: 0.3s; transform-origin: center; transform-box: fill-box; pointer-events: none; 
}

a.is-hovered .state-active, a.state-selected .state-active { 
    fill: var(--brand-blue) !important; stroke: var(--brand-red) !important; 
    stroke-width: 3.5px !important; transform: translateY(-12px) scale(1.06) !important; 
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.35)) !important; 
}

a.is-hovered .state-label, a.state-selected .state-label { transform: translateY(-12px) scale(1.06) !important; }

/* --- 7. SHARED HERO BUTTON STYLE --- */
.btn-brand-submit, .btn-contact-region, .btn-hero-white { 
    background-color: #ffffff !important; color: var(--brand-blue) !important; 
    border: 2px solid #dee2e6 !important; font-weight: 800; padding: 18px 32px; 
    border-radius: 50px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); text-transform: uppercase;
    letter-spacing: 1px; display: inline-block; text-decoration: none; text-align: center;
}

.btn-brand-submit:hover, .btn-contact-region:hover, .btn-hero-white:hover { 
    background-color: var(--brand-blue) !important; color: #ffffff !important;
    border-color: var(--brand-blue) !important; transform: translateY(-3px); 
    box-shadow: 0 10px 25px rgba(32, 72, 153, 0.4); 
}

/* --- 8. MAP SNAPSHOT & BUBBLE BUTTONS --- */
.map-snapshot-container { position: relative; border-radius: 15px; overflow: hidden; border: 3px solid rgba(255,255,255,0.1); margin-top: 20px; }
.map-snapshot-img { display: block; width: 100%; height: 220px; object-fit: cover; }
.map-bubble-btn {
    position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%);
    background-color: var(--brand-white); color: var(--brand-blue);
    padding: 8px 20px; border-radius: 50px; font-weight: 700; font-size: 0.85rem;
    text-decoration: none; display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); transition: all 0.2s ease; z-index: 5;
}
.map-bubble-btn:hover { color: var(--brand-red); transform: translateX(-50%) scale(1.05); background-color: #fff; }

/* --- 9. GALLERY STYLES --- */
.gallery-card { position: relative; overflow: hidden; background: #fff; border-radius: 12px; border: none; box-shadow: 0 4px 15px rgba(0,0,0,0.06); }
.gallery-img-container { height: 300px; overflow: hidden; }
.gallery-img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s ease; }
.gallery-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(32, 72, 153, 0.9)); padding: 25px 15px; opacity: 0; transition: 0.3s ease; }
.gallery-card:hover .gallery-overlay { opacity: 1; }
.gallery-card:hover .gallery-img { transform: scale(1.1); }

/* --- 10. CONTACT SPECIFIC & HEADQUARTERS --- */
.contact-hq-card { background-color: var(--brand-blue) !important; color: white !important; border: none !important; }
.transition-link { transition: opacity 0.2s ease; }
.transition-link:hover { opacity: 0.7; color: #fff !important; }
.contact-form-input { background-color: var(--gray-bg) !important; border: 1px solid #dee2e6 !important; padding: 12px !important; border-radius: 8px; }
.contact-form-input:focus { border-color: var(--brand-blue) !important; box-shadow: none !important; background-color: #fff !important; }

/* --- 11. STATIC CARDS (About Page Only) --- */
.static-card { background-color: #fff; border-radius: 12px; border: 1px solid rgba(0,0,0,0.08) !important; transition: none !important; }

/* --- 12. UTILITIES & FOOTER --- */
footer { margin-top: auto; background-color: #fff; padding: 1.5rem 0; border-top: 4px solid var(--brand-red); font-weight: 500; }
.pdf-download-link {
    display: flex; align-items: center; background: #fff; border: 1px solid #dee2e6; padding: 12px 15px; border-radius: 8px; text-decoration: none; color: #555; font-weight: 600; font-size: 0.9rem; transition: all 0.2s ease; margin-bottom: 5px;
}
.pdf-download-link:hover { border-color: var(--brand-red); color: var(--brand-red); transform: translateX(5px); }
.pdf-icon { background: var(--brand-red); color: white; font-size: 0.6rem; font-weight: 800; padding: 3px 6px; border-radius: 4px; margin-right: 12px; text-transform: uppercase; }

/* --- 13. CUSTOM HEADER ADDITIONS --- */
.broker-subtitle {
    color: var(--brand-red) !important;
    font-size: 0.9rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.5px; line-height: 1.2; margin-top: 4px;
}
.header-categories { font-size: 0.8rem; font-style: italic; color: #333; margin-top: 2px; white-space: nowrap; }
.header-categories .dot { color: var(--brand-blue) !important; font-weight: 800; margin: 0 6px; font-style: normal; display: inline-block; vertical-align: middle; }

/* --- 14. FORM CLEANUP --- */
#hcaptcha-container, 
.h-captcha, 
div[data-sitekey] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- 15. REGIONAL REP CARDS --- */
.rep-photo {
    width: 65px !important;
    height: 65px !important;
    min-width: 65px !important;
    max-width: 65px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center 15% !important; 
    border: 2px solid #fff !important;
    flex-shrink: 0 !important; 
}

/* --- 16. CSP GALLERY & PORTFOLIO FIXES --- */
.gallery-card-link {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.gallery-img-wrapper {
    width: 100%;
    padding-top: 75%;
    background-color: #f8f9fa;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.gallery-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Portfolio Button Fix --- */
.btn-portfolio {
    background-color: var(--brand-red) !important;
    color: #ffffff !important;
    border-radius: 8px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-portfolio:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #ffffff !important;
}

/* --- Fully Scaled Distributor Logo & Wrapper Rules --- */
.distributor-item > .d-flex {
    align-items: center !important; 
}

.distributor-logo-wrapper {
    width: 175px !important;   /* Increased from 140px for a bolder presence */
    height: 120px !important;  /* Increased from 100px */
    background-color: #fff;    
    border: 1px solid #e9ecef; 
    border-radius: 8px;        
    padding: 12px;             /* Gives the logo a clean, breathable border */
    display: flex;             
    align-items: center;       
    justify-content: center;   
    overflow: hidden;
    flex-shrink: 0;            
    box-shadow: 0 2px 6px rgba(0,0,0,0.04); /* Swapped to a subtle outer drop shadow for depth */
    transition: box-shadow 0.3s ease;
}

.distributor-logo-img, .distributor-logo {
    width: 100% !important;        
    height: 100% !important;       
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important; 
    filter: none !important;        
    opacity: 0.95;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Hover effect */
.distributor-item:hover .distributor-logo-wrapper {
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); /* Wrapper shadow deepens slightly on hover */
}

.distributor-item:hover .distributor-logo-img,
.distributor-item:hover .distributor-logo {
    opacity: 1;
    transform: scale(1.06); /* Slightly more zoom to take advantage of the bigger box */        
}