/* ============================================
   TABLE OF CONTENTS
   ============================================ 
   1. Base & Reset Styles
   2. CSS Variables & Theme Colors
   3. Typography & Global Elements
   4. Header & Navigation
   5. Mobile Hamburger Menu
   6. Hero Section
   7. Footer
   8. Kabul Code Lab Credit
   9. Utility Classes
   10. Responsive Media Queries
   ============================================ */

/* ============================================
   1. BASE & RESET STYLES
   ============================================ */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 0;
    background-color: var(--bg-light);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ============================================
   2. CSS VARIABLES & THEME COLORS
   ============================================ */

:root {
    /* Brand Colors - 70/20/10 Rule */
    --deep-navy: #0B132B; /* 70% - Primary dark */
    --burgundy-accent: #500E3F; /* 20% - Secondary accent */
    --solar-amber: #FFB703; /* 10% - CTA / Highlights */
    /* Supporting Colors */
    --bg-light: #f5f5f5; /* White smoke background */
    --cyan: #00ccff; /* KCL brand color */
    --cyan-light: #33d6ff; /* KCL hover color */
    --text-gray: #4a5568; /* Body text */
    --border-light: #d0d0d0; /* Light borders */
}

/* ============================================
   3. TYPOGRAPHY & GLOBAL ELEMENTS
   ============================================ */

/* Buttons - Solar Amber (Default Primary) */
.btn-primary,
.btn-cta {
    background-color: var(--solar-amber);
    border-color: var(--solar-amber);
    color: var(--deep-navy);
    font-weight: 600;
}

    .btn-primary:hover {
        background-color: #e6a500;
        border-color: #e6a500;
        color: var(--deep-navy);
    }

/* Background Utilities */
.bg-navy {
    background-color: var(--deep-navy);
    color: white;
}

/* Accent Utilities */
.text-accent {
    color: var(--burgundy-accent);
}

.border-accent {
    border-color: var(--burgundy-accent);
}

/* ============================================
   4. HEADER & NAVIGATION
   ============================================ */

