@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700&family=Roboto:wght@100;300;400;500;700;900&display=swap');

body {
    font-family: 'Poppins', sans-serif;
}

.font-montserrat {
    font-family: 'Montserrat', sans-serif;
}

.font-poppins {
    font-family: 'Poppins', sans-serif;
}

/* Subtle Wave Animation - OPTIMIZED */
.bg-waves {
    background: linear-gradient(-45deg, #020202, #0a0a0a, #0c1a12, #050f0a);
    background-size: 400% 400%;
    /* Removed animation for performance */
}

/* REMOVED waveAnim keyframes to reduce CPU usage */

/* REMOVED animate-spin-slow and spin keyframes */

.font-roboto {
    font-family: 'Roboto', sans-serif;
}

.font-thin {
    font-weight: 100;
}

.font-extralight {
    font-weight: 200;
}

.font-light {
    font-weight: 300;
}

.font-regular {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.font-black {
    font-weight: 900;
}

/* Navbar scroll effect */
:root {
    --navbar-scroll: 0;
}

/* Particle container styles */
/* Add padding to body to account for fixed navbar */
body {
    padding-top: 60px;
}

#particle-container {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    filter: blur(0.5px);
    opacity: 0.7;
}

:root {
    --bg: black;
    --dot: rgb(255 255 255 / 0.15);
}

body {
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at center, transparent 0%, var(--bg) 70%),
        radial-gradient(var(--dot) 1px, transparent 1px) 0 0 / 20px 20px;
    background-attachment: fixed;
    z-index: -3;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    z-index: -4;
}

/* Preloader Styles - OPTIMIZED */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(11, 15, 25, 0.95) 0%, rgba(5, 7, 12, 0.98) 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
    /* Removed backdrop-filter for performance */
}

.progress-bar {
    position: absolute;
    bottom: 28%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    max-width: 60%;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Vintage Camera Styles - OPTIMIZED */
.vintage-camera {
    position: absolute;
    bottom: 32%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.camera-body {
    width: 120px;
    height: 90px;
    background: #2a2a2a;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* ... resto de estilos de cámara sin cambios ... */

/* Chromatic aberration effect for the whole page - OPTIMIZED */
main {
    /* Removed backdrop-filter for performance */
}

/* Particle Text Container */
#particle-text-container {
    margin-bottom: 2.5rem;
    overflow: visible;
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    height: 30vh;
    min-height: 120px;
    max-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ... resto del CSS de particle text sin cambios ... */

/* Tagline styles */
.hero-section p {
    font-size: 1.5rem;
    max-width: 36rem;
    line-height: 1.5;
    margin: 1.5rem auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.letter:hover {
    transform: scale(1.05) !important;
}

/* OPTIMIZED: Gradient text sin animación */
.gradient-text {
    color: transparent;
    background: linear-gradient(270deg,
            #10B981,
            #34D399,
            #059669);
    -webkit-background-clip: text;
    background-clip: text;
    /* Removed animation for performance */
    text-shadow:
        0 0 10px rgba(16, 185, 129, 0.5),
        0 0 20px rgba(5, 150, 105, 0.3);
    display: inline-block;
    padding: 0;
    position: relative;
}

/* REMOVED holoAnim keyframes */

/* iOS Glass Button Effect - OPTIMIZED */
a[href="#contact"] {
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.7) !important;
    /* Removed backdrop-filter for performance */
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* ... resto de estilos sin cambios ... */

/* Services Section - iOS Glass Style - OPTIMIZED */
#services {
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0.02) 100%);
    /* Removed backdrop-filter for performance */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#services .bg-gray-800\/85 {
    background: rgba(255, 255, 255, 0.05) !important;
    /* Removed backdrop-filter for performance */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    /* Removed animations for performance */
}

#services .bg-gray-800\/85:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-5px) scale(1.01);
}

/* REMOVED serviceSlideIn keyframes */

#services .bg-gray-800\/85:nth-child(2) {
    /* animation-delay: 100ms; REMOVED */
}

#services .bg-gray-800\/85:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

#services .bg-gray-700\/50 {
    background: rgba(255, 255, 255, 0.03) !important;
    /* Removed backdrop-filter for performance */
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px;
    /* Removed animations for performance */
    transition: all 0.6s ease;
}

#services .bg-gray-700\/50:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* REMOVED serviceItemSlideIn keyframes */

#services .bg-gray-700\/50:nth-child(1) {
    /* animation-delay: 150ms; REMOVED */
}

#services .bg-gray-700\/50:nth-child(2) {
    /* animation-delay: 200ms; REMOVED */
}

