/* ============================================
   AIPN Investigation Services
   Premium Corporate Design System — Enhancements CSS
   ============================================ */

/* === Design Tokens === */
:root {
    --aipn-blue: #081F4D; /* Deep Navy */
    --aipn-blue-light: #163A84; /* Medium Navy */
    --aipn-orange: #D4AF37; /* Metallic Gold */
    --aipn-gold: #D4AF37; /* Gold */
    --aipn-gold-light: #dfc06e; /* Light Gold */
    --aipn-dark: #081F4D; /* Navy Dark (for overlays/menus) */
    --aipn-charcoal: #1e293b; /* Charcoal for text */
    --aipn-slate: #f8fafc; /* Slate Light Background */
    --aipn-glass: rgba(255, 255, 255, 0.7);
    --aipn-glass-border: rgba(8, 31, 77, 0.08);
    --radius-sm: 0.5rem;
    --radius-md: 0.875rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === Loader === */
#aipn-page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}
#aipn-page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 2.2rem;
    letter-spacing: 0.1em;
    color: #081F4D;
    margin-bottom: 2rem;
    opacity: 0;
    animation: loaderFadeIn 0.5s 0.1s forwards;
}
.loader-spinner {
    position: relative;
    width: 48px;
    height: 48px;
}
.loader-spinner::before,
.loader-spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
}
.loader-spinner::before {
    border-top-color: #081F4D;
    animation: loaderSpin 1s linear infinite;
}
.loader-spinner::after {
    border-bottom-color: #D4AF37;
    animation: loaderSpin 1.5s linear infinite reverse;
}
.loader-status {
    margin-top: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: #081F4D;
    opacity: 0.6;
    animation: loaderFadeIn 0.5s 0.3s forwards;
}
@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}
@keyframes loaderFadeIn {
    to { opacity: 1; }
}

/* === Base === */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    width: 100%;
    max-width: 100vw;
    position: relative;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background-color: #f8fafc;
    color: #334155; /* Slate-700 */
}

* {
    -webkit-overflow-scrolling: touch;
}

/* === Reveal Animations === */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.animate-in,
.reveal-left.animate-in,
.reveal-right.animate-in,
.reveal-scale.animate-in {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* === Stagger Children === */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 80ms; }
.stagger-children > *:nth-child(3) { transition-delay: 160ms; }
.stagger-children > *:nth-child(4) { transition-delay: 240ms; }
.stagger-children > *:nth-child(5) { transition-delay: 320ms; }
.stagger-children > *:nth-child(6) { transition-delay: 400ms; }
.stagger-children > *:nth-child(7) { transition-delay: 480ms; }
.stagger-children > *:nth-child(8) { transition-delay: 560ms; }

/* === Skeleton Loading === */
.skeleton {
    background: linear-gradient(90deg, rgba(8,31,77,0.03) 25%, rgba(8,31,77,0.08) 50%, rgba(8,31,77,0.03) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 0.75rem;
}
.skeleton-text {
    height: 0.875rem;
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
}
.skeleton-text:last-child {
    width: 60%;
}
.skeleton-card {
    height: 200px;
    border-radius: 1rem;
}
@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* === Hover Effects === */
.hover-lift {
    transition: transform var(--transition-smooth),
                box-shadow var(--transition-smooth);
}
.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(8, 31, 77, 0.12);
}

/* === Premium Button Glow === */
.btn-glow-blue {
    position: relative;
    overflow: hidden;
}
.btn-glow-blue::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-glow-blue:hover::after {
    opacity: 1;
}

.btn-glow-gold {
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    transition: box-shadow var(--transition-smooth), transform var(--transition-fast);
}
.btn-glow-gold:hover {
    box-shadow: 0 0 25px -5px rgba(212, 175, 55, 0.4);
}

/* === Glass Card Glow === */
.glass-glow-hover {
    transition: box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-glow-hover:hover {
    box-shadow: 0 10px 45px -10px rgba(8, 31, 77, 0.08),
                0 0 40px -15px rgba(212, 175, 55, 0.15);
}

/* === Card Gradient Border === */
.card-border-gradient {
    position: relative;
}
.card-border-gradient::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(8,31,77,0.15), transparent, rgba(212,175,55,0.25));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s;
}
.card-border-gradient:hover::before {
    opacity: 1;
}

