/* ==========================================================================
   Premium Corporate Theme (VidyaSoft)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    /* Colors */
    --bg-color: #FFFFFF;
    --section-bg: #F8FAFC;
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --secondary: #0EA5E9;
    --border: #E2E8F0;
    --heading: #0F172A;
    --text: #475569;
    --muted: #64748B;
    --success: #10B981;
    --danger: #EF4444;
    
    /* Footer Dark Theme */
    --footer-bg: #0B1121;
    --footer-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --radius: 24px;
    --radius-sm: 12px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text);
    background: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--heading); line-height: 1.2; font-weight: 700; }
a { text-decoration: none; color: var(--primary); transition: var(--transition); }
img { max-width: 100%; height: auto; }

/* Layout Utilities */
.container, .container-wide { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section:nth-child(even), .section-tight { background-color: var(--section-bg); }
.section-tight { padding: 80px 0; }

.section-head { text-align: center; max-width: 700px; margin: 0 auto 50px; }
.section-head h2 { font-size: clamp(32px, 4vw, 42px); margin: 16px 0; }
.section-head p { color: var(--muted); font-size: 18px; }

.eyebrow {
    display: inline-block; font-size: 13px; font-weight: 600; color: var(--primary);
    text-transform: uppercase; letter-spacing: 1.5px; background: rgba(37, 99, 235, 0.1);
    padding: 8px 16px; border-radius: 100px;
}
.divider { height: 1px; background: var(--border); margin: 40px 0; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-family: var(--font-body); border-radius: var(--radius-sm); 
    cursor: pointer; transition: var(--transition); border: none; outline: none; 
    text-align: center; position: relative; overflow: hidden;
}
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-block { width: 100%; padding: 16px; font-size: 16px; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); background: rgba(37, 99, 235, 0.05); transform: translateY(-2px); }

/* Ripple Effect */
.ripple {
    position: absolute; background: rgba(255, 255, 255, 0.4); border-radius: 50%;
    transform: scale(0); animation: ripple-anim 0.6s linear; pointer-events: none;
}
.btn-outline .ripple { background: rgba(37, 99, 235, 0.2); }
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

/* Ambient Background */
.bg-ambient {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.05) 0%, transparent 60%);
    z-index: -1; pointer-events: none;
}

/* Navigation */
.nav { position: fixed; top: 0; width: 100%; z-index: 1000; padding: 20px 0; transition: var(--transition); border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); padding: 15px 0; border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.nav-brand img { 
    height: 90px;          /* Logo ko bada karne ke liye height badha di */
    margin: -20px 0;       /* Negative margin taki navbar unnecessarily mota na ho */
    object-fit: contain;   /* Aspect ratio maintain karne ke liye */
}
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--heading); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--primary); }
.nav-cta { display: flex; gap: 16px; }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--heading); }

/* Hero */
.hero { padding: 160px 24px 80px; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; max-width: 1200px; margin: 0 auto;}
.hero-copy h1 { font-size: clamp(38px, 5vw, 60px); margin: 24px 0; letter-spacing: -1.5px; }
.hero-copy h1 em { font-style: normal; color: var(--primary); }
.hero-copy p { font-size: 18px; margin-bottom: 40px; color: var(--muted); }
.hero-cta { display: flex; gap: 16px; margin-bottom: 48px; }

.hero-proof { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--border); padding-top: 32px; }
.hero-proof div strong { display: block; font-size: 28px; font-family: var(--font-heading); color: var(--heading); }
.hero-proof div span { font-size: 14px; color: var(--muted); font-weight: 500; }

/* Abstract Hero Visual */
.hero-visual { position: relative; height: 450px; display: flex; align-items: center; justify-content: center; }
.hero-visual .core { width: 140px; height: 140px; background: #fff; border-radius: 32px; box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center; z-index: 2; border: 1px solid var(--border); }
.hero-visual .core img { height: 120px; }
.hero-visual .ring { position: absolute; width: 380px; height: 380px; border: 2px dashed var(--border); border-radius: 50%; animation: spin 25s linear infinite; }
.hero-visual .pixel { position: absolute; background: var(--bg-color); box-shadow: var(--shadow-md); border-radius: 16px; border: 1px solid var(--border); }
.hero-visual .p1 { width: 90px; height: 90px; top: 5%; right: 15%; animation: float 4s infinite; }
.hero-visual .p2 { width: 70px; height: 70px; bottom: 15%; left: 5%; animation: float 5s infinite reverse; }
.hero-visual .p3 { width: 120px; height: 45px; top: 45%; right: 0%; background: rgba(37, 99, 235, 0.1); border-color: transparent; }

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-15px); } }

