:root {
    /* Premium SaaS Dark Palette */
    --bg-deep: #020617;
    --bg-dark: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.6);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --secondary: #8b5cf6;
    --secondary-glow: rgba(139, 92, 246, 0.4);
    --accent: #22d3ee;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(2, 6, 23, 0.85);
    --hero-overlay: rgba(2, 6, 23, 0.7);
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes sectionPulse {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.15);
    }

    100% {
        filter: brightness(1);
    }
}

.section-active {
    animation: sectionPulse 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.section-active::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 120px var(--primary-glow);
    pointer-events: none;
    animation: fadeOutGlow 1.2s forwards;
    z-index: 5;
}

@keyframes fadeOutGlow {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes floatGlow {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.glow-effect {
    position: absolute;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(59, 130, 246, 0) 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
    animation: floatGlow 20s ease-in-out infinite;
}

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

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered entry for grid items */
.services-grid .reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.services-grid .reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.services-grid .reveal:nth-child(3) {
    transition-delay: 0.3s;
}

.services-grid .reveal:nth-child(4) {
    transition-delay: 0.4s;
}

.services-grid .reveal:nth-child(5) {
    transition-delay: 0.5s;
}

.projects-grid .reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.projects-grid .reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.projects-grid .reveal:nth-child(3) {
    transition-delay: 0.3s;
}

.benefits-grid .benefit-card {
    transition-delay: calc(var(--delay) * 0.1s);
}

html[data-theme="light"] {
    --bg-deep: #f8fafc;
    --bg-dark: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-main: #0f172a;
    --text-muted: #334155;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --hero-overlay: rgba(255, 255, 255, 0.65);
    --primary: #1d4ed8;
    --primary-glow: rgba(59, 130, 246, 0.15);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

h1,
h2,
h3,
h4,
.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.75rem;
    line-height: 1.3;
}

span.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

/* Scroll Progress Bar */
nav::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 1001;
    animation: scrollProgress linear;
    animation-timeline: scroll();
}

@keyframes scrollProgress {
    to {
        width: 100%;
    }
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    flex-shrink: 1;
    min-width: 0;
}

.logo span {
    color: var(--primary);
    margin-left: 4px;
}

.logo-icon {
    height: 34px;
    margin-right: 10px;
    flex-shrink: 0;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle-icon {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.theme-toggle-icon:hover {
    background: var(--glass-border);
    transform: rotate(15deg);
}

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

/* --- Buttons --- */
.btn {
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 20px -6px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -6px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass-border);
    transform: translateY(-2px);
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(var(--hero-overlay), var(--hero-overlay)), url('/static/images/hero_bg.png');
    background-size: cover;
    background-position: center;
    padding-top: 100px;
    overflow: hidden;
}

.hero-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: clamp(3rem, 7vw, 4.8rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
    text-wrap: balance;
    min-height: 1.1em;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    margin: 0 auto 3rem;
    max-width: 750px;
    color: var(--text-muted);
    line-height: 1.7;
    font-weight: 400;
}

.hero-btns {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.hero-btns .btn {
    min-width: 180px;
    height: 54px;
    padding: 0 2rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.hero-visual {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Challenges --- */
.challenges-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.challenge-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: var(--transition-smooth);
}

.challenge-item:hover {
    transform: translateX(10px);
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.4);
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.challenges-img {
    width: 100%;
    max-width: 420px;
    display: block;
    margin: 0 auto;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--glass-border);
}

/* --- Stats --- */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: -60px;
    position: relative;
    z-index: 20;
}

.stat-card {
    background: var(--bg-dark);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 2.75rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-card p {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Grids --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-content: center;
}

.services-grid .service-card:nth-child(4),
.services-grid .service-card:nth-child(5) {
    grid-column: span 1;
}

/* Center the last two items if they are on a new row */
@media (min-width: 1025px) {
    .services-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .services-grid .service-card {
        grid-column: span 2;
    }

    .services-grid .service-card:nth-child(4) {
        grid-column: 2 / span 2;
    }

    .services-grid .service-card:nth-child(5) {
        grid-column: 4 / span 2;
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.service-card,
.project-card,
.benefit-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: var(--transition-smooth);
    overflow: hidden;
    height: 100%;
    position: relative;
}

.service-card:hover,
.project-card:hover,
.benefit-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

/* Advanced Card Shine Effect */
.service-card::after,
.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-25deg);
    transition: 0.75s;
    pointer-events: none;
}

.service-card:hover::after,
.project-card:hover::after {
    left: 150%;
}

/* Mobile Menu Overlay Base (Hidden on Desktop) */
.mobile-menu-overlay { display: none; }

.service-card img,
.project-img {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover img,
.project-card:hover .project-img {
    transform: scale(1.1);
}

.service-card {
    padding: 1.75rem;
}

.service-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.project-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.project-content {
    padding: 1.75rem;
}

.benefit-card {
    padding: 2.5rem 1.5rem;
    text-align: center;
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2) rotate(5deg);
    }

    100% {
        transform: scale(1);
    }
}

.benefit-card:hover i {
    animation: iconPulse 1s ease-in-out infinite;
    color: var(--secondary);
}


/* --- About & CEO --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.leadership-wrapper {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 5rem;
    align-items: center;
}

.ceo-quote {
    font-size: 1.2rem;
    line-height: 1.7;
    position: relative;
    padding: 2rem;
    background: var(--glass-bg);
    border-radius: 20px;
    border-left: 4px solid var(--primary);
    margin-top: 2rem;
    color: var(--text-main);
}

/* --- CEO Image Enhancement --- */
.ceo-image-container {
    position: relative;
    display: inline-block;
    z-index: 5;
    transition: var(--transition-smooth);
}

.ceo-image-container:hover {
    transform: translateY(-5px);
}

.ceo-image {
    width: 100%;
    max-width: 420px;
    display: block;
    border-radius: 30px;
    border: 4px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    transition: var(--transition-smooth);
}

.ceo-more-btn {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    padding: 1rem 2rem !important;
    border-radius: 12px !important; /* Slightly more professional square-ish corners match the quote box */
    background: var(--gradient-primary) !important;
    color: white !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 20px var(--primary-glow) !important;
    border: none !important;
    white-space: nowrap;
    z-index: 10;
    display: inline-flex !important;
    text-decoration: none !important;
    transition: var(--transition-smooth) !important;
}

.ceo-more-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 15px 30px var(--primary-glow) !important;
    filter: brightness(1.1);
}

