/* ==========================================================
   CENTRO PSICOLÓGICO CLARIDAD
   PÁGINA PRINCIPAL - INDEX

   Este archivo contiene únicamente estilos exclusivos
   de la página principal:

   - Botón de video / presentación
   - Hero
   - Características
   - Sobre nosotros
   - Servicios
   - CTA de agenda
   - Responsividad exclusiva del index

   Los estilos generales, header, footer, botones base,
   contenedores y utilidades se encuentran en global.css.
   ========================================================== */


/* ==========================================================
   1. BOTÓN DE VIDEO / PRESENTACIÓN
   ========================================================== */

/*
    Este botón actualmente dirige a "Sobre nosotros".

    En el futuro podrá utilizarse para abrir un video
    institucional, por ejemplo mediante un modal.
*/
.btn-video {
    padding: 11px 20px;

    color: var(--primary-dark);

    background-color: var(--white);

    border: 1px solid rgba(15, 42, 58, 0.18);

    box-shadow:
        0 6px 18px rgba(15, 42, 58, 0.12);
}


/* Icono circular de reproducción */
.play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 30px;
    height: 30px;

    padding-left: 2px;

    border-radius: 50%;

    font-size: 0.72rem;
    line-height: 1;

    color: var(--white);

    background-color: var(--accent-mint);
}


/* Hover específico.
   Se utiliza mayor especificidad para prevalecer
   sobre el hover general de .btn.
*/
.btn.btn-video:hover {
    opacity: 1;

    transform: translateY(-2px);

    border-color: rgba(0, 168, 143, 0.45);

    box-shadow:
        0 9px 24px rgba(15, 42, 58, 0.18);
}


/* ==========================================================
   2. HERO
   ========================================================== */

.hero {
    padding: clamp(56px, 7vw, 80px) 0;

    background:
        radial-gradient(
            circle at 80% 20%,
            var(--accent-mint-light) 0%,
            transparent 50%
        );
}


.hero-grid {
    display: grid;

    grid-template-columns: 1.1fr 0.9fr;

    align-items: center;

    gap: clamp(32px, 4vw, 50px);
}


/* ----------------------------------------------------------
   CONTENIDO
   ---------------------------------------------------------- */

.hero-content h1 {
    margin-bottom: 24px;

    /*
        El tamaño se adapta fluidamente entre
        laptops y pantallas grandes.
    */
    font-size: clamp(2.3rem, 4.5vw, 3.5rem);

    line-height: 1.15;

    color: var(--primary-dark);
}


.hero-content p {
    max-width: 500px;

    margin-bottom: 35px;

    font-size: clamp(1rem, 1.5vw, 1.1rem);

    color: var(--text-muted);
}


/* ----------------------------------------------------------
   ACCIONES DEL HERO
   ---------------------------------------------------------- */

.hero-cta {
    display: flex;
    align-items: center;

    /*
        Evita que los botones provoquen desbordamiento
        si el espacio horizontal disminuye.
    */
    flex-wrap: wrap;

    gap: 20px;
}


/* ----------------------------------------------------------
   IMAGEN PRINCIPAL
   ---------------------------------------------------------- */

.main-hero-img {
    width: 100%;

    height: clamp(360px, 42vw, 480px);

    border-radius:
        45% 55% 40% 60% /
        45% 45% 55% 55%;
}


/* ==========================================================
   3. CARACTERÍSTICAS
   ========================================================== */

.features {
    position: relative;

    z-index: 10;

    margin-top: -40px;

    padding: 40px 0;
}


/*
    Existen exactamente cuatro tarjetas en el index.

    Utilizamos cuatro columnas explícitas en escritorio
    para evitar distribuciones irregulares tipo 3 + 1.
*/
.features-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;
}


.feature-card {
    height: 100%;

    padding: 30px 24px;

    border-radius: 20px;

    background-color: var(--white);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.02);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.feature-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 14px 32px rgba(15, 42, 58, 0.06);
}


.feature-icon {
    margin-bottom: 15px;

    font-size: 1.6rem;

    line-height: 1;
}


