/* ======= General ======= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    scroll-behavior: smooth;
}

body {
    color: #2c3e50;
    background-color: #f9fafb;
}

/* ======= General ======= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    scroll-behavior: smooth;
}

body {
    color: #2c3e50;
    background-color: #aaffc8;
}

/* ======= Encabezado ======= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ccf5cd;
    padding: 0.8rem 2rem;
    gap: 1rem;
}

.logo {
    height: 70px;
}

/* ======= Menú ======= */
.navbar {
    background-color: #2e7d32;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #c8e6c9;
    transform: scale(1.1);
}


/* ===== Botones extra ===== */
.nav-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Volver */
.btn-volver {
    background-color: #f7fafc;
    color: #2d3748;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s ease;
    border: 1px solid #cbd5e0;
}

.btn-volver:hover {
    background-color: #e2e8f0;
}

/* WhatsApp */
.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #1aa94f;
}

.acciones-servicio {
    display: flex;
    gap: 12px;
}

.btn-volver,
.btn-cita {
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: .3s;
}

.btn-volver {
    background: #dcedc8;
    color: #2e7d32;
}

.btn-cita {
    background: #2e7d32;
    color: white;
}

.btn-volver:hover {
    background: #c5e1a5;
}

.btn-cita:hover {
    background: #27632a;
}

@media (max-width: 768px) {

    /* Navbar en columna */
    .navbar {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 12px 10px;
    }

    /* ===== LINKS EN UNA SOLA FILA ===== */
    .nav-links {
        display: flex;
        flex-direction: row;        /* 👈 CLAVE */
        flex-wrap: nowrap;          /* 👈 NO permitir salto */
        overflow-x: auto;           /* 👈 Scroll horizontal */
        width: 100%;
        justify-content: flex-start;
        gap: 18px;
        padding: 6px 10px;
    }

    .nav-links li {
        flex: 0 0 auto;             /* 👈 evita que se aplasten */
    }

    .nav-links a {
        font-size: 0.9rem;
        white-space: nowrap;        /* 👈 evita saltos de línea */
    }

    /* Ocultar scrollbar feo en móvil */
    .nav-links::-webkit-scrollbar {
        display: none;
    }

    /* ===== BOTONES ABAJO ===== */
    .nav-buttons {
        display: flex;
        justify-content: center;
        gap: 14px;
        width: 100%;
    }

    .btn-volver,
    .btn-cita {
        min-width: 150px;
        padding: 10px 18px;
        font-size: 0.95rem;
        text-align: center;
        border-radius: 12px;
    }

    /* Hamburguesa fuera (no se usa aquí) */
    .menu-toggle {
        display: none;
    }
}

/* ======= RESET ======= */
* {margin: 0; padding: 0; box-sizing: border-box; font-family: "Arial", sans-serif;}

/* ======= HEADER ======= */
header {
    width: 100%;
    position: fixed;
    top: 0;
    background: #238026;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.15);
    z-index: 9999;
}

.top-bar {
    display: flex;
    align-items: center;
    padding: 10px 20px;
}

.logo {
    height: 60px;
    margin-right: 12px;
}

.titulo h1 { font-size: 20px; margin-bottom: 2px; }
.titulo p { font-size: 13px; color: var(--gris-texto); }

.navbar { background: var(--verde); display: flex; justify-content: center; }
.nav-links { list-style: none; display: flex; gap: 20px; padding: 12px; }

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: .3s;
}
.nav-links a:hover { text-decoration: underline; }

