/* Estilos para la página de servicios - Noelyth Softworks */

/* Encabezado de la página */
.services-page-header {
    background: linear-gradient(rgba(0, 51, 102, 0.85), rgba(0, 153, 204, 0.75)), url('../resources/bannerservicios.jpg') center/cover;
    color: white;
    text-align: center;
    padding: 150px 0 80px;
}

.services-page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.services-page-header p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* Sección principal de servicios */
.services-section {
    background-color: white;
    padding: 80px 0;
}

.service-intro {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 60px;
}

.service-intro h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.service-intro p {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.7;
}

/* Contenedor de tarjetas de servicios - SOLUCIÓN SIMPLE */
.services-container {
    /* Limitar el ancho del contenedor para mejor control */
    max-width: 1140px;
    margin: 0 auto 80px;
    /* Quitar flex y usar un grid explícito */
    display: grid;
    /* Definir exactamente 3 columnas de igual tamaño */
    grid-template-columns: repeat(3, 1fr);
    /* Definir espacio entre tarjetas */
    gap: 30px;
    /* Asegurar que la última fila esté centrada si está incompleta */
    justify-content: center;
}

/* Tarjetas de servicios */
.service-card {
    background-color: var(--light-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Flexbox para organizar el contenido verticalmente */
    display: flex;
    flex-direction: column;
}

/* Solución específica para la última tarjeta */
.service-card:last-child:nth-child(3n-1) {
    /* Si es la penúltima de un múltiplo de 3 */
    grid-column: 2;
}

.service-card:last-child:nth-child(3n-2) {
    /* Si es la antepenúltima de un múltiplo de 3 */
    grid-column: 2 / span 1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-card-header {
    background-color: var(--secondary-color);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.service-card-header i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-card-header h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.service-card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    flex-grow: 1;
}

.service-features li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    line-height: 1.5;
}

.service-features li:before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.service-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 20px;
    text-align: center;
}

.service-price .amount {
    font-size: 2rem;
    color: var(--primary-color);
}

.service-price .period {
    font-size: 1.1rem;
    color: #666;
    font-weight: normal;
}

.service-price .iva-note {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.service-card .btn {
    width: 100%;
    text-align: center;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: auto;
}

.service-card .btn:hover {
    background-color: var(--accent-color);
}

/* Sección de llamada a la acción */
.cta-container {
    background-color: var(--light-color);
    padding: 60px 0;
    text-align: center;
    border-radius: 12px;
    margin-top: 50px;
}

.cta-container h2 {
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.cta-container p {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.cta-container .btn {
    font-size: 1.3rem;
    padding: 18px 40px;
}

/* Anclas para navegación interna */
.service-anchor {
    display: block;
    position: relative;
    top: -120px;
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
}

/* Estilos responsivos */
@media (max-width: 992px) {
    .services-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    }
    
    /* Resetear reglas específicas para pantallas más pequeñas */
    .service-card:last-child:nth-child(3n-1),
    .service-card:last-child:nth-child(3n-2) {
        grid-column: auto;
    }
    
    .services-page-header h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .services-container {
        grid-template-columns: 1fr; /* 1 columna en móviles */
    }
    
    .service-card {
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .services-page-header {
        padding: 120px 0 60px;
    }
    
    .services-page-header h1 {
        font-size: 2.5rem;
    }
    
    .services-page-header p {
        font-size: 1.2rem;
    }
}