.feature-card h3 {
    margin-bottom: 10px;

    font-size: 1.1rem;

    line-height: 1.3;

    color: var(--primary-dark);
}


.feature-card p {
    font-size: 0.85rem;

    line-height: 1.5;

    color: var(--text-muted);
}


/* ==========================================================
   4. SOBRE NOSOTROS
   ========================================================== */

.about {
    padding: 80px 0;
}


.about-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    align-items: center;

    gap: clamp(40px, 5vw, 60px);
}


/* ----------------------------------------------------------
   IMAGEN
   ---------------------------------------------------------- */

.about-img {
    width: 100%;

    height: clamp(380px, 42vw, 480px);

    border-radius: 30px;
}


/* ----------------------------------------------------------
   CONTENIDO
   ---------------------------------------------------------- */

.about-content h2 {
    margin-bottom: 20px;

    font-size: clamp(2rem, 3.5vw, 2.5rem);

    line-height: 1.2;

    color: var(--primary-dark);
}


.section-desc {
    margin-bottom: 35px;

    font-size: 1.05rem;

    color: var(--text-muted);
}


/* ----------------------------------------------------------
   LISTA
   ---------------------------------------------------------- */

.about-list {
    display: flex;
    flex-direction: column;

    gap: 25px;
}


.about-item {
    display: flex;

    align-items: flex-start;

    gap: 20px;
}


/*
    Tamaño fijo para que todos los círculos mantengan
    exactamente las mismas dimensiones independientemente
    del emoji que contienen.
*/
.item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 42px;
    height: 42px;

    border-radius: 50%;

    font-size: 1.15rem;

    line-height: 1;

    color: var(--accent-mint);

    background-color: var(--accent-mint-light);
}


.about-item h4 {
    margin-bottom: 4px;

    font-size: 1.1rem;

    line-height: 1.3;

    color: var(--primary-dark);
}


.about-item p {
    font-size: 0.9rem;

    color: var(--text-muted);
}


/* ==========================================================
   5. SERVICIOS
   ========================================================== */

.services {
    padding: 80px 0;
}


/*
    En escritorio existen cinco servicios destacados,
    por lo que mantenemos cinco columnas equilibradas.
*/
.services-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 20px;
}


.service-card {
    height: 100%;

    padding: 35px 20px;

    border-radius: 24px;

    text-align: center;

    background-color: var(--white);

    box-shadow:
        0 4px 25px rgba(0, 0, 0, 0.01);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.service-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 12px 30px rgba(15, 42, 58, 0.06);
}


.service-icon {
    font-size: 1.8rem;

    line-height: 1;
}


.service-card h3 {
    margin-top: 15px;
    margin-bottom: 12px;

    font-size: 1.1rem;

    line-height: 1.3;

    color: var(--primary-dark);
}


.service-card p {
    font-size: 0.85rem;

    line-height: 1.5;

    color: var(--text-muted);
}


/* ==========================================================
   6. CTA - AGENDA TU CITA
   ========================================================== */

.cta-banner {
    /*
        El ancho deja margen lateral incluso en pantallas
        menores a 1150px.
    */
    width: min(
        1150px,
        calc(100% - 48px)
    );

    margin: 40px auto;

    padding: 45px 50px;

    border-radius: 24px;

    color: var(--white);

    background-color: var(--primary-dark);
}


