* {
    font-family: 'Nunito', sans-serif;
}

:root {
    --primary-red: #DC2626;
    --primary-blue: #2563EB;
    --light-blue: #3B82F6;
    --dark-blue: #1E40AF;
    --accent-teal: #06B6D4;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-blue) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-padding {
    padding: 5rem 0;
}

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.smooth-scroll {
    scroll-behavior: smooth;
}

.hero-pattern {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(220, 38, 38, 0.1) 0%, transparent 50%);
}

.logo-img {
    height: 70px;
    width: auto;
    max-width: 350px;
    object-fit: contain;
    display: block;
    border: none;
    outline: none;
}

.logo-img-footer {
    height: 80px;
    width: auto;
    max-width: 400px;
    object-fit: contain;
    display: block;
    border: none;
    outline: none;
}

@media (max-width: 768px) {
    .logo-img {
        height: 60px;
        max-width: 280px;
    }
}

@media (max-width: 640px) {
    .logo-img {
        height: 50px;
        max-width: 220px;
    }

    .logo-img-footer {
        height: 60px;
        max-width: 300px;
    }
}

/* Image Carousel Styles */
.image-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.image-carousel[style*="height"] {
    height: 100%;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
    z-index: 1;
}

.carousel-image.active {
    opacity: 1;
    z-index: 2;
}

/* Navigation Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    opacity: 0;
}

.image-carousel:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav.prev {
    left: 16px;
}

.carousel-nav.next {
    right: 16px;
}

.carousel-nav i {
    color: #1f2937;
    font-size: 18px;
    transition: color 0.3s ease;
}

.carousel-nav:hover i {
    color: #dc2626;
}

/* Enhanced Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    align-items: center;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 2px solid transparent;
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.carousel-indicator.active {
    background: white;
    width: 32px;
    border-radius: 16px;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Progress Bar */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
    z-index: 12;
    overflow: hidden;
}

.carousel-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

/* Mobile touch indicators */
@media (max-width: 768px) {
    .carousel-nav {
        width: 36px;
        height: 36px;
        opacity: 0.8;
    }
    
    .carousel-nav.prev {
        left: 8px;
    }
    
    .carousel-nav.next {
        right: 8px;
    }
    
    .carousel-nav i {
        font-size: 14px;
    }
    
    .carousel-indicators {
        bottom: 12px;
        padding: 6px 12px;
        gap: 8px;
    }
    
    .carousel-indicator {
        width: 8px;
        height: 8px;
    }
    
    .carousel-indicator.active {
        width: 24px;
    }
}

/* Team member image positioning */
.team-member-img {
    object-position: center 10% !important;
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    will-change: opacity, transform;
}

/* Image Loading Optimization */
.image-container {
    position: relative;
    overflow: hidden;
    background-color: #f3f4f6;
    background-image: linear-gradient(90deg, #f0f0f0 0%, #f8f8f8 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Hide images until loaded */
img[data-src],
img.lazy-load:not(.carousel-image) {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    will-change: opacity;
}

/* Show images when loaded */
img.loaded:not(.carousel-image) {
    opacity: 1;
}

/* Blur-up effect for images */
.image-blur {
    filter: blur(20px);
    transform: scale(1.1);
    transition: filter 0.3s ease-out, transform 0.3s ease-out;
}

.image-blur.loaded {
    filter: blur(0);
    transform: scale(1);
}

/* Aspect ratio containers to prevent layout shift */
.aspect-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.aspect-16-9 {
    padding-bottom: 56.25%; /* 16:9 */
}

.aspect-4-3 {
    padding-bottom: 75%; /* 4:3 */
}

.aspect-1-1 {
    padding-bottom: 100%; /* 1:1 */
}

.aspect-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Smooth fade-in for images */
@keyframes imageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.image-fade-in {
    animation: imageFadeIn 0.5s ease-in-out forwards;
}

/* Performance optimizations */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    content-visibility: auto;
}

/* Reduce repaints on scroll */
nav {
    will-change: box-shadow;
}

/* Optimize font loading */
body {
    font-display: swap;
}

/* Prevent layout shift for images */
img {
    max-width: 100%;
    height: auto;
}

