/* ==========================================================================
   1. GLOBAL RESET, CONFIGURATIONS & THEME DESIGN TOKENS
   ========================================================================== */
:root {
    /* Color Palette Layout - Grey, Red, Black, White */
    --bg-dark: #ffffff;             /* Main background canvas: Pure White */
    --bg-surface: #f8fafc;          /* Content cards & section blocks: Soft Light Grey */
    --bg-surface-accent: #f1f5f9;   /* High-visibility active background state */
    --text-primary: #0f172a;        /* Body Copy, standard parameters: Solid Carbon Black */
    --text-secondary: #475569;      /* Main Headings (h1, h2, h3, h4): Deep Slate Grey */
    --brand-blue: #dc2626;          /* Small titles & Primary UI elements: Crimson Red */
    --brand-cyan: #991b1b;          /* Interactive hover accent state: Deep Wine Red */
    
    /* UI Element Gradients */
    --primary-gradient: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    --accent-gradient: linear-gradient(135deg, #475569 0%, #334155 100%);
    
    /* Structural Elements */
    --border-color: rgba(15, 23, 42, 0.08); /* Dark subtle border lines */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary); /* Sets default text to Black */
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Fluid Responsive Container Base */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   2. TYPOGRAPHY & FIXED COLOR SCHEMING
   ========================================================================== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-secondary); /* Headings: Grey */
    overflow-wrap: break-word;
    word-wrap: break-word;
}

p {
    color: var(--text-primary); /* Paragraph Text: Black */
    overflow-wrap: break-word;
}

.section-header {
    margin-bottom: 56px;
}

.section-header.text-center {
    text-align: center;
}

/* Small Titles Layer */
.sub-title {
    color: var(--brand-blue); /* Small Titles: Red */
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-desc {
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-primary); /* Standardizing descriptions to Black */
}

/* ==========================================================================
   3. DESIGN UTILITIES (RED BUTTONS, BADGES, CARDS)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    max-width: 100%;
}

/* Buttons: Solid Red */
.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff; /* Contrast text inside red buttons */
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
    background: var(--brand-cyan);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-primary); /* Text: Black */
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--text-primary);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: var(--brand-blue); /* Outline Button: Red text */
    border: 1px solid var(--brand-blue);
}

.btn-outline:hover {
    background: rgba(220, 38, 38, 0.05);
}

.btn-block {
    width: 100%;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(220, 38, 38, 0.08); /* Translucent Red accent box */
    color: var(--brand-blue); /* Red Text */
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-accent {
    background: rgba(71, 85, 105, 0.1);
    color: var(--text-secondary); /* Grey Badge variation */
}

/* Glassmorphism Structural Cards (Polished Light-Mode blur) */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: absolute;
    width: 320px;
    box-shadow: 0 20px 40px rgba(15,23,42,0.08);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(15, 23, 42, 0.15);
}

/* Small Title inside floating card */
.glass-card h4 {
    color: var(--brand-blue) !important; /* Forces Red style rules on custom widget micro-headers */
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.glass-card p {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.glass-card i {
    font-size: 2rem;
    flex-shrink: 0;
}

.text-gradient {
    color: var(--brand-blue); /* Forcing icon gradients directly to Red accenting */
}

.text-blue { color: var(--brand-blue); }

/* ==========================================================================
   4. NAVIGATION MENU LAYOUT
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================================================
   UPDATED: GRAPHIC BRAND IMAGE LOGO & VARIABLE SIZING ENGINE
   ========================================================================== */
.logo-img-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.brand-logo-image {
    height: auto;
    width: 150px;
    object-fit: contain; /* Keeps dimensions, aspect ratios, and resolutions crisp */
    display: block;
    transition: max-height 0.2s ease; /* Smooth scaling switch */
}

/* --------------------------------------------------------------------------
   SIZE VARIANT MATRIX (Controlled directly via HTML data-size attribute)
   -------------------------------------------------------------------------- */

/* Variant 1: Compact/Small Logo Style */
.logo-img-wrapper[data-size="small"] .brand-logo-image {
    max-height: 32px;
    max-width: 120px;
}

/* Variant 2: Standard/Medium Logo Style (Default Configuration) */
.logo-img-wrapper[data-size="medium"] .brand-logo-image {
    max-height: 44px;
    max-width: 165px;
}

/* Variant 3: Prominent/Large Logo Style */
.logo-img-wrapper[data-size="large"] .brand-logo-image {
    max-height: 54px;
    max-width: 200px;
}

/* --------------------------------------------------------------------------
   INTERACTIVE REACTION & BREAKPOINT BOUNDARIES
   -------------------------------------------------------------------------- */
.logo-img-wrapper:hover .brand-logo-image,
.logo-img-wrapper:active .brand-logo-image {
    transform: scale(1.03);
}

/* Mobile responsive downscaling overrides to prevent header blowout */
@media (max-width: 768px) {
    /* Clamps all variations cleanly down to a balanced mobile framework */
    .logo-img-wrapper[data-size="small"] .brand-logo-image { max-height: 28px; max-width: 100px; }
    .logo-img-wrapper[data-size="medium"] .brand-logo-image { max-height: 34px; max-width: 130px; }
    .logo-img-wrapper[data-size="large"] .brand-logo-image { max-height: 40px; max-width: 150px; }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary); /* Nav Links default: Slate Grey */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--brand-blue); /* Hover: Turns Red */
}