.cta-flex {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


.cta-text-group {
    display: flex;

    align-items: center;

    flex: 1;

    min-width: 0;

    gap: 25px;
}


.cta-logo-brain {
    flex-shrink: 0;

    font-size: 3rem;

    line-height: 1;
}


.cta-text-group h2 {
    font-size: 1.8rem;

    line-height: 1.3;

    font-weight: 600;
}


.cta-text-group p {
    margin-top: 4px;

    color: #94a3b8;
}


/*
    Evita que el botón se comprima cuando el texto
    del CTA ocupa más espacio.
*/
.cta-flex > .btn {
    flex-shrink: 0;
}


/* ==========================================================
   7. RESPONSIVIDAD DEL INDEX
   ========================================================== */


/* ----------------------------------------------------------
   TABLETS / LAPTOPS PEQUEÑAS
   ---------------------------------------------------------- */

@media (max-width: 1024px) {

    /* ----------------------------------------------
       Características
       4 tarjetas → 2 x 2
       ---------------------------------------------- */

    .features-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    /* ----------------------------------------------
       Sobre nosotros
       ---------------------------------------------- */

    .about-grid {
        gap: 40px;
    }


    /* ----------------------------------------------
       Servicios
       5 tarjetas → 2 + 2 + 1 centrada
       ---------------------------------------------- */

    .services-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .service-card:last-child {
        grid-column: 1 / -1;

        justify-self: center;

        width: calc(50% - 10px);
    }

}


/* ----------------------------------------------------------
   CELULARES / TABLETS VERTICALES
   ---------------------------------------------------------- */

@media (max-width: 768px) {

    /* ======================================================
       HERO
       ====================================================== */

    .hero {
        padding: 56px 0;
    }


    .hero-grid {
        grid-template-columns: 1fr;

        gap: 40px;

        text-align: center;
    }


    .hero-content h1 {
        font-size: 2.3rem;
    }


    .hero-content p {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 30px;
    }


    .hero-cta {
        flex-direction: column;

        align-items: stretch;

        justify-content: center;
    }


    .hero-cta .btn {
        width: 100%;
    }


    /*
        En móvil mostramos primero la imagen
        y después el contenido textual.
    */
    .hero-image {
        order: -1;
    }


    .main-hero-img {
        height: 340px;
    }


    /* ======================================================
       CARACTERÍSTICAS
       ====================================================== */

    .features {
        margin-top: -20px;

        padding: 35px 0;
    }


    .features-grid {
        grid-template-columns: 1fr;
    }


    /* ======================================================
       SOBRE NOSOTROS
       ====================================================== */

    .about {
        padding: 64px 0;
    }


    .about-grid {
        grid-template-columns: 1fr;

        gap: 40px;

        text-align: center;
    }


    .about-img {
        height: 340px;
    }


    /*
        La lista conserva alineación izquierda
        para facilitar la lectura.
    */
    .about-item {
        text-align: left;
    }


    /* ======================================================
       SERVICIOS
       ====================================================== */

    .services {
        padding: 64px 0;
    }


    .services-grid {
        grid-template-columns: 1fr;
    }


    /*
        Se deshace el comportamiento especial
        de la quinta tarjeta utilizado en tablet.
    */
    .service-card:last-child {
        grid-column: auto;

        justify-self: stretch;

        width: 100%;
    }


    /* ======================================================
       CTA
       ====================================================== */

    .cta-banner {
        width: calc(100% - 32px);

        margin: 20px auto;

        padding: 32px 24px;
    }


    .cta-flex {
        flex-direction: column;

        align-items: stretch;

        gap: 24px;
    }


    .cta-text-group {
        flex-direction: column;

        text-align: center;

        gap: 15px;
    }


    .cta-logo-brain {
        font-size: 2.7rem;
    }


    .cta-text-group h2 {
        font-size: 1.5rem;

        line-height: 1.3;
    }


    .cta-flex > .btn {
        width: 100%;
    }

}


/* ----------------------------------------------------------
   CELULARES PEQUEÑOS
   ---------------------------------------------------------- */

@media (max-width: 480px) {

    /* HERO */

    .hero {
        padding-top: 45px;
        padding-bottom: 50px;
    }


    .hero-content h1 {
        font-size: 2rem;
    }


    .main-hero-img {
        height: 260px;
    }


    /* SOBRE NOSOTROS */

    .about-img {
        height: 260px;
    }


    .about-content h2 {
        font-size: 1.9rem;
    }


    .section-desc {
        font-size: 1rem;
    }


    /* CARDS */

    .feature-card,
    .service-card {
        padding-left: 20px;
        padding-right: 20px;
    }


    /* CTA */

    .cta-banner {
        padding: 28px 20px;
    }


    .cta-text-group h2 {
        font-size: 1.35rem;
    }

}