/* ============================================================
   PRO HABITS — css/styles.css  (versión completa + additions)
   Paleta principal
   --ph-lime:       #84CC16
   --ph-lime-light: #A3E635
   --ph-lime-dark:  #65A30D
   --ph-dark:       #111111
   --ph-dark-2:     #1A1A1A
   --ph-dark-3:     #222222
   --ph-dark-4:     #2A2A2A
   ============================================================ */


/* ─────────────────────────────────────────
   1. RESET & BASE
───────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overscroll-behavior: none;
    scroll-behavior: smooth;
    font-size: 112.5%;
}

body {
    font-family: 'Inter', sans-serif;
    background: #111111;
    color: #FFFFFF;
    overflow-x: hidden;
}


/* ─────────────────────────────────────────
   2. SCROLLBAR PERSONALIZADA
───────────────────────────────────────── */
::-webkit-scrollbar        { width: 5px; }
::-webkit-scrollbar-track  { background: #111111; }
::-webkit-scrollbar-thumb  { background: #84CC16; border-radius: 10px; }


/* ─────────────────────────────────────────
   3. HEADER
───────────────────────────────────────── */
.header-1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s ease;
}

.header-1.sticky {
    background: rgba(17, 17, 17, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 0;
}


/* ─────────────────────────────────────────
   4. MOBILE MENU
───────────────────────────────────────── */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(17, 17, 17, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-inner {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open .mobile-menu-inner {
    transform: translateY(0);
}


/* ─────────────────────────────────────────
   5. HERO — PARALLAX
───────────────────────────────────────── */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-parallax-bg {
    position: absolute;
    inset: -20%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    will-change: transform;
}

@supports (-webkit-touch-callout: none) {
    .hero-parallax-bg {
        background-attachment: scroll;
        inset: 0;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(17, 17, 17, 0.92) 0%,
        rgba(17, 17, 17, 0.78) 55%,
        rgba(17, 17, 17, 0.45) 100%
    );
}


/* ─────────────────────────────────────────
   6. MARQUEE
───────────────────────────────────────── */
.marquee-track {
    display: flex;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* ─────────────────────────────────────────
   7. STRIPE DECORATIVA
───────────────────────────────────────── */
.stripe-accent {
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #111111 0px,  #111111 20px,
        #84CC16 20px, #84CC16 40px
    );
}


/* ─────────────────────────────────────────
   8. SERVICIOS — LISTA (legacy, mantenida)
───────────────────────────────────────── */
.service-list-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 50px 0;
    transition: padding-left 0.4s ease, border-color 0.4s ease;
}

.service-list-item:hover {
    padding-left: 20px;
    border-color: rgba(132, 204, 22, 0.3);
}

.service-list-item:last-child { border-bottom: none; }

.service-num {
    font-family: 'Inter', monospace;
    color: #84CC16;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.1em;
}


/* ─────────────────────────────────────────
   9. PLAN — FEATURES LIST (legacy)
───────────────────────────────────────── */
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.feature-item:last-child { border-bottom: none; }

.feature-check {
    color: #84CC16;
    font-size: 13px;
    margin-top: 2px;
    flex-shrink: 0;
}


/* ─────────────────────────────────────────
   10. BADGE "MÁS POPULAR"
───────────────────────────────────────── */
.badge-popular {
    display: inline-block;
    background: #84CC16;
    color: #111111;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
}


/* ─────────────────────────────────────────
   11. FAQ
───────────────────────────────────────── */
.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 12px;
    transition: border-color 0.3s ease;
    background: #1A1A1A;
}

.faq-item:hover {
    border-color: rgba(132, 204, 22, 0.3);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), margin-top 0.3s ease;
    color: #999999;
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    margin-top: 16px;
}

.faq-icon {
    transition: transform 0.3s ease, color 0.3s ease;
    color: #666666;
    flex-shrink: 0;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
    color: #84CC16;
}


/* ─────────────────────────────────────────
   12. BACK TO TOP
───────────────────────────────────────── */
.back-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    background: #84CC16;
    color: #111111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-top:hover {
    background: #A3E635;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(132, 204, 22, 0.3);
}


/* ─────────────────────────────────────────
   13. VIDEOS — PLACEHOLDER
───────────────────────────────────────── */
.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #1A1A1A;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease;
}

.video-thumb:hover { border-color: rgba(132, 204, 22, 0.3); }

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    transition: opacity 0.5s ease;
}