.menu-toggle {
    display: none;
    background: transparent;
    color: var(--text-primary); /* Hamburger Menu Line: Black */
    font-size: 1.5rem;
    border: none;
    cursor: pointer;
    padding: 8px;
}

/* ==========================================================================
   5. COMPLETE HERO BLOCK SYSTEM
   ========================================================================== */
/* ==========================================================================
   HERO SECTION LAYOUT ENGINE & STRUCTURAL POSITIONS
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 120px 0 100px 0;
    background-color: var(--bg-dark); /* Carbon theme sync */
    overflow: hidden;
    width: 100%;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr; /* Distinct asymmetric structure balancing text and visuals */
    gap: 60px;
    align-items: center;
}

/* Typography alignment controllers */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    line-height: 1.1;
    margin: 15px 0 20px 0;
    font-weight: 900;
}

.hero-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 35px;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* --------------------------------------------------------------------------
   VISUAL MATRIX STAGE - CONTROLLING SCATTERED ELEMENTS
   -------------------------------------------------------------------------- */
.hero-visual {
    position: relative; /* Base coordinate center point for floating glass-cards */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

/* Central Main Dashboard Image Canvas Frame */
.hero-img-frame {
    width: 100%;
    max-width: 440px;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* --------------------------------------------------------------------------
   THE GLASS CARD SYSTEM OVERLAYS
   -------------------------------------------------------------------------- */
.glass-card {
    position: absolute !important; /* Detaches cards from standard stack layout */
    width: 210px !important;       /* Compact card block format */
    
    /* UPDATED OPACITY: Changed from 0.85 to 0.95 for a more solid, premium look */
    background: rgba(255, 255, 255, 0.10) !important; 
    
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    
    /* UPDATED BORDER: Adjusted opacity so it frames the sharper card perfectly */
    border: 1px solid rgba(15, 23, 42, 0.12) !important; 
    
    border-radius: 16px !important;
    padding: 14px !important;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    z-index: 5;
}

/* Coordinates Card 1: Top Left overlapping main visual */
.card-1 {
    top: 0;
    left: -20px;
}

/* Coordinates Card 2: Bottom Right overlapping main visual */
.card-2 {
    bottom: 10px;
    right: -20px;
}

/* Inner Thumbnail configuration within micro context specs */
.card-image-thumb {
    width: 100% !important;
    height: 90px !important; /* Rigid containment scale */
    border-radius: 8px !important;
    overflow: hidden !important;
}

.card-image-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.card-text-content h4 {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    margin: 2px 0 !important;
}

.card-text-content p {
    font-size: 0.75rem !important;
    margin: 0 !important;
    opacity: 0.8;
}

/* ==========================================================================
   MOBILE PRESERVATION GRID (STOPS CRUSHING)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr; /* Switch to single columnar stack */
        gap: 50px;
    }
    .hero-content {
        align-items: center;
        text-align: center;
    }
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-visual {
        max-width: 480px;
        margin: 0 auto;
    }
    /* Moves cards inward slightly on compact tablets to fit inside display window */
    .card-1 { left: 0px; }
    .card-2 { right: 0px; }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }
    /* Hide decorative card image thumbnails on tiny mobile screens to save layout real estate */
    .card-image-thumb { display: none !important; }
    .glass-card { width: 160px !important; }
    .card-1 { top: -10px; left: -10px; }
    .card-2 { bottom: -10px; right: -10px; }
}
/* ==========================================================================
   6. VALUE PROPOSITION & BUSINESS STATS
   ========================================================================== */
