/* terapia.css — estilos propios de terapia.html (extraidos de bloques <style> embebidos) */

/* CATALOG HEADER */
.catalog-header-text {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 0 15px;
    position: relative;
    z-index: 10;
}
.section-title-v2 {
    font-size: clamp(1.5rem, 2.5vw, 1.8rem);
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}
.section-title-v2 span {
    color: #f10075;
}
.section-subtitle-v2 {
    font-size: 0.95rem;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
}

/* CARD V2 */
.catalog-card-v2 {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative;
    border: none;
}
.catalog-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.card-image-wrap-v2 {
    position: relative;
    height: 265px;
    border-radius: 20px 20px 0 0;
}
.img-clipper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    z-index: 1;
}
.card-image-wrap-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* recorte anclado arriba: el título del flyer siempre visible */
    object-position: top center;
    transition: transform 0.5s ease;
}
.catalog-card-v2:hover .card-image-wrap-v2 img {
    transform: scale(1.05);
}

/* BADGE ON IMAGE */
.card-badge-v2 {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ffffff;
    padding: 4px 12px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.badge-ninos { color: #f10075; }
.badge-adolescentes { color: #0056b3; }
.badge-adultos { color: #8b5cf6; }
.badge-familia { color: #10b981; }

.badge-icon {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

/* COLOR BAR */
.card-color-bar {
    height: 4px;
    width: 100%;
    z-index: 2;
    position: relative;
}
.bar-ninos { background: #f10075; }
.bar-adolescentes { background: #0056b3; }
.bar-adultos { background: #8b5cf6; }
.bar-familia { background: #10b981; }

/* CIRCLE ICON OVER IMAGE */
.card-circle-icon {
    position: absolute;
    bottom: -22px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 3;
    border: 3px solid #ffffff; /* This creates the gap effect around the circle */
}
.icon-ninos { color: #f10075; }
.icon-adolescentes { color: #0056b3; }
.icon-adultos { color: #8b5cf6; }
.icon-familia { color: #10b981; }

.circle-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* BODY */
.card-body-v2 {
    padding: 20px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.therapy-badges-inline-v2 {
    margin-bottom: 8px;
}
.therapy-badge-v2 {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    display: inline-block;
}
.badge-type-ninos { background: #fff0f5; color: #f10075; }
.badge-type-adolescentes { background: #eff6ff; color: #0056b3; }
.badge-type-adultos { background: #f5f3ff; color: #8b5cf6; }
.badge-type-familia { background: #ecfdf5; color: #10b981; }

.card-body-v2 h4 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 12px;
    line-height: 1.3;
}

.therapy-meta-row-v2 {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 16px;
    overflow: hidden; /* Prevent wrap, ensure they stay on one line if possible */
}
.therapy-meta-item-v2 {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #4a5568;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 99px;
    white-space: nowrap;
}
.meta-icon {
    width: 12px;
    height: 12px;
    color: #718096;
}

.card-body-v2 p {
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* FOOTER */
.card-footer-v2 {
    margin: 0 20px 24px 20px;
    padding: 8px 8px 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 99px;
    background: #fff0f5; /* Default fallback */
}
.footer-ninos { background: #fff0f5; }
.footer-adolescentes { background: #eff6ff; }
.footer-adultos { background: #f5f3ff; }
.footer-familia { background: #ecfdf5; }

.btn-details-v2 {
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}
.btn-details-v2:hover { opacity: 0.8; }
.text-ninos { color: #f10075; }
.text-adolescentes { color: #0056b3; }
.text-adultos { color: #8b5cf6; }
.text-familia { color: #10b981; }

.btn-circle-action {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn-circle-action:hover {
    transform: translateX(3px);
    opacity: 0.9;
}
.btn-circle-action svg {
    width: 18px;
    height: 18px;
}
.btn-ninos { background: #f10075; }
.btn-adolescentes { background: #0056b3; }
.btn-adultos { background: #8b5cf6; }
.btn-familia { background: #10b981; }

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Fix for tab filtering: ensure inactive tabs are hidden */
.tab-panel:not(.active) {
    display: none !important;
}

/* Tabs update */
.therapy-tabs-wrapper {
    margin-bottom: 2rem !important; /* Overwrite existing */
}

        /* Modern Therapy Tabs */
        .therapy-tabs-wrapper {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            margin: -6.5rem auto 3.5rem auto;
            flex-wrap: wrap;
            padding: 10px 14px;
            position: relative;
            z-index: 20;
            background-color: rgba(255, 255, 255, 0.65);
            backdrop-filter: blur(16px) saturate(180%);
            -webkit-backdrop-filter: blur(16px) saturate(180%);
            border: 1px solid rgba(255, 255, 255, 0.8);
            border-radius: 100px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
            width: fit-content;
        }

        .catalog-section {
            background-image: none !important;
            background-color: #ffffff !important;
            position: relative;
            z-index: 50;
        }

        /* Ambient Glowing Background Orbs */
        .ambient-orbs {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 0;
        }

        .ambient-orbs .orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(90px);
            opacity: 0.12;
            animation: float-orbs 20s infinite ease-in-out alternate;
        }

        .orb-pink {
            background-color: #f10075;
            width: 450px;
            height: 450px;
            top: -5%;
            left: -10%;
        }

        .orb-blue {
            background-color: #004fb0;
            width: 550px;
            height: 550px;
            bottom: 10%;
            right: -10%;
            animation-delay: -7s !important;
        }

        @keyframes float-orbs {
            0% { transform: translate(0, 0) scale(1); }
            50% { transform: translate(80px, 40px) scale(1.15); }
            100% { transform: translate(-40px, 80px) scale(0.9); }
        }

        /* Minimalist Floating Particles */
        .particle {
            position: absolute;
            background-color: #004fb0;
            border-radius: 50%;
            opacity: 0.15;
            animation: float-particle 15s infinite ease-in-out;
        }

        .p-1 { width: 6px; height: 6px; top: 15%; left: 10%; animation-duration: 24s; }
        .p-2 { width: 12px; height: 12px; top: 60%; left: 5%; opacity: 0.08; animation-duration: 35s; background-color: #f10075;}
        .p-3 { width: 8px; height: 8px; top: 80%; left: 88%; animation-duration: 20s; }
        .p-4 { width: 4px; height: 4px; top: 25%; left: 82%; opacity: 0.2; animation-duration: 18s; background-color: #f10075;}
        .p-5 { width: 10px; height: 10px; top: 40%; left: 50%; opacity: 0.1; animation-duration: 30s; }
        .p-6 { width: 5px; height: 5px; top: 5%; left: 65%; opacity: 0.15; animation-duration: 22s; }
        .p-7 { width: 7px; height: 7px; top: 85%; left: 20%; opacity: 0.12; animation-duration: 28s; background-color: #f10075;}
        .p-8 { width: 9px; height: 9px; top: 55%; left: 95%; opacity: 0.09; animation-duration: 32s; }

        @keyframes float-particle {
            0% { transform: translateY(0) translateX(0); }
            33% { transform: translateY(-40px) translateX(25px); }
            66% { transform: translateY(20px) translateX(-20px); }
            100% { transform: translateY(0) translateX(0); }
        }

        .catalog-section .container {
            position: relative;
            z-index: 10;
        }

        .therapy-tab {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 8px 20px 8px 10px;
            background-color: transparent;
            border-radius: 9999px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 700;
            color: #1a202c;
            font-size: 0.95rem;
        }

        .therapy-tab:hover {
            background-color: #f8f9fa;
        }

        .therapy-tab.active {
            background-color: #fff0f5; /* Light pink background */
            border-color: #ffe0eb;
            color: #f10075;
        }

        .therapy-tab .icon-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.3s ease;
        }

        .therapy-tab.active .icon-circle {
            background-color: transparent !important;
            color: #f10075 !important;
        }

        .therapy-tab svg {
            width: 22px;
            height: 22px;
            stroke-width: 2;
        }
        /* Override global navbar colors for this light page */
        header:not(.scrolled) .nav-links li a,
        header:not(.scrolled) .nav-links-center li a,
        .nav-links li a,
        .nav-links-center li a {
            color: #f10075 !important;
        }
        
        header:not(.scrolled) .hamburger span {
            background-color: #f10075 !important;
        }

        .hero-v2 {
            background-color: #F8F9F5;
            background-image: url('images/terapia-dash/image-dashboard.webp');
            background-size: cover;
            background-position: right center;
            background-repeat: no-repeat;
            position: relative;
            overflow: hidden;
            padding: 10rem 2rem 1rem; /* Reducido al mínimo */
            color: var(--text-dark, #333333);
            font-family: 'Poppins', sans-serif;
        }

        /* Velo translúcido a la izquierda para dar legibilidad al texto,
           se desvanece hacia la derecha para no tapar la imagen */
        .hero-v2::before {
            content: '';
            position: absolute;
            inset: 0;
            z-index: 2;
            pointer-events: none;
            background: linear-gradient(100deg,
                rgba(248, 249, 245, 0.96) 0%,
                rgba(248, 249, 245, 0.88) 26%,
                rgba(248, 249, 245, 0.55) 46%,
                rgba(248, 249, 245, 0) 64%);
        }
        
        /* Decorative Background Elements */
        .hero-v2-bg-circle {
            position: absolute;
            bottom: -10%;
            left: 30%;
            width: 450px;
            height: 450px;
            border-radius: 50%;
            background-color: rgba(241, 0, 117, 0.06); /* primary-pink extra tenue */
            z-index: 1;
        }

        .hero-v2-bg-lines {
            position: absolute;
            top: 15%;
            right: 40%;
            width: 300px;
            height: 400px;
            background-image: url('data:image/svg+xml;utf8,<svg width="300" height="400" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M50 10 Q 70 30 50 90 M50 90 Q 30 70 50 10" stroke="%23004fb0" stroke-width="0.5" opacity="0.15"/></svg>');
            background-repeat: no-repeat;
            z-index: 1;
            display: none; /* Hidden since dashboard.jpg is the overall background */
        }

        .hero-v2-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 4rem;
            position: relative;
            z-index: 10;
        }

        .hero-v2-content {
            flex: 1;
            max-width: 580px;
        }

        .hero-v2-eyebrow {
            font-size: 0.8rem;
            font-weight: 700;
            letter-spacing: 0.15em;
            color: var(--primary-blue, #004fb0);
            text-transform: uppercase;
            margin-bottom: 1.5rem;
            display: block;
        }

        .hero-v2-title {
            font-size: clamp(2.8rem, 5vw, 4.2rem);
            line-height: 1.1;
            color: var(--text-dark, #333333);
            margin-bottom: 1.5rem;
            font-weight: 700;
        }

        .hero-v2-title-highlight {
            color: var(--primary-pink, #f10075);
            font-family: 'Fraunces', serif;
            font-style: italic;
            font-weight: 500;
            display: inline-block;
        }

        .hero-v2-desc {
            font-size: 1.15rem;
            line-height: 1.6;
            color: #4a4a4a;
            max-width: 480px;
            margin-bottom: 2.5rem;
        }

        .hero-v2-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            background-color: var(--primary-pink, #f10075);
            color: white;
            padding: 1rem 2rem;
            border-radius: 9999px;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            box-shadow: 0 4px 15px rgba(241, 0, 117, 0.2);
            font-size: 1.05rem;
        }
        
        .hero-v2-btn:hover {
            transform: translateY(-3px);
            background-color: #d10065;
            box-shadow: 0 5px 20px rgba(241, 0, 117, 0.3);
            color: white;
        }

        .hero-v2-trust {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-top: 1.5rem;
            font-size: 0.85rem;
            color: var(--text-light, #666666);
            font-weight: 500;
        }

        .hero-v2-trust svg {
            width: 18px;
            height: 18px;
            color: var(--primary-pink, #f10075);
        }

        .hero-v2-image-wrapper {
            flex: 1;
            position: relative;
            display: flex;
            justify-content: flex-end;
            align-items: flex-end;
            min-height: 550px;
        }

        .hero-v2-image {
            width: 100%;
            max-width: 500px;
            height: 550px;
            /* Se eliminó la imagen de aquí para usarla de fondo en .hero-v2 */
            position: relative;
            z-index: 2;
        }

        .hero-v2-wave {
            position: absolute;
            bottom: -1px;
            left: 0;
            width: 100%;
            height: auto;
            z-index: 10;
            pointer-events: none;   /* decorativa: no debe robar clics al botón "Agendar mi consulta" */
        }

        @media (max-width: 991px) {
            .hero-v2 {
                padding: 7.5rem 1.5rem 4.5rem;
                text-align: center;
                /* En móvil la foto vive en su propia tarjeta, no de fondo */
                background-image: none;
            }
            .hero-v2::before {
                background: none;
            }
            /* El círculo rosa asoma detrás de la tarjeta de la foto */
            .hero-v2-bg-circle {
                left: auto;
                right: -70px;
                transform: none;
                bottom: 60px;
                width: 260px;
                height: 260px;
                background-color: rgba(241, 0, 117, 0.09);
            }
            .hero-v2-container {
                flex-direction: column;
                gap: 2.5rem;
            }
            .hero-v2-content {
                max-width: 100%;
                display: flex;
                flex-direction: column;
                align-items: center;
            }
            .hero-v2-desc {
                margin-left: auto;
                margin-right: auto;
            }
            .hero-v2-image-wrapper {
                justify-content: center;
                width: 100%;
                min-height: 0;
            }
            /* Tarjeta de foto: encuadre sobre la psicóloga, esquinas
               redondeadas y sombra suave con el azul de marca */
            .hero-v2-image {
                width: 100%;
                max-width: 560px;
                height: 340px;
                background-image: url('images/terapia-dash/dashboard2.webp');
                background-size: cover;
                background-position: 62% 20%;
                background-repeat: no-repeat;
                border-radius: 26px;
                box-shadow:
                    0 24px 48px rgba(0, 47, 112, 0.16),
                    0 6px 14px rgba(0, 47, 112, 0.08);
                border: 4px solid #ffffff;
            }
            /* Chip glassmórfico con los valores de marca */
            .hero-v2-image::after {
                content: 'Escucha · Empatía · Bienestar';
                position: absolute;
                bottom: 16px;
                left: 50%;
                transform: translateX(-50%);
                background: rgba(255, 255, 255, 0.85);
                -webkit-backdrop-filter: blur(8px);
                backdrop-filter: blur(8px);
                padding: 9px 18px;
                border-radius: 9999px;
                font-size: 0.82rem;
                font-weight: 600;
                letter-spacing: 0.03em;
                color: var(--primary-blue, #004fb0);
                white-space: nowrap;
                box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
            }
            /* Tabs en cuadrícula 2×2, sin solaparse con la tarjeta de foto */
            .therapy-tabs-wrapper {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 0.6rem;
                margin: 1.5rem auto 2rem auto;
                width: 100%;
                max-width: 560px;
                border-radius: 24px;
                padding: 12px;
            }
            .therapy-tab {
                justify-content: flex-start;
                padding: 8px 10px 8px 8px;
                font-size: 0.85rem;
                gap: 9px;
                line-height: 1.2;
                text-align: left;
            }
            .therapy-tab .icon-circle {
                width: 36px;
                height: 36px;
            }
        }

        @media (max-width: 480px) {
            .hero-v2 {
                padding: 7rem 1.25rem 4rem;
            }
            .hero-v2-title {
                font-size: clamp(2.2rem, 9vw, 2.8rem);
            }
            .hero-v2-desc {
                font-size: 1.02rem;
            }
            .hero-v2-image {
                height: 280px;
                border-radius: 22px;
            }
            .hero-v2-image::after {
                font-size: 0.74rem;
                padding: 8px 14px;
            }
        }

/* ── Modal del flyer más grande ──
   shared.css lo limita a 500px y los datos del flyer (horarios,
   contactos) quedaban ilegibles; este override solo aplica en terapia */
.modal-content-wrapper {
    max-width: min(92vw, 780px);
}
.modal-body img {
    max-height: 84vh;
}
