


/* ==========================================
   ESTILOS ESPECÍFICOS DE LA PÁGINA SERVICIOS
   ========================================== */
.services-page {
    background: radial-gradient(circle at 15% 15%, #ffffff 0%, #d3f3dc 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* SECCIÓN HERO (CABECERA) */
.services-hero {
    text-align: center;
    padding: 60px 20px 30px 20px;
    background: #d3f3dc radial-gradient(circle farthest-corner at 15% 15%, #ffffff 0%, #d3f3dc 100%);
    margin-bottom: 0;
    border: none;
}

.services-hero h1 {
    color: #1b4332;
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
    
}

.services-hero p {
    color: #555;
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    
}

/* CONTENEDOR DE LA REJILLA */
.services-grid-section {
    background: transparent !important;
    max-width: 1400px; 
    margin: 0 auto;
    padding: 10px 20px 40px 20px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    gap: 12px; 
    width: 100%;
}

/* DISEÑO DE LA TARJETA (CARD CUADRADA) */
.service-card {
    height: 100%;
    background: #ffffff;
    padding: 20px 30px;
    min-height: 300px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: #0bce52;
    box-shadow: 0 15px 35px rgba(11, 206, 82, 0.15);
}

.service-card-icon {
    font-size: 35px;
    color: #0bce52;
    margin-bottom: 15px;
}

.service-card h2 {
    color: #1b4332;
    font-size: 1.1rem;
    margin-bottom: 15px;
    min-height: 3.6rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card p {
    color: #666;
    line-height: 1.4;
    margin-bottom: 20px;
    font-size: 0.9rem;
    
}

/* BOTÓN "MÁS INFO" */
.btn-small-outline {
    margin-top: auto;
    cursor: pointer;
    display: inline-block;
    background-color: #0ea043;
    color: #ffffff !important;
    padding: 12px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
}

.btn-small-outline:hover {
    background-color: #1b4332;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(11, 206, 82, 0.3);
}

/* VISUALIZADOR DINÁMICO */
.detalle-visualizador {
    background: #ffffff;
    padding: 60px 0;
    margin: 20px 20px 100px 20px;
    border-radius: 50px;
    box-shadow: 0 20px 50px rgba(27, 67, 30, 0.12);
    animation: slideUp 0.6s ease;
    overflow: hidden;   
}

.detalle-flex {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* NUEVA CLASE: MODO ESPECIAL (Para Suelo Radiante) */
.detalle-flex.modo-especial {
    display: block; /* Rompe las 2 columnas para usar el ancho completo */
}

.detalle-flex.modo-especial .detalle-texto {
    width: 100%;
    flex: none;
}

.detalle-texto { 
    flex: 1.2; 
    text-align: left; 
}

.detalle-texto h2 {
    color: #1b4332;
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 800;
    
}

.detalle-texto p {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: justify;
}

.detalle-imagen { 
    flex: 0.8; 
}

.detalle-imagen img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.cerrar-detalle {
    position: absolute;
    top: 0px;
    right: 20px;
    background: #f0f4f2;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 10;
}

.cerrar-detalle:hover {
    background: #1b4332;
    color: white;
}

/* ==========================================
   NUEVOS ESTILOS PARA SUELO RADIANTE/REFRESCANTE
   ========================================== */
.detalle-doble-fila {
    display: flex;
    flex-direction: column;
    gap: 50px; /* Espacio entre el bloque calor y frío */
    width: 100%;
    margin-top: 20px;
}

.fila-interna {
    display: flex;
    align-items: center;
    gap: 40px;
}

.fila-interna.invertida {
    flex-direction: row-reverse;
}

.fila-interna div { 
    flex: 1; 
}

.fila-interna img {
    width: 100%;
    height: 320px; /* Altura controlada para las sub-imágenes */
    object-fit: cover;
    border-radius: 25px;
    display: block;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.fila-interna h3 {
    color: #1b4332;
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.fila-interna p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0; /* Quitamos margen extra */
}

/* Unificar tipografía en los detalles */
.detalle-texto h2, 
.col-txt h3 {
    font-weight: 700; /* Para que tenga ese cuerpo potente de Biofont */
    letter-spacing: -0.5px;
}



/* ANIMACIONES */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   RESPONSIVE (MÓVILES)
   ========================================== */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .detalle-flex { gap: 30px; }
}

    @media (max-width: 768px) {
        /* 1. HERO DE SERVICIOS: Compacto */
        .services-hero {
            padding: 40px 25px 20px 25px;
        }

        .services-hero h1 { 
            font-size: 2rem;
            margin-bottom: 10px;
        }

        /* 2. TARJETAS DE SERVICIO: Unificación y Justificado */
        .services-grid { 
            grid-template-columns: 1fr; 
            gap: 20px;
        }

        .service-card {
            padding: 25px 20px;
            min-height: auto;
            margin-bottom: 0px;
        }

        .service-card h2 {
            font-size: 1.3rem;
            line-height: 1.2;
            color: #1b4332 !important;
            margin-bottom: 15px !important;
        }

        .service-card p {
            font-size: 0.9rem !important;
            line-height: 1.6;
            color: #555 !important;
            margin-bottom: 20px;
            text-align: start !important;
            hyphens: auto !important;
            word-spacing: -1px;
        }

        /* 3. SECCIÓN DE DETALLES (DESPLEGABLE / MODAL) */
        .service-grid-section {
            padding: 0 15px 30px 15px;
            position: relative; /* Necesario para que el botón X se posicione bien */
        }

        .detalle-flex { 
            flex-direction: column; 
            gap: 20px;
        }

        .detalle-texto { 
            text-align: left; /* Cambiado a left para que el justificado luzca mejor */
        }

       /* Arreglo específico para el título interno del detalle */
        .col-txt h3 {
            display: block !important;
            text-align: left !important;
            width: 100% !important;
            
            /* 1. Reducimos el tamaño para que no sea gigante */
            font-size: 1.25rem !important; 
            
            /* 2. Unificamos peso y espaciado */
            font-weight: 700 !important;
            line-height: 1.2 !important;
            letter-spacing: -0.2px !important; /* Lo hace más compacto y elegante */
            
            /* 3. Márgenes para que respire */
            margin-top: 10px !important;
            margin-bottom: 15px !important;
            
            /* 4. Aseguramos el color verde Biofont */
            color: #1b4332 !important;
            
            word-spacing: normal !important;
        }

        /* Si el contenedor padre (.col-txt) tiene flex, esto asegura que el h3 no se estire raro */
        .col-txt {
            display: block !important;
        }

        /* Título del detalle con espacio para la X */
        .detalle-texto h2 {
            font-size: 1.5rem !important;
            margin-top: 5px !important;
            margin-bottom: 20px !important;
            padding-right: 45px !important; /* Espacio de seguridad para que la X no lo tape */
            color: #1b4332 !important;
            line-height: 1.2;
        }

        /* Texto e ítems dentro del detalle */
        .detalle-texto p, 
        .detalle-texto li {
            font-size: 0.9rem !important;
            line-height: 1.5 !important;
            color: #444 !important;
            text-align: start !important;
            margin-bottom: 12px !important;
        }

        .detalle-texto strong, 
        .detalle-texto b {
            font-size: 0.95rem !important;
            color: #1b4332 !important;
            display: inline-block;
            margin-bottom: 2px;
        }

        .detalle-texto ul {
            padding-left: 20px !important;
            padding-right: 10px !important;
        }

    /* UNIFICACIÓN TOTAL DE BOTONES (Presupuesto y Más Info) */
    .btn-small-outline, 
    .btn-small-outline.btn-toggle {
        display: block !important;
        width: fit-content !important; 
        margin: 25px auto !important; 
        padding: 10px 25px !important; /* El tamaño más elegante */
        font-size: 0.85rem !important; /* Tipografía más legible */
        background-color: #0bce52 !important; 
        color: white !important;
        border-radius: 50px !important; 
        text-align: center !important;
        text-decoration: none !important;
        border: none !important;
    }
    

        /* 4. BOTÓN DE CERRAR (X) */
        .btn-cerrar-modal, 
        .close-button, 
        .close-modal { 
            position: absolute !important;
            top: 15px !important;
            right: 15px !important;
            z-index: 100 !important;
            width: 32px !important;
            height: 32px !important;
            background-color: rgba(0,0,0,0.08) !important;
            border-radius: 50% !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            border: none !important;
        }

        /* 5. IMÁGENES Y SUB-FILAS */
        .detalle-imagen img { 
            height: auto; 
            max-height: 280px; 
            width: 100%;
            object-fit: cover;
            border-radius: 10px;
        }

        .fila-interna, .fila-interna.invertida {
            flex-direction: column;
            gap: 20px;
        }
        
        .fila-interna img { 
            height: auto;
            max-height: 250px; 
        }
    }
