/* ============================================================
   THINKAMIGO CHASSIS v6.6 - GLOBAL SHELL
   Architecture: 1250px Grid | 3-Col Footer | UI Components
   Updates: Added Global Figure Reset & Image Block Logic
   Rules: STRICT HEX-ONLY (Converted all RGB/RGBA to Hex-8)
   v6.5: Removed background: #ffffff from html, body reset.
         White body background was bleeding below footer.
         Added margin: 0 to #main-footer to seal footer edge.
   v6.6: padding-bottom: 20px added to .footer-bottom.
         Seals background around footer-address margin.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
    --brand-blue: #0054dc;
    --brand-blue-light: #ffffff26;
    --brand-orange: #ff6600;
    --footer-bg: #0a254a;
    --white: #ffffff;
    --stone-bg: #f5f5ef; 
}

/* --- 1. CORE RESET --- */
html, body { 
    margin: 0; padding: 0; width: 100%; overflow-x: hidden; 
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
}

figure { 
    margin: 0; 
    padding: 0; 
}

img { 
    max-width: 100%; 
    height: auto; 
    display: block;
}

.container { 
    max-width: 1280px; 
    margin: 0 auto; 
    padding: 0 20px; 
    box-sizing: border-box; 
}

/* --- 2. GLOBAL NAVIGATION --- */
#main-nav {
    background-color: var(--brand-blue) !important;
    width: 100% !important;
    position: relative;
    z-index: 3000;
    display: block !important;
}

#main-nav .nav-flex {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    width: 100% !important; 
    max-width: none !important; 
    padding: 10px 20px; 
    box-sizing: border-box;
}

.logo img { height: 40px !important; width: auto; display: block; }

.nav-links { 
    display: flex; 
    gap: 15px; 
    align-items: center; 
    list-style: none; 
    margin: 0; padding: 0; 
}

.nav-links a {
    color: #ffffff !important;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
}

.nav-links a:hover {
    text-decoration: underline;
    text-decoration-color: var(--brand-orange);
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
}

/* --- 3. MOBILE TOGGLE ENGINE --- */
.menu-toggle { display: none !important; }
.hamburger { 
    display: none; 
    cursor: pointer; 
    flex-direction: column; 
    gap: 5px; 
}
.hamburger span { width: 25px; height: 3px; background-color: #ffffff; display: block; }

/* --- 4. MASTER FOOTER --- */
#main-footer { 
    background-color: var(--footer-bg) !important; color: #ffffff !important; 
    padding: 60px 0 0px !important; width: 100% !important; 
    display: block !important; clear: both;
    margin: 0;
}

.footer-full-logo { width: 100% !important; max-width: 1150px; height: auto !important; display: block; margin: 0 auto; }

.footer-body-grid { 
    display: flex !important; 
    justify-content: space-between !important; 
    align-items: flex-start !important; 
    flex-wrap: wrap; 
    gap: 20px; 
}

.footer-visual-col { flex: 0 0 250px; margin-top: 0 !important; }

.footer-brand-mark { 
    max-width: 100% !important; 
    height: auto !important; 
    display: block;
    transition: filter 0.4s ease-in-out; 
}

