/* =========================================
   DILSEGROW - MODERN CSS ARCHITECTURE
========================================= */

/* --- 1. CSS Variables (Theming Engine) --- */
:root {
    /* Color Palette */
    --primary: #2563eb;          /* Vibrant Blue */
    --primary-hover: #1d4ed8;
    --secondary: #10b981;        /* Emerald Growth */
    --accent: #f59e0b;           /* Warm Warning/Action */
    
    /* Surface & Backgrounds */
    --bg-main: #f8fafc;          /* Slate 50 */
    --bg-surface: #ffffff;
    --bg-alt: #f1f5f9;           /* Slate 100 */
    
    /* Typography Colors */
    --text-heading: #0f172a;     /* Slate 900 */
    --text-body: #475569;        /* Slate 600 */
    --text-muted: #94a3b8;       /* Slate 400 */
    
    /* Borders & Shadows */
    --border-light: #e2e8f0;     /* Slate 200 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.025);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.05);
    
    /* Utilities */
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 2. Base Reset & Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- 3. Modern Typography --- */
h1, h2, h3, h4 {
    color: var(--text-heading);
    font-weight: 700;
    letter-spacing: -0.02em; /* Tighter modern kerning */
    line-height: 1.2;
}

h2 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.75rem); /* Fluid sizing */
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-body);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 60px;
}

/* --- 4. Buttons & Badges --- */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-full); /* Pill shape for modern feel */
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: white;
    color: var(--text-heading);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background-color: #dcfce7;
    color: #15803d;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.01em;
}

/* --- 5. Navigation (Glassmorphism) --- */

/* --- Logo Styling --- */
.logo {
    display: flex;
    align-items: center;
    gap: 12px; /* Adds space if you use an icon + text together */
    text-decoration: none; /* Removes underline since it's now a link */
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.03em;
    transition: var(--transition);
}

/* Controls the exact size of your image file */
.logo img {
    height: 50px; 
    width: auto;
    display: block;
    object-fit: contain;
    border-radius:50% 0% 50% 0%;
}

/* Adds a slight hover effect to the logo */
.logo:hover {
    opacity: 0.8;
}

.logo span {
    color: var(--primary);
    font-size:1.1em;
}


.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: rgba(255, 255, 255, 0.85); /* Semi-transparent */
    backdrop-filter: blur(12px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.03em;
}

.logo span {
    color: var(--primary);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

/* Button overrides for nav */
.nav-links .btn-primary {
    padding: 10px 24px;
    box-shadow: none;
}

/* --- 6. Hero Section --- */
.hero {
    /* Modern deep gradient */
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
    text-align: center;
    padding: 140px 20px;
    position: relative;
    overflow: hidden;
}

/* Optional glow effect behind text */
.hero::before {
    content: '';
    position: absolute;
    top: -50%; left: 50%;
    transform: translateX(-50%);
    width: 80%; height: 200%;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 850px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: white;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 24px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: #e2e8f0;
    margin-bottom: 40px;
    max-width: 600px;
    margin-inline: auto;
}

/* --- 7. Sections & Grids --- */
section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--bg-alt);
}

/* Mission & Tools Grid */
.mission-grid, .tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

/* Modern Card Styling */
.mission-card, .tool-card {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.mission-card h3, .tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.tool-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left; /* Left align is more modern than center */
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--bg-main);
    border-radius: var(--radius-md);
}

.tool-link {
    margin-top: 32px;
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Card Hover Effects */
.mission-card:hover, .tool-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: #cbd5e1;
}

/* --- 8. Process Steps --- */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    text-align: center;
}

.step {
    padding: 20px;
}

.step-number {
    width: 56px;
    height: 56px;
    background-color: var(--bg-alt);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 24px;
    box-shadow: 0 0 0 8px var(--bg-surface);
}

/* --- 9. Impact / Success Stories (Scrollable) --- */
.impact-section {
    padding: 100px 0;
    background-color: var(--bg-main);
    overflow: hidden; /* Prevents horizontal scroll on the whole page */
}