/* === Form Focus States === */
.form-input:focus,
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(8, 31, 77, 0.15);
    border-color: #081F4D;
}

select option {
    background: #ffffff;
    color: #081F4D;
}

/* === Section Enter Animation === */
.section {
    animation: sectionEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.section.hidden {
    animation: none;
}
@keyframes sectionEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Toast === */
.aipn-toast {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateZ(0);
    will-change: transform, opacity;
}

/* === Performance Optimizations === */
.glass-card, #pageHeader, #sidebar, #mobileMenu, .backdrop-blur-xl, .backdrop-blur-2xl, .backdrop-blur-3xl {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
}

.clients-slider, .gallery-slider, .glass-card, #header, #sidebar {
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.client-logo-item, .gallery-item {
    transition: transform 0.3s ease;
}

/* === Client Logo Slider === */
.clients-slider-wrapper {
    position: relative;
}

@keyframes slideClients {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(calc(-208px * 10), 0, 0); }
}

@keyframes slideGallery {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(calc(-344px * 19), 0, 0); }
}

/* === Image Loading === */
img {
    transition: opacity 0.3s;
}
img[loading="lazy"] {
    opacity: 1;
}
img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
    opacity: 1;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: rgba(8, 31, 77, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(8, 31, 77, 0.4);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(8, 31, 77, 0.2) #f1f5f9;
}

/* === Icon Bounce === */
.icon-bounce:hover i,
.icon-bounce:hover .fa-solid,
.icon-bounce:hover .fas {
    animation: iconBounce 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* === Counters === */
.counter {
    font-variant-numeric: tabular-nums;
}

/* === WhatsApp Float === */
a[aria-label="Chat on WhatsApp"],
.whatsapp-float {
    animation: whatsappPulse 2s ease-in-out infinite;
}
@keyframes whatsappPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(22, 163, 74, 0); }
}

/* === Stats Section === */
.hero-stats-enhanced {
    position: relative;
    overflow: hidden;
}
.hero-stats-enhanced::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(8,31,77,0.03), transparent, rgba(212,175,55,0.04), transparent);
    animation: statsRotate 15s linear infinite;
    pointer-events: none;
}
@keyframes statsRotate {
    to { transform: rotate(360deg); }
}

/* === Gradient Text === */
.gradient-text-animated {
    background-size: 200% auto;
    animation: gradientShift 3s ease-in-out infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* === Mobile Menu Touch Feedback === */
#mobileMenu a:active {
    background: rgba(8, 31, 77, 0.05);
    border-radius: 0.5rem;
}

/* === Premium Mobile Drawer === */
.mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 31, 77, 0.4);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-drawer-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(8, 31, 77, 0.4) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}
.mobile-drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* === Premium Header Gold Accent Line === */
.header-accent-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), rgba(8, 31, 77, 0.15), transparent);
    opacity: 0;
    transition: opacity var(--transition-slow);
}
.header-scrolled .header-accent-line {
    opacity: 1;
}

/* === Premium Monogram Shield === */
.monogram-shield {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: -0.02em;
    overflow: hidden;
}
.monogram-shield::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--aipn-blue), var(--aipn-gold));
    z-index: -1;
}

/* === Achievement Image Fix === */
.achievement-img-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}
.achievement-img-container img {
    width: 100% !important;
    height: auto !important;
    display: block;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.achievement-img-container:hover img {
    transform: scale(1.05);
}

/* === Trust Badge === */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 2rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.5625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.06);
    color: var(--aipn-gold);
}

/* === Case Study Card Structure === */
.case-study-phase {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid rgba(8, 31, 77, 0.08);
}
.case-study-phase::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0.25rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--aipn-blue);
    background: #ffffff;
}
.case-study-phase.phase-challenge::before {
    border-color: var(--aipn-gold);
}
.case-study-phase.phase-process::before {
    border-color: var(--aipn-blue-light);
}
.case-study-phase.phase-outcome::before {
    border-color: #10b981;
}

/* === Print === */
@media print {
    #aipn-page-loader,
    .no-print,
    .whatsapp-float,
    a[aria-label="Chat on WhatsApp"],
    #aipn-site-integrity-notice {
        display: none !important;
    }
}