#services .bg-gray-700\/50:nth-child(3) {
    /* animation-delay: 250ms; REMOVED */
}

/* Contact Section - OPTIMIZED */
#contact {
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0.02) 100%);
    /* Removed backdrop-filter for performance */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#contact .contact-method {
    background: rgba(255, 255, 255, 0.05) !important;
    /* Removed backdrop-filter for performance */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px;
    transition: all 0.3s ease;
    /* Removed animations for performance */
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

#contact .contact-method a {
    word-break: break-all;
    max-width: 100%;
    padding: 0 1rem;
}

#contact .contact-method:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* REMOVED contactSlideIn keyframes */

#contact .contact-method:nth-child(1) {
    /* animation-delay: 0ms; REMOVED */
}

#contact .contact-method:nth-child(2) {
    /* animation-delay: 100ms; REMOVED */
}

#contact .contact-method:nth-child(3) {
    /* animation-delay: 200ms; REMOVED */
}

#contact .contact-method:nth-child(4) {
    /* animation-delay: 300ms; REMOVED */
}

/* Work Section - OPTIMIZED */
#work .work-item {
    /* Removed animations for performance */
    transition: all 0.4s ease;
}

#work .work-item:nth-child(1) {
    /* animation-delay: 0ms; REMOVED */
}

#work .work-item:nth-child(2) {
    /* animation-delay: 100ms; REMOVED */
}

#work .work-item:nth-child(3) {
    /* animation-delay: 200ms; REMOVED */
}

#work .work-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

#work iframe {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: #111;
}

/* REMOVED fadeInUp keyframes */

/* ... resto de estilos sin cambios ... */

/* Scroll indicator animation - OPTIMIZED */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 3s ease-in-out infinite;
}

/* ... resto de estilos sin cambios ... */

/* Featured Projects Styles - OPTIMIZED */
.featured-project,
.project-card,
.sponsor-card {
    /* Removed animations for performance */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* REMOVED slideInUp keyframes and all animation delays */

/* Hover effects */
.featured-project:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.country-card:hover .group-hover\:translate-x-1 {
    transform: translateX(4px);
}

/* Responsive adjustments */
@media (max-width: 768px) {

    #featured-projects .grid,
    #sponsors .grid,
    #international .grid {
        grid-template-columns: 1fr;
    }

    .sponsor-logo {
        padding: 2rem;
    }
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* =========================================== */
/* RESPONSIVE FIXES FOR WORLDWIDE CONNECTION SECTION */
/* =========================================== */

/* Fix for flex layout on mobile */
.flex-col.md\:flex-row {
    flex-direction: column;
}

@media (min-width: 768px) {
    .flex-col.md\:flex-row {
        flex-direction: row;
    }

    .md\:w-1\/2 {
        width: 50%;
    }
}

/* Responsive fixes for Worldwide Connection section */
@media (max-width: 768px) {
    .py-32 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .h-[250px] {
        height: 200px;
    }

    .h-[400px] {
        height: 300px;
    }

    .w-[220px] {
        width: 180px;
        height: 180px;
    }

    .h-[220px] {
        height: 180px;
    }

    .text-4xl {
        font-size: 2rem;
    }

    .text-5xl {
        font-size: 2.5rem;
    }

    .text-7xl {
        font-size: 3rem;
    }

    pre {
        font-size: 5px;
        line-height: 5px;
    }

    /* Fix for music video section */
    .h-[60vh] {
        height: 40vh;
    }

    .h-[80vh] {
        height: 50vh;
    }

    /* Fix for allies slider */
    .w-[85vw] {
        width: 85vw;
    }

    .h-[50vh] {
        height: 40vh;
    }

    /* Fix for contact section */
    .contact-method {
        min-height: 250px;
        padding: 1.5rem;
    }

    .text-xl {
        font-size: 1.25rem;
    }

    .text-2xl {
        font-size: 1.5rem;
    }
}

/* Ensure sections are properly separated */
section {
    box-sizing: border-box;
    position: relative;
}

/* Fix for the globe section layout */
.max-w-7xl {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Fix for absolute positioning on mobile */
@media (max-width: 768px) {
    .absolute {
        position: absolute;
    }

    /* Adjust city markers for mobile */
    .animate-bounce {
        animation: bounce 4s ease-in-out infinite;
    }

    .delay-700 {
        animation-delay: 700ms;
    }

    .delay-1000 {
        animation-delay: 1000ms;
    }
}

/* Improve text readability on mobile */
@media (max-width: 768px) {
    .text-base {
        font-size: 0.9rem;
    }

    .text-lg {
        font-size: 1rem;
    }

    .text-xl {
        font-size: 1.125rem;
    }

    .text-2xl {
        font-size: 1.25rem;
    }

    .text-3xl {
        font-size: 1.5rem;
    }

    .text-4xl {
        font-size: 1.75rem;
    }
}

/* Fix for ASCII globe on very small screens */
@media (max-width: 480px) {
    pre {
        font-size: 4px;
        line-height: 4px;
    }

    .w-[180px] {
        width: 150px;
        height: 150px;
    }

    .h-[180px] {
        height: 150px;
    }
}

/* Fix for button sizes on mobile */
@media (max-width: 768px) {
    .px-8 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .py-4 {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .px-6 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .py-3 {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

/* Ensure proper spacing between sections */
section+section {
    margin-top: 0;
}

/* Fix for video aspect ratio */
video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Improve mobile navigation */
@media (max-width: 768px) {
    body {
        padding-top: 56px;
    }
}

/* Fix for overflow issues */
.overflow-hidden {
    overflow: hidden;
}

/* Ensure proper z-index stacking */
.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

/* Fix for backdrop-filter support */
@supports not (backdrop-filter: blur(10px)) {
    .backdrop-blur-sm {
        background-color: rgba(0, 0, 0, 0.7);
    }

    .backdrop-blur-md {
        background-color: rgba(0, 0, 0, 0.8);
    }

    .backdrop-blur-lg {
        background-color: rgba(0, 0, 0, 0.9);
    }
}

/* =========================================== */
/* SLIDER STYLES - OPTIMIZED */
/* =========================================== */

#allies {
    position: relative;
}

#slider-track {
    scroll-behavior: smooth;
}

.slider-item {
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}

.slider-item:hover {
    transform: translateY(-5px);
}

/* Slider Navigation */
#prev-slide,
#next-slide,
#prev-slide-mobile,
#next-slide-mobile {
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

#prev-slide:hover,
#next-slide:hover,
#prev-slide-mobile:hover,
#next-slide-mobile:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: scale(1.1);
}

/* Slider Dots */
#slider-dots {
    display: flex;
    gap: 8px;
    margin-top: 1.5rem;
}

#slider-dots button {
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

#slider-dots button:hover {
    transform: scale(1.2);
}