.btn-cita { background: #25D366; padding: 7px 12px; border-radius: 6px; }

.volver { background: var(--verde-oscuro); padding: 7px 12px; border-radius: 6px; }

/* HAMBURGUESA */
.hamburger {
    margin-left: auto;
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}
.hamburger span {
    width: 25px; height: 3px; background: var(--verde-oscuro);
}

/* HERO */
.hero { margin-top: 140px; text-align: center; background: var(--fondo-suave); padding: 30px 15px; }
.hero-img { width: 100%; max-width: 600px; border-radius: 10px; }
.hero-text h1 { margin-top: 18px; color: var(--verde-oscuro); }

/* Compensa el header fijo */
main {
    padding-top: 140px;
}

/* SECCIONES */
.section { padding: 45px 15px; max-width: 900px; margin: auto; }
.section h2 { color: var(--verde-oscuro); margin-bottom: 15px; }

ul, ol { margin-left: 25px; }

/* BOTONES FINALES */
.buttons { text-align: center; }
.btn { background: var(--verde); padding: 12px 20px; border-radius: 6px; color: white; text-decoration: none; margin-right: 10px; }
.secondary { background: var(--verde-oscuro); }

/* FOOTER */
.footer { background: var(--verde); text-align: center; padding: 18px; color: white; margin-top: 40px; }

/*SECCION: ¿CÓMO FUNCIONA? */
.funciona {
    padding: 2rem;
}

.funciona-contenedor {
    display: flex;
    background-color: #dffae1;
    padding: 4rem 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.funciona-img img {
    width: 100%;
    max-width: 750px;
    border-radius: 16px;
    box-shadow: 0px 6px 18px rgba(0,0,0,0.15);
}

.funciona-info h2 {
    font-size: 2rem;
    color: #1b5e20;
    margin-bottom: 1.5rem;
}

.acordeon {
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.acordeon-titulo {
    width: 100%;
    background: #bcf3fd;
    border: none;
    padding: 1rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #1b5e20;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acordeon-contenido {
    max-height: 0;
    overflow: hidden;
    padding: 0 1rem;
    transition: max-height 0.35s ease;
}

.acordeon-contenido.activo {
    max-height: 800px;
    padding: 1rem;
}

.flecha {
    transition: transform 0.3s ease;
}

.flecha.rotar {
    transform: rotate(180deg);
}

.funciona-info ul {
    padding-left: 1.2rem;
}

.funciona-info li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.funciona-contenedor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    flex-wrap: nowrap; /* evita que se vayan abajo */
}

/* Ajustamos proporciones 50/50 */
.funciona-img,
.funciona-info {
    flex: 1;
    min-width: 35%;
}

/* ===============================
   📱 MOBILE – ¿CÓMO FUNCIONA?
   =============================== */
@media (max-width: 768px) {

    .funciona-contenedor {
        display: flex;
        flex-direction: column;   /* Imagen arriba, texto abajo */
        padding: 2.5rem 1.5rem;
        gap: 2rem;
        text-align: center;
        margin-top: 0; /* elimina espacio extra */
    }

    .funciona-info h2 {
        order: -2;               /* título primero */
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .funciona-img {
        order: -1; 
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .funciona-img img {
        max-width: 320px;
        width: 100%;
        margin: 0 auto;
    }

    .funciona-info {
        order: 1; 
        width: 100%;
        text-align: left; /* texto más legible */
    }

    .acordeon-titulo {
        font-size: 0.95rem;
        padding: 0.9rem 1rem;
    }
}

/* ===== BENEFICIOS ===== */
.beneficios-seccion {
    padding: 4rem 2rem;
    text-align: center;
    background-color: #e8f5e9; /* Verde pastel suave */
}

.titulo-beneficios {
    font-size: 2rem;
    color: #1b5e20;
    margin-bottom: 3rem;
}

/* Contenedor en dos columnas */
.beneficios-contenedor {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.beneficio-col {
    width: 450px;
    text-align: center;
}

/* Imagen */
.beneficio-img {
    width: 100%;
    height: 350px;
    background-color: #c8e6c9; /* Solo como referencia */
    border-radius: 12px;
    margin-bottom: 1.2rem;
    overflow: hidden;
}

.beneficio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Botón desplegable */
.accordion {
    width: 100%;
    background-color: #2e7d32;
    color: white;
    font-size: 1rem;
    padding: 0.9rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    margin-top: 0.5rem;
    transition: background 0.3s ease;
}

.accordion:hover {
    background-color: #1b5e20;
}

/* Contenido desplegable */
.panel {
    margin-top: 0.8rem;
    padding: 0 1rem;
    display: none;
    text-align: left;
}

.panel ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.panel li {
    margin-bottom: 0.5rem;
    color: #1c3e1d;
}

/* ===============================
   📱 MOBILE – BENEFICIOS
   =============================== */
@media (max-width: 768px) {

    .beneficios-seccion {
        padding: 3rem 1.2rem;
    }

    .beneficios-contenedor {
        flex-direction: column;
        gap: 2.5rem;
    }

    .beneficio-col {
        width: 100%;          /* ❗ quita ancho fijo */
        max-width: 100%;
    }

    .beneficio-img {
        height: auto;         /* ❗ deja que crezca */
        aspect-ratio: 4 / 3;  /* mantiene proporción */
    }

    .beneficio-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .accordion {
        font-size: 0.95rem;
        padding: 0.85rem;
    }

    .panel {
        font-size: 0.95rem;
    }
}

/* ======= PROCEDIMIENTO EN TARJETAS ======= */
.procedimiento-cards {
    background: #abfdb1; /* verde pastel suave */
    padding: 4rem 2rem;
    text-align: center;
}

.procedimiento-cards h2 {
    color: #1b5e20;
    font-size: 2rem;
    margin-bottom: 3rem;
    font-weight: 750;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 2rem;
    max-width: 1500px;
    margin: 0 auto;
}

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 2rem;
    border-left: 6px solid #2e7d32;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0px 6px 18px rgba(0,0,0,0.15);
}

.card h3 {
    color: #1b5e20;
    margin-bottom: 1.4rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.card ul {
    list-style: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.card li {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ======= ESPECIALISTAS ======= */
.especialistas-section {
    padding: 4rem 2rem;
    text-align: center;
    background-color: #ffffff;
}

.especialistas-section h2 {
    color: #1b5e20;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.especialistas-subtitle {
    color: #4f6f52;
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

.especialistas-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.especialista-card {
    background: #f3f9f4;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-width: 280px;
    text-align: center;
    transition: transform 0.3s ease;
}

.especialista-card:hover {
    transform: translateY(-6px);
}

.especialista-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid #2e7d32;
}

.especialista-card h3 {
    color: #1b5e20;
    margin-bottom: 0.3rem;
}

.especialidad {
    color: #2e7d32;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.descripcion {
    color: #4f6f52;
    font-size: 0.95rem;
}

/* ======= FAQ ======= */
.faq-section {
    padding: 60px 20px;
    background: #f2f8f4; /* tono cálido */
    text-align: center;
}

.faq-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #0a4d2a;
    font-weight: 750;
}

.faq-container {
    max-width: 700px;
    margin: auto;
}

/* Botones del acordeón */
#faq .faq-accordion {
    width: 100%;
    background: #bee0b9;
    border: none;
    padding: 18px 20px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    margin-bottom: 8px;
    transition: background .3s;
}

#faq .faq-accordion:hover {
    background: #faf4ef;
}

/* Panel */
#faq .faq-panel {
    background: #ffffff;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .3s;
    border-radius: 0 0 8px 8px;
    padding: 0 20px;
    margin-bottom: 12px;
}

/* Cuando se abre */
#faq .faq-panel.open {
    max-height: 500px;
    padding: 75px 20px;
    border-left: 3px solid #d4a373;
}

#faq .faq-panel p {
    margin: 0;
    color: #5b5b5b;
    line-height: 1.5;
}

/* CONTACTO */
#contacto {
    background: #325d3d;
    padding: 80px 20px;
    text-align: center;
}

