/* ═══════════════════════════════════════════════════
   TOP BRAND MEDICAL — Custom Stylesheet
   Complementa Tailwind CDN. No duplicar utilities aquí.
   ═══════════════════════════════════════════════════ */

/* ── Base font ─────────────────────────────────────── */
* { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }

/* ── Gradiente de texto ────────────────────────────── */
.text-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Botón primario ────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(30, 58, 138, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(30, 58, 138, 0.45);
}

/* ── Cards hover ───────────────────────────────────── */
.card-hover { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card-hover:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0,0,0,0.08); }

/* Muelle suave para service-cards — efecto WOW principal */
.service-card { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease; }
.service-card:hover { transform: translateY(-12px); box-shadow: 0 36px 80px rgba(30, 58, 138, 0.14); }

/* ── Navbar blur ───────────────────────────────────── */
.nav-blur {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(255,255,255,0.92);
}

/* ── Acento de línea decorativa ────────────────────── */
.line-accent {
    height: 4px;
    width: 56px;
    background: linear-gradient(90deg, #1e3a8a, #2563eb);
    border-radius: 2px;
}
.stat-accent { border-left: 3px solid #1e3a8a; }

/* ── Animaciones de entrada en Hero (sin scroll) ───── */
.fade-up {
    opacity: 0;
    transform: translateY(28px);
    animation: fadeUpAnim 0.85s ease-out forwards;
}
@keyframes fadeUpAnim { to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 0.10s; }
.delay-2 { animation-delay: 0.22s; }
.delay-3 { animation-delay: 0.38s; }
.delay-4 { animation-delay: 0.54s; }
.delay-5 { animation-delay: 0.70s; }

/* ── Scroll-reveal (IntersectionObserver en script.js) */
.scroll-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Delays escalonados para grids de cards */
.scroll-reveal.sr-d1 { transition-delay: 0.05s; }
.scroll-reveal.sr-d2 { transition-delay: 0.15s; }
.scroll-reveal.sr-d3 { transition-delay: 0.25s; }
.scroll-reveal.sr-d4 { transition-delay: 0.35s; }

/* ── Glassmorphism (dark sections) ─────────────────── */
.glass-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}
.glass-card:hover { background: rgba(255,255,255,0.09); }

/* ── Botón flotante de WhatsApp ────────────────────── */
.whatsapp-float {
    box-shadow: 0 6px 28px rgba(37,211,102,0.45);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.12);
    box-shadow: 0 12px 44px rgba(37,211,102,0.6);
}

/* ── Select de código de país ──────────────────────── */
.form-country-select {
    flex-shrink: 0;
    width: 5.75rem;
    max-width: 5.75rem;
    padding-left: 0.5rem;
    padding-right: 1.35rem;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.35rem center;
    background-size: 0.75rem;
}
@media (min-width: 640px) {
    .form-country-select { width: 6.25rem; max-width: 6.25rem; }
}

/* ── Animación éxito del formulario ────────────────── */
@keyframes contactSuccessIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.contact-success-enter { animation: contactSuccessIn 0.6s ease-out forwards; }

/* ── FAQ Accordion ─────────────────────────────────── */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    /* Transition desde JS — no limitar con display:none */
    transition: max-height 0.4s ease, padding-top 0.3s ease, padding-bottom 0.3s ease;
    padding-top: 0;
    padding-bottom: 0;
}
.faq-answer.open {
    max-height: 320px;
    padding-top: 0.75rem;
    padding-bottom: 1rem;
}
/* Ícono + gira 45° cuando abierto */
.faq-icon { transition: transform 0.3s ease; flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
/* Borde inferior del ítem activo */
.faq-item.open { border-color: rgba(30,58,138,0.15) !important; }

/* ── Menú móvil ────────────────────────────────────── */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
#mobile-menu.open { max-height: 400px; }

/* ── Cookie banner ─────────────────────────────────── */
#tbm-cookie-banner {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 99999;
    width: 340px;
    max-width: calc(100vw - 40px);
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow:
        0 24px 64px rgba(15,30,80,0.18),
        0 4px 16px rgba(15,30,80,0.10),
        inset 0 1px 0 rgba(255,255,255,0.9);
    padding: 22px 22px 18px;
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
#tbm-cookie-banner.tbm-show { opacity: 1; transform: translateY(0); }

.tbm-cookie-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tbm-cookie-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
}
.tbm-cookie-brand {
    font-size: 0.72rem; font-weight: 800;
    color: #1e3a8a; letter-spacing: 0.06em; text-transform: uppercase;
}
#tbm-cookie-banner p { font-size: 0.78rem; color: #475569; line-height: 1.65; margin-bottom: 16px; }
.tbm-cookie-btns { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

#tbm-cookie-accept {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #fff; border: none; border-radius: 50px;
    padding: 9px 22px; font-size: 0.82rem; font-weight: 700;
    cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 0.02em;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}
#tbm-cookie-accept:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.45); }

#tbm-cookie-decline {
    font-size: 0.78rem; color: #94a3b8; background: none;
    border: none; cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 0; transition: color 0.2s;
}
#tbm-cookie-decline:hover { color: #64748b; }

