html {
    scroll-behavior: smooth;
}

html, body {
    overflow-x: hidden;
}

/* ==========================================================================
   ROOT VARIABLES & GLOBAL
   ========================================================================== */
:root {
    --gold: #FFC000;
    --white: #ffffff;
    --black: #080808;
    --header-h: 100px;
    --transition: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Global Reset */
.home-hero-wrapper * { 
    box-sizing: border-box; 
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================================================== 
   HOME HERO SECTION 
   ========================================================================== */

.home-hero-wrapper {
    background: var(--black);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Adjusted padding and layout for mobile responsiveness */
.home-hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    padding-top: var(--header-h);
    overflow: hidden;
    margin: 0;
    flex-direction: column; /* Stack vertically on mobile */
    justify-content: center; /* Center content vertically */
}

/* Cinematic Background */
.home-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    object-fit: cover; /* Ensure background images scale properly */
}

/* Hero Slide Adjustments */
.home-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 10s linear;
    transform: scale(1.1);
}

/* Active Hero Slide */
.home-hero-slide.active {
    opacity: 0.4;
    transform: scale(1);
}

/* Overlays */
.home-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to right, var(--black) 0%, rgba(8,8,8,0.8) 40%, transparent 100%);
}

/* Main Container */
.home-hero-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center; /* Center text on smaller screens */
}

/* Content Styling */
.home-hero-sub {
    font-family: 'Syncopate', sans-serif;
    font-size: clamp(10px, 1.5vw, 12px);
    letter-spacing: 5px;
    color: var(--gold);
    margin-bottom: 20px;
    display: block;
}

.home-hero-h1 {
    font-size: clamp(2.5rem, 8vw, 6.5rem);
    font-weight: 900;
    line-height: 0.9;
    margin: 0 0 30px;
    text-transform: uppercase;
    letter-spacing: -2px;
}

/* Outline Effect */
.home-hero-outline {
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.4);
}

/* Typing Area */
.home-hero-typing-wrap {
    font-family: 'Syncopate', sans-serif;
    font-size: clamp(12px, 2vw, 16px);
    margin-bottom: 40px;
    height: 24px;
}

#home-hero-type-text {
    color: var(--gold);
}

.home-hero-cursor {
    animation: home-hero-blink 0.8s infinite;
    color: var(--gold);
}

/* Button */
.home-hero-btn {
    display: inline-flex;
    align-items: center;
    padding: 18px 40px;
    background: var(--gold);
    color: var(--black);
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    transition: var(--transition);
    border: 1px solid var(--gold);
}

/* Button Hover Effects */
.home-hero-btn:hover {
    background: transparent;
    color: var(--gold);
    transform: translateY(-3px);
}

