

/* ===================================================
   1. FONDO GLOBAL Y BASE (Marca Biofont)
   =================================================== */

   body {
    font-family: 'Segoe UI', Arial;
    margin: 0;
    /* Fondo con el degradado circular corporativo */
    background: #d3f3dc radial-gradient(circle farthest-corner at 15% 15%, #ffffff 0%, #d3f3dc 100%);
    background-attachment: fixed; /* Mantiene el fondo fijo al hacer scroll */
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- HERO DE SUBVENCIONES --- */
.services-hero {
    background-color: transparent !important;
    padding: 80px 20px 20px;
    text-align: center;
}

.services-hero h1 {
    color: #1b4332;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.services-hero p {
    color: #555;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* ===================================================
   2. GRID DE TARJETAS
   =================================================== */
.services-grid-section {
    padding: 40px 20px;
    background-color: transparent !important;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en escritorio */
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.service-card {
    background: #fff;
    padding: 40px 30px;
    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.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(11, 206, 82, 0.15);
}

.service-card-icon {
    width: 80px;
    height: 80px;
    background: rgba(11, 206, 82, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
}

.service-card h2 {
    color: #1b4332;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* --- BOTONES --- */
.btn-small-outline {
    display: inline-block;
    width: fit-content;
    margin: 20px auto 0;
    padding: 12px 30px;
    font-size: 0.85rem;
    background-color: #0ea043;
    color: white;
    border-radius: 50px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s ease;
}

.btn-small-outline:hover {
    background-color: #1a4a31;
}

/* ===================================================
   3. ESTILO DEL DETALLE (LO QUE FALTABA)
   =================================================== */
.detalle-visualizador {
    background: white;
    margin: 40px auto;
    max-width: 1000px;
    border-radius: 25px;
    padding: 60px 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    position: relative;
    border: 1px solid #eef5f0;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.detalle-flex {
    display: flex;
    align-items: center;
    gap: 40px;
    justify-content: space-between;
}

.detalle-texto {
    flex: 1.2;
}

.detalle-texto h2 {
    margin-top: 0; 
    color: #1b4332;
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.detalle-texto p {
    color: #444;
    line-height: 1.7;
    margin-bottom: 15px;
}

.detalle-texto ul {
    list-style: none;
    padding: 0;
}

.detalle-texto ul li {
    padding-left: 25px;
    margin-bottom: 12px;
    position: relative;
    color: #333;
}

.detalle-texto ul li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: #0bce52;
    font-weight: bold;
}

.detalle-imagen {
    flex: 0.8;
    display: flex;
    align-items: center;
}

.detalle-imagen img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- BOTÓN CERRAR --- */
.cerrar-detalle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.cerrar-detalle:hover {
    background: #1b4332;
    color: white;
    
}

/* ===================================================
   4. AJUSTES MÓVIL
   =================================================== */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .detalle-texto {
        text-align: center; /* Centra los títulos y textos opcionalmente */
        display: flex;
        flex-direction: column;
        align-items: center; /* Esto fuerza a que todo el contenido se centre */
    }

    .detalle-texto ul {
        text-align: left; /* Mantiene la lista alineada a la izquierda para que se lea mejor */
        align-self: flex-start; /* Evita que la lista se centre si prefieres el check a la izquierda */
        width: 100%;
    }

    .detalle-texto .btn-small-outline {

        margin: 30px auto 0 !important; /* El 'auto' en los lados centra el botón horizontalmente */
        display: inline-block;

        

    }

    .btn-small-outline{
    display: inline-block; /* Importante para que respete márgenes */
    width: fit-content;
    margin: 20px auto 0;
    /* Achicamos el botón aquí */
    padding: 10px 20px;   /* Antes era 10-12px de alto, ahora 8px */
    font-size: 0.75rem;  /* Bajamos un pelín el tamaño de la letra */
    
    color: white;
    border-radius: 50px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px; /* Un poco de espacio entre letras lo hace más profesional */
    transition: all 0.3s ease;

    }

    .detalle-flex {
        flex-direction: column;
    }

   /* Usamos # para el ID y aplicamos a párrafos y elementos de lista */
    #descripcion-dinamica p, 
    #descripcion-dinamica li {
    font-family: 'Segoe UI', Arial;
    text-align: start;
    hyphens: auto; /* Esto ayuda a que las palabras largas se corten con guiones si es necesario, evitando huecos grandes */
}

    .detalle-visualizador {
        margin: 20px;
        padding: 40px 20px;
    }

    .detalle-imagen {
        order: -1; /* La imagen se pone arriba en móvil */
    }

    .services-hero {
        padding-top: 20px !important; /* Ajusta este valor si necesitas subirlo más */
        padding-bottom: 10px !important;
        margin-top: 0 !important;
    }

    .services-hero h1 {
        font-size: 1.8rem;
        margin-top: 0 !important; /* Elimina margen superior del h1 */
        margin-bottom: 10px !important; /* Espacio corto con el subtítulo */
    }

     /* Ajuste extra para el párrafo del Hero si lo tienes */
    .services-hero p {
        margin-bottom: 15px !important;
    }

    .services-grid-section-container {
        padding-top: 10px !important; /* Sube las tarjetas hacia el título */
        margin-top: 0 !important;
    }
}