.impact-scroll-container {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 20px 4px 40px; /* Extra bottom padding for scrollbar and shadow */
    scroll-snap-type: x mandatory;
    scrollbar-width: thin; /* Modern Firefox styling */
    scrollbar-color: var(--primary) var(--border-light);
}

/* Custom Scrollbar for Chrome/Safari/Edge */
.impact-scroll-container::-webkit-scrollbar {
    height: 8px;
}
.impact-scroll-container::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: var(--radius-full);
}
.impact-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: var(--radius-full);
}

.impact-card {
    flex: 0 0 calc(100% - 10px); /* Shows 1 card on mobile */
    max-width: 500px;
    scroll-snap-align: center;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

/* Show 2 cards side-by-side on larger screens */
@media(min-width: 768px) {
    .impact-card {
        flex: 0 0 calc(50% - 12px); 
    }
}

.impact-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: #cbd5e1;
    transform: translateY(-4px);
}

/* Layout: Logo top, then name, then text */
.impact-header {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.client-logo {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

/* Colored placeholder backgrounds for logos */
.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-accent { background-color: var(--accent); }

.client-name {
    font-size: 1.25rem;
    margin-bottom: 4px;
    color: var(--text-heading);
}

.client-role {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.impact-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Pushes the list to the bottom evenly */
}

.review-text {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 32px;
}

.impact-list {
    list-style: none;
    margin-top: auto; /* Aligns checklists at the bottom of all cards */
    display: grid;
    gap: 12px;
}

.impact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-heading);
}

/* --- 10. Footer --- */
footer {
    background-color: var(--text-heading);
    color: white;
    text-align: center;
    padding: 100px 20px 40px;
}

footer h2 {
    color: white;
}

.footer-content p {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.125rem;
}

.footer-bottom {
    margin-top: 80px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* --- 11. Scroll Animations --- */
.scroll-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 12. Mobile Responsiveness & Menu --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-heading);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}



/* --- Contact Modal Styles --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6); /* Dark slate overlay */
    backdrop-filter: blur(8px); /* Frosted glass effect */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: var(--shadow-hover);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    right: 24px;
    top: 20px;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

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

/* Form Inputs */
.form-group {
    margin-bottom: 16px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-heading);
    background-color: var(--bg-main);
    transition: var(--transition);
}

/* Hover & Focus Effects */
.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); /* Soft blue glow */
    background-color: var(--bg-surface);
}

/* =======
   MOBILE RESPONSIVENESS REFINEMENTS ====== */

@media (max-width: 768px) {
    /* 1. Force all grids into a single, clean column */
    .mission-grid, .tools-grid, .process-steps {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* 2. Reduce massive desktop padding */
    section {
        padding: 60px 0 !important; 
    }
    
    /* 3. Center Hero Text on Mobile (Crucial for Business & Edu Pages) */
    .hero, .biz-hero, .edu-hero {
        padding: 100px 20px 50px !important;
        text-align: center !important;
    }
    
    .hero p, .biz-hero p, .edu-hero p {
        margin-inline: auto !important;
    }

    /* 4. Center the Back Links */
    .back-link {
        display: block;
        margin-bottom: 20px;
        font-size: 0.95rem;
        text-align: center;
    }

    /* 5. Shrink PWA Cards slightly */
    .pwa-card {
        padding: 24px;
    }

    .app-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        margin-bottom: 16px;
    }

    /* 6. Tighten the Footer */
    footer {
        padding: 60px 20px 40px !important;
    }

    .footer-content h2 {
        font-size: 1.8rem;
    }

    /* 7. Optimize the Contact Pop-up for Mobile Screens */
    .modal-content {
        padding: 30px 20px; /* Less padding so it fits on small phones */
        margin: 15% auto;
        width: 95%;
    }

    .close-btn {
        top: 15px;
        right: 15px;
    }

    /* Mobile Menu Toggle Fix */
    .menu-toggle {
        display: block;
        z-index: 1001;
        margin-left: auto;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border-light);
        padding: 32px 20px;
        gap: 24px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-md);
    }

    .nav-links.mobile-active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}