.about-section {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.stat-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 32px 24px;
    border-radius: 12px;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    color: var(--text-secondary); /* Large Numbers: Grey */
    margin-bottom: 8px;
}

.stat-item p {
    color: var(--text-primary); /* Stat text descriptions: Black */
}

/* ==========================================================================
   7. EXPERTISE & SERVICES LAYOUT MATRIX
   ========================================================================== */
.services-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, var(--bg-dark), var(--bg-surface));
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.service-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 16px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.service-card:hover {
    background: var(--bg-surface-accent);
    transform: translateY(-4px);
    border-color: rgba(220, 38, 38, 0.3);
}

.icon-box {
    width: 56px;
    height: 56px;
    background: rgba(220, 38, 38, 0.08); /* Translucent Red bounding box */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue); /* Red Icons */
    font-size: 1.5rem;
    margin-bottom: 24px;
    flex-shrink: 0;
}

/* Core Service Item Header Sized as Small Title */
.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--brand-blue); /* Sized as micro headers: Red */
}

/* ==========================================================================
   8. SYSTEM BLUEPRINT (5-STAGE TIMELINE)
   ========================================================================== */
.process-section {
    padding: 100px 0;
    background: var(--bg-surface);
}

.timeline {
    max-width: 800px;
    margin: 56px auto 0 auto;
    position: relative;
    padding-left: 48px;
    border-left: 2px solid var(--border-color);
}

.timeline-step {
    position: relative;
    margin-bottom: 48px;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.step-number {
    position: absolute;
    left: -66px;
    top: -2px;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 2px solid var(--brand-blue); /* Step Circles: Red */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--brand-blue); /* Numbers inside circles: Red */
    z-index: 5;
}

.timeline-step h3 {
    color: var(--brand-blue); /* Phase Small Titles: Red */
    font-size: 1.3rem;
    margin-bottom: 8px;
}

/* ==========================================================================
   9. REGULATORY COMPLIANCE & SCALING SECTIONS
   ========================================================================== */
.global-section {
    padding: 100px 0;
    background: var(--bg-dark);
}

.global-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
    align-items: center;
}

.global-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.global-text p {
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.expert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.expert-tag {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary); /* Tag items: Black */
}

.expert-tag i {
    color: var(--brand-blue); /* Badge icons inside tags: Red */
}

.global-visual-with-img {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.global-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    border: 1px solid var(--border-color);
    border-bottom: none;
}

.global-visual-with-img .compliance-box {
    border-radius: 0 0 16px 16px;
}

/* Compliance Card Switch to Deep Structural Theme colors */
.compliance-box {
    background: var(--accent-gradient); /* Rich Deep Grey back layer */
    padding: 40px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.compliance-box h3 {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff; /* Contrast text inside global container */
}

.compliance-box p {
    color: rgba(255, 255, 255, 0.85); /* Contrast description details */
}

/* ==========================================================================
   10. INTERACTIVE PORTFOLIO/CASE STUDIES DISPLAY
   ========================================================================== */
.portfolio-section {
    padding: 100px 0;
    background: var(--bg-surface);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
}

.portfolio-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 320px;
    border: 1px solid var(--border-color);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 32px 24px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 70%, transparent 100%);
    transform: translateY(10px);
    transition: var(--transition-smooth);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h4 {
    font-size: 1.2rem;
    margin-bottom: 4px;
    color: #ffffff; /* Retained high-contrast light text inside dark picture overlay */
}

.portfolio-overlay p {
    font-size: 0.85rem;
    color: #f1f5f9;
    font-weight: 500;
}