.tbm-cookie-privacy {
    display: block; font-size: 0.72rem; color: #2563eb;
    text-decoration: none; font-weight: 600;
    transition: color 0.2s; letter-spacing: 0.01em;
}
.tbm-cookie-privacy:hover { color: #1e3a8a; text-decoration: underline; }

@media (max-width: 480px) {
    #tbm-cookie-banner { left: 16px; bottom: 16px; }
}

/* ══════════════════════════════════════════════════════
   SOCIAL PROOF NOTIFICATION
   Aparece encima del botón flotante de WhatsApp
   ══════════════════════════════════════════════════════ */
#sp-notification {
    position: fixed;
    /* 24px (bottom WA) + 56px (alto WA) + 14px (gap) */
    bottom: 94px;
    right: 24px;
    z-index: 49;
    pointer-events: none;
}
#sp-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.07);
    padding: 13px 38px 13px 14px; /* espacio para el botón ✕ */
    width: 284px;
    max-width: calc(100vw - 40px);
    position: relative;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(110%);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-left: 3px solid #25D366;
}
#sp-card.sp-show {
    opacity: 1;
    transform: translateX(0);
}
.sp-inner { display: flex; gap: 11px; align-items: flex-start; }
#sp-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 0.88rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.sp-content { flex: 1; min-width: 0; }
#sp-name  { font-weight: 700; font-size: 0.76rem; color: #0f172a; margin: 0 0 1px; }
#sp-spec  { font-size: 0.66rem; color: #64748b; margin: 0 0 4px; }
#sp-msg   { font-size: 0.71rem; color: #334155; line-height: 1.45; margin: 0 0 5px; }
.sp-footer { display: flex; align-items: center; gap: 8px; }
#sp-time    { font-size: 0.63rem; color: #94a3b8; }
.sp-verified { font-size: 0.62rem; color: #16a34a; font-weight: 700; }
#sp-close {
    position: absolute; top: 9px; right: 10px;
    background: none; border: none; color: #cbd5e1;
    font-size: 1.05rem; cursor: pointer; line-height: 1; padding: 0;
    transition: color 0.2s; font-family: 'Plus Jakarta Sans', sans-serif;
}
#sp-close:hover { color: #475569; }

@media (max-width: 480px) {
    #sp-notification { right: 16px; bottom: 88px; }
    #sp-card { width: 250px; }
}

/* ══════════════════════════════════════════════════════
   POPUP — DIAGNÓSTICO DE MARKETING GRATUITO
   ══════════════════════════════════════════════════════ */
#tbm-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 15, 40, 0.68);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
#tbm-popup-overlay.popup-show {
    opacity: 1;
    pointer-events: auto;
}
#tbm-popup {
    background: #ffffff;
    border-radius: 24px;
    max-width: 460px;
    width: 100%;
    padding: 40px 36px 32px;
    position: relative;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 40px 100px rgba(8,15,40,0.35), 0 8px 32px rgba(8,15,40,0.15);
}
#tbm-popup-overlay.popup-show #tbm-popup {
    transform: scale(1) translateY(0);
}
#tbm-popup-close {
    position: absolute; top: 14px; right: 14px;
    width: 30px; height: 30px; border-radius: 50%;
    background: #f1f5f9; border: none; color: #64748b;
    font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
#tbm-popup-close:hover { background: #e2e8f0; color: #1e3a8a; }

.popup-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fef9c3; color: #854d0e;
    font-size: 0.68rem; font-weight: 800;
    padding: 5px 14px; border-radius: 50px;
    margin-bottom: 18px; letter-spacing: 0.05em; text-transform: uppercase;
    border: 1px solid #fde68a;
}
.popup-icon {
    width: 62px; height: 62px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 8px 28px rgba(30,58,138,0.32);
}
#tbm-popup h3 {
    font-size: 1.5rem; font-weight: 800;
    color: #0f172a; line-height: 1.2; margin: 0 0 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
#tbm-popup > p {
    font-size: 0.88rem; color: #475569; line-height: 1.65;
    margin: 0 0 18px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.popup-features {
    list-style: none; margin: 0 0 22px; padding: 0;
    display: flex; flex-direction: column; gap: 9px; text-align: left;
}
.popup-features li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 0.81rem; color: #334155; font-weight: 500;
    line-height: 1.4;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.popup-check {
    width: 19px; height: 19px; border-radius: 50%;
    background: #dcfce7; color: #16a34a;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.62rem; font-weight: 900;
    flex-shrink: 0; margin-top: 1px;
}
.popup-cta {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    color: #fff; font-weight: 800; font-size: 0.93rem;
    padding: 15px 28px; border-radius: 14px;
    text-decoration: none; width: 100%; margin-bottom: 11px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 24px rgba(30,58,138,0.35);
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.popup-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(30,58,138,0.45); }
.popup-dismiss {
    font-size: 0.73rem; color: #94a3b8; background: none; border: none;
    cursor: pointer; transition: color 0.2s;
    font-family: 'Plus Jakarta Sans', sans-serif; display: block; width: 100%;
}
.popup-dismiss:hover { color: #64748b; }
.popup-urgency {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.71rem; color: #dc2626; font-weight: 700;
    margin-top: 14px; font-family: 'Plus Jakarta Sans', sans-serif;
}
.popup-urgency-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #dc2626;
    animation: urgencyPulse 1.2s ease-in-out infinite;
}
@keyframes urgencyPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.25; }
}
@media (max-width: 480px) {
    #tbm-popup { padding: 32px 22px 26px; border-radius: 20px; }
    #tbm-popup h3 { font-size: 1.25rem; }
    .popup-cta { font-size: 0.85rem; padding: 14px 20px; }
}
