@import url('variables.css');

/* =========================================
   1. RESET & BASE (Bootstrap Replacement)
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    background-color: var(--bg-cream);
    color: var(--text-color);
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* =========================================
   2. GRID SYSTEM & LAYOUT
   ========================================= */
.container {
    width: 100%;
    padding-right: var(--bs-gutter-x, 0.75rem);
    padding-left: var(--bs-gutter-x, 0.75rem);
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(var(--bs-gutter-y) * -1);
    margin-right: calc(var(--bs-gutter-x) * -.5);
    margin-left: calc(var(--bs-gutter-x) * -.5);
}

.row>* {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: calc(var(--bs-gutter-x) * .5);
    padding-left: calc(var(--bs-gutter-x) * .5);
    margin-top: var(--bs-gutter-y);
}

.col {
    flex: 1 0 0%;
}

.col-12 {
    flex: 0 0 auto;
    width: 100%;
}

.col-6 {
    flex: 0 0 auto;
    width: 50%;
}

@media (min-width: 768px) {
    .col-md-5 {
        flex: 0 0 auto;
        width: 41.666667%;
    }

    .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }

    .col-md-7 {
        flex: 0 0 auto;
        width: 58.333333%;
    }
}

@media (min-width: 992px) {
    .col-lg-2 {
        flex: 0 0 auto;
        width: 16.666667%;
    }

    .col-lg-4 {
        flex: 0 0 auto;
        width: 33.333333%;
    }
}

/* =========================================
   3. UTILITIES
   ========================================= */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex !important;
}

.d-block {
    display: block !important;
}

.justify-content-center {
    justify-content: center !important;
}

.align-items-center {
    align-items: center !important;
}

.align-items-end {
    align-items: flex-end !important;
}

.align-self-center {
    align-self: center !important;
}

.text-center {
    text-align: center !important;
}

.text-white {
    color: white !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-decoration-none {
    text-decoration: none !important;
}

.m-0 {
    margin: 0 !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.p-0 {
    padding: 0 !important;
}

.p-5 {
    padding: 3rem !important;
}

.py-1 {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.px-3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.pt-3 {
    padding-top: 1rem !important;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.rounded-pill {
    border-radius: 50rem !important;
}

.rounded-3 {
    border-radius: 0.3rem !important;
}

.list-unstyled {
    padding-left: 0;
    list-style: none;
}

/* =========================================
   4. LOADER
   ========================================= */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-cream, #fefbf3);
    /* Soft Cream Background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.loader-logo {
    width: 80px;
    height: 80px;
    animation: breathe 2s infinite ease-in-out;
    filter: drop-shadow(0 0 10px rgba(157, 96, 207, 0.3));
    /* Soft Purple Glow */
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(157, 96, 207, 0.3));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 20px rgba(157, 96, 207, 0.6));
    }
}

body.loaded .loader-container {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.no-scroll {
    overflow: hidden;
    height: 100%;
}

/* =========================================
   5. HEADER & NAVBAR
   ========================================= */
.header {
    background-color: rgb(254, 251, 243, 0.85);
    backdrop-filter: blur(10px);
    /* Glass effect */
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 20px;
    /* Mobile first padding */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* Premium shadow */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    /* Subtle separator */
}

/* ... */
.navbar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    /* margin-left moved to desktop query */
}

.header.hidden {
    transform: translateY(-100%);
}

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

/* --- Brand (Left) --- */
.navbar-brand {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.navbar-brand .logo {
    width: 140px;
    height: auto;
    display: block;
    transition: filter 0.3s;
}

.navbar-brand .logo:hover {
    filter: brightness(1.1);
}

/* --- Toggle Button (Mobile) --- */
.navbar-toggler {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: block;
    z-index: 101;
    /* Above menu if needed */
}

/* SVG Toggle Styles */
/* SVG Toggler Styles */
.navbar-svg-icon {
    cursor: pointer;
    transition: transform 400ms;
    width: 60px;
    /* Adjusted to fit the header nicely */
    height: 60px;
}

.toggler-line {
    fill: none;
    transition: stroke-dasharray 400ms, stroke-dashoffset 400ms;
    stroke-width: 5.5;
    stroke-linecap: round;
    stroke: var(--text-color) !important;

    /* Ensure visibility */
}

/* Rotation */
.navbar-toggler:not(.collapsed) .navbar-rotate {
    transform: rotate(45deg);
}

/* Specific Animation (X Shape) */
.navbar-anim-x .top {
    stroke-dasharray: 40 121;
}

.navbar-anim-x .bottom {
    stroke-dasharray: 40 121;
}

.navbar-toggler:not(.collapsed) .navbar-anim-x .top {
    stroke-dashoffset: -68px;
}

.navbar-toggler:not(.collapsed) .navbar-anim-x .bottom {
    stroke-dashoffset: -68px;
}


/* --- Navigation (Center/Right) --- */
.navbar-collapse {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    /* Items Left, Premium Right */
    align-items: center;
}

.navbar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    display: block;
}

