/* css/style.css */

/* --- VARIABLES --- */
:root {
    --primary-blue: #0056D2;
    --accent-red: #FF1F3D;
    --accent-yellow: #F7C844;
    --text-dark: #111;
    --text-gray: #555;
    --bg-light: #F9FAFB;
    --white: #fff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-light); color: var(--text-gray); line-height: 1.7; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; color: var(--text-dark); font-weight: 700; letter-spacing: -0.5px; }
a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 80px 0; }
.text-center { text-align: center; }
.section-title { text-align: center; font-size: 2.2rem; margin-bottom: 40px; }
.section-subtitle { text-align: center; color: var(--primary-blue); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }

.gradient-text { 
    background: linear-gradient(90deg, #4facfe, #00f2fe, #4facfe); 
    background-size: 200% auto;
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    animation: shine 4s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

/* Ken Burns slow zoom for hero background slides */
@keyframes kenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.09); }
}

/* Hero content staggered entrance */
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

.badge { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4); padding: 5px 15px; border-radius: 20px; color: white; margin-bottom: 15px; display: inline-block; }

/* --- HERO SLIDE INDICATOR DOTS --- */
.slide-dots {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: 2px solid rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.dot.active {
    background: white;
    width: 28px;
    border-radius: 5px;
    border-color: white;
}
.dot:hover:not(.active) { background: rgba(255,255,255,0.7); }

/* --- BACKGROUND PATTERNS --- */
.bg-pattern {
    background-color: var(--bg-light);
    background-image: radial-gradient(#d5d5d5 1px, transparent 1px);
    background-size: 20px 20px;
}

/* --- ANIMATIONS --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- BUTTONS --- */
.btn { display: inline-block; padding: 14px 35px; border-radius: 50px; font-weight: 600; cursor: pointer; border: none; letter-spacing: 0.5px; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.btn-primary { background: var(--accent-red); color: white; box-shadow: 0 5px 15px rgba(255, 31, 61, 0.3); }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 25px rgba(255, 31, 61, 0.5); }
.btn-secondary-light { background: transparent; border: 2px solid white; color: white; }
.btn-secondary-light:hover { background: white; color: var(--primary-blue); }

/* --- REAL GLASS HEADER --- */
header {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 1000px; z-index: 9999;
    
    /* The Glass Effect */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.90);
    top: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 30px; }
.logo { font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--text-dark); }
.logo span { color: var(--primary-blue); }
.nav-links { display: flex; gap: 30px; }
.nav-links a { color: var(--text-dark); font-weight: 500; position: relative; }
.nav-links a:hover { color: var(--primary-blue); }
/* Animated underline for nav links (excludes the CTA button) */
.nav-links a:not(.btn-nav)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.nav-links a:not(.btn-nav):hover::after,
.nav-links a:not(.btn-nav).active::after { width: 100%; }
.nav-links a.active:not(.btn-nav) { color: var(--primary-blue); }
.btn-nav { background: var(--primary-blue); color: white !important; padding: 8px 20px; border-radius: 20px; }
.btn-nav:hover { background: #0045b0; }
.hamburger { display: none; cursor: pointer; font-size: 1.5rem; }

/* --- HERO SLIDER --- */
.hero { height: 100vh; position: relative; display: flex; align-items: center; overflow: hidden; padding-top: 0; color: white; }
.hero-slider, .slide, .hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.hero-slider { z-index: -2; }
.slide { background-size: cover; background-position: center; opacity: 0; transition: opacity 1.5s ease; }
.slide.active { opacity: 1; animation: kenBurns 6s ease-out forwards; }

/* ENHANCED OVERLAY: Darker on the left for maximum text readability */
.hero-overlay { 
    background: linear-gradient(to right, rgba(0, 10, 30, 0.9) 0%, rgba(0, 10, 30, 0.4) 100%); 
    z-index: -1; 
}

.hero-content { 
    position: relative; 
    z-index: 1; 
    max-width: 700px; 
    text-shadow: 0 4px 15px rgba(0,0,0,0.8); 
}
.hero h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; color: #ffffff; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; color: #f8f9fa; font-weight: 500; }
.hero-btns { display: flex; gap: 15px; }
.hero-btns .btn { text-shadow: none; }

/* Staggered entrance — triggered by JS adding .hero-animate after preloader fades */
.hero-content.hero-animate > .badge  { animation: heroFadeUp 0.7s ease-out 0.1s both; }
.hero-content.hero-animate > h1      { animation: heroFadeUp 0.7s ease-out 0.35s both; }
.hero-content.hero-animate > p       { animation: heroFadeUp 0.7s ease-out 0.6s both; }
.hero-content.hero-animate > .hero-btns { animation: heroFadeUp 0.7s ease-out 0.85s both; }

/* --- MISSION & ABOUT --- */
.mission-text { font-size: 1.8rem; color: var(--primary-blue); max-width: 900px; margin: 0 auto; line-height: 1.5; font-weight: 600; padding: 40px; background: rgba(0, 86, 210, 0.05); border-radius: 20px; box-shadow: inset 0 0 20px rgba(0,0,0,0.02); border-left: 5px solid var(--primary-blue); }
.mission-text span { color: var(--text-dark); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-image img { border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.check-list li { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check-list i { color: var(--primary-blue); }

/* --- SERVICES --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card { background: white; padding: 40px 30px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); border-top: 4px solid #ddd; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.service-card:hover { transform: translateY(-12px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.icon-box { width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 20px; transition: transform 0.3s; }
.service-card:hover .icon-box { transform: scale(1.1); }

/* --- PARTNERS CARDS --- */
.partners-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.partner-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    text-align: center;
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.partner-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.partner-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: #f8f9fa;
    height: 160px;
    border-bottom: 1px solid #eee;
}
.partner-logo-wrapper img {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.partner-card:hover .partner-logo-wrapper img {
    transform: scale(1.05);
}
.partner-info {
    padding: 25px 20px;
}
.partner-info h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary-blue);
}
.partner-info p {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.5;
}

/* --- GALLERY SLIDER --- */
.slider-wrapper { position: relative; display: flex; align-items: center; margin-top: 30px; }
.gallery-slider {
    display: flex; overflow-x: auto; scroll-behavior: smooth; gap: 20px; padding: 20px 5px;
    scrollbar-width: none; /* Firefox */
}
.gallery-slider::-webkit-scrollbar { display: none; /* Chrome */ }

.gallery-card {
    min-width: 320px; height: 350px; border-radius: 20px; overflow: hidden;
    position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.gallery-card:hover img { transform: scale(1.08); }

.gallery-info {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
    color: white; padding: 30px 20px 20px;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.gallery-card:hover .gallery-info {
    transform: translateY(0);
    opacity: 1;
}
.gallery-info h4 { margin-bottom: 5px; font-size: 1.15rem; color: #fff; }
.gallery-info p { font-size: 0.9rem; color: #e0e0e0; line-height: 1.4; font-weight: 400; }

/* Slider Buttons */
.slider-btn {
    background: white; border: none; width: 50px; height: 50px; border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); cursor: pointer; z-index: 2;
    color: var(--primary-blue); font-size: 1.2rem; transition: 0.3s; position: absolute;
}
.slider-btn:hover { background: var(--primary-blue); color: white; }
.prev-btn { left: -25px; }
.next-btn { right: -25px; }

/* Auto-Slider Styles - Bulletproof Loop */
.work-slider-section {
    overflow: hidden;
    width: 100%;
    padding: 40px 0;
    background-color: #ffffff; 
}

.slider-track {
    display: flex;
    width: max-content; 
    /* Slide continuously for 15 seconds */
    animation: slideContinuous 15s linear infinite; 
}

/* We group the images so the browser calculates the exact halfway point */
.slide-group {
    display: flex;
    gap: 30px; /* Space between images inside the group */
    padding-right: 30px; /* Space at the end to connect seamlessly to the next group */
}

.slide-group img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.4s ease, filter 0.4s ease;
}
.slide-group img:hover {
    transform: scale(1.06);
    filter: brightness(1.12);
}

/* Pause the auto-scroll when the user hovers over the gallery */
.slider-track:hover { animation-play-state: paused; }

/* THE MAGIC: 
   Slide exactly 50% of the total track width. 
   When group 2 hits the exact spot group 1 started, it snaps invisibly! */
@keyframes slideContinuous {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}
/* --- STATS & TEAM --- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat-item h2 { font-size: 3.5rem; color: white; margin-bottom: 5px; line-height: 1; }
.team-grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.team-card { width: 300px; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); text-align: center; background: white; padding-bottom: 20px; }
.team-card img { width: 100%; height: 300px; object-fit: cover; margin-bottom: 15px; }

/* --- CONTACT FORM --- */
.contact-wrapper {
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px; box-shadow: 0 15px 50px rgba(0,0,0,0.06);
    padding: 50px; display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px;
}
.contact-info h3 { font-size: 1.8rem; margin-bottom: 15px; }
.info-item { display: flex; align-items: center; gap: 15px; margin-top: 20px; color: var(--text-dark); font-weight: 500; }
.info-item i { width: 40px; height: 40px; background: rgba(0, 86, 210, 0.1); color: var(--primary-blue); border-radius: 50%; display: flex; justify-content: center; align-items: center; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group textarea {
    width: 100%; padding: 14px; border: 1px solid #ddd; border-radius: 10px;
    background: #f8f9fa; outline: none; transition: 0.3s; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary-blue); background: white; box-shadow: 0 0 0 4px rgba(0, 86, 210, 0.1); }
.form-group select:focus { border-color: var(--primary-blue); background: white; box-shadow: 0 0 0 4px rgba(0, 86, 210, 0.1); }

/* --- FOOTER --- */
footer { background: #0a0a0a; color: white; padding: 70px 0 30px; text-align: left; }
.footer-grid { 
    display: grid; 
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr; 
    gap: 40px; 
}

/* Footer Links */
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #aaa; text-decoration: none; transition: 0.3s ease; display: inline-block; }
.footer-links a:hover { color: var(--primary-blue); transform: translateX(5px); }

/* Footer Socials */
.social-icons { display: flex; gap: 15px; }
.social-icons a { 
    color: white; 
    background: rgba(255, 255, 255, 0.1); 
    width: 45px; 
    height: 45px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    transition: 0.3s ease; 
    font-size: 1.1rem;
}
.social-icons a:hover { 
    background: var(--primary-blue); 
    transform: translateY(-5px); 
    box-shadow: 0 5px 15px rgba(0, 86, 210, 0.4);
}

/* --- MOBILE FOOTER --- */
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .social-icons { justify-content: center; }
    .footer-links a:hover { transform: translateY(-2px); /* Vertical lift instead of horizontal shift on mobile */ }
}
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    header { width: 95%; top: 10px; }
    .nav-links { display: none; position: absolute; top: 70px; left: 0; width: 100%; background: white; flex-direction: column; padding: 30px; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); }
    .nav-links.active { display: flex; }
    .hamburger { display: block; }
    .contact-wrapper, .about-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .slider-btn { display: none; /* Hide slider buttons on mobile, allow touch scroll */ }
    .gallery-slider { padding: 0; }
}

/* --- Bulletproof Video Preloader --- */
    #video-preloader {
        position: fixed; /* This forces it to float over the hero section */
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: #ffffff;
        z-index: 999999; /* Keeps it on top of the navbar */
        display: flex;
        justify-content: center;
        align-items: center;
        transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    }

    #preloader-video {
        width: 150px; /* Perfect small loading size */
        height: auto;
    }

    .preloader-hidden {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important; /* CRITICAL: Stops the invisible screen from blocking your mouse clicks */
    }

/* --- TOAST NOTIFICATIONS --- */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toast {
    background: white;
    color: var(--text-dark);
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success i { color: #28a745; font-size: 1.5rem; }
.toast-error i { color: #dc3545; font-size: 1.5rem; }

/* --- BUTTON LOADING STATE --- */
button[type="submit"]:disabled {
    background: #ccc !important;
    color: #666 !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}
