/* Estilos para la sección de servicios */
.servicios-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.servicios-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #e74c3c;
}

.section-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 30px;
    text-align: center;
    line-height: 1.6;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px 0;
}

.servicio-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

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

.servicio-imagen-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f1f3f5;
}

.servicio-imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.servicio-card:hover .servicio-imagen {
    transform: scale(1.05);
}

.servicio-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.servicio-nombre {
    font-size: 1.2rem;
    color: #2c3e50;
    margin: 0 0 15px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.4;
}

.servicio-descripcion {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.btn-ver-mas {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    margin-top: auto;
}

.btn-ver-mas:hover {
    background-color: #c0392b;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Estilos para el modal de servicio */
.servicio-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
}

.servicio-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1;
}

.modal-container {
    position: relative;
    width: 95%;
    max-width: 1000px;
    min-height: 200px;
    max-height: 90vh;
    margin: 10px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    transform: translateY(10px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.servicio-modal.active .modal-container {
    transform: translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    max-height: 100%;
}

.modal-gallery {
    position: relative;
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    background: #f8f9fa;
}

.modal-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(90vh - 350px);
    -webkit-overflow-scrolling: touch;
}

.modal-title {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0 0 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.modal-description {
    color: #495057;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.section-title-modal {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-modal i {
    color: #e74c3c;
}

.beneficios-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}

.beneficios-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    color: #495057;
    line-height: 1.6;
}

.beneficios-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #e74c3c;
    font-weight: bold;
}

.modal-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.btn-solicitar {
    background: #25D366;
    color: white;
    padding: 15px 35px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-solicitar:hover {
    background: #128C7E;
    color: white;
    transform: translateY(-2px);
}

/* Responsive styles */
@media (max-width: 1199px) {
    .servicios-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-container {
        width: 95%;
        margin: 2.5vh auto;
    }
}

@media (max-width: 767px) {
    .servicios-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .modal-container {
        width: 95%;
        max-height: 95vh;
        margin: 10px auto;
    }
    
    .modal-gallery {
        max-height: 200px;
    }
    
    .modal-details {
        padding: 15px;
        max-height: calc(95vh - 250px);
    }
    
    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .section-title-modal {
        font-size: 1.2rem;
        margin: 15px 0 10px;
    }
    
    .btn-solicitar {
        width: 100%;
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-gallery {
        max-height: 150px;
    }
    
    .modal-details {
        padding: 10px;
        max-height: calc(95vh - 200px);
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .modal-description, 
    #modalEspecificaciones {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .beneficios-list li {
        margin-bottom: 8px;
        font-size: 0.9rem;
        justify-content: center;
        padding: 12px 20px;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.servicio-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Aplica un retraso escalonado a cada tarjeta */
.servicio-card:nth-child(1) { animation-delay: 0.1s; }
.servicio-card:nth-child(2) { animation-delay: 0.2s; }
.servicio-card:nth-child(3) { animation-delay: 0.3s; }
.servicio-card:nth-child(4) { animation-delay: 0.4s; }
.servicio-card:nth-child(5) { animation-delay: 0.5s; }
.servicio-card:nth-child(6) { animation-delay: 0.6s; }
.servicio-card:nth-child(7) { animation-delay: 0.7s; }