/* Stats Grid */
.home-hero-stats-grid {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Stat Card Styling */
.home-hero-stat-card h3 {
    font-size: 1.2rem;
    margin: 0 0 10px;
    color: var(--gold);
    text-transform: uppercase;
}

.home-hero-stat-card p {
    font-size: 0.9rem;
    color: #aaa;
    margin: 0;
    line-height: 1.4;
}

/* Hero Animations */
@keyframes home-hero-blink {
    50% {
        opacity: 0;
    }
}

/* MOBILE STYLES */
@media (max-width: 768px) {
    /* Adjust the hero section */
    .home-hero-section {
        padding-top: 80px; /* Add some space for the header */
    }

    /* Main Container Adjustments */
    .home-hero-container {
        padding: 20px 3%;
    }

    /* Typography for smaller screens */
    .home-hero-sub {
        font-size: clamp(10px, 3vw, 12px);
        letter-spacing: 3px; /* Reduced letter spacing */
        margin-bottom: 10px;
    }

    .home-hero-h1 {
        font-size: clamp(2.5rem, 10vw, 4.5rem); /* Adjusted size for better fit on smaller screens */
        margin: 0 0 15px;
    }

    .home-hero-typing-wrap {
        font-size: clamp(12px, 4vw, 16px);
    }

    /* Button Adjustments */
    .home-hero-btn {
        padding: 12px 30px;
        font-size: 12px;
    }

    /* Stats Grid on Mobile */
    .home-hero-stats-grid {
        grid-template-columns: 1fr; /* Stack stats vertically */
        gap: 20px;
    }
}

@media (max-width: 480px) {
    /* Reduce padding further */
    .home-hero-container {
        padding: 15px 3%;
    }

    /* Adjust font sizes further for small screens */
    .home-hero-h1 {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .home-hero-sub {
        font-size: clamp(8px, 4vw, 10px);
    }

    .home-hero-typing-wrap {
        font-size: 14px;
    }

    .home-hero-btn {
        padding: 10px 25px;
        font-size: 12px;
    }
}



/* ==========================================================================
   BADGES SECTION
   ========================================================================== */
.badges-section {
    padding: 60px 20px;
    text-align: center;
    background: #fafafa;
}

.badges-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.badge {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.badge:hover {
    transform: scale(1.5);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* ========================================================================== 
   POPUP & MODAL
   ========================================================================== */

/* Disable background interaction when popup is open */
body.popup-open #site-content {
    filter: blur(8px);
    pointer-events: none;
}

/* Popup Overlay */
#popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    opacity: 0;
}

/* Show overlay when popup is open */
body.popup-open #popup-overlay {
    display: flex;
    opacity: 1;
}

/* Popup Card */
.popup-card {
    width: 380px;
    background: transparent;
    padding: 30px;
    border-radius: 22px;
    color: #fff;
    text-align: center;
    box-shadow: none;
    animation: slideIn 0.5s ease-in-out;
    position: relative;
}

/* Close Button */
.popup-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Change close button color on hover */
.popup-close-btn:hover {
    color: #FFC000;
}

/* Popup Spinner */
.popup-spinner {
    width: 140px;
    height: 140px;
    border: 5px solid rgba(255, 255, 255, 0.16);
    border-top: 5px solid #FFC000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
}

/* Popup Header */
.popup-card h2 {
    font-size: 24px;
    margin: 0;
    letter-spacing: 1px;
    color: #FFC000;
}

.popup-card h3 {
    font-size: 18px;
    margin: 4px 0 0;
    color: #fff;
    opacity: 0.85;
}

.popup-card p {
    font-size: 14px;
    margin: 10px 0 0;
    color: #fff;
    opacity: 0.8;
}

/* Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Slide-in Animation */
@keyframes slideIn {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}
/* Add Fade-Out Animation */
#popup-overlay.fade-out {
  opacity: 0;
  transition: opacity 1s ease-out;
}