#contacto h2 {
    font-size: 2.3rem;
    color: #fff;
    margin-bottom: 10px;
}

.contacto-desc {
    color: #fff;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

.contacto-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
}

.contact-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.07);
    padding: 25px;
    width: 290px;
    text-align: center;
    transition: transform .3s;
}

.contact-card:hover {
    transform: translateY(-4px);
}

.contact-card img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    margin-bottom: 15px;
}

.contact-card h3 {
    color: #325d3d;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.contact-card p {
    color: #666;
    font-size: .95rem;
    margin-bottom: 15px;
}

.btn-contacto {
    display: inline-block;
    padding: 10px 18px;
    background: #5dfe7e;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: background .3s;
}

.btn-contacto:hover {
    background: #5e8d6a;
}

/* FOOTER */
.main-footer {
    background: #325d3d;
    color: #ffffff;
    text-align: center;
    padding: 18px 10px;
    margin-top: 40px;
}

.main-footer .copy {
    font-size: .85rem;
    opacity: .8;
}

/* Tarjeta del logo */
.contact-logo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 35px;
}

/* Tamaño del logo (más grande) */
.logo-contacto {
    width: 230px;      /* <-- aquí aumenté tamaño */
    height: auto;
    margin-bottom: 28px;
    opacity: 1;
}

/* Líneas de contacto */
.contact-info-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-size: 1.1rem;
    color: #1b5e20;
    font-weight: 500;
    text-decoration: none;     /* quita subrayado */
    transition: transform .2s ease, color .3s ease;
}

/* Interacción suave */
.contact-info-line:hover {
    transform: scale(1.05);
    color: #2e7d32;
}

/* Emojis un poco más grandes */
.contact-info-line span {
    font-size: 1.4rem;
}

html {
  scroll-behavior: smooth;
}

/* --- Tarjetas del footer/contacto --- */
.contact-card {
    padding: 20px;
    text-align: center;
}

.contact-card a {
    word-break: break-word; /* Evita que se salga del contenedor */
}

/* --- Títulos más equilibrados en pantallas pequeñas --- */
h1, h2 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
}
p {
    font-size: clamp(0.95rem, 2.6vw, 1.1rem);
}
