:root {
    --brand-blue: #145589;
    --brand-purple: #7f03d3;
    --brand-orange: #fd7319;
    --text-dark: #1f2937;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --primary-color: #007bff;
    --dark-color: #0a1931;
    --light-color: #f5f5f5;
    --white-color: #ffffff;
    --text-color: #333;
    --section-padding: 80px 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f8f9fa;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3 {
    margin-bottom: 1.2rem;
    font-weight: 600;
}

h1 {
    font-size: 3rem;
}
h2 {
    font-size: 2.2rem;
    text-align: center;
}
h3 {
    font-size: 1.4rem;
}
p {
    margin-bottom: 1rem;
}
a {
    text-decoration: none;
    color: var(--primary-color);
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: var(--light-color);
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: #0056b3;
}

/* ======== 2. Header ======== */
header {
    /* background: var(--light-color); */
    opacity: 0.95;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.5s ease-in-out; /* This makes it slide */
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(20, 85, 137, 0.1);
}
/* 2. Fixed state (triggered after 80px) */
header.is-fixed {
    position: fixed;
    background: #ffffff; /* Add background so it's not see-through when scrolling */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 3. Hidden state (only applied when fixed and scrolling down) */
header.nav-up {
    transform: translateY(-100%);
}

header .container {
    display: flex;
    justify-content: start;
    align-items: center;
    height: 70px;
}
.header-spacer {
    height: 70px; /* Match header height */
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 100px;
    color: var(--dark-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links li {
    position: relative; /* Context for dropdown */
    margin-left: 25px;
}
/* Hide mobile-only elements by default */
.mobile-menu-header {
    display: none;
}
.mobile-icon {
    display: none;
}
.mobile-menu-toggle {
    display: none;
}
.menu-icon,
.close-icon {
    font-size: 2.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

.nav-links a.nav-link {
    padding: 25px 0; /* Align with header height */
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a.nav-link ion-icon {
    font-size: 0.8rem; /* Smaller icon size */
}

.nav-links a.nav-link:hover {
    color: var(--primary-color);
}

/* ======== 2.1 Dropdown Menus ======== */
.dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; /* Position right below the parent */
    left: 0;
    background: var(--light-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    min-width: 220px;
    list-style: none;
    z-index: 1001;
}

.dropdown-menu li {
    position: relative;
    margin-left: 0; /* Reset margin */
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    transition: background 0.3s ease;
    font-weight: 400;
    white-space: nowrap; /* Prevent line breaks */
    padding: 12px 20px !important; /* Override nav-link padding */
}

.dropdown-menu li:hover > a {
    background: var(--light-color);
    color: var(--primary-color);
}

/* Multi-level Submenu */
.submenu {
    display: none; /* Hidden by default */
    position: absolute;
    top: -5px; /* Align with parent li */
    left: 100%;
    background: var(--light-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    min-width: 220px;
    list-style: none;
}

.dropdown-menu li.has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ======== 3. Hero Section ======== */
.hero {
    background: var(--dark-color);
    color: var(--light-color);
    padding: 160px 0 100px; /* Adjusted for fixed header */
    text-align: center;
}

.hero h1 {
    color: var(--light-color);
}

.hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ======== 4. Other Sections ======== */
.about,
.services,
.contact {
    padding: var(--section-padding);
}

.about {
    background: var(--light-color);
    text-align: center;
}

.about p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ======== 5. Services Section ======== */
.services {
    background: var(--light-color);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.service-card {
    background: var(--light-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.service-card ion-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ======== 6. Contact Section ======== */
.contact {
    text-align: center;
}

.contact form {
    max-width: 600px;
    margin: 2rem auto 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: "Poppins", sans-serif;
}

/* ======== 7. Footer ======== */
footer {
    background: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 40px 0;
}

.social-links {
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--light-color);
    font-size: 1.8rem;
    margin: 0 12px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

footer p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ======== 8. Responsive Styles ======== */
@media (max-width: 992px) {
    .logo {
        margin-right: 0px;
    }
    header .container {
        justify-content: space-between;
    }
    /* Show mobile hamburger */
    .mobile-menu-toggle {
        display: block;
        z-index: 1001;
    }

    /* Hide desktop icons */
    .desktop-icon {
        display: none !important;
    }

    /* Style mobile icons */
    .mobile-icon {
        display: block;
        position: absolute;
        right: 15px;
        top: 12px;
        font-size: 1.8rem;
        cursor: pointer;
        padding: 5px;
        color: var(--text-color);
    }
    .mobile-icon:hover {
        color: var(--primary-color);
    }

    /* --- Mobile Nav Menu Container --- */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 85%;
        max-width: 380px;
        height: 100vh;
        background: var(--light-color);
        display: block; /* Override flex */
        padding: 0;
        margin: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 1002;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0; /* Slide in */
    }

    /* --- Mobile Menu Header (Logo + Close) --- */
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        height: 70px; /* Match main header */
        border-bottom: 1px solid var(--light-color);
    }
    .mobile-menu-header .logo {
        display: block;
    }
    .mobile-menu-header .close-icon {
        display: block;
    }

    /* --- Mobile Menu Links --- */
    .nav-links li {
        margin-left: 0;
        border-bottom: 1px solid var(--light-color);
    }
    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a.nav-link {
        display: block;
        padding: 15px 20px !important; /* Override desktop padding */
    }

    /* --- Mobile Dropdowns --- */
    .dropdown-menu,
    .submenu {
        position: static; /* No longer absolute */
        display: none; /* Toggled by JS */
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        border-top: 1px solid var(--light-color);
        background: var(--light-color); /* Indent visually */
    }

    .dropdown-menu li {
        border-bottom: none; /* Handled by parent li */
    }

    .dropdown-menu li a {
        padding: 12px 20px 12px 30px !important; /* Indent */
        font-weight: 400;
    }

    .submenu li a {
        padding: 12px 20px 12px 40px !important; /* Further indent */
    }

    .dropdown-menu li.has-submenu {
        border-bottom: 1px solid #ddd;
    }
    .dropdown-menu li.has-submenu:last-child {
        border-bottom: none;
    }

    /* Hide desktop hover logic */
    .dropdown-menu li:hover > a {
        background: none;
        color: var(--brand-purple);
    }
}
.nav-btn-container {
    margin-top: 0px;
    padding: 0 20px;
}
.btn-get-started,
.cta-button {
    background: linear-gradient(
        135deg,
        var(--brand-blue) 0%,
        var(--brand-purple) 100%
    );
    padding: 12px 28px;
    border-radius: 12px;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(127, 3, 211, 0.2);
    transition: var(--transition);
    border: none;
}

.btn-get-started:hover,
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(127, 3, 211, 0.4);
    filter: brightness(1.1);
}

/* ======== Service Cards ======== */
.service-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-md);
    border-color: rgba(127, 3, 211, 0.2);
}

.service-card ion-icon {
    /* Multi-color gradient icon effect */
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ======== Popular Badge (Pricing) ======== */
.badge-popular {
    background: linear-gradient(
        to right,
        var(--brand-purple),
        var(--brand-orange)
    );
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.premium-border {
    border: 2px solid var(--brand-purple);
}
