/* ==========================================================================
   KAIVO UNIFIED HEADER & FOOTER MASTER STYLESHEET (SNAPSHOT)
   Exact snapshot of the homepage (index.php) header, navigation & footer.
   Usable across all pages via includes/header.php and includes/footer.php.
   ========================================================================== */

/* Typography & Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Core Brand Tokens */
:root {
    --bg-main: #FFFFFF;
    --bg-subtle: #F8FAFC;
    --bg-card: #FFFFFF;
    --text-dark: #0F172A;
    --text-muted: #475569;
    --primary-color: #013941;
    --secondary-color: #51b5a6;
    --primary-grad: linear-gradient(135deg, #013941 0%, #51b5a6 100%);
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px -10px rgba(1, 57, 65, 0.08);
    --shadow-lg: 0 20px 40px -15px rgba(1, 57, 65, 0.12);
}

/* Component Container Helper */
header.kaivo-header,
footer.kaivo-footer {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header.kaivo-header *,
footer.kaivo-footer * {
    box-sizing: border-box;
}

header.kaivo-header .container,
footer.kaivo-footer .container {
    width: 100%;
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
header.kaivo-header {
    padding: 12px 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

header.kaivo-header .nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
}

/* Brand & Logo */
header.kaivo-header .brand-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 1010;
}

header.kaivo-header .brand-wrapper img,
header.kaivo-header .brand-logo-img {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: block;
    object-fit: contain;
}

header.kaivo-header .logo {
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
    z-index: 1010;
}

/* Hamburger Toggle & Label */
header.kaivo-header #menu-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
}

header.kaivo-header .menu-icon {
    display: none;
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: var(--primary-color);
    z-index: 1010;
    user-select: none;
    padding: 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, transform 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

header.kaivo-header .menu-icon i,
header.kaivo-header .menu-icon * {
    pointer-events: none;
}

header.kaivo-header .menu-icon:active {
    transform: scale(0.95);
}

header.kaivo-header .menu-icon:hover {
    background: #F1F5F9;
}

/* Desktop Navigation */
header.kaivo-header nav {
    display: flex;
    align-items: center;
}

header.kaivo-header nav ul.main-nav-list {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
    margin: 0;
    padding: 0;
}

header.kaivo-header nav ul.main-nav-list li a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
    display: block;
}

header.kaivo-header nav ul.main-nav-list li a:hover {
    color: var(--primary-color);
}

header.kaivo-header nav ul.main-nav-list li a:hover .btn {
    color: #fff !important;
}

/* Buttons */
.btn {
    background: #013941;
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    min-height: 40px;
    touch-action: manipulation;
}

.btn:hover {
    transform: translateY(-1px);
    background: #024e59;
    box-shadow: 0 4px 14px rgba(1, 57, 65, 0.2);
    color: #fff !important;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color) !important;
    padding: 9px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
}

.btn-outline:hover {
    background: rgba(1, 57, 65, 0.04);
    border-color: var(--primary-color);
    color: #013941 !important;
    transform: translateY(-1px);
}

/* Desktop Defaults: Strictly hide mobile-only drawer elements */
header.kaivo-header .mobile-link-arrow {
    display: none !important;
}

header.kaivo-header .mobile-drawer-scroll-body {
    display: contents;
}

header.kaivo-header .mobile-only-link,
header.kaivo-header .mobile-drawer-account-footer {
    display: none !important;
}

header.kaivo-header .desktop-only-auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   RESPONSIVE & MOBILE DRAWER (Screen width <= 991px)
   ========================================================================== */
@media (max-width: 991px) {
    header.kaivo-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 1020 !important;
        background: #FFFFFF !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    header.kaivo-header .menu-icon {
        display: flex !important;
        z-index: 1030;
    }

    header.kaivo-header .brand-wrapper {
        z-index: 1030;
    }

    header.kaivo-header nav#main-nav {
        position: fixed;
        top: 68px;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: calc(100vh - 68px);
        height: calc(100dvh - 68px);
        background-color: var(--bg-main, #FFFFFF);
        box-shadow: 0 10px 40px rgba(1, 57, 65, 0.12);
        z-index: 1015;
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.32s ease;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    header.kaivo-header #menu-toggle:checked~nav#main-nav,
    header.kaivo-header nav#main-nav.mobile-active {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    header.kaivo-header #menu-toggle:checked~.menu-icon i::before,
    header.kaivo-header .menu-icon.active i::before {
        content: "\f00d" !important;
    }

    header.kaivo-header .desktop-only-auth {
        display: none !important;
    }

    header.kaivo-header .mobile-only-link {
        display: block !important;
    }

    /* Scrollable drawer body */
    header.kaivo-header .mobile-drawer-scroll-body {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px;
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 24px 20px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    header.kaivo-header nav ul.main-nav-list {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        box-sizing: border-box !important;
    }

    header.kaivo-header nav ul.main-nav-list li {
        width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    header.kaivo-header nav ul.main-nav-list li a {
        font-size: 15px;
        font-weight: 600;
        color: var(--primary-color);
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 14px 18px !important;
        background: #F8FAFC;
        border: 1px solid #EEF2F6;
        border-radius: 12px;
        text-decoration: none;
        transition: all 0.2s ease;
        min-height: 48px;
        box-sizing: border-box !important;
        touch-action: manipulation;
    }

    header.kaivo-header nav ul.main-nav-list li a:hover,
    header.kaivo-header nav ul.main-nav-list li a:active {
        background: #F1F5F9;
        color: var(--secondary-color);
        border-color: #E2E8F0;
        transform: translateY(-1px);
    }

    header.kaivo-header .mobile-link-arrow {
        font-size: 12px;
        color: #94A3B8;
        transition: transform 0.2s ease, color 0.2s ease;
        display: inline-block !important;
    }

    header.kaivo-header nav ul.main-nav-list li a:hover .mobile-link-arrow {
        transform: translateX(3px);
        color: var(--secondary-color);
    }

    /* Sticky Footer in Drawer: Account Card */
    header.kaivo-header .mobile-drawer-account-footer {
        display: block !important;
        flex: 0 0 auto;
        position: sticky;
        bottom: 0;
        width: 100% !important;
        background: #FFFFFF;
        border-top: 1px solid #E2E8F0;
        padding: 16px 20px;
        z-index: 20;
        box-sizing: border-box !important;
    }

    header.kaivo-header .mobile-account-card {
        width: 100% !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        box-sizing: border-box !important;
    }

    header.kaivo-header .mobile-account-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        padding: 14px 20px;
        background: var(--primary-color);
        color: #FFFFFF !important;
        font-size: 15px;
        font-weight: 600;
        border-radius: 12px;
        text-decoration: none;
        text-align: center;
        min-height: 48px;
        box-sizing: border-box !important;
        transition: opacity 0.2s ease, transform 0.15s ease;
        touch-action: manipulation;
    }

    header.kaivo-header .mobile-account-link:active {
        opacity: 0.92;
        transform: scale(0.99);
    }

    header.kaivo-header .mobile-account-logout {
        font-size: 12px;
        font-weight: 500;
        color: #64748B;
        text-decoration: none;
        padding: 4px 8px;
        transition: color 0.2s ease;
    }

    header.kaivo-header .mobile-account-logout:hover {
        color: #DC2626;
    }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer.kaivo-footer {
    background-color: #013941;
    padding: 100px 0 40px 0;
    position: relative;
    overflow: hidden;
    color: #cbd5e1;
}

footer.kaivo-footer::before {
    content: "";
    position: absolute;
    bottom: -50px;
    width: 100%;
    height: 100%;
    background-image: url("https://joinkaivo.com/assets/oooscillate.svg");
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.1;
    pointer-events: none;
    z-index: 1;
}

footer.kaivo-footer .container {
    position: relative;
    z-index: 2;
}

footer.kaivo-footer .footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 48px;
    margin-bottom: 60px;
}

footer.kaivo-footer .footer-brand-col .logo {
    color: #fff !important;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

footer.kaivo-footer .footer-desc {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

footer.kaivo-footer .footer-contact-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 13.5px;
}

footer.kaivo-footer .footer-contact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    line-height: 1.5;
}

footer.kaivo-footer .footer-contact-row .contact-label {
    color: #ffffff;
    font-weight: 600;
    min-width: 50px;
}

footer.kaivo-footer .footer-contact-row .contact-val,
footer.kaivo-footer .footer-contact-row a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer.kaivo-footer .footer-contact-row a:hover {
    color: var(--secondary-color, #51b5a6);
}

footer.kaivo-footer .socials {
    display: flex;
    gap: 12px;
}

footer.kaivo-footer .socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

footer.kaivo-footer .socials a i {
    color: #237e70;
    font-size: 22px;
    display: inline-block;
    transition: transform 0.2s ease, color 0.2s ease;
}

footer.kaivo-footer .socials a:hover i {
    transform: translateY(-4px);
    color: #ffffff;
}

footer.kaivo-footer .footer-links h4 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 22px;
    letter-spacing: -0.3px;
}

footer.kaivo-footer .footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
}

footer.kaivo-footer .footer-links ul li a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

footer.kaivo-footer .footer-links ul li a:hover {
    color: #fff;
    transform: translateX(2px);
}

footer.kaivo-footer .footer-newsletter p {
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

footer.kaivo-footer .newsletter-form {
    display: flex;
    gap: 8px;
}

footer.kaivo-footer .newsletter-form input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 14px;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    outline: none;
    width: 100%;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: border-color 0.2s;
}

footer.kaivo-footer .newsletter-form input::placeholder {
    color: #94a3b8;
}

footer.kaivo-footer .newsletter-form input:focus {
    border-color: var(--secondary-color);
}

footer.kaivo-footer .newsletter-form button {
    background: #237e70;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 500;
    align-items: center;
    display: flex;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s ease;
}

footer.kaivo-footer .newsletter-form button:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

footer.kaivo-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94a3b8;
    font-size: 13px;
}

footer.kaivo-footer .footer-bottom p {
    font-size: 13px;
}

footer.kaivo-footer .footer-bottom-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

footer.kaivo-footer .footer-bottom-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

footer.kaivo-footer .footer-bottom-links a:hover {
    color: #fff;
}

/* Footer Responsive */
@media (max-width: 991px) {
    footer.kaivo-footer {
        padding: 60px 0 30px 0 !important;
        margin: 0 !important;
    }

    footer.kaivo-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-bottom: 40px;
    }

    footer.kaivo-footer .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    footer.kaivo-footer .footer-bottom-links {
        justify-content: center;
        gap: 16px;
    }
}