#slider-dots button.bg-white {
    transform: scale(1.2);
}

/* Mobile slider buttons */
#prev-slide-mobile,
#next-slide-mobile {
    width: 44px;
    height: 44px;
}

/* =========================================== */
/* WORLDWIDE CONNECTION BUTTON STYLES - OPTIMIZED */
/* =========================================== */

/* Improved button styles for Worldwide Connection */
.bg-gradient-to-r.from-green-500.to-emerald-600 {
    background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%);
    color: white;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.bg-gradient-to-r.from-green-500.to-emerald-600:hover {
    background: linear-gradient(135deg, #34D399 0%, #10B981 50%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.bg-gradient-to-r.from-green-500.to-emerald-600:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

/* Button icon animation */
.bg-gradient-to-r.from-green-500.to-emerald-600 i {
    transition: transform 0.3s ease;
}

.bg-gradient-to-r.from-green-500.to-emerald-600:hover i {
    transform: translateX(4px);
}

/* Responsive button adjustments */
@media (max-width: 768px) {
    .bg-gradient-to-r.from-green-500.to-emerald-600 {
        font-size: 0.875rem;
        padding: 0.75rem 1.5rem;
    }
}

/* =========================================== */
/* PERFORMANCE OPTIMIZATIONS */
/* =========================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .animate-bounce,
    .slider-item,
    .bg-gradient-to-r.from-green-500.to-emerald-600 i,
    .group-hover\:scale-110,
    .group-hover\:translate-x-1 {
        animation: none !important;
        transition: none !important;
    }
}

/* Optimize GPU rendering */
.transform-gpu {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduce paint operations */
.will-change-transform {
    will-change: transform;
}

/* Optimize images and videos */
img,
video {
    max-width: 100%;
    height: auto;
    content-visibility: auto;
}

/* Lazy loading for offscreen images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Optimize scrolling performance */
#slider-track {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

/* Reduce composite layers */
.optimize-composite {
    transform: translateZ(0);
    isolation: isolate;
}

/* Performance-critical optimizations */
@media (max-width: 768px) {

    /* Reduce animations on mobile */
    .transition-all {
        transition: opacity 0.2s ease, transform 0.2s ease !important;
    }

    /* Simplify gradients on mobile */
    .gradient-text {
        background: linear-gradient(90deg, #10B981, #059669);
    }

    /* Reduce shadow complexity */
    .shadow-lg,
    .shadow-xl,
    .shadow-2xl {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    }
}