/* ==========================================================================
   11. DATA CONVERSION & LEAD CAPTURE FORM LAYER
   ========================================================================== */
.contact-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, var(--bg-surface), var(--bg-dark));
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.contact-methods {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.method-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.method-item i {
    width: 48px;
    height: 48px;
    background: rgba(15,23,42,0.04);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue); /* Icons: Red */
    font-size: 1.2rem;
    flex-shrink: 0;
}

.method-item h4 {
    font-size: 1rem;
    color: var(--brand-blue); /* Micro contact tags: Red */
}

.contact-form-container {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.lead-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary); /* Input labels: Grey */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 8px;
    color: var(--text-primary); /* Content input type text: Black */
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    width: 100%;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-blue); /* Focused Field border: Red */
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* ==========================================================================
   12. FOOTER FOOTPRINT SYSTEM
   ========================================================================== */
.main-footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-container p {
    color: var(--text-primary); /* Footer texts: Black */
}

.footer-container p span {
    color: var(--brand-blue); /* Logo block highlight inside footer: Red */
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary); /* Footer Link nodes: Grey */
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--brand-blue); /* Footer Links hover state: Red */
}

/* ==========================================================================
   13. STALWART INTERACTIVE MOBILE OVERRIDES (COMPREHENSIVE RESPONSIVENESS)
   ========================================================================== */

/* Medium Devices & Small Laptops */
@media (max-width: 1024px) {
    .hero-container, 
    .global-container, 
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }
    
    .hero-visual {
        margin-top: 40px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets, Handsets, and Compact Viewports */
@media (max-width: 768px) {
    /* Container Constraints Configuration */
    .container {
        padding: 0 20px;
    }

    /* Mobile Hamburger Menu Drawer Configuration */
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        padding: 40px 24px;
        gap: 24px;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-120%);
        opacity: 0;
        transition: var(--transition-smooth);
        pointer-events: none;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    
    /* Layout Element Alignment Collapse Overrides */
    .stats-grid, 
    .services-grid, 
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Absolute Scaling Protection For Tiny Screens */
    .hero-section {
        padding: 120px 0 60px 0;
    }

    .hero-content h1 {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }
    
    .section-header h2,
    .global-text h2,
    .contact-info h2 {
        font-size: 1.8rem !important;
        line-height: 1.2;
    }
    
    /* Strict Layout Restructure: Stacking Buttons & CTAs */
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .hero-actions .btn {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    /* Realigning Elements: Converting Floats to Static Content Cards */
    .hero-visual {
        flex-direction: column;
        gap: 16px;
    }
    
    .hero-img {
        height: 260px;
        border-radius: 16px;
    }
    
    /* Glass Layer Positioning Exits */
    .glass-card {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100%;
        transform: none !important;
        box-shadow: 0 10px 25px rgba(15,23,42,0.05);
    }
    
    /* Step Marker Alignment Fixes */
    .timeline {
        padding-left: 32px;
    }
    
    .step-number {
        left: -50px;
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .contact-form-container {
        padding: 28px 20px;
    }
    
    /* Guard Clause: Prevent iOS Browser Text Zooming In Inputs */
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        font-size: 16px !important; 
    }
    
    .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* ==========================================================================
   14. INTERACTIVE ANIMATIONS & SCROLL REVEALS
   ========================================================================== */

/* Baseline entry setups for scrolling blocks */
.reveal-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
                transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;
}

/* Instantly transitions elements up when seen */
.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger updates for sequential structural elements */
.service-card.reveal-ready:nth-child(2) { transition-delay: 0.15s; }
.stat-item.reveal-ready:nth-child(2) { transition-delay: 0.1s; }
.stat-item.reveal-ready:nth-child(3) { transition-delay: 0.2s; }
.stat-item.reveal-ready:nth-child(4) { transition-delay: 0.3s; }

/* Micro interactions for Red UI CTA Buttons */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
    transition: 0.75s;
}

.btn-primary:hover::after {
    left: 125%;
}

