/* --- 1. VARIABLES --- */
:root {
    --bg: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #475569;
    --primary: #4f46e5;
    --secondary: #a855f7;
    --glass-nav: rgba(255, 255, 255, 0.9);
    --glass-card: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --input-bg: #e2e8f0;
    --switch-bg: #cbd5e1;
    --sidebar-link-bg: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] {
    --bg: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #6366f1;
    --secondary: #c084fc;
    --glass-nav: rgba(2, 6, 23, 0.8);
    --glass-card: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: #1e293b;
    --switch-bg: #1e293b;
    --sidebar-link-bg: rgba(255, 255, 255, 0.03);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    overflow-x: hidden;
    width: 100%;
    transition: background 0.3s, color 0.3s;
}

/* --- 2. LAYOUT & PADDING FIX (Ye hai main change) --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    /* Desktop Padding */
    padding: 0 5%;
}

@media (max-width: 768px) {
    .container {
        /* Mobile Padding (Bada diya hai) */
        padding-left: 25px !important;
        padding-right: 25px !important;
    }

    .section-padding {
        padding: 60px 0;
    }

    /* Vertical gap thoda kam mobile pe */
}

/* --- 3. NAVBAR --- */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: var(--glass-nav);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.desktop-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.desktop-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    transition: 0.2s;
    font-size: 0.95rem;
}

.desktop-menu a:hover {
    color: var(--primary);
}

/* --- 4. SIDEBAR (UPDATED) --- */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    background: var(--bg);
    border-left: 1px solid var(--glass-border);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Padding thodi adjust ki hai taaki niche content kate nahi */
    padding: 30px;
    padding-bottom: 80px;
    /* 🔥 Naya: Niche extra jagah taaki last link dikhe */

    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.4);

    /* 🔥 MAIN FIX: Scroll Enable Karne Ke Liye 🔥 */
    overflow-y: auto;
    /* Jab content jyada hoga to scroll aa jayega */
    height: 100vh;
    /* Poori screen height lega */
}

/* Sidebar ka scrollbar chupane ke liye (Clean look) */
.sidebar::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* --- Baki Code Same Rahega --- */
.sidebar.active {
    transform: translateX(0);
}

.sidebar-links {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.2s;
    background: var(--sidebar-link-bg);
    border: 1px solid var(--glass-border);
}

.sidebar-links a:active,
.sidebar-links a:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.sidebar-links i {
    color: var(--primary);
    font-size: 1.3rem;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-main);
    cursor: pointer;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* --- 5. TOGGLE --- */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.switch-input {
    display: none;
}

.switch-label {
    width: 60px;
    height: 32px;
    background: var(--switch-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    transition: 0.3s;
}

.switch-label i {
    font-size: 14px;
    z-index: 1;
    transition: 0.3s;
}

.switch-circle {
    position: absolute;
    left: 4px;
    top: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.switch-input:checked+.switch-label .switch-circle {
    transform: translateX(28px);
    background: var(--primary);
}

/* --- 6. CARDS --- */
.card-ui {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 24px;
    backdrop-filter: blur(12px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card-ui:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.2);
}

.icon-box {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    transition: 0.3s;
}

.card-ui:hover .icon-box {
    background: var(--primary);
    color: white;
    transform: rotate(10deg);
}

/* --- 7 FAQ SECTION CSS --- */
.faq-card {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    padding: 20px 25px;
    margin-bottom: 15px;
    border-radius: 16px;
    cursor: pointer;
    transition: border-color 0.3s;

    /* 🔥 COPY PROTECTION: Text select nahi hoga click karne par */
    user-select: none;
    -webkit-user-select: none;
    /* Chrome/Safari ke liye */
    -moz-user-select: none;
    /* Firefox ke liye */
}

.faq-card:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
    align-items: center;
}

.faq-question i {
    transition: transform 0.4s ease;
    /* Icon ghumne ka animation */
}

.faq-ans {
    /* 🔥 ANIMATION LOGIC: Height 0 se start hogi */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease, margin 0.4s ease;

    color: var(--text-muted);
    border-top: 1px solid transparent;
    /* Border chhupa ke rakho */
}

/* Jab active class lagegi tab ye style apply hoga */
.faq-card.active .faq-ans {
    opacity: 1;
    margin-top: 15px;
    padding-top: 15px;
    border-top-color: var(--glass-border);
    /* Border ab dikhega */
}

/* --- 8. UTILS --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.section-padding {
    padding: 100px 0;
}

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

.btn-glow {
    padding: 12px 30px;
    border: none;
    outline: none;
    color: #fff !important;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
}

.btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    padding: 11px 29px;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: 0.3s;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.aurora {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--primary);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: var(--secondary);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

@media (max-width: 900px) {
    .desktop-menu {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem !important;
    }

    .contact-split {
        grid-template-columns: 1fr !important;
    }
}

/* Contact Form */
.form-card {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 24px;
}

.input-group {
    margin-bottom: 25px;
    position: relative;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--glass-border);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    font-family: inherit;
}

.input-group input:focus,
.input-group textarea:focus {
    border-bottom-color: var(--primary);
}

.input-group label {
    position: absolute;
    top: 15px;
    left: 0;
    color: var(--text-muted);
    pointer-events: none;
    transition: 0.3s;
}

.input-group input:focus~label,
.input-group input:valid~label,
.input-group textarea:focus~label,
.input-group textarea:valid~label {
    top: -10px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

/* --- PRICING LIST UPDATES --- */
.feature-list {
    list-style: none;
    margin: 30px 0;
    text-align: left;
}

.feature-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    /* Icon aur text ke beech gap */
    font-size: 0.95rem;
}