.video-thumb:hover img { opacity: 0.6; }

.video-thumb__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 2;
}

.play-btn {
    width: 50px;
    height: 50px;
    background: #84CC16;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-thumb:hover .play-btn {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(132, 204, 22, 0.4);
}

.video-thumb__label {
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 14px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}


/* ─────────────────────────────────────────
   14. SECCIÓN ACCIÓN
───────────────────────────────────────── */
.accion-top-line {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, #84CC16, #A3E635, #84CC16);
}

.accion-glow {
    position: absolute;
    top: 0; right: 0;
    width: 500px; height: 500px;
    background: rgba(132, 204, 22, 0.05);
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
}


/* ═══════════════════════════════════════════
   ── ADDITIONS ──
   Plan cards · Modal · Loader · Cursor
═══════════════════════════════════════════ */


/* ─────────────────────────────────────────
   A. PLAN CARDS (compactas)
───────────────────────────────────────── */
.plan-card {
    background: #1A1A1A;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 32px 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    min-height: 260px;
    /* cursor explícito para que no lo borre Tailwind */
    cursor: pointer !important;
}

.plan-card:hover,
.plan-card:focus {
    border-color: rgba(132, 204, 22, 0.45);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(132, 204, 22, 0.15);
}

.plan-card--popular {
    border-color: rgba(132, 204, 22, 0.35);
    background: #1E2A12;
}

.plan-card--popular:hover { border-color: #84CC16; }

.plan-card__header { flex: 1; }

.plan-card__icon {
    width: 44px;
    height: 44px;
    background: rgba(132, 204, 22, 0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #84CC16;
    font-size: 18px;
    margin-bottom: 16px;
}

.plan-card__icon--modal {
    width: 52px;
    height: 52px;
    font-size: 22px;
    flex-shrink: 0;
}

.plan-card__num {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #84CC16;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.plan-card__title {
    color: #FFFFFF;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
}

.plan-card__desc {
    color: #888888;
    font-size: 0.82rem;
    line-height: 1.55;
}

.plan-card__footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.plan-card__cta {
    font-size: 0.82rem;
    font-weight: 700;
    color: #84CC16;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}

.plan-card:hover .plan-card__cta { gap: 10px; }


/* ─────────────────────────────────────────
   B. MODAL DE PLANES
───────────────────────────────────────── */
.plan-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.plan-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.plan-modal-box {
    background: #1A1A1A;
    border: 1px solid rgba(132, 204, 22, 0.2);
    border-radius: 20px;
    padding: 40px 36px 36px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.plan-modal-overlay.open .plan-modal-box {
    transform: translateY(0) scale(1);
}

.plan-modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #888;
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background 0.2s, color 0.2s;
    cursor: pointer !important;
}

.plan-modal-close:hover {
    background: rgba(132, 204, 22, 0.15);
    color: #84CC16;
}

.modal-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.modal-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #84CC16;
    color: #111111;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 13px 28px;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    cursor: pointer !important;
}

.modal-cta-btn:hover {
    background: #A3E635;
    transform: translateY(-2px);
}


/* ─────────────────────────────────────────
   C. LOADER DE PÁGINA
   El loader arranca visible (sin clase).
   El JS añade .ph-loader--out → fade out.
   display:none lo pone el JS 650ms después.
───────────────────────────────────────── */
#ph-loader {
    position: fixed;
    inset: 0;
    background: #111111;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    /* SIN transition aquí — sólo en --out */
}

#ph-loader.ph-loader--out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.ph-loader__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: loaderFadeIn 0.5s ease both;
}