/* Optional: Make the popup card fade-out more smoothly as well */
.popup-card.fade-out {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

/* ==========================================================================
   PAGE TRANSITIONS & ANIMATIONS
   ========================================================================== */
.page-content {
    animation: pageEnter 0.45s cubic-bezier(.4,0,.2,1);
}

.page-exit {
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

body {
    opacity: 1;
    transition: opacity 0.6s ease-in-out;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideIn {
    0% { transform: translateY(-50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

#popup-overlay.fade-out {
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0.0, 0.2, 1);
    pointer-events: none;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
/* Home Hero Responsive */
@media (max-width: 992px) {
    .home-hero-overlay { 
        background: rgba(0,0,0,0.7); 
    }
    .home-hero-h1 { 
        font-size: 4rem; 
        text-align: center; 
    }
    .home-hero-container { 
        align-items: center; 
        text-align: center; 
    }
    .home-hero-stats-grid { 
        grid-template-columns: 1fr; 
        gap: 20px; 
        width: 100%; 
    }
    .home-hero-stat-card { 
        padding: 15px; 
        background: rgba(255,255,255,0.03); 
    }
}

@media (max-width: 480px) {
    .home-hero-h1 { 
        font-size: 2.5rem; 
    }
    .home-hero-btn { 
        width: 100%; 
        justify-content: center; 
    }
}


/* Badges Responsive */
@media (max-width: 1024px) {
    .badges-grid {
        gap: 16px;
    }
    .badge {
        width: 65px;
        height: 65px;
    }
}

@media (max-width: 768px) {
    .badges-section {
        padding: 45px 15px;
    }
    .badges-grid {
        gap: 12px;
    }
    .badge {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .badges-section {
        padding: 35px 10px;
    }
    .badges-grid {
        gap: 10px;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }
    .badge {
        width: 40px;
        height: 40px;
    }
}

/* Mobile Mission/Vision */
@media (max-width: 600px) {
    .mission, .vision {
        flex: 1 1 100%;
        padding: 1.5rem;
    }
}



/* ========================================================================== 
   TESTIMONIALS RESPONSIVE - OPTIMIZED
   ========================================================================== */

/* Large Tablet & Desktop (1025px+) - Default styles already handle this */

/* Tablet (769px - 1024px) */
@media (max-width: 1024px) {
    .testimonials {
        padding: 80px 4%;
    }
    .testimonial-track {
        gap: 20px;
    }
    .testimonial {
        min-width: 220px;
        max-width: 240px;
        padding: 25px 20px;
    }
    .testimonial p { 
        font-size: 0.9rem; 
    }
    .testimonial h4 { 
        font-size: 0.85rem; 
    }
}

/* Small Tablet & Large Phone (481px - 768px) */
@media (max-width: 768px) {
    .testimonials {
        padding: 60px 3%;
    }
    .testimonial-track {
        gap: 15px;
        animation-duration: 40s; /* Slower for better readability */
    }
    .testimonial {
        min-width: 200px;
        max-width: 220px;
        padding: 22px 18px;
    }
    .testimonial p { 
        font-size: 0.85rem; 
    }
    .testimonial h4 { 
        font-size: 0.8rem; 
    }
    .testimonial:before { 
        height: 3px; 
    }
}

/* Mobile (0px - 480px) - FIXED VERSION */
@media (max-width: 480px) {
    .testimonials {
        padding: 40px 5%; /* Reduced padding */
        margin: 0 10px; /* Add side margins */
    }
    
    .testimonial-marquee {
        padding: 15px 0;
    }
    
    .testimonial-track {
        gap: 20px; /* Fixed gap */
        animation-duration: 45s; /* Smooth scroll speed */
    }
    
    .testimonial {
        min-width: 280px; /* Fixed: Larger for mobile readability */
        max-width: 280px;
        width: 280px; /* Fixed width for smooth marquee */
        padding: 20px 18px;
        flex-shrink: 0; /* Prevent shrinking */
        margin: 0 10px; /* Extra spacing */
    }
    
    .testimonial p { 
        font-size: 0.82rem; 
        line-height: 1.5;
    }
    
    .testimonial h4 { 
        font-size: 0.78rem; 
    }
    
    .testimonial:before { 
        height: 2px; 
    }
    
    /* Ensure smooth scrolling on mobile */
    .testimonial-track {
        width: fit-content;
    }
}

/* Extra Small Mobile (0px - 360px) */
@media (max-width: 360px) {
    .testimonial {
        min-width: 260px;
        max-width: 260px;
        width: 260px;
        padding: 18px 15px;
    }
    
    .testimonial p { 
        font-size: 0.78rem; 
    }
    
    .testimonial h4 { 
        font-size: 0.75rem; 
    }
}

/* ========================================================================== 
   TESTIMONIALS SECTION 
   ========================================================================== */
.testimonials {
    background: #f4f7fa;
    padding: 20px 5%;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
    position: relative;
    text-align: center;
    overflow: hidden;
    transition: padding 0.3s ease;
}

.testimonials .subtitle {
    font-size: 1.2rem;
    color: #7a7a7a;
    margin-bottom: 50px;
    font-weight: 500;
    letter-spacing: 1px;
    line-height: 1.8;
    text-align: center;
}

/* Marquee Container */
.testimonial-marquee {
    position: relative;
    padding: 20px 0;
    overflow: hidden;
}

/* Track */
.testimonial-track {
    display: flex;
    gap: 30px;
    width: fit-content;
    animation: scrollTestimonials 60s linear infinite;
    transform-style: preserve-3d;
    transition: transform 0.3s ease-out;
}

/* Testimonial Card */
.testimonial {
    min-width: 250px;
    max-width: 280px;
    background: #ffffff;
    padding: 30px 25px;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.07);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    text-align: center;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0 10px;
}

/* 3D Effect on alternating testimonial cards */
.testimonial:nth-child(odd) {
    transform: rotateY(-2deg) translateZ(0px);
}

.testimonial:nth-child(even) {
    transform: rotateY(2deg) translateZ(0px);
}

.testimonial:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

.testimonial p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
}

.testimonial h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    letter-spacing: 0.5px;
}

.testimonial:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0066ff, #00cc99);
    border-radius: 18px 18px 0 0;
}

/* Smooth scrolling animation */
@keyframes scrollTestimonials {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