/* Jo cheez milegi (Green/Primary Check) */
.feature-list li.available {
    color: var(--text-main);
}

.feature-list li.available i {
    color: var(--primary);
    /* Theme color */
    font-size: 1.2rem;
    font-weight: bold;
}

/* Jo cheez NAHI milegi (Red Cross + Fade) */
.feature-list li.unavailable {
    color: var(--text-muted);
    opacity: 0.6;
    /* Thoda dhundhla */
    text-decoration: line-through;
    /* Beech me line */
}

.feature-list li.unavailable i {
    color: #ef4444;
    /* Red Color */
    font-size: 1.2rem;
}

/* --- MOBILE SPACING FIXES (UPDATED) --- */
@media (max-width: 768px) {

    /* 1. Sections Gap Fix */
    .section-padding {
        /* Top-Bottom: 50px, Left-Right: 25px (SIDE GAP WAPAS A GAYA) */
        padding: 50px 25px !important;
    }

    /* 2. Hero Section Gap Fix */
    #home {
        padding-top: 120px !important;
        padding-bottom: 40px !important;
        /* Hero me bhi sides me gap zaroori hai */
        padding-left: 25px !important;
        padding-right: 25px !important;
    }

    /* 3. Container Padding Override (Safety ke liye) */
    .container {
        padding-left: 25px !important;
        padding-right: 25px !important;
    }

    /* 4. Grid Gap Adjustment */
    .grid {
        margin-top: 30px !important;
        gap: 25px !important;
    }

    /* 5. Descriptions Spacing */
    .section-desc {
        margin-bottom: 30px !important;
    }

    /* 6. Footer Fix */
    footer {
        padding: 40px 25px !important;
        /* Footer me bhi side gap */
    }
}

/* --- STICKY HEADER FIX --- */
#header-placeholder {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}


/* --- PRELOADER STYLES --- */
#preloader {
    position: fixed;
    inset: 0;
    /* Top, Left, Right, Bottom sab 0 */
    background-color: var(--bg);
    /* Theme Background */
    z-index: 9999;
    /* Sabse upar */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Spinner Animation */
.loader-ring {
    width: 60px;
    height: 60px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* Logo Text */
.loader-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 1px;
}

.loader-text .dot {
    color: var(--primary);
    animation: blink 1.5s infinite;
}

/* Hide Class (JS se add karenge) */
.fade-out {
    opacity: 0;
    visibility: hidden;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* --- CONTACT PAGE LAYOUT FIX --- */

/* Desktop: 2 Columns */
.contact-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 50% - 50% split */
    gap: 50px;
    align-items: start;
}

/* Mobile Responsive: 1 Column */
@media (max-width: 900px) {
    .contact-split {
        grid-template-columns: 1fr;
        /* Ek ke niche ek */
        gap: 30px;
    }

    /* Text center kar do mobile pe acha lagta hai */
    .contact-split>div:first-child {
        text-align: center;
        margin-bottom: 20px;
    }

    /* Icons ko bhi center align karo */
    .contact-split .icon-box {
        margin: 0 auto 10px auto;
        /* Center alignment trick */
    }

    .contact-split>div:first-child>div {
        justify-content: center;
        /* Flex items center */
        flex-direction: column;
        /* Icon upar, text niche */
        text-align: center;
    }
}

/* --- FINAL SPACING & ALIGNMENT FIXES --- */

/* 1. Desktop Hero Spacing (Upar se neeche khiskaya) */
/* Home, About, Services, sabke pehle section ko target karega */
section#home,
section.container:first-of-type {
    padding-top: 180px !important;
    /* Desktop par content thoda neeche aayega */
    padding-bottom: 40px !important;
}

/* 2. Reduce GAP (Heading aur Content ke beech) */
.section-desc {
    margin-bottom: 15px !important;
    /* Description ke niche ka gap kam kiya */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 3. Grid/Cards Spacing (Cards ko upar khiskaya) */
.grid {
    margin-top: 15px !important;
    /* Heading se doori kam ki */
    gap: 30px !important;
}

/* 4. Contact Page Specific Fix */
.contact-split {
    margin-top: 20px !important;
    /* Contact form ka gap kam kiya */
}

/* --- MOBILE SPECIFIC ADJUSTMENTS --- */
@media (max-width: 768px) {

    /* Mobile par content zyada neeche na bhage */
    section#home,
    section.container:first-of-type {
        padding-top: 110px !important;
        padding-bottom: 30px !important;
    }

    /* Mobile par Cards ka gap */
    .grid {
        margin-top: 10px !important;
        gap: 20px !important;
    }

    .section-title {
        font-size: 2.2rem !important;
        margin-bottom: 10px !important;
    }
}

/* Chrome, Safari, Edge, Opera se arrows hatane ke liye */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox se arrows hatane ke liye */
input[type=number] {
    -moz-appearance: textfield;
}

/* Header Active Link */
.nav-link.active {
    color: var(--primary) !important;
    font-weight: 700;
}

/* --- WHATSAPP FLOATING BUTTON --- */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    /* WhatsApp Green */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
    /* Sidebar se upar dikhega */
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse-green 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    /* Hover karne par thoda bada hoga */
    background-color: #20b858;
}

/* Pulse Animation Keyframes */
@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Mobile Adjustment (Thoda chhota button) */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 25px;
        right: 25px;
        font-size: 28px;
    }
}

/* --- BLOG SEARCH & PAGINATION --- */
.search-container {
    max-width: 500px;
    margin: 0 auto 40px auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    padding-left: 50px; /* Icon ke liye jagah */
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Pagination Buttons */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
}

.page-btn {
    padding: 10px 25px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Clickable Card Hover Effect */
.card-clickable {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}