/* === Safe Area Padding === */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* === Responsive: Mobile (max-width: 768px) === */
@media (max-width: 768px) {
    .btn-primary,
    .btn-secondary,
    .btn-premium {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body {
        overflow-x: hidden;
    }

    #mobileMenu {
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    footer .grid {
        gap: 2rem;
    }

    #sidebar {
        -webkit-overflow-scrolling: touch;
    }

    h1 {
        word-break: break-word;
    }

    .form-input {
        font-size: 16px;
    }

    .glass-card {
        border-radius: 1rem;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }
    .backdrop-blur-xl, .backdrop-blur-2xl, .backdrop-blur-3xl {
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }

    button:active, a:active {
        transform: scale(0.96);
        transition: transform 0.1s;
    }
}

/* === Responsive: Small Phones (max-width: 480px) === */
@media (max-width: 480px) {
    .section-title {
        font-size: 1.75rem !important;
        line-height: 1.1 !important;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* === Responsive: Tablet (max-width: 1023px) === */
@media (max-width: 1023px) {
    #sidebar::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
    }
    #sidebar:not(.-translate-x-full)::before {
        opacity: 1;
    }
}

/* === Premium Corporate Redesign Overrides === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Poppins:wght@600;700;800&family=Manrope:wght@500;600;700;800&display=swap');

:root {
    --aipn-blue: #061A40 !important;
    --aipn-blue-light: #0B2E59 !important;
    --aipn-dark: #F8F9FB !important; /* Make body background light */
    --aipn-charcoal: #1F2937 !important;
    --aipn-slate: #F8F9FB !important;
}

body {
    font-family: 'Inter', sans-serif !important;
    background-color: #F8F9FB !important;
    color: #1F2937 !important;
}

h1, h2, h3, h4, h5, h6, .font-montserrat {
    font-family: 'Poppins', sans-serif !important;
}

/* Ensure all page headings use premium navy unless in dark background sections */
h1:not([class*="bg-[#081f4d]" i] *), 
h2:not([class*="bg-[#081f4d]" i] *), 
h3:not([class*="bg-[#081f4d]" i] *), 
h4:not([class*="bg-[#081f4d]" i] *), 
h5:not([class*="bg-[#081f4d]" i] *), 
h6:not([class*="bg-[#081f4d]" i] *), 
.section-title:not([class*="bg-[#081f4d]" i] *) {
    color: #061A40 !important;
}

/* Recolor description texts to dark corporate charcoal unless in dark background sections */
p.text-gray-400:not([class*="bg-[#081f4d]" i] *), 
p.text-gray-500:not([class*="bg-[#081f4d]" i] *), 
p.text-slate-500:not([class*="bg-[#081f4d]" i] *), 
p.text-slate-600:not([class*="bg-[#081f4d]" i] *), 
.text-slate-300:not([class*="bg-[#081f4d]" i] *) {
    color: #4B5563 !important; /* Slate gray */
}

/* Light Slate background sections */
.bg-slate-50, section.bg-slate-50, .bg-[#f8fafc] {
    background-color: #F8F9FB !important;
}

/* White background sections */
section.bg-white, .bg-white {
    background-color: #ffffff !important;
}

/* Re-adjust Hero Layout to Light Mockup Design */
.home-hero > .absolute.inset-0.z-0 {
    background: #ffffff !important; /* Light background */
}
.home-hero > .absolute.inset-0.z-0 > .absolute.inset-0.bg-cover {
    opacity: 0.85 !important; /* Extremely bright, high visibility */
    filter: none !important;
    -webkit-filter: none !important;
}
.home-hero > .absolute.inset-0.z-0::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.9) 10%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%) !important;
    z-index: 1;
    pointer-events: none;
}

/* Header Text elements in Hero must be dark navy/slate for contrast */
.home-hero h1, 
.home-hero p,
.home-hero span:not(.text-aipn-orange),
.home-hero div.text-gray-600,
.home-hero div.text-gray-500 {
    color: #061A40 !important;
}

.home-hero p,
.home-hero div.text-gray-600 {
    color: #4B5563 !important;
}

