/* =============================================
   SECCIÓN SERVICIOS
   ============================================= */

/* Contenedor de la sección */
.section-dark-bg {
    background: url('../img/backgrounds/corpo.png') center/cover;
    position: relative;
    min-height: 100vh;
}

.section-dark-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.8),
        rgba(0, 40, 86, 0.7)
    );
    z-index: 0;
}

.section-dark-bg > * {
    position: relative;
    z-index: 1;
}

/* Header de sección */
.section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-top: 20px;
}

.section-subtitle {
    color: var(--soft-aqua);
    font-family: var(--font-primary);
    font-weight: 200;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.75rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 15px;
    color: var(--blanco);
    font-weight: 500;
    font-family: var(--font-secondary);
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.section-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 200;
    opacity: 0;
    animation: fadeInUp 1.2s ease 0.4s forwards;
}

/* Grid de servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

/* Centrar la última tarjeta cuando hay 7 tarjetas (3+3+1) */
.services-grid .service-card:nth-child(7):last-child {
    grid-column: 2 / 3;
}

/* Tarjeta de servicio */
.service-card {
    background: rgba(0, 40, 86, 0.4);
    padding: 35px 25px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--soft-aqua);
    backdrop-filter: blur(5px);
    cursor: pointer;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    min-height: 386px;
    height: 100%;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* Efecto hover con gradiente */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(104, 175, 181, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--soft-aqua);
    background: rgba(0, 40, 86, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Icono del servicio */
.service-icon {
    width: 55px;
    height: 55px;
    background: var(--soft-aqua);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--royal-blue);
    margin: 15px auto;
    position: relative;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.service-card:hover .service-icon {
    background: var(--soft-aqua);
    transform: scale(1.1);
}

/* Título del servicio */
.service-card h3 {
    font-size: 1.25rem;
    margin: 15px 0;
    color: var(--blanco);
    font-family: var(--font-secondary);
    transition: color var(--transition-fast);
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card:hover h3 {
    color: var(--soft-aqua);
}

/* Descripción del servicio */
.service-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin: 0 0 20px 0;
    padding: 0 10px;
    font-size: 0.9rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    min-height: 60px;
}

/* Lista de características */
.service-features {
    list-style: none;
    margin: auto 0 0 0;
    padding: 0;
    width: 100%;
}

.service-features li {
    padding: 10px 0 10px 25px;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    border-bottom: 1px solid rgba(104, 175, 181, 0.2);
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    min-height: 38px;
    display: flex;
    align-items: center;
}

.service-features li:last-child {
    border-bottom: none;
}

.service-features li::before {
    content: '▪';
    position: absolute;
    left: 0;
    color: var(--soft-aqua);
    font-size: 1rem;
    transition: transform var(--transition-fast);
}

.service-card:hover .service-features li {
    color: rgba(255, 255, 255, 0.9);
    padding-left: 30px;
}

.service-card:hover .service-features li::before {
    transform: translateX(5px);
}

/* Badge de servicio destacado */
.service-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: var(--soft-aqua);
    color: var(--royal-blue);
    padding: 5px 15px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Botón ver más (opcional) */
.service-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--soft-aqua);
    text-decoration: none;
    font-size: 0.8rem;
    margin-top: 15px;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-link:hover {
    gap: 10px;
    color: var(--soft-aqua);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* Sección completa */
    .page-section {
        padding: 80px 20px !important;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Resetear el centrado de la 7ma tarjeta en móvil */
    .services-grid .service-card:nth-child(7):last-child {
        grid-column: 1 / -1;
    }

    .service-card {
        padding: 25px;
    }

    .section-header {
        margin-bottom: 30px;
        padding: 0 10px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 0.7rem;
    }

    .section-description {
        font-size: 0.9rem;
        padding: 0 10px;
    }

    .service-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .service-card h3 {
        font-size: 1.15rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    .service-features li {
        font-size: 0.85rem;
        padding: 10px 0 10px 20px;
    }
}

@media (max-width: 480px) {
    /* Sección completa */
    .page-section {
        padding: 60px 15px !important;
    }

    .section-header {
        margin-bottom: 25px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .section-subtitle {
        font-size: 0.65rem;
        margin-bottom: 8px;
    }

    .section-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .services-grid {
        gap: 15px;
    }

    .service-card {
        padding: 18px;
    }

    .service-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .service-card h3 {
        font-size: 1.05rem;
        margin-bottom: 10px;
    }

    .service-card p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 15px;
    }

    .service-features li {
        font-size: 0.78rem;
        padding: 8px 0 8px 22px;
        line-height: 1.3;
    }

    .service-features li::before {
        font-size: 0.8rem;
    }

    /* Hover effects más sutiles en móvil */
    .service-card:hover {
        transform: translateY(-2px);
    }

    .service-card:hover .service-features li {
        padding-left: 25px;
    }
}