/* ================================
   CSS PARA LA PÁGINA "SERVICIOS"
   ================================ */

/* ---------- Variables y ajustes globales ---------- */
:root {
    --primary-color: #006341; /* Verde corporativo */
    --secondary-color: #f1c40f; /* Amarillo/dorado para acentos */
    --accent-color: #e74c3c; /* Rojo para elementos importantes */
    --dark-color: #2c3e50; /* Más oscuro que negro para texto principal */
    --light-color: #f8f9fa; /* Fondo claro */
    --gray-color: #e9ecef; /* Fondos alternativos */
    --text-color: #333; /* Color de texto general */
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* Sombra elegante */
    --transition: all 0.3s ease-in-out; /* Transición estándar */
    --border-radius: 10px; /* Bordes redondeados */
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background-color: var(--light-color);
}

/* ---------- Hero section mejorado ---------- */
.main-background {
    position: relative;
    width: 100%;
    height: 80vh;
    margin-top: 0; /* MODIFICADO: Cambiado de 80px a 0 para eliminar el espacio en blanco */
    overflow: hidden;
}

.background-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 15s ease;
    filter: brightness(0.9);
}

.main-background:hover .background-img {
    transform: scale(1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 80%;
    max-width: 900px;
    z-index: 2;
}

.hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.3s;
}

.hero-content p {
    font-size: 1.5rem;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sección de introducción */
.servicios-intro {
    padding: 80px 20px;
    background-color: white;
    text-align: center;
    position: relative;
    margin-top: -80px;
    z-index: 3;
}

.servicios-intro .container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
}

.servicios-intro .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.servicios-intro h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.servicios-intro h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.servicios-intro p {
    font-size: 1.2rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Sección principal de servicios */
.services-section {
    padding: 100px 0 120px;
    background-color: var(--light-color);
    position: relative;
    overflow: hidden;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><path d="M54 22.5l-16.5-6.6-7.5-15-7.5 15-16.5 6.6 12 11.7-3 17.3 15-8.1 15 8.1-3-17.3z" stroke="%2328a74510" fill="none" stroke-width="1" /></svg>');
    opacity: 0.3;
}

/* Contenedor de cada servicio */
.services-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 80px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.services-container.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.services-container.alt {
    flex-direction: row-reverse;
}

.services-container:last-child {
    margin-bottom: 0;
}

/* Imágenes de servicios */
.services-image {
    flex: 1;
    height: 450px;
    overflow: hidden;
    position: relative;
}

.services-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.services-container:hover .services-image img {
    transform: scale(1.05);
}

/* Textos de servicios */
.services-text {
    flex: 1;
    padding: 50px;
    position: relative;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 5px 15px rgba(0, 99, 65, 0.2);
    transition: var(--transition);
}

.services-container:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.services-text h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.services-text h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

.services-container:hover .services-text h2::after {
    width: 60px;
}

.services-text p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 25px;
    line-height: 1.6;
}

.services-list {
    list-style: none;
    margin-bottom: 30px;
    padding: 0;
}

.services-list li {
    position: relative;
    padding: 10px 0 10px 35px;
    font-size: 1.05rem;
    color: #555;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.services-list li:last-child {
    border-bottom: none;
}

.services-list li i {
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-start;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 99, 65, 0.2);
}

/* Sección CTA */
.servicios-cta {
    background-color: var(--dark-color);
    padding: 80px 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.servicios-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(241,196,15,0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
}

.servicios-cta .container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.servicios-cta h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
}

.servicios-cta h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.servicios-cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-cta {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    padding: 14px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-cta:hover {
    background-color: transparent;
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Estilo de servicio con tarjeta superior como en index */
.service-tag {
    position: absolute;
    top: 20px;
    right: 0;
    background-color: var(--primary-color);
    color: white;
    padding: 6px 15px;
    border-radius: 4px 0 0 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    z-index: 3;
}

/* Botón Ver Todos los Servicios */
.all-services-btn-container {
    text-align: center;
    margin-top: 60px;
    position: relative;
    z-index: 2;
}

.all-services-btn {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.4s ease;
    border: 2px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 16px;
}

.all-services-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.2);
}

/* Efectos visuales adicionales */
.services-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0) 100%);
    z-index: 0;
    opacity: 0;
    transition: var(--transition);
}

.services-container:hover::before {
    opacity: 1;
}

/* Animaciones adicionales */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.service-icon i {
    animation: float 3s ease-in-out infinite;
}

/* ---------- Media queries ---------- */
@media (max-width: 1200px) {
    .services-container {
        max-width: 900px;
    }
    
    .services-text {
        padding: 40px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .servicios-intro h2 {
        font-size: 2rem;
    }
    
    .services-container {
        flex-direction: column;
        max-width: 600px;
    }
    
    .services-container.alt {
        flex-direction: column;
    }
    
    .services-image {
        width: 100%;
        height: 300px;
    }
    
    .services-text {
        width: 100%;
    }
    
    .servicios-cta h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .main-background {
        height: 60vh;
        margin-top: 0; /* MODIFICADO: Mantener en 0 también en dispositivos móviles */
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .servicios-intro {
        padding: 40px 20px;
    }
    
    .servicios-intro .container {
        padding: 30px 20px;
    }
    
    .servicios-intro h2 {
        font-size: 1.8rem;
    }
    
    .services-text {
        padding: 30px;
    }
    
    .services-text h2 {
        font-size: 1.6rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .services-list li {
        font-size: 1rem;
    }
    
    .servicios-cta h2 {
        font-size: 2rem;
    }
    
    .servicios-cta p {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .services-text {
        padding: 25px 20px;
    }
    
    .btn-primary, .btn-cta {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .services-image {
        height: 250px;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}