.home-hero span.text-aipn-blue {
    color: #081F4D !important; /* Logo navy blue */
}

.home-hero span.text-aipn-orange {
    color: #FF6B00 !important; /* Logo orange */
}

/* Secondary Button in Hero */
.home-hero #hero-cta-secondary {
    border-color: rgba(6, 26, 64, 0.2) !important;
    color: #061A40 !important;
}
.home-hero #hero-cta-secondary:hover {
    border-color: #061A40 !important;
    background-color: rgba(6, 26, 64, 0.05) !important;
}

/* Trust Badges in Hero */
.home-hero .trust-badge {
    background: #ffffff !important;
    border: 1px solid rgba(6, 26, 64, 0.08) !important;
    color: #061A40 !important;
    box-shadow: 0 4px 15px rgba(6, 26, 64, 0.03) !important;
}

/* Bottom Column Info Pills in Hero */
.home-hero .mt-12.pt-8.border-t {
    border-top-color: rgba(6, 26, 64, 0.12) !important;
}
.home-hero .mt-12.pt-8.border-t > div {
    background: #ffffff !important;
    border: 1px solid rgba(6, 26, 64, 0.15) !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 9999px !important;
    box-shadow: 0 4px 15px rgba(6, 26, 64, 0.05) !important;
    color: #061A40 !important;
}
.home-hero .mt-12.pt-8.border-t > div span {
    color: #061A40 !important;
    font-weight: 800 !important;
}

/* Mockup Slide Layout styling */
.home-hero .glass-card {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 20px 50px rgba(6, 26, 64, 0.08) !important;
    padding: 1.25rem !important;
    border-radius: 24px !important;
}

.home-hero .glass-card > .absolute.inset-0.z-0 {
    position: relative !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    height: 310px !important;
}

.home-hero .glass-card div.p-6.relative.z-10.bg-gradient-to-t {
    background: none !important;
    padding: 1.25rem 0 0 0 !important;
}

.home-hero .glass-card #slider-title {
    color: #061A40 !important;
    font-weight: 800 !important;
}

.home-hero .glass-card #slider-counter {
    color: #4B5563 !important;
}


/* Overriding section background styles */
section:not(.home-hero):not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark), 
section.py-32:not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark), 
section.py-24:not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark), 
section.py-12:not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark) {
    background-color: #F8F9FB !important;
}

section:not(.home-hero):not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark) .bg-black\/50,
section:not(.home-hero):not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark) .bg-slate-900\/50 {
    background-color: #F8F9FB !important;
}

/* Reset default white text within sections */
section:not(.home-hero):not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark) h2,
section:not(.home-hero):not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark) h3,
section:not(.home-hero):not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark) h4,
section:not(.home-hero):not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark) h5,
section:not(.home-hero):not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark) .text-white {
    color: #061A40 !important;
}

section:not(.home-hero):not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark) p,
section:not(.home-hero):not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark) .text-gray-500,
section:not(.home-hero):not([class*="bg-[#081f4d]" i]):not(.bg-aipn-dark) .text-gray-400 {
    color: #1F2937 !important;
}

/* Premium Card Styles */
.glass-card:not(.home-hero .glass-card) {
    background: #ffffff !important;
    border: 1px solid rgba(6, 26, 64, 0.05) !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px -10px rgba(6, 26, 64, 0.04) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.glass-card:not(.home-hero .glass-card):hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 20px 40px -15px rgba(6, 26, 64, 0.08) !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
}

/* Trust Stats Bar Section */
.hero-stats-enhanced {
    background-color: #ffffff !important;
    border-top: 1px solid rgba(6, 26, 64, 0.05) !important;
    border-bottom: 1px solid rgba(6, 26, 64, 0.05) !important;
}

.hero-stats-enhanced .counter {
    color: #061A40 !important;
}

/* Timeline grid & cards */
.stagger-children .glass-card {
    background: #ffffff !important;
    border: 1px solid rgba(6, 26, 64, 0.05) !important;
}

/* Gold details */
.text-aipn-orange, .text-[#c9a84c], span.text-[#c9a84c] {
    color: #D4AF37 !important;
}



