/* ==============================================
   ESTILOS GENERALES
   ============================================== */
* {
    font-family: 'Oswald', sans-serif;
}

/* ==============================================
   SCROLLBAR PERSONALIZADO
   ============================================== */
.scroll-container::-webkit-scrollbar {
    width: 6px;
    background-color: rgba(255, 255, 255, 0);
}

.scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0);
    border-radius: 4px;
}

/* ==============================================
   FONDOS DE SECCIONES
   ============================================== */
.servicios-background {
    background-image:
        linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1)),
        linear-gradient(to right, rgb(54, 20, 29), rgb(11, 41, 56), rgb(15, 46, 46));
    background-repeat: no-repeat;
    background-size: cover;
}

.contact-background {
    background: linear-gradient(to bottom, rgb(44, 48, 51), rgb(204, 217, 230));
}

.imaginacion-background {
    background-image:
        linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1)),
        linear-gradient(to right, rgb(54, 20, 29), rgb(11, 41, 56), rgb(15, 46, 46));
    background-repeat: no-repeat;
    background-size: cover;
}

.contact-card-background {
    background-image:
        linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1)),
        linear-gradient(to right, rgb(140, 28, 54), rgb(2, 75, 115), rgb(6, 89, 86));
    background-repeat: no-repeat;
    background-size: cover;
}

.footer-background {
    background-image:
        linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1)),
        linear-gradient(to right, rgb(224, 43, 82), rgb(2, 129, 184), rgb(9, 143, 138));
    background-repeat: no-repeat;
    background-size: cover;
}

/* ==============================================
   UTILIDADES DE TEXTO Y DISEÑO
   ============================================== */
.gradient-text {
    background: linear-gradient(135deg, #06B6D4, #3B82F6, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-bg {
    background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 50%, #ec4899 100%);
}

.arcoiris {
    border: 1px solid transparent;
    border-image: conic-gradient(red, orange, yellow, green, blue, indigo, violet)1;
}

/* ==============================================
   TARJETAS DE SERVICIOS
   ============================================== */
.service-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.service-card .service-image {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.service-card:hover .service-image {
    filter: grayscale(0%);
}

.service-card .yellow-bar {
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.3s ease;
}

.service-card:hover .yellow-bar {
    opacity: 1;
    transform: scaleX(1);
}

/* ==============================================
   MODAL Y CAROUSEL - OPTIMIZADO
   ============================================== */
.modal {
    backdrop-filter: blur(10px);
}

/* Optimizaciones de rendering para el carousel */
.carousel-container,
.carousel-slides,
.carousel-slide,
.thumbnail {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    contain: layout style paint;
}

.carousel-slides {
    display: flex;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
}

/* ==============================================
   NAVEGACIÓN DEL CAROUSEL
   ============================================== */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background: rgba(0,0,0,0.8);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* ==============================================
   INDICADORES DEL CAROUSEL
   ============================================== */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dot.active {
    background: #fbbf24;
}

/* ==============================================
   THUMBNAILS - OPTIMIZADO
   ============================================== */
.thumbnail-strip {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

.thumbnail {
    min-width: 80px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    border-radius: 4px;
    overflow: hidden;
}

.thumbnail:not(.active) {
    opacity: 0.7;
    filter: blur(2px); /* Efecto blur sutil para thumbnails no activos */
}

.thumbnail:hover {
    opacity: 1;
    filter: blur(0);
}

.thumbnail.active {
    opacity: 1;
    border-color: #fbbf24;
    filter: blur(0);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==============================================
   LINK INDICATOR
   ============================================== */
.link-indicator {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(4px);
}

/* ==============================================
   ANIMACIONES DE TEXTO
   ============================================== */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeOut {
    from { 
        opacity: 1; 
        transform: translateY(0); 
    }
    to { 
        opacity: 0; 
        transform: translateY(-20px); 
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.fade-out {
    animation: fadeOut 0.6s ease-in forwards;
}

.text-animated {
    opacity: 0;
}

/* ==============================================
   ANIMACIONES DE CARGA
   ============================================== */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.5; 
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */
@media (max-width: 768px) {
    .carousel-container {
        aspect-ratio: 4/3;
        min-height: 250px;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .thumbnail {
        min-width: 60px;
        height: 45px;
    }
    
    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}