header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background-color: var(--bg-light);
    transition: box-shadow 0.3s ease;
}

    /* Optional shadow when scrolled (requires JS) */
    header.scrolled {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    /* Nav Links Hover */
    header .nav-link {
        transition: color 0.2s ease;
    }

        header .nav-link:hover {
            color: var(--solar-amber) !important;
        }

    /* Free Quote Button Hover */
    header .btn {
        transition: all 0.3s ease;
    }

        header .btn:hover {
            border-color: var(--solar-amber) !important;
            background-color: white !important;
            color: var(--deep-navy) !important;
            box-shadow: 0 2px 8px rgba(255, 183, 3, 0.15);
        }
/* Header Logo */
.header-logo {
    height: 50px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Mobile Logo Size */
@media (max-width: 768px) {
    .header-logo {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .header-logo {
        height: 35px;
    }
}

/* ============================================
   4B. DROPDOWN MENU STYLES
   ============================================ */

/* Dropdown Container */
.dropdown {
    position: relative;
}

/* Dropdown Toggle */
.dropdown-toggle::after {
    display: none !important; /* Hide Bootstrap's default caret */
}

.dropdown-toggle i {
    transition: transform 0.2s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
    color: var(--solar-amber) !important;
}

/* Dropdown Menu Container */
.dropdown-menu {
    background-color: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    margin-top: 0.5rem !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-width: 220px;
}

/* Dropdown Items */
.dropdown-item {
    color: var(--deep-navy);
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

    .dropdown-item:hover {
        background-color: rgba(255, 183, 3, 0.08);
        color: var(--solar-amber);
        padding-left: 1.75rem;
    }

/* Dropdown Divider */
.dropdown-divider {
    margin: 0.5rem 0;
    border-color: rgba(0, 0, 0, 0.05);
}

/* ============================================
   DESKTOP: HOVER TO EXPAND (Fixed Gap Issue)
   ============================================ */

@media (min-width: 992px) {
    /* Add invisible padding to bridge the gap */
    .dropdown-toggle {
        padding-bottom: 1.5rem !important;
        margin-bottom: -1rem !important;
    }

    /* Dropdown menu appears with proper spacing */
    .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
        pointer-events: none;
        margin-top: 0.25rem !important;
    }

    /* Show on hover - stays open while over menu */
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Keep menu open when cursor is over it */
    .dropdown-menu:hover {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Chevron rotation */
    .dropdown-toggle i {
        font-size: 0.7rem;
        opacity: 0.6;
        transition: transform 0.25s ease, opacity 0.2s ease, color 0.2s ease;
    }

    .dropdown:hover .dropdown-toggle i {
        opacity: 1;
    }
}

/* ============================================
   MOBILE: CLICK TO EXPAND
   ============================================ */

@media (max-width: 991px) {
    .dropdown-toggle {
        padding-bottom: 0.5rem !important;
        margin-bottom: 0 !important;
    }

    .dropdown-menu {
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        margin-top: 0 !important;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

        .dropdown-menu.show {
            display: block;
        }

    .dropdown-item {
        color: var(--deep-navy);
        padding: 0.5rem 1rem;
    }

        .dropdown-item:hover {
            background-color: transparent;
            color: var(--solar-amber);
            padding-left: 1.25rem;
        }

    .dropdown-divider {
        display: none;
    }

    /* Chevron on mobile */
    .dropdown-toggle i {
        transition: transform 0.25s ease, color 0.2s ease;
    }

    /* When expanded - chevron rotates */
    .dropdown .dropdown-toggle[aria-expanded="true"] i {
        transform: rotate(180deg);
        color: var(--solar-amber) !important;
    }

    /* When collapsed - chevron returns */
    .dropdown .dropdown-toggle[aria-expanded="false"] i {
        transform: rotate(0deg);
        color: var(--deep-navy) !important;
        opacity: 0.6;
    }
}

/* ============================================
   4C. DROPDOWN SUBMENU STYLES (Expandable)
   ============================================ */

/* Submenu Container */
.dropdown-submenu {
    position: relative;
}

.dropdown-toggle-sub {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
}

/* Submenu Dropdown */
.submenu {
    position: absolute;
    left: 100%;
    top: -0.5rem;
    background-color: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    min-width: 200px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1050;
}

    /* Submenu Items */
    .submenu .dropdown-item {
        padding: 0.6rem 1.5rem;
        white-space: nowrap;
    }

/* ============================================
   DESKTOP: HOVER TO EXPAND SUBMENU
   ============================================ */

@media (min-width: 992px) {
    .dropdown-toggle-sub i {
        margin-left: 0.5rem !important;
        font-size: 0.7rem;
        opacity: 0.6;
        transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    }

    .dropdown-submenu:hover .submenu {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        pointer-events: auto;
    }

    .dropdown-submenu:hover .dropdown-toggle-sub {
        background-color: rgba(255, 183, 3, 0.08);
        color: var(--solar-amber);
    }

        .dropdown-submenu:hover .dropdown-toggle-sub i {
            transform: translateX(3px);
            color: var(--solar-amber);
            opacity: 1 !important;
        }
}

/* ============================================
   MOBILE: CLICK TO EXPAND SUBMENU
   ============================================ */

@media (max-width: 991px) {
    .submenu {
        position: static !important;
        background-color: transparent !important;
        box-shadow: none !important;
        padding-left: 1.5rem !important;
        margin-top: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: none;
        border: none !important;
        pointer-events: auto !important;
        list-style: none;
    }

        .submenu.show {
            display: block !important;
        }

    .dropdown-submenu .dropdown-toggle-sub {
        padding: 0.5rem 1rem !important;
        cursor: pointer !important;
        display: inline-flex !important;
        align-items: center !important;
        color: var(--deep-navy) !important;
        font-weight: 500 !important;
        font-size: 0.95rem !important;
        width: auto !important;
    }

        /* Chevron - right next to text, NOT far right */
        .dropdown-submenu .dropdown-toggle-sub i {
            margin-left: 0.5rem !important;
            font-size: 0.7rem !important;
            opacity: 0.6 !important;
            transition: transform 0.25s ease, color 0.2s ease !important;
            display: inline-block !important;
        }

    .submenu .dropdown-item {
        padding: 0.4rem 1.5rem !important;
        font-size: 0.9rem !important;
        white-space: normal !important;
        display: block !important;
        width: 100% !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        color: var(--deep-navy) !important;
        font-weight: 500 !important;
    }

        .submenu .dropdown-item:hover {
            color: var(--solar-amber) !important;
            background-color: transparent !important;
            padding-left: 1.75rem !important;
        }

    /* Expanded state - chevron rotates */
    .dropdown-submenu .dropdown-toggle-sub[aria-expanded="true"] i {
        transform: rotate(90deg) !important;
        color: var(--solar-amber) !important;
        opacity: 1 !important;
    }

    /* Collapsed state */
    .dropdown-submenu .dropdown-toggle-sub[aria-expanded="false"] i {
        transform: rotate(0deg) !important;
    }
}


/* ============================================
   5. MOBILE HAMBURGER MENU
   ============================================ */

.navbar-toggler {
    border: 2px solid var(--deep-navy) !important;
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
    transition: border-color 0.2s ease;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(11, 19, 43, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.25) !important;
    outline: none;
}

.navbar-toggler:hover {
    border-color: var(--solar-amber) !important;
}

/* ============================================
   6. HERO SECTION
   ============================================ */

.hero-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--deep-navy);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--text-gray);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.hero-image {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 20px;
}

/* Hero Buttons */
.btn-hero-primary {
    background-color: var(--solar-amber);
    color: var(--deep-navy);
    border: 2px solid var(--solar-amber);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

    .btn-hero-primary:hover {
        background-color: #e6a500;
        border-color: #e6a500;
        color: var(--deep-navy);
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(255, 183, 3, 0.25);
    }

.btn-hero-secondary {
    background-color: transparent;
    color: var(--deep-navy);
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

    .btn-hero-secondary:hover {
        border-color: var(--solar-amber);
        background-color: white;
        color: var(--deep-navy);
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    }


/* ============================================
   6B. ABOUT US SECTION
   ============================================ */

.about-section {
    padding: 5rem 0;
    background-color: white;
}

.about-image {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.section-tag {
    display: inline-block;
    color: var(--solar-amber);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--deep-navy);
    line-height: 1.2;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .feature-list li {
        display: flex;
        align-items: flex-start;
        margin-bottom: 1.25rem;
        color: var(--text-gray);
        font-size: 1.05rem;
    }

        .feature-list li i {
            color: var(--solar-amber);
            font-size: 1.4rem;
            margin-top: 2px;
        }

        .feature-list li strong {
            color: var(--deep-navy);
        }

.btn-about {
    background-color: transparent;
    color: var(--deep-navy);
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

    .btn-about:hover {
        background-color: var(--solar-amber);
        border-color: var(--solar-amber);
        color: var(--deep-navy);
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(255, 183, 3, 0.2);
    }

/* About Section Responsive */
@media (max-width: 992px) {
    .about-section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    .about-section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .feature-list li {
        font-size: 1rem;
    }

    .about-image {
        max-height: 300px;
        width: 100%;
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }

    .btn-about {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   6C. ABOUT PAGE STATS
   ============================================ */

.stats-section {
    background-color: var(--bg-light);
}

    .stats-section i {
        transition: transform 0.3s ease;
    }

    .stats-section .col-md-4:hover i {
        transform: scale(1.1);
    }


/* ============================================
   7. FOOTER
   ============================================ */

footer {
    background-color: var(--deep-navy) !important;
    color: white !important;
}

    footer a {
        transition: color 0.2s ease;
    }

        footer a:hover {
            color: var(--solar-amber) !important;
        }

/* ============================================
   8. KABUL CODE LAB CREDIT
   ============================================ */

.footer-credit {
    color: white;
    letter-spacing: 0.3px;
}

.kcl-link {
    color: var(--cyan) !important;
    font-weight: 700;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

    .kcl-link::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -2px;
        width: 0%;
        height: 2px;
        background-color: var(--cyan);
        transition: width 0.3s ease;
    }

    .kcl-link:hover {
        color: var(--cyan-light) !important;
        text-shadow: 0 0 8px rgba(0, 207, 255, 0.9);
    }

        .kcl-link:hover::after {
            width: 100%;
        }

/* ============================================
   9. UTILITY CLASSES
   ============================================ */

/* Add custom utilities here as needed */

/* ============================================
   10. RESPONSIVE MEDIA QUERIES
   ============================================ */

/* Tablet and larger */
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Hero - Large tablets */
@media (max-width: 992px) {
    .hero-section {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-image {
        max-height: 350px;
        margin-top: 2rem;
    }
}

/* Hero - Tablets */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-image {
        max-height: 300px;
    }
}

/* Hero - Mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.75rem !important;
        width: 100%;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
    }

    .hero-image {
        max-height: 250px;
    }
}