/* Fix Top Header Bar legibility on dark background */
#aipn-top-bar, 
#aipn-top-bar a, 
#aipn-top-bar span, 
#aipn-top-bar div {
    color: #cbd5e1 !important; /* High contrast light slate gray */
}

#aipn-top-bar a:hover {
    color: #D4AF37 !important; /* Bright gold on hover */
}

#aipn-top-bar a.text-\[\#D4AF37\], 
#aipn-top-bar a[href*="register"] {
    color: #D4AF37 !important; /* Bold bright gold link */
}

/* Hero Animated Slideshow & Ken Burns Effects */
.home-hero .hero-slideshow-container {
    opacity: 0.95 !important;
    transition: opacity 0.5s ease-in-out !important;
}
.home-hero .hero-slide {
    position: absolute !important;
    inset: 0 !important;
    background-size: cover !important;
    background-position: center 12% !important; /* Keep heads and upper bodies in frame on wide screens */
    opacity: 0;
    will-change: opacity !important;
}
.home-hero .hero-slide.slide-1 {
    animation: heroSlide1 16s infinite ease-in-out !important;
}
.home-hero .hero-slide.slide-2 {
    animation: heroSlide2 16s infinite ease-in-out !important;
}

@keyframes heroSlide1 {
    0%, 40.625% {
        opacity: 1;
    }
    50%, 90.625% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes heroSlide2 {
    0%, 40.625% {
        opacity: 0;
    }
    50%, 90.625% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Mobile View Background Image and Layout Fixes */
@media (max-width: 767px) {
    section.relative.home-hero {
        padding-top: 4.5rem !important; /* Reduced to compact hero layout */
        padding-bottom: 2rem !important; /* Reduced to prevent bottom clipping */
        min-height: auto !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    section.relative.home-hero .container {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    section.relative.home-hero .hero-slideshow-container {
        opacity: 0.85 !important; /* Keep background image bright */
        background-color: #081F4D !important; /* Unified dark background to blend image edges */
    }
    section.relative.home-hero .hero-slide {
        background-size: cover !important; /* Cover the container fully to prevent bottom cutoffs or white gaps */
        background-repeat: no-repeat !important;
        background-position: center 40% !important; /* Ideal vertical composition for mobile viewports */
    }
    section.relative.home-hero > .absolute.inset-0.z-0::after {
        background: linear-gradient(180deg, rgba(8, 31, 77, 0.48) 0%, rgba(8, 31, 77, 0.55) 100%) !important; /* Premium dark contrast overlay (45-55% opacity) */
    }

    /* Accessibility Recolor on dark overlay background */
    section.relative.home-hero h1,
    section.relative.home-hero h1 span,
    section.relative.home-hero p,
    section.relative.home-hero div:not(.inline-flex),
    section.relative.home-hero span:not(.text-aipn-orange):not(.text-aipn-blue),
    section.relative.home-hero .mt-12.pt-8.border-t span {
        color: #ffffff !important;
    }
    section.relative.home-hero span.text-aipn-orange {
        color: #FF6B00 !important; /* Exact bright logo orange */
    }
    section.relative.home-hero span.text-aipn-blue {
        color: #38bdf8 !important; /* High contrast matching blue for dark mobile overlay */
    }

    /* Heading Sizing & Line Height */
    section.relative.home-hero h1 {
        font-size: 2.25rem !important;
        line-height: 1.15 !important;
        margin-bottom: 0.75rem !important; /* Reduced margin */
    }

    /* India's Premier Agency Badge */
    section.relative.home-hero .inline-flex.items-center.gap-3 {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
        margin-bottom: 1rem !important; /* Reduced margin */
        margin-top: -2.5rem !important; /* Shift it significantly higher into the markup whitespace */
        font-size: 8px !important; /* Keep text clean and small to prevent wrapping */
        letter-spacing: 0.18em !important; /* Tighter letter spacing to fit single line */
        padding: 0.35rem 0.85rem !important;
        justify-content: center !important;
    }
    section.relative.home-hero .inline-flex.items-center.gap-3 span span {
        background-color: #ffffff !important;
    }

    /* CIN Text spacing and sizing */
    section.relative.home-hero .text-\[10px\].font-mono.font-bold {
        font-size: 8px !important;
        opacity: 0.75 !important;
        margin-top: 0.5rem !important; /* Reduced spacing */
        margin-bottom: 1rem !important; /* Reduced spacing */
        letter-spacing: 0.15em !important;
    }

    /* License Badges Wrapping */
    section.relative.home-hero .flex.flex-wrap.gap-3 {
        justify-content: center !important;
        gap: 0.5rem !important;
        margin-bottom: 1.25rem !important; /* Reduced spacing */
    }
    section.relative.home-hero .trust-badge {
        height: 38px !important; /* Slightly more compact */
        border-radius: 9999px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 1rem !important;
        font-size: 10px !important;
        border-color: rgba(255, 255, 255, 0.25) !important;
        background: rgba(255, 255, 255, 0.08) !important;
    }

    /* Primary and Secondary CTA Buttons */
    section.relative.home-hero #hero-cta-primary {
        width: 100% !important;
        height: 50px !important; /* Slightly more compact height */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 0.75rem !important; /* Reduced spacing */
        border-radius: 12px !important;
        font-size: 0.9rem !important;
    }
    section.relative.home-hero #hero-cta-secondary {
        width: 100% !important;
        height: 50px !important; /* Slightly more compact height */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 0.5rem !important; /* Reduced spacing */
        border-radius: 12px !important;
        font-size: 0.9rem !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
        color: #ffffff !important;
    }
    section.relative.home-hero #hero-cta-secondary:hover {
        background-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Bottom Badges & Cases Counter */
    section.relative.home-hero .mt-12.pt-8.border-t {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        margin-top: 1.5rem !important; /* Reduced spacing */
        padding-top: 1rem !important; /* Reduced spacing */
        border-top-color: rgba(255, 255, 255, 0.15) !important;
    }
    section.relative.home-hero .mt-12.pt-8.border-t > div {
        background: rgba(255, 255, 255, 0.1) !important; /* Premium semi-transparent dark pills override */
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        box-shadow: none !important;
    }
    section.relative.home-hero .mt-12.pt-8.border-t > div span {
        color: #ffffff !important; /* Forced white text for absolute legibility on mobile */
    }
    section.relative.home-hero .mt-12.pt-8.border-t > div i {
        color: #ffffff !important; /* Force icons to be white too */
    }
    section.relative.home-hero .mt-12.pt-8.border-t > div:nth-child(1),
    section.relative.home-hero .mt-12.pt-8.border-t > div:nth-child(2) {
        flex: 1 1 45% !important;
        min-width: 120px !important;
        height: 38px !important; /* Sized down */
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 0.5rem !important;
        border-radius: 8px !important;
    }
    section.relative.home-hero .mt-12.pt-8.border-t > div:nth-child(3) {
        flex: 1 1 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin-top: 1rem !important; /* Reduced spacing */
        height: 38px !important;
        align-items: center !important;
        border-radius: 8px !important;
    }

    /* General Spacing & Footer Spacing Improvements */
    section:not(.relative.home-hero) {
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    .premium-footer {
        padding-top: 3rem !important; /* Reduced padding from 90px to 3rem to decrease content spacing */
        padding-bottom: 2rem !important;
    }
    .glass-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 16px !important;
    }

    /* Floating CTA Widgets positions */
    .whatsapp-float {
        bottom: 24px !important;
        left: 20px !important;
        width: 48px !important;
        height: 48px !important;
        border-radius: 12px !important;
        font-size: 1.5rem !important;
    }
    #aipn-contact-hub {
        bottom: 24px !important;
        right: 20px !important;
    }
    #aipn-contact-hub #triggerHubBtn {
        width: 48px !important;
        height: 48px !important;
        border-radius: 12px !important;
    }
}

/* Accessibility: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .home-hero .hero-slide {
        transform: none !important;
        animation-duration: 20s !important; /* Slower, gentler cross-fade only, no panning/zooming */
    }
    @keyframes heroSlide1 {
        0%, 40.625%, 100% { opacity: 1; transform: none !important; }
        50%, 90.625% { opacity: 0; transform: none !important; }
    }
    @keyframes heroSlide2 {
        0%, 40.625%, 100% { opacity: 0; transform: none !important; }
        50%, 90.625% { opacity: 1; transform: none !important; }
    }
}