/* Stats Strip */
.stats-strip { background: var(--primary); padding: 40px 0; color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats-grid div strong { display: block; font-size: 22px; font-family: var(--font-heading); margin-bottom: 8px; }
.stats-grid div span { font-size: 15px; opacity: 0.9; }

/* Solutions (Modules) */
.solutions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.mod-card { background: #fff; padding: 32px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: var(--transition); }
.mod-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: rgba(37, 99, 235, 0.3); }
.mod-card-top { margin-bottom: 20px; }
.mod-tag { background: rgba(37, 99, 235, 0.1); color: var(--primary); padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.mod-card h3 { font-size: 22px; margin-bottom: 12px; }
.mod-card p { color: var(--muted); margin-bottom: 24px; }

.mod-toggle { width: 100%; background: var(--section-bg); border: 1px solid var(--border); padding: 14px 16px; border-radius: var(--radius-sm); display: flex; justify-content: space-between; align-items: center; font-weight: 600; cursor: pointer; transition: var(--transition); color: var(--heading); }
.mod-toggle:hover { border-color: var(--primary); color: var(--primary); background: #fff; }
.mod-toggle svg { transition: transform 0.3s; }
.mod-toggle.active svg { transform: rotate(180deg); }

.mod-feature-list { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
.mod-feature-list.open { max-height: 800px; margin-top: 16px; }
.mod-feature-list ul { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.mod-feature-list li { font-size: 14px; position: relative; padding-left: 24px; color: var(--text); }
.mod-feature-list li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: bold; }
.mod-feature-list li strong { display: block; color: var(--heading); font-size: 15px; margin-bottom: 4px; }

/* Configurator (Stack Builder) */
.configurator { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow: hidden; }
.console-bar { background: var(--section-bg); padding: 16px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; }
.console-dots { display: flex; gap: 8px; }
.console-dots span { width: 12px; height: 12px; border-radius: 50%; background: #CBD5E1; }
.console-dots span:nth-child(1) { background: #EF4444; }
.console-dots span:nth-child(2) { background: #F59E0B; }
.console-dots span:nth-child(3) { background: #10B981; }
.console-title { font-size: 14px; color: var(--muted); font-family: monospace; }

.configurator-body { display: grid; grid-template-columns: 2fr 1.2fr; }
.config-list { padding: 40px; border-right: 1px solid var(--border); max-height: 600px; overflow-y: auto; }
.config-group { margin-bottom: 40px; }
.config-group h4 { font-size: 20px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); color: var(--heading); }

.config-item { display: flex; align-items: flex-start; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; cursor: pointer; transition: var(--transition); }
.config-item:hover:not(.disabled) { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.config-item.selected { border-color: var(--primary); background: rgba(37, 99, 235, 0.05); }

/* FIX: flex-shrink: 0 ensures checkbox doesn't get squeezed and remains clickable */
.config-item input[type="checkbox"] { margin-top: 4px; margin-right: 16px; width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--primary); cursor: pointer; }
.config-item-text strong { display: block; font-size: 16px; color: var(--heading); margin-bottom: 4px; }
.config-item-text span { font-size: 14px; color: var(--muted); line-height: 1.5; display: block; }

/* FIX: Styling for modules with missing prices in calculator.js */
.config-item.disabled { opacity: 0.6; background: var(--section-bg); pointer-events: none; }

.config-summary { padding: 40px; background: var(--section-bg); display: flex; flex-direction: column; justify-content: space-between;}
.config-summary h4 { font-size: 20px; margin-bottom: 24px; color: var(--heading); }
.config-total { margin-bottom: 32px; }
#configTotalValue { font-size: 48px; font-family: var(--font-heading); font-weight: 700; color: var(--heading); display: block; }
.lock-note { font-size: 12px; color: var(--muted); text-transform: uppercase; font-weight: 600; letter-spacing: 1px; }
.config-count { font-weight: 600; margin-bottom: 16px; color: var(--heading); }

.config-selected-chips { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; align-content: flex-start; }
.config-empty { font-size: 14px; color: var(--muted); background: #fff; padding: 12px 16px; border-radius: 8px; border: 1px dashed var(--border); }

/* FIX: Match the JS output class name to render correctly */
.chip { background: #fff; border: 1px solid var(--border); padding: 8px 12px; border-radius: 100px; font-size: 13px; font-weight: 500; color: var(--primary); box-shadow: var(--shadow-sm); }

/* Case Studies (Our Work) */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.case-card { background: #fff; padding: 40px 32px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: var(--transition); }
.case-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: rgba(37, 99, 235, 0.3); }
.case-kicker { font-size: 12px; font-weight: 700; color: var(--secondary); text-transform: uppercase; margin-bottom: 16px; display: block; letter-spacing: 1px; }
.case-card h3 { font-size: 22px; margin-bottom: 16px; }
.case-card p { color: var(--muted); margin-bottom: 32px; }
.case-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--border); padding-top: 24px; }
.case-stats strong { display: block; font-size: 24px; font-family: var(--font-heading); color: var(--heading); }
.case-stats span { font-size: 13px; color: var(--muted); font-weight: 500;}

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-copy h2 { font-size: clamp(32px, 4vw, 42px); margin: 16px 0; }
.about-copy p { margin-bottom: 24px; font-size: 18px; }
.about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.about-fact { background: #fff; padding: 24px; border-radius: var(--radius-sm); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.about-fact .mono { font-family: monospace; font-size: 24px; font-weight: 700; color: var(--primary); display: block; margin-bottom: 12px; }
.about-fact strong { display: block; font-size: 18px; margin-bottom: 8px; color: var(--heading); }
.about-fact p { font-size: 14px; color: var(--muted); margin: 0; }

/* Contact Section & Form Improvements */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; }
.contact-info h2 { font-size: clamp(32px, 4vw, 42px); margin: 16px 0; }
.contact-info p { font-size: 18px; margin-bottom: 32px; }
.contact-detail { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.contact-detail a { font-size: 20px; font-weight: 600; color: var(--heading); }
.contact-detail a:hover { color: var(--primary); }
.contact-note { font-size: 14px; color: var(--muted); padding: 16px; background: rgba(37, 99, 235, 0.05); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); }

.contact-form-panel { background: #fff; padding: 48px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { margin-bottom: 24px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--heading); }

/* FIX: Beautiful form inputs */
.field input, .field textarea { 
    width: 100%; padding: 14px 16px; border: 1px solid var(--border); 
    border-radius: 8px; font-family: var(--font-body); font-size: 16px; 
    color: var(--heading); background: var(--section-bg); outline: none; 
    transition: var(--transition); 
}
.field input:focus, .field textarea:focus { 
    background: #fff; border-color: var(--primary); 
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); 
}
.field textarea { min-height: 120px; resize: vertical; }

.selected-modules-box { background: rgba(37, 99, 235, 0.05); padding: 16px; border-radius: var(--radius-sm); border: 1px solid rgba(37, 99, 235, 0.2); margin-bottom: 24px; }
.selected-modules-box strong { display: block; font-size: 14px; margin-bottom: 8px; color: var(--heading); }
#selectedModulesList { font-size: 14px; font-weight: 500; color: var(--primary); line-height: 1.5; }

/* FIX: Form Status (Success/Error Message) generated by forms.js */
.form-status { margin-top: 16px; padding: 14px; border-radius: 8px; font-size: 14px; font-weight: 600; text-align: center; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.form-status.err { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }

/* ==========================================================================
   Footer (Completely Fixed & Premium Look)
   ========================================================================== */
.footer { background: var(--footer-bg); color: #94A3B8; padding: 80px 0 40px; border-top: 1px solid var(--border); }
.footer-top { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-bottom: 60px; }

/* White box wrapper for logo to make sure it's always clearly visible */
.footer-brand img { 
    height: auto; 
    max-height: 90px;      /* Isko bhi 70px se badha kar 90px kar diya */
    margin-bottom: 24px; 
    background: #ffffff; 
    padding: 0px 10px;     /* CSS padding ekdum kam kar di kyunki image me pehle se hai */
    border-radius: 8px; 
    display: inline-block; 
    box-shadow: var(--shadow-md);
}
.footer-brand p { color: #94A3B8; max-width: 320px; font-size: 15px; }

.footer-cols { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1.5fr; /* <--- YE CHANGE KIYA HAI */
    gap: 40px; 
}
.footer-col h5 { font-size: 18px; margin-bottom: 24px; color: #fff; }
.footer-col a { display: block; color: #94A3B8; margin-bottom: 12px; transition: var(--transition); font-size: 15px; }
.footer-col a:hover { color: #fff; padding-left: 4px; }

.footer-bottom { border-top: 1px solid var(--footer-border); padding-top: 32px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #64748B; }
.footer-admin-link { color: #64748B; font-weight: 500; }
.footer-admin-link:hover { color: #fff; }

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; padding-top: 140px; text-align: center; }
    .hero-copy p { margin: 0 auto 32px; }
    .hero-cta { justify-content: center; }
    .hero-proof { justify-content: center; text-align: left; }
    .hero-visual { display: none; }
    
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .solutions-grid, .case-grid, .about-grid, .about-facts { grid-template-columns: 1fr; }
    .configurator-body { grid-template-columns: 1fr; }
    .config-list { border-right: none; border-bottom: 1px solid var(--border); padding: 24px; max-height: 400px; }
    
    .contact-wrap, .form-row, .footer-top { grid-template-columns: 1fr; }
    .contact-form-panel { padding: 32px 24px; }
    
    .nav-links, .nav-cta { display: none; }
    .nav-toggle { display: block; }
    .nav-links.active {
        display: flex; flex-direction: column; position: absolute; top: 100%; left: 0;
        width: 100%; background: #fff; padding: 24px; box-shadow: var(--shadow-md); border-top: 1px solid var(--border);
    }
    .nav-links.active a { padding: 12px 0; text-align: center; border-bottom: 1px solid var(--section-bg); }
}
@media (max-width: 767px) {
    .footer-cols {
        grid-template-columns: 1fr;
    }
    .nav-brand img {
        height: 75px;
        margin: -15px 0;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .hero-proof { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}