.footer-visual-col a:hover .footer-brand-mark {
    filter: drop-shadow(0 0 15px #3385ffcc);
}

.footer-nav-col { 
    flex: 1; 
    min-width: 140px; 
    padding-top: 100px !important; 
}

.footer-nav-col ul { list-style: none; padding: 0; margin: 0; }
.footer-nav-col li { margin-bottom: 10px; }

.footer-nav-col a { 
    color: #ffffffb3 !important;
    font-size: 14px; 
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
}

.footer-nav-col a:hover {
    color: #ffffff !important;
    text-decoration: underline;
    text-decoration-color: var(--brand-orange);
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
}

.footer-cta { 
    margin-top: 80px; 
    margin-bottom: 60px;
    text-align: center; 
    width: 100%;
}

/* PRECISION SOCIAL GRID */
.social-strip { 
    display: flex; 
    justify-content: center; 
    align-items: flex-start;
    gap: 20px; 
    margin: 20px 0 40px; 
}

.social-item {
    flex: 0 0 100px; 
    text-align: center;
}

.social-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.social-icon { 
    width: 28px; 
    height: 28px; 
    background-size: contain; 
    background-repeat: no-repeat; 
    background-position: center;
}

.social-item span {
    margin-top: 10px;
    color: #ffffffb3 !important;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: 0.3s ease;
    white-space: nowrap;
}

.social-item a:hover span {
    color: var(--brand-orange) !important;
}

.icon-linkedin { background-image: url('assets/img/icon-linkedin.png'); }
.icon-substack { background-image: url('assets/img/icon-substack.png'); }
.icon-instagram { background-image: url('assets/img/icon-instagram.png'); }

.footer-address { text-align: center; color: #ffffff80; font-size: 13px; margin-top: 20px; }

.footer-bottom {
    padding-bottom: 20px;
}

/* --- 5. UI COMPONENTS --- */

.btn-pill { 
    display: inline-block; padding: 12px 45px; border: 4px solid #ffffff; border-radius: 50px; 
    color: #ffffff; text-decoration: none; font-family: 'Poppins', sans-serif; 
    font-size: 18px; font-weight: 500; transition: background-color 0.4s ease; 
}

.btn-pill:hover { 
    background-color: var(--brand-blue-light) !important; 
    color: #ffffff !important;
}

.back-to-top { 
    position: fixed; 
    bottom: 250px; 
    right: 25px; 
    width: 46px; 
    height: 46px; 
    background-color: #E0E0E04D;
    z-index: 9999; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.back-to-top.show { display: flex !important; }

.back-to-top:hover {
    background-color: #E0E0E099;
    transform: scale(1.05);
}

.chevron-up {
    display: block;
    width: 10px;
    height: 10px;
    border-top: 2px solid #ffffff; 
    border-left: 2px solid #ffffff; 
    transform: rotate(45deg);
    margin-top: 4px;
}

/* --- 6. RESPONSIVE OVERRIDES --- */
@media (max-width: 1100px) {
    .hamburger { display: flex !important; }
    .nav-links {
        display: none !important; position: absolute;
        top: 100%; left: 0; width: 100%;
        background-color: var(--brand-blue);
        flex-direction: column; padding: 10px 0; z-index: 3001;
    }
    #menu-toggle:checked ~ .nav-links { display: flex !important; }
    .nav-links a { 
        padding: 15px 30px !important; 
        width: 100%; 
        box-sizing: border-box; 
        border-top: 1px solid #ffffff1a; 
        text-align: left;
        text-decoration: none;
    }
    .nav-links a:hover {
        text-decoration: underline;
        text-decoration-color: var(--brand-orange);
        text-decoration-thickness: 3px;
    }
}

@media (min-width: 1101px) {
    .nav-links { display: flex !important; position: static !important; width: auto !important; background: transparent !important; flex-direction: row !important; }
    .hamburger { display: none !important; }
}

@media (max-width: 768px) {
    #main-footer .footer-branding-top { padding: 0 20px 40px 20px; }
    
    #main-footer .footer-body-grid { 
        flex-direction: column !important; 
        align-items: center !important; 
        text-align: center !important; 
        width: 100% !important;
        gap: 0 !important; 
    }

    #main-footer .footer-visual-col { margin-bottom: 30px; }

    #main-footer .footer-nav-col { 
        padding-top: 0 !important; 
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 0 !important; 
        display: block !important;
    }

    #main-footer .footer-nav-col ul {
        display: block !important;
        padding-left: 0 !important; 
        margin: 0 auto !important;
        list-style: none !important;
        width: 100% !important;
    }

    #main-footer .footer-nav-col li {
        text-align: center !important;
        margin: 0 0 10px 0 !important;
        width: 100% !important;
    }
    
    #main-footer .footer-nav-col a {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }

    .social-strip {
        flex-direction: row !important;
        gap: 10px;
        align-items: center;
    }

    .social-item {
        flex: 0 0 90px;
    }

    .back-to-top {
        bottom: 250px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}