/* Mobile Adjustment for CEO Button */
@media (max-width: 1024px) {
    .ceo-more-btn {
        margin: 2rem auto 0 !important;
        display: flex !important;
        width: fit-content !important;
    }
}


@media (max-width: 768px) {
    .ceo-image-container {
        margin-bottom: 3.5rem;
    }
    .ceo-more-btn {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.85rem !important;
    }
}



/* --- Contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.contact-form {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-deep);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    background: var(--bg-dark);
}

/* --- Footer --- */
footer {
    padding: 80px 0 40px;
    background: #020617;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 60px;
}

.footer-brand .logo {
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 340px;
}

.social-icons-row {
    display: flex;
    gap: 0.75rem;
}

.social-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    text-decoration: none;
}

.social-icon-circle:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    border-color: var(--primary);
}

.footer-links h4 {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding: 25px 0;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Light Mode Footer Fix */
html[data-theme="light"] footer {
    background: #f1f5f9;
}

html[data-theme="light"] .footer-brand p,
html[data-theme="light"] .footer-links a,
html[data-theme="light"] .footer-bottom p {
    color: #475569;
}

html[data-theme="light"] .footer-links h4 {
    color: #0f172a;
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
        transform: scale(1.05);
    }

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

.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition-smooth);
    text-decoration: none;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
    background: #22c35e;
}

/* --- Chatbot --- */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px var(--primary-glow);
    transition: var(--transition-smooth);
}

.chat-toggle:hover {
    transform: scale(1.05) rotate(-5deg);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 500px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(25px);
}

.chat-window.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.chat-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--bg-deep);
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 15px;
    max-width: 85%;
    font-size: 0.9rem;
    line-height: 1.5;
}

