/* ===== CSS Variables ===== */
:root {
    --primary-color: #0070FF;      /* Stitch Blue */
    --primary-dark: #004DB3;
    --primary-light: #E5F0FF;
    --secondary-color: #00E5FF;    /* Teal/Cyan */
    --accent-color: #88FF00;       /* Lime Green */
    
    --text-main: #1A1A24;
    --text-muted: #646473;
    --text-light: #FFFFFF;
    
    --bg-main: #FFFFFF;
    --bg-light: #F4F7FB;
    --bg-dark: #0F172A;
    
    --card-bg: #FFFFFF;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 800;
    color: var(--text-main);
}

h1 {
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem; /* Reduced from 2rem to prevent mobile overflow */
}

.section {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

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

.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

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

/* ===== Components ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    gap: 0.5rem;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(0, 112, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 112, 255, 0.4);
    color: var(--text-light);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
    max-width: 100%; /* Prevent card from overflowing */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
}

.glass-panel-dark {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(0, 77, 179, 0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--text-light);
}

/* ===== Header & Nav ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem; /* Slightly smaller for mobile */
    font-weight: 800;
    color: var(--text-main);
    flex-shrink: 1; /* Allow logo to shrink on small screens */
}

.logo img {
    height: 40px;
    width: auto;
}

@media (min-width: 769px) {
    .logo {
        font-size: 1.5rem;
        gap: 0.75rem;
    }
    .logo img {
        height: 50px;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    font-weight: 600;
    color: var(--text-main);
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 50%, rgba(15, 23, 42, 0.3) 100%);
}

.hero-content {
    color: var(--text-light);
    max-width: 800px;
    z-index: 1;
}

.hero-content h1, .hero-content h2, .hero-content h3 {
    color: var(--text-light);
}

.hero-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    max-width: 700px;
}

.stat-card {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-light);
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card p {
    font-size: 0.875rem;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ===== Services Section ===== */
.section-header {
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-card:hover .card-icon {
    background: var(--primary-color);
    color: var(--text-light);
    transform: scale(1.1) rotate(-5deg);
}

/* ===== About Section ===== */
.about-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.about-images {
    position: relative;
    padding-bottom: 2rem;
    padding-right: 2rem;
}

.img-main {
    width: 90%;
    border-radius: var(--radius-lg);
    z-index: 1;
    position: relative;
}

.img-float {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    border-radius: var(--radius-lg);
    border: 10px solid var(--bg-light);
    z-index: 2;
    box-shadow: var(--shadow-lg);
}

.feature-list {
    margin-top: 1.5rem;
    display: grid;
    gap: 1rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
}

.feature-list i {
    color: var(--accent-color);
    font-size: 1.25rem;
}

/* ===== Contact Section ===== */
.cta-box {
    padding: clamp(1.5rem, 5vw, 4rem);
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0,229,255,0.2) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.cta-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    position: relative;
    z-index: 1;
}

.cta-text h2 {
    color: var(--text-light);
}

.cta-text p {
    color: rgba(255,255,255,0.8);
    font-size: 1.125rem;
}

.cta-form {
    background: var(--card-bg);
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
}

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

input, select, textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: #F9FAFB;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 112, 255, 0.1);
    background: var(--bg-main);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding-top: 5rem;
}

.footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    margin-bottom: 4rem;
}

.footer p {
    color: rgba(255,255,255,0.6);
}

.footer h3 {
    color: var(--text-light);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    display: grid;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
}

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

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-contact i {
    color: var(--secondary-color);
}

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

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-light);
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
}

/* ===== Animations ===== */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

/* ===== Responsive Global ===== */
@media (max-width: 992px) {
    .about-grid, .cta-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .cta-box {
        padding: 1.5rem;
    }
}

/* ===== Subpage Specific Styles ===== */
.sub-hero {
    padding: clamp(6rem, 15vw, 10rem) 0 clamp(4rem, 10vw, 6rem);
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
    text-align: center;
    width: 100%;
}

.sub-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(0, 112, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(0, 229, 255, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.sub-hero .container {
    position: relative;
    z-index: 1;
}

.sub-hero h1 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    margin-bottom: 1rem;
    flex-wrap: wrap; /* Prevent breadcrumb from overflowing on very small screens */
}

.breadcrumb a {
    color: var(--secondary-color);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 0.25rem;
}

/* ===== Detailed Services Grid ===== */
.service-detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 3rem 2rem;
}

.service-detail-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding: 0; 
    border: 1px solid rgba(0,0,0,0.05);
    width: 100%;
}

.service-detail-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.service-detail-card:hover img {
    transform: scale(1.05);
}

.service-detail-card .card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 480px) {
    .service-detail-card .card-content {
        padding: 2rem;
    }
}

.service-detail-card .card-icon {
    margin-top: -3.5rem;
    position: relative;
    z-index: 2;
    border: 4px solid var(--bg-main);
    box-shadow: var(--shadow-md);
}

.service-detail-card h3 {
    margin-top: 1rem;
}

/* ===== Process Steps ===== */
.process-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    counter-reset: process-counter;
}

.process-step {
    text-align: center;
    position: relative;
    padding: 2rem 1.5rem;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    width: 100%;
}

.process-step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.process-step::before {
    counter-increment: process-counter;
    content: counter(process-counter);
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 0 8px var(--primary-light);
}

/* ===== Accordion ===== */
.accordion {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.accordion-item {
    background: var(--bg-main);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid rgba(0,0,0,0.08);
    overflow: hidden;
    transition: var(--transition);
}

.accordion-item:hover {
    border-color: var(--primary-color);
}

.accordion-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    gap: 1rem;
}

@media (min-width: 480px) {
    .accordion-header {
        padding: 1.5rem 2rem;
        font-size: 1.1rem;
    }
}

.accordion-header:hover {
    background: var(--bg-light);
}

.accordion-content {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    font-size: 1rem;
}

@media (min-width: 480px) {
    .accordion-content {
        padding: 0 2rem;
        font-size: 1.05rem;
    }
}

.accordion-item.active {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.accordion-item.active .accordion-content {
    padding: 0 1.5rem 1.5rem;
    max-height: 500px;
}

@media (min-width: 480px) {
    .accordion-item.active .accordion-content {
        padding: 0 2rem 2rem;
    }
}

.accordion-item.active .accordion-header {
    color: var(--primary-color);
}

.accordion-icon {
    transition: var(--transition);
    color: var(--primary-color);
    flex-shrink: 0;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* ===== Additional Responsiveness Fixes ===== */
@media (max-width: 992px) {
    .service-detail-grid {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .sub-hero {
        padding: 7rem 0 3.5rem;
    }
    
    .service-detail-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .cta-image {
        display: none;
    }

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

@media (max-width: 380px) {
    .logo span {
        display: none; /* Hide logo text on extremely small screens if necessary */
    }
    
    .logo::after {
        content: 'Suryansh'; /* Shorter text for tiny screens */
    }
}
