/*
 * assets/css/servicios.css
 * Versión mejorada con diseño moderno y profesional
 */

/* ===== VARIABLES CSS ===== */
:root {
    --servicios-primary: #4169E1;
    --servicios-primary-dark: #2c4fbd;
    --servicios-bg: #ffffff;
    --servicios-text-dark: #000;
    --servicios-text-light: #666;
    --servicios-white: #fff;
    --servicios-shadow: 0 8px 25px rgba(65, 105, 225, 0.15);
    --servicios-shadow-hover: 0 12px 40px rgba(65, 105, 225, 0.25);
    --servicios-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --servicios-border-radius: 20px;
}

/* ===== WRAPPER PRINCIPAL ===== */
#servicios-component-wrapper {
    width: 100%;
    background-color: var(--servicios-bg);
    padding: 80px 0;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Patrón decorativo de fondo */
#servicios-component-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(65, 105, 225, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(65, 105, 225, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ===== ENCABEZADO DE SECCIÓN ===== */
.servicios-section-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.servicios-section-title {
    font-size: clamp(24px, 4vw, 36px);
    text-transform: uppercase;
    letter-spacing: 6px;
    color: var(--servicios-text-dark);
    margin: 0 0 12px 0;
    font-weight: 900;
}

.servicios-section-subtitle {
    font-size: clamp(14px, 2vw, 16px);
    color: var(--servicios-text-light);
    margin: 0;
    font-weight: 400;
    letter-spacing: 1px;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
#servicios-component-wrapper .contenido {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* ===== GRID DE SERVICIOS ===== */
#servicios-component-wrapper .features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

/* ===== TARJETA DE SERVICIO ===== */
#servicios-component-wrapper .feature {
    position: relative;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 340px;
    background: linear-gradient(135deg, var(--servicios-primary) 0%, var(--servicios-primary-dark) 100%);
    border-radius: var(--servicios-border-radius);
    padding: 40px 25px;
    box-shadow: var(--servicios-shadow);
    overflow: hidden;
    transition: var(--servicios-transition);
    animation: fadeInUp 0.6s ease-out backwards;
}

#servicios-component-wrapper .feature:nth-child(1) { animation-delay: 0.1s; }
#servicios-component-wrapper .feature:nth-child(2) { animation-delay: 0.2s; }
#servicios-component-wrapper .feature:nth-child(3) { animation-delay: 0.3s; }
#servicios-component-wrapper .feature:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#servicios-component-wrapper .feature:hover {
    transform: translateY(-8px);
    box-shadow: var(--servicios-shadow-hover);
}

/* Fondo decorativo animado */
.feature-background {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transition: var(--servicios-transition);
    pointer-events: none;
}

#servicios-component-wrapper .feature:hover .feature-background {
    transform: translate(-10%, -10%) scale(1.1);
}

/* ===== ICONO DEL SERVICIO ===== */
.feature-icon-wrapper {
    position: relative;
    width: 100%;
    max-width: 180px;
    margin-bottom: 25px;
    z-index: 2;
}

.feature-icon {
    width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: contain;
    transition: var(--servicios-transition);
    filter: brightness(1) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

#servicios-component-wrapper .feature:hover .feature-icon {
    transform: scale(1.12) translateY(-5px);
    filter: brightness(1.1) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.2));
}

/* ===== CONTENIDO DEL SERVICIO ===== */
.feature-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.feature-title {
    font-weight: 700;
    font-size: clamp(14px, 2vw, 16px);
    letter-spacing: 3px;
    color: var(--servicios-white);
    text-transform: uppercase;
    margin: 0;
    transition: var(--servicios-transition);
}

#servicios-component-wrapper .feature:hover .feature-title {
    letter-spacing: 4px;
    transform: scale(1.05);
}

.feature-text {
    font-size: clamp(13px, 1.5vw, 15px);
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.6;
    padding: 0 10px;
    transition: var(--servicios-transition);
}

#servicios-component-wrapper .feature:hover .feature-text {
    color: rgba(255, 255, 255, 1);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets */
@media (max-width: 1024px) {
    #servicios-component-wrapper {
        padding: 60px 0;
    }

    .servicios-section-header {
        margin-bottom: 50px;
    }

    #servicios-component-wrapper .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    #servicios-component-wrapper .feature {
        min-height: 300px;
        padding: 35px 20px;
    }
}

/* Móviles */
@media (max-width: 768px) {
    #servicios-component-wrapper {
        padding: 50px 0;
    }

    .servicios-section-header {
        margin-bottom: 40px;
        padding: 0 20px;
    }

    .servicios-section-title {
        letter-spacing: 4px;
        margin-bottom: 8px;
    }

    .servicios-section-subtitle {
        letter-spacing: 0.5px;
    }

    #servicios-component-wrapper .contenido {
        width: 95%;
        padding: 0 10px;
    }

    #servicios-component-wrapper .features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    #servicios-component-wrapper .feature {
        min-height: 200px;
        padding: 20px 12px;
        border-radius: 16px;
    }

    .feature-icon-wrapper {
        max-width: 80px;
        margin-bottom: 15px;
    }

    .feature-icon {
        max-height: 60px;
    }

    .feature-content {
        gap: 8px;
    }

    .feature-title {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .feature-text {
        font-size: 9px;
        line-height: 1.4;
        padding: 0 5px;
    }

    /* Animaciones más suaves en móvil */
    #servicios-component-wrapper .feature:hover {
        transform: translateY(-4px);
    }

    #servicios-component-wrapper .feature:hover .feature-icon {
        transform: scale(1.08) translateY(-3px);
    }
}

/* Móviles muy pequeños */
@media (max-width: 480px) {
    #servicios-component-wrapper .features {
        gap: 10px;
    }

    #servicios-component-wrapper .feature {
        min-height: 180px;
        padding: 16px 10px;
    }

    .feature-icon-wrapper {
        max-width: 70px;
        margin-bottom: 12px;
    }

    .feature-icon {
        max-height: 50px;
    }

    .feature-title {
        font-size: 9px;
        letter-spacing: 1.5px;
    }

    .feature-text {
        font-size: 8px;
    }
}

/* Desktop extra grande */
@media (min-width: 1400px) {
    #servicios-component-wrapper .contenido {
        max-width: 1600px;
    }

    #servicios-component-wrapper .features {
        gap: 40px;
    }

    #servicios-component-wrapper .feature {
        min-height: 360px;
        padding: 45px 30px;
    }

    .feature-icon-wrapper {
        max-width: 200px;
        margin-bottom: 30px;
    }

    .feature-icon {
        max-height: 160px;
    }

    .servicios-section-header {
        margin-bottom: 70px;
    }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== MEJORAS DE RENDIMIENTO ===== */
#servicios-component-wrapper .feature,
.feature-icon,
.feature-background {
    will-change: transform;
}

/* Force GPU acceleration */
#servicios-component-wrapper .feature:hover {
    transform: translateY(-8px) translateZ(0);
}