.message.bot {
    background: var(--glass-bg);
    align-self: flex-start;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.message.user {
    background: var(--primary);
    align-self: flex-end;
    color: white;
}

.chat-input-area {
    padding: 0.85rem 1rem;
    background: var(--bg-dark);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-input-area input {
    flex: 1;
    background: var(--bg-deep);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0.6rem 1.2rem;
    color: var(--text-main);
    outline: none;
    font-size: 0.9rem;
}

.chat-input-area button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.chat-input-area button:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.close-chat {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.3s;
}

.close-chat:hover {
    opacity: 1;
}


/* --- Unified Responsive Standards --- */

/* Tablets & Small Laptops (up to 1024px) */
@media (max-width: 1024px) {
    .nav-links.desktop-nav { display: none !important; }
    nav { 
        z-index: 1100 !important; 
        height: 70px !important;
        background: var(--nav-bg) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        display: flex;
        align-items: center;
    }
    .nav-wrapper { height: 100%; display: flex; align-items: center; width: 100%; }
    .container { width: 100%; padding: 0 1rem; margin: 0 auto; }
    .section-padding { padding: 60px 0; }
    .nav-cta { display: none; }
    .mobile-toggle { display: flex !important; align-items: center; justify-content: center; }
    
    /* Premium Mobile Menu Overlay */
    .mobile-menu-overlay { 
        display: none; 
        position: fixed; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column; 
        padding: 90px 2rem 2rem;
        text-align: center; 
        z-index: 1000;
        overflow-y: auto;
    }

    html[data-theme="dark"] .mobile-menu-overlay {
        background: rgba(15, 23, 42, 0.98);
    }

    .mobile-menu-overlay.active { 
        display: flex !important;
        animation: fadeIn 0.4s ease forwards;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .mobile-nav-links { 
        list-style: none; 
        width: 100%; 
        padding: 0; 
        margin: 0; 
    }

    .mobile-nav-links li { 
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    html[data-theme="dark"] .mobile-nav-links li {
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .mobile-menu-overlay.active .mobile-nav-links li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered link entry */
    .mobile-nav-links li:nth-child(1) { transition-delay: 0.1s; }
    .mobile-nav-links li:nth-child(2) { transition-delay: 0.15s; }
    .mobile-nav-links li:nth-child(3) { transition-delay: 0.2s; }
    .mobile-nav-links li:nth-child(4) { transition-delay: 0.25s; }
    .mobile-nav-links li:nth-child(5) { transition-delay: 0.3s; }

    .mobile-nav-links a { 
        font-size: 1.15rem; 
        font-weight: 500; 
        color: var(--text-main); 
        text-decoration: none; 
        display: block;
        padding: 1.25rem 0;
        transition: all 0.3s ease;
        letter-spacing: 0.01em;
    }

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

    .leadership-wrapper,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero { 
        padding: 120px 0 80px; 
        min-height: auto; 
        text-align: center;
    }
    .hero-wrapper {
        gap: 0;
    }
    .hero-content { 
        width: 100%; 
        max-width: 100%;
    }
    .hero-content h1 { 
        font-size: clamp(2.2rem, 8vw, 3.2rem); 
        margin: 0 auto 1.5rem; 
        max-width: 100%; 
        line-height: 1.2; 
    }
    .hero-subtitle { 
        font-size: 1.05rem; 
        max-width: 90% !important; 
        margin: 0 auto 2.5rem !important; 
        line-height: 1.6;
    }
    .hero-btns { 
        display: flex !important;
        flex-direction: row !important; 
        gap: 1rem; 
        justify-content: center; 
    }
    .hero-btns .btn { 
        min-width: 160px;
        height: 50px;
        padding: 0 1.5rem; 
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    /* Reordering About section for mobile */
    .about-grid { display: flex; flex-direction: column; text-align: center; }
    .about-content { display: contents; }
    .about-content > p { order: 1; }
    .about-content > h2 { order: 2; }
    .about-content > p:nth-of-type(2) { order: 3; margin-bottom: 2rem !important; }
    .about-visual { order: 4; margin: 0 auto 2rem; display: block; }
    .about-visual img { max-width: 130px !important; }
    .about-cards { order: 5; }
    
    .benefits-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .benefit-card i { 
        display: inline-block;
        font-size: 2.5rem; 
        color: var(--primary); 
        margin-bottom: 1rem;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .challenges-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .challenge-card { padding: 2rem 1.5rem; }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .services-grid,
    .projects-grid,
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

/* Mobile Devices (up to 768px) */
@media (max-width: 768px) {
    h1 {
        font-size: 2.75rem;
    }

    h2 {
        font-size: 2.25rem;
    }

    .services-grid,
    .projects-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: -30px;
    }

    .chat-window {
        width: calc(100vw - 30px);
        height: 70vh;
        right: -10px;
        bottom: 75px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons-row {
        justify-content: center;
    }

    .footer-brand p {
        margin: 1.5rem auto;
    }
}

/* Small Phones (up to 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 2.25rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-btns .btn {
        width: 100%;
        min-width: 100%;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 85px;
        right: 20px;
    }

    .chat-widget {
        bottom: 20px;
        right: 20px;
    }

    .chat-toggle {
        width: 50px;
        height: 50px;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    .ceo-quote {
        padding: 1.5rem;
        border-left: none;
        border-top: 4px solid var(--primary);
    }
}

/* --- Extra Small Devices (320px) --- */
@media (max-width: 350px) {
    .logo {
        font-size: 0.9rem;
    }

    .logo-icon {
        height: 28px;
        margin-right: 6px;
    }

    .nav-actions {
        gap: 0.35rem;
    }

    .theme-toggle-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .mobile-toggle {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 1.85rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-top: -20px;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-card h3 {
        font-size: 1.75rem;
    }

    .stat-card p {
        font-size: 0.75rem;
    }

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

    .contact-form {
        padding: 1.5rem 1rem;
    }
}

/* --- Ultimate Mobile Fixes (320px) --- */
@media (max-width: 380px) {
    .logo {
        font-size: 0.75rem;
        letter-spacing: 0;
    }

    .logo span {
        margin-left: 2px;
    }

    .logo-icon {
        height: 24px;
        margin-right: 4px;
    }

    .nav-actions {
        gap: 0.25rem;
    }

    .theme-toggle-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .mobile-toggle {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .nav-wrapper {
        padding: 0 0.5rem;
    }
}

@media (max-width: 320px) {
    .logo {
        font-size: 0.65rem;
        letter-spacing: 0;
    }

    .logo-icon {
        height: 20px;
        margin-right: 4px;
    }

    /* Hide 'INNOVATIONS' on extremely small screens if needed, or just make it very small */
    /* Alternative: just keep 'MITTAL' or make text smaller */
}

/* --- Force Stats Visibility on Mobile --- */
@media (max-width: 500px) {
    .stats-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
        margin-top: -1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .stat-card {
        width: 100%;
        padding: 1.25rem !important;
        box-sizing: border-box;
    }
}

/* --- Hero & Floats Refinement --- */
.hero-btns .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    backdrop-filter: blur(10px);
}

html[data-theme="light"] .hero-btns .btn-secondary {
    background: transparent !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    color: #0f172a !important;
}

html[data-theme="light"] .hero-btns .btn-secondary:hover {
    background: var(--gradient-primary) !important;
    color: white !important;
    border-color: transparent !important;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 90px;
    }

    .chat-widget {
        bottom: 25px;
    }

    /* Better Hero Contrast on Mobile */
    .hero::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, var(--hero-overlay), rgba(2, 6, 23, 0.4));
        z-index: 1;
    }

    .hero-content {
        position: relative;
        z-index: 2;
    }
}

@media (max-width: 350px) {
    .hero-btns {
        gap: 1rem;
    }
}


/* --- Contact & About Mobile Refinement --- */
@media (max-width: 480px) {
    .contact-info p {
        word-break: break-word;
        font-size: 0.9rem;
    }

    .about-cards {
        grid-template-columns: 1fr !important;
    }

    .contact-grid {
        padding-bottom: 100px;
        /* Space for floating buttons */
    }
}

@media (max-width: 350px) {
    .contact-info p {
        font-size: 0.8rem;
    }
}

/* --- About Cards Base --- */
.about-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

/* --- Chat Suggestions --- */
.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.suggestion-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.suggestion-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* --- Light Mode Refinements --- */
html[data-theme="light"] .hero::after {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.7));
}

html[data-theme="light"] .hero-subtitle {
    color: #334155;
    font-weight: 500;
}

html[data-theme="light"] .btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

html[data-theme="light"] .btn-secondary:hover {
    background: var(--glass-bg);
}

/* --- Header Cut-off Fix for mid-range mobile --- */
@media (max-width: 450px) {
    .nav-wrapper {
        padding: 0 1rem;
    }

    .nav-actions {
        gap: 0.35rem;
    }

    .logo {
        font-size: 0.95rem;
        letter-spacing: 0.5px;
    }

    .logo-icon {
        height: 24px;
        margin-right: 6px;
    }

    .theme-toggle-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }
}

/* --- Universal Mobile Compatibility Reset --- */
* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    -webkit-appearance: none;
}

/* Fix for potential iOS button styling issues */
.btn,
.theme-toggle-icon,
.mobile-toggle {
    -webkit-appearance: none;
    border-radius: 12px;
}

/* Ensure sections don't cause horizontal scroll on any device */
section,
header,
footer {
    width: 100%;
    overflow: hidden;
}

/* Smooth scrolling for a premium feel on mobile */
html {
    scroll-behavior: smooth;
}