/* Smooth transformations for 3D card calculations */
.glass-card, .service-card, .portfolio-item {
    transition: transform 0.1s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

/* Floating pulse loops for the background glass cards on desktops */
@media (min-width: 769px) {
    .card-1 {
        animation: floatFloatingOne 6s ease-in-out infinite;
    }
    .card-2 {
        animation: floatFloatingTwo 7s ease-in-out infinite 0.5s;
    }
}

@keyframes floatFloatingOne {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes floatFloatingTwo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ==========================================================================
   14. HIGH-IMPACT SCROLL REVEALS & COMPONENT KINETICS
   ========================================================================== */

/* Background Split Reveal State for entire sections */
.section-hidden {
    opacity: 0;
    clip-path: inset(10% 0 10% 0); /* Section breaks open horizontally */
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
                clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, clip-path;
}

.section-visible {
    opacity: 1;
    clip-path: inset(0% 0 0% 0);
}

/* Stagger reveals for internal items (cards, stats, timeline text) */
.section-hidden .service-card,
.section-hidden .stat-item,
.section-hidden .timeline-step,
.section-hidden .portfolio-item,
.section-hidden h1,
.section-hidden h2 {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.8s ease-out;
}

/* Trigger cascade reveal when parent container is visible */
.section-visible .service-card,
.section-visible .stat-item,
.section-visible .timeline-step,
.section-visible .portfolio-item,
.section-visible h1,
.section-visible .hero-content p,
.section-visible h2 {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: calc(var(--stagger-index, 0) * 0.12s + 0.2s);
}

/* Interactive Glare Foil Overlay on Cards */
.service-card, .glass-card, .portfolio-item {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, border-color 0.4s ease, box-shadow 0.4s ease;
}

.service-card::before, .glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(220, 38, 38, 0.06), transparent 40%);
    z-index: 5;
    pointer-events: none;
}

/* Red Button Kinetic Liquid Fill Transition Effect */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: #0f172a; /* Switches background instantly to Black from inside center out */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Smooth loop float metrics for background hero tags on desktops */
@media (min-width: 769px) {
    .card-1 {
        animation: smoothFloatHeroOne 5s ease-in-out infinite;
    }
    .card-2 {
        animation: smoothFloatHeroTwo 5s ease-in-out infinite 0.5s;
    }
}

@keyframes smoothFloatHeroOne {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1.5deg); }
}

@keyframes smoothFloatHeroTwo {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(15px) rotate(-1.5deg); }
}

/* Timeline Dynamic Drawing Bar Effect */
.section-visible .timeline {
    animation: drawTimelineLine 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawTimelineLine {
    from { height: 0; opacity: 0; }
    to { height: 100%; opacity: 1; }
}

/* ==========================================================================
   15. INFINITE KINETIC MARQUEE GALLERY SYSTEM
   ========================================================================== */
/* ==========================================================================
   UPDATED: COMPACT NO-CROP MARQUEE ENGINE (OPTIMIZED CARD WIDTH)
   ========================================================================== */
.gallery-marquee-section {
    display: block !important;
    padding: 80px 0 !important; 
    background-color: #ffffff !important; 
    overflow: hidden !important; 
    width: 100% !important;
    box-sizing: border-box !important;
}

.marquee-wrapper {
    position: relative !important;
    display: flex !important;
    width: 100% !important;
    overflow: hidden !important;
    padding: 20px 0 !important;
    box-sizing: border-box !important;
}

/* Edge Shading Overlays */
.marquee-wrapper::before,
.marquee-wrapper::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    width: 15% !important;
    height: 100% !important;
    z-index: 10 !important;
    pointer-events: none !important;
}
.marquee-wrapper::before {
    left: 0 !important;
    background: linear-gradient(to right, #ffffff 0%, transparent 100%) !important;
}
.marquee-wrapper::after {
    right: 0 !important;
    background: linear-gradient(to left, #ffffff 0%, transparent 100%) !important;
}

/* TRACK ENGINE */
.marquee-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: max-content !important; 
    will-change: transform !important;
    animation: masterMarqueeScroll 28s linear infinite !important; 
}

.marquee-track:hover {
    animation-play-state: paused !important;
}

/* MARQUEE ROW CONTAINER STRUCTURE */
.marquee-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 24px !important; /* Slightly tighter gap for smaller layout widths */
    padding-right: 24px !important; 
}