.ph-loader__label {
    color: #84CC16;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

@keyframes loaderFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ─────────────────────────────────────────
   E. SECCIÓN EQUIPO — 15 LOGOS A LOS COSTADOS
   Los logos van a color, flanqueando a los
   costados de todo el bloque de información
   (texto + foto del médico), no superpuestos
   al texto ni en una barra aparte.
───────────────────────────────────────── */
.team-section {
    position: relative;
    overflow: hidden;
}

/* Riel vertical de logos, pegado a cada costado de la sección */
.team-side-logos {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 180px;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 40px 10px;
    pointer-events: none;
}

.team-side-logos--left  { left: 0; }
.team-side-logos--right { right: 0; }

.team-side-logos__item {
    width: 100%;
    max-width: 110px;
    height: auto;
    max-height: 70px;
    object-fit: contain;
    /* a color, sin escala de grises, sin rotación: quedan derechos */
    opacity: 0.9;
}

/* El contenido real siempre por encima de los rieles de logos */
.team-section__content {
    position: relative;
    z-index: 1;
}

/* En tablet/mobile no hay espacio a los costados: los rieles pasan
   a ser una nube de logos que se acomoda en varias filas (sin scroll),
   ubicada arriba del bloque de texto/foto, en vez de desaparecer */
@media (max-width: 1280px) {
    .team-side-logos {
        position: static;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 20px 24px;
        padding: 10px 6px;
        overflow: visible;
    }
    .team-side-logos__item {
        flex: 0 0 auto;
        max-width: 84px;
        max-height: 48px;
    }
    /* Separar visualmente las dos filas de logos entre sí */
    .team-side-logos--left {
        padding-bottom: 4px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        margin-bottom: 6px;
    }
}

@media (max-width: 640px) {
    .team-side-logos {
        gap: 16px 20px;
    }
    .team-side-logos__item {
        max-width: 68px;
        max-height: 40px;
    }
}


/* ─────────────────────────────────────────
   D. CURSOR PERSONALIZADO
   FIX: usamos :not() para no anular los
   cursores de elementos que los necesitan
   con !important (Tailwind los define así).
   En su lugar, aplicamos cursor:none solo
   al html/body y dejamos que el JS mueva
   los divs del cursor.
───────────────────────────────────────── */
@media (pointer: fine) {
    html, body {
        cursor: none;
    }
    /* Sobreescribir Tailwind que pone cursor:pointer con !important
       en clases como .cursor-pointer — lo reemplazamos con none */
    *:not(#ph-cursor):not(#ph-cursor-trail) {
        cursor: none !important;
    }
}

#ph-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 12px; height: 12px;
    background: #84CC16;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;   /* sobre el loader */
    opacity: 0;        /* arranca invisible; JS lo muestra al primer mousemove */
    transition: width 0.2s ease, height 0.2s ease,
                background 0.2s ease, opacity 0.25s ease;
    will-change: transform;
}

#ph-cursor-trail {
    position: fixed;
    top: 0; left: 0;
    width: 32px; height: 32px;
    border: 1.5px solid rgba(132, 204, 22, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999998;
    opacity: 0;
    transition: width 0.25s ease, height 0.25s ease,
                border-color 0.25s ease, opacity 0.25s ease;
    will-change: transform;
}

#ph-cursor.ph-cursor--hover {
    width: 18px; height: 18px;
    background: #A3E635;
}

#ph-cursor-trail.ph-cursor-trail--hover {
    width: 48px; height: 48px;
    border-color: rgba(132, 204, 22, 0.7);
}


/* ═══════════════════════════════════════════
   F. RESPONSIVE GENERAL — TABLET / MOBILE
   Ajustes a componentes con medidas fijas en px
   que no se adaptaban solas por Tailwind.
═══════════════════════════════════════════ */

/* Tablets (≤1024px) */
@media (max-width: 1024px) {
    .plan-modal-box {
        padding: 32px 24px 28px;
        max-height: 88vh;
    }

    .faq-item {
        padding: 20px 22px;
    }

    .plan-card {
        padding: 26px 22px 20px;
        min-height: unset;
    }
}

/* Mobile (≤640px) */
@media (max-width: 640px) {
    html { font-size: 100%; }

    .plan-modal-box {
        padding: 26px 18px 22px;
        border-radius: 16px;
    }

    .plan-modal-close {
        top: 10px; right: 10px;
        width: 30px; height: 30px;
        font-size: 13px;
    }

    .faq-item {
        padding: 18px 16px;
        border-radius: 10px;
    }

    .faq-item h4 {
        font-size: 0.95rem;
    }

    .plan-card {
        padding: 22px 18px 18px;
    }

    .plan-card__title {
        font-size: 1.15rem;
    }

    .back-top {
        bottom: 18px;
        right: 18px;
        width: 40px;
        height: 40px;
    }

    /* En pantallas muy chicas el parallax con fixed puede saltar;
       ya se maneja con @supports touch más arriba, esto es refuerzo */
    .hero-section {
        min-height: 100svh;
    }
}

/* Mobile muy chico (≤400px) */
@media (max-width: 400px) {
    .plan-modal-box {
        padding: 20px 14px 18px;
    }

    .modal-cta-btn {
        width: 100%;
        justify-content: center;
    }
}