/* ========================================
   Vyas Smart Education - Custom Styles
   Brand: Deep Indigo / Royal Blue / Warm Orange
   ======================================== */

/* CSS Custom Properties */
:root {
    --primary: #1a0a3e;
    --secondary: #3366ff;
    --accent: #ff8c00;
    --light-blue: #4488ff;
    --light: #f8f9ff;
    --dark: #0d0520;
    --gradient-primary: linear-gradient(135deg, #1a0a3e 0%, #2d1b69 100%);
    --gradient-dark: linear-gradient(135deg, #0d0520 0%, #1a0a3e 100%);
    --gradient-hero: linear-gradient(160deg, #0d0520 0%, #1a0a3e 40%, #2d1b69 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 30px rgba(51, 102, 255, 0.15);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Body */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Navigation
   ======================================== */
.main-nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.main-nav.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.main-nav.scrolled .nav-inner {
    height: 64px;
    transition: height 0.3s ease;
}

.nav-inner {
    transition: height 0.3s ease;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

/* ========================================
   Hero Sections
   ======================================== */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(51, 102, 255, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(255, 140, 0, 0.08) 0%, transparent 50%);
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-particles::before,
.hero-particles::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    opacity: 0.05;
}

.hero-particles::before {
    background: var(--secondary);
    top: -100px;
    right: -100px;
    animation: float 15s ease-in-out infinite;
}

.hero-particles::after {
    background: var(--accent);
    bottom: -150px;
    left: -100px;
    animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-small {
    min-height: 50vh;
}

/* Grid pattern overlay */
.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
}

/* ========================================
   Cards & Glass Effects
   ======================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: all 0.4s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.solution-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.solution-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-8px);
    border-color: rgba(51, 102, 255, 0.15);
}

.solution-card:hover::before {
    transform: scaleX(1);
}

.solution-card .icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.4s ease;
}

.solution-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
}

/* Service card variant */
.service-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.service-card .card-image {
    position: relative;
    overflow: hidden;
}

.service-card .card-image img {
    transition: transform 0.6s ease;
}

.service-card:hover .card-image img {
    transform: scale(1.08);
}

.service-card .card-image .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 5, 32, 0.7) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover .card-image .overlay {
    opacity: 1;
}

/* ========================================
   Stats Section
   ======================================== */
.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Section Styles
   ======================================== */
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    border-radius: 2px;
    margin-top: 12px;
}

.section-title-center::after {
    margin-left: auto;
    margin-right: auto;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ========================================
   Gallery
   ======================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 5, 32, 0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.lightbox-close:hover {
    background: var(--accent);
}

/* ========================================
   Filter Tabs
   ======================================== */
.filter-tab {
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    background: white;
    color: #666;
}

.filter-tab:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.filter-tab.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* ========================================
   Video Container
   ======================================== */
.video-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: #000;
}

.video-container video {
    width: 100%;
    display: block;
    border-radius: 16px;
}

/* ========================================
   Image Carousel / Slider
   ======================================== */
.image-slider {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.image-slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.image-slider-track img {
    flex: 0 0 100%;
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.slider-btn:hover {
    background: var(--accent);
    color: white;
}

.slider-btn.prev {
    left: 12px;
}

.slider-btn.next {
    right: 12px;
}

/* ========================================
   WhatsApp Button
   ======================================== */
.whatsapp-btn {
    animation: whatsapp-pulse 2s ease-in-out infinite;
}

@keyframes whatsapp-pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6), 0 0 60px rgba(37, 211, 102, 0.2); }
}

/* ========================================
   Form Styles
   ======================================== */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(51, 102, 255, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #374151;
}

/* ========================================
   Testimonial Cards
   ======================================== */
.testimonial-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 4rem;
    font-family: 'Georgia', serif;
    color: var(--secondary);
    opacity: 0.15;
    line-height: 1;
}

/* ========================================
   Lab Section Cards
   ======================================== */
.lab-section {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lab-section .lab-header {
    padding: 2rem 2rem 1rem;
}

.lab-section .lab-images {
    display: grid;
    gap: 0.5rem;
    padding: 0 1rem;
}

.lab-section .lab-images.grid-2 {
    grid-template-columns: 1fr 1fr;
}

.lab-section .lab-images.grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.lab-section .lab-images.grid-4 {
    grid-template-columns: 1fr 1fr;
}

.lab-section .lab-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.lab-section .lab-images img:hover {
    transform: scale(1.03);
}

/* ========================================
   Product Image Grid
   ======================================== */
.product-image-grid {
    display: grid;
    gap: 0.75rem;
}

.product-image-grid.grid-6 {
    grid-template-columns: repeat(3, 1fr);
}

.product-image-grid.grid-4 {
    grid-template-columns: repeat(2, 1fr);
}

.product-image-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.4s ease;
    cursor: pointer;
}

.product-image-grid img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-card-hover);
}

/* ========================================
   Animated Gradient Text
   ======================================== */
.gradient-text {
    background: linear-gradient(135deg, var(--secondary), var(--light-blue), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
    }

    .hero-small {
        min-height: 40vh;
    }

    .stat-number {
        font-size: 2.25rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .product-image-grid.grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .lab-section .lab-images.grid-3 {
        grid-template-columns: 1fr 1fr;
    }

    .image-slider-track img {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .product-image-grid.grid-6,
    .product-image-grid.grid-4 {
        grid-template-columns: 1fr;
    }

    .lab-section .lab-images.grid-2,
    .lab-section .lab-images.grid-3,
    .lab-section .lab-images.grid-4 {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .whatsapp-btn {
        animation: none;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.text-balance {
    text-wrap: balance;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-dark {
    background: var(--gradient-dark);
}

.border-gradient {
    border-image: linear-gradient(90deg, var(--secondary), var(--accent)) 1;
}

/* GSAP initial state - opacity only, no visibility hidden */
[data-reveal] {
    opacity: 0;
}