.nav-link:hover {
    color: var(--purple-light);
    transform: translateY(-2px);
    text-shadow: 0 4px 10px rgba(157, 96, 207, 0.15);
}

.nav-link.active,
.nav-link.bold-active {
    color: var(--text-color);
    font-weight: 600;
}

.nav-link.active:hover,
.nav-link.bold-active:hover {
    color: var(--purple-light);
}

/* Premium Icon */
.premium {
    width: 28px;
    height: auto;
    margin-left: 20px;
    transition: transform 0.3s;
}

.premium:hover {
    transform: scale(1.1);
}


/* --- DESKTOP STYLES (lg and up) --- */
@media (min-width: 992px) {
    .header {
        padding: 30px 50px;
        /* Larger padding for desktop only */
    }

    .navbar-collapse {
        display: flex !important;
        /* Force show */
        height: auto !important;
        position: static;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .navbar-toggler {
        display: none;
    }

    .navbar-nav {
        flex-direction: row;
        gap: 30px;
        /* Spacious desktop gap */
        margin-left: 40px;
        /* Only apply left margin on desktop */
    }

    .nav-item {
        border: none;
    }

    .d-lg-none {
        display: none !important;
    }

    .d-lg-flex {
        display: flex !important;
        align-items: center;
    }
}


/* --- MOBILE STYLES (max-width 991px) --- */
@media (max-width: 991px) {
    .navbar-collapse {
        display: flex;
        /* Always flex to allow transition */
        position: absolute;
        top: 100%;
        /* Below header */
        left: 0;
        right: 0;
        background-color: var(--bg-main);

        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
        /* Full width items */
        border-radius: 0 0 20px 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.03);

        /* Animation State: Hidden */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease-in-out;
        pointer-events: none;
        /* Prevent clicks when hidden */
    }

    .navbar-collapse.show {
        /* Animation State: Visible */
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 15px;
        /* Vertical gap */
        margin-left: 0 !important;
        /* Force reset */
        width: 100%;
        /* Ensure full width for centering */
    }

    .nav-link {
        font-size: 18px;
        /* Larger text */
        padding: 10px 0;
        text-align: center;
        /* Centered mobile items */
    }

    .d-lg-none {
        display: block !important;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #f0f0f0;
        text-align: center;
    }
}

/* =========================================
   6. FOOTER
   ========================================= */
.footer {
    margin-top: 80px;
    padding: 60px 0 20px;
    /* Vertical padding with bottom spacing */
    background: radial-gradient(120% 100% at 50% 0%, var(--soft-orange) 0%, var(--purple-light) 40%, var(--cyan) 100%);
    border-radius: 20px 20px 0 0;
    width: 100%;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay if desired, or just clean gradient */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.15;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.div-space {
    margin-left: auto;
}

.footer-logo {
    margin-bottom: 5px;
    width: 160px;
    height: auto;
    filter: brightness(0) invert(1);
    /* Ensure white logo */
}

.footer-socials {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon i {
    font-size: 20px;
    color: var(--white);
    transition: transform 0.3s ease;
    line-height: 1;
    /* Fix vertical centering */
    display: flex;
    /* Helps with some icon sets */
}

.social-icon:hover {
    background-color: var(--teal);
    transform: translateY(-3px);
}

.social-icon:hover i {
    color: #fff;
}

.footer-heading {
    color: var(--teal-light);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 30px;
    height: 2px;
    background-color: var(--teal);
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav-item {
    margin-bottom: 12px;
}

.footer-nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-nav-link:hover {
    color: var(--teal-light) !important;
    transform: translateX(5px);
}

.footer-bottom {
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    padding-top: 30px;
    padding-bottom: 20px;
}

.footer-legal-links {
    display: flex;
    gap: 20px;
}

.footer-legal-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal-link:hover {
    color: var(--white);
    text-decoration: underline;
}

@media (max-width: 1200px) {
    .footer {
        padding: 60px;
        border-radius: 25px 25px 0 0;
    }
}

@media (max-width: 900px) {
    .footer {
        padding: 40px 20px;
    }
}