/* COMPACT FIXED CARDS - WIDTH REDUCED TO 60% */
.gallery-card {
    flex-shrink: 0 !important; 
    display: block !important;
    width: 235px !important;   /* FIXED COMPACT WIDTH: Exactly 60% of the previous 480px size */
    height: 385px !important;  /* Retained the 75% increased tall premium height */
    border-radius: 16px !important;
    overflow: hidden !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04) !important;
    background-color: #ffffff !important; 
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
}

/* NO-CROP IMAGE RENDERING WITH ZERO DISTORTION */
.gallery-card img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Keeps the full image fully visible without cutting */
    transition: transform 0.5s ease !important;
    padding: 6px; 
}

/* Hover Adjustments */
.gallery-card:hover {
    transform: scale(1.03) translateY(-6px) !important;
    border-color: #dc2626 !important; /* Crimson Focus Link */
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.08) !important;
}
.gallery-card:hover img {
    transform: scale(1.02) !important;
}

/* KEYFRAMES LOOPING MATRIX */
@keyframes masterMarqueeScroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0); 
    }
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .gallery-card {
        width: 180px !important;  /* Balanced mobile scale mapping */
        height: 240px !important; 
        border-radius: 12px !important;
    }
    .marquee-group {
        gap: 12px !important;
        padding-right: 12px !important;
    }
}
/* ==========================================================================
   HERO GLASS CARDS CONTENT IMAGE ALIGNMENT
   ========================================================================== */
.glass-card {
    display: flex !important;
    flex-direction: column !important; /* Arranges icon, image, and text vertically */
    gap: 12px !important;
    padding: 20px !important;
    align-items: flex-start !important;
}

/* Micro wrapper for the font-awesome icon layout */
.card-icon-wrap {
    font-size: 1.5rem;
    line-height: 1;
}

/* New responsive inner thumbnail box inside glass containers */
.card-image-thumb {
    width: 100% !important;
    height: 110px !important; /* Strict height limit so hero doesn't blow up */
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: rgba(15, 23, 42, 0.05) !important;
}

.card-image-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Clean center cropping for the thumbnails */
    transition: transform 0.4s ease !important;
}

/* Subtle mouse interaction inside hero elements */
.glass-card:hover .card-image-thumb img {
    transform: scale(1.06);
}

.card-text-content h4 {
    margin: 4px 0 2px 0 !important;
    font-size: 1.1rem !important;
}

.card-text-content p {
    margin: 0 !important;
    font-size: 0.85rem !important;
    opacity: 0.8;
}

/* ==========================================================================
   UPDATED: SPACIOUS & PREMIUM SOCIAL ICONS SYSTEM
   ========================================================================== */

/* Social Row Container: Increased horizontal breathing space */
.footer-socials {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important; /* INCREASED GAP: Pehle 12px tha, ab icons ke beech perfect space hai */
    justify-content: flex-end !important;
    flex: 1 !important;
}

/* Individual Icon Circle Design Upgrades */
.social-icon-link {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 44px !important;  /* Slightly larger for better tap targets and luxury look */
    height: 44px !important; 
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.02) !important; /* Subtle transparent base */
    border: 1px solid rgba(255, 255, 255, 0.08) !important; /* Crisp hairline ring */
    color: rgba(255, 255, 255, 0.55) !important; /* Elegant muted look initially */
    font-size: 1.1rem !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important; /* Soft backdrop shadow */
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important; /* Ultra-smooth glide */
}

/* KINETIC HOVER ANIMATION: Premium Crimson Red Burst */
.social-icon-link:hover {
    color: #ffffff !important;
    background: #dc2626 !important; /* Brand Crimson Red */
    border-color: #dc2626 !important;
    transform: translateY(-6px) scale(1.08) !important; /* Elegant float animation */
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.35) !important; /* Vibrant neon red aura */
}

/* ==========================================================================
   MOBILE PRESERVATION ADJUSTMENT
   ========================================================================== */
@media (max-width: 992px) {
    .footer-socials {
        justify-content: center !important; /* Center aligns spacing beautifully on tablets/phones */
        gap: 18px !important;
        margin-top: 5px !important;
    }
}