:root {
    --bg: #eaf3ff; 
    --surface: #ffffff; 
    --primary: #0052cc; 
    --on-primary: #ffffff;
    --cyan-med: #0077ff; 
    --red-med: #ff2a5f; 
    --blue-med: #1a64db;
    --text: #0f172a; 
    --text-dim: #64748b; 
    --glass: rgba(0, 82, 204, 0.08);
    --card-shadow: 0 10px 25px -5px rgba(0, 50, 120, 0.06), 0 8px 10px -6px rgba(0, 50, 120, 0.04);
}

html { scroll-behavior: smooth; overflow-x: hidden; }
body { 
    background: var(--bg); 
    color: var(--text); 
    font-family: 'Inter', sans-serif; 
    background-image: radial-gradient(circle at 50% 0%, #dbeafe 0%, transparent 60%); 
    padding-bottom: 120px; 
    overflow-x: hidden; 
}
* { margin: 0; padding: 0; box-sizing: border-box; max-width: 100%; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* HEADER */
.main-header { 
    padding: 1rem 0; 
    border-bottom: 1px solid rgba(0, 82, 204, 0.1); 
    position: sticky; 
    top: 0; 
    background: rgba(234, 243, 255, 0.85); 
    backdrop-filter: blur(12px); 
    z-index: 1000; 
}
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; background: white; padding: 6px 14px; border-radius: 12px; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.logo-img { height: 50px; width: auto; object-fit: contain; }
.status-dot-header { position: absolute; top: -5px; right: -5px; width: 10px; height: 10px; background: var(--red-med); border-radius: 50%; border: 2px solid var(--bg); box-shadow: 0 0 8px var(--red-med); }
.btn-agendar-nav { background: var(--red-med); color: white; border: none; padding: 0.6rem 1.2rem; border-radius: 0.8rem; font-weight: 700; cursor: pointer; transition: transform 0.2s; }
.btn-agendar-nav:hover { transform: scale(1.03); }

/* HERO */
.hero { 
    position: relative; /* Indispensable para que bottom: 12px tome de referencia esta sección */
    width: 100%;
    min-height: 460px; /* Le da el alto suficiente para que el botón azul y el scroll no colisionen */
    padding-bottom: 0rem;
    display: flex;
    align-items: center;
    background-image: url('foto-hero-2.webp'); 
    background-size: 60% auto;
    background-position: right -120px;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* DEGRADADO DE IZQUIERDA A DERECHA (DIFUMINADO) */
.hero-overlay {
    width: 100%;
    height: 100%;
    padding: 4rem 0 3rem;
    display: flex;
    align-items: center;
    background: linear-gradient(
        to right, 
        #eef6ff 0%, 
        #eef6ff 40%, 
        rgba(238, 246, 255, 0.85) 60%, 
        rgba(238, 246, 255, 0) 100%
    );
}

.hero-container-left {
    margin-left: 5%;
    margin-right: auto;
    max-width: 620px;
    text-align: left;
}

.badge-clinica {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.5rem;
    background: #dbeafe;
    border: 1px solid rgba(0, 119, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    margin-left: 0;
    margin-right: 0;
}

h1 { 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    font-size: 2.3rem; 
    line-height: 1.1;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.text-gradient { 
    background: linear-gradient(90deg, #003b95, #0077ff); 
    -webkit-background-clip: text; 
    background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.hero-subtitle { 
    color: var(--text-dim); 
    font-size: 1.1rem; 
    max-width: 550px; 
    text-align: left; 
    margin-left: 0; 
    margin-right: 0; 
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.hero-btn-wrapper {
    display: flex;
    justify-content: flex-start;
}

/* BOTÓN DEGRADADO HERO (TUS ESTILOS ORIGINALES SIN TOCAR) */
.btn-hero-gradient { position: relative; padding: 3px; background: linear-gradient(90deg, #0077ff, #3b82f6, #0052cc); border-radius: 1.2rem; border: none; cursor: pointer; box-shadow: 0 10px 20px rgba(0, 82, 204, 0.25); transition: transform 0.2s; }
.btn-hero-gradient:hover { transform: translateY(-2px); }
.btn-content { background: #3b82f6; color: #ffffff; padding: 1.2rem 2.5rem; border-radius: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 1rem; }
.btn-link-clean { text-decoration: none !important; display: inline-block; }

/* POSICIONAR EL SCROLL EN LA PARTE INFERIOR DEL HERO EN LAPTOP */
.scroll-indicator { 
    position: absolute;
    bottom: 15px; /* Al subir el min-height, 20px lo ubicará limpio abajo sin pisar a nadie */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: var(--text-dim); 
    font-size: 0.75rem; 
    font-weight: 600; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 0.3rem; 
}

.mouse { 
    width: 22px; 
    height: 35px; 
    border: 2px solid var(--text-dim); 
    border-radius: 20px; 
    position: relative; 
}

.wheel { 
    width: 4px; 
    height: 8px; 
    background: var(--primary); 
    position: absolute; 
    top: 6px; 
    left: 50%; 
    transform: translateX(-50%); 
    border-radius: 2px; 
    animation: scroll 2s infinite; 
}

@keyframes scroll {
    0% { opacity: 1; top: 6px; }
    100% { opacity: 0; top: 18px; }
}

/* ADAPTABILIDAD EN MÓVIL */
@media (max-width: 768px) {
    .hero {
        min-height: 680px; /* Más espacio vertical en celular */
        padding-bottom: 6rem;
        background-position: top center;
        background-size: contain; /* Ajusta la foto entera arriba */
    }

    .hero-overlay {
        /* Fondo sólido abajo para cubrir la foto y que el texto no se monte */
        background: linear-gradient(
            to bottom, 
            rgba(238, 246, 255, 0.1) 0%, 
            rgba(238, 246, 255, 0.90) 50%,  
            #eef6ff 100%
        );
        padding-top: 18rem; /* Empuja el texto HACIA ABAJO para no tapar la cara del doctor */
    }

    .hero-container-left {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .badge-clinica, h1, .hero-subtitle {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .badge-clinica {
        margin-top: 60px; /* Sube la pastilla al tope del hero */
        margin-bottom: 1rem;
    }

    .hero-btn-wrapper {
        justify-content: center;
        margin-bottom: 2rem; /* Separa el botón del scroll */
    }

}
/* SECCIONES */
.section-padding { padding: 2rem 0; scroll-margin-top: 80px; }
.tag-section { color: var(--primary); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.15em; margin-bottom: 0.8rem; text-align: center; }
.title-section { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 2rem; margin-bottom: 3rem; text-align: center; color: #0b192c; }

/* ABORDAJE (TARJETAS) */
.grid-areas { display: grid; gap: 1.5rem; }
.card-abordaje { 
    background: var(--surface); 
    border-radius: 1.2rem; 
    display: flex; 
    overflow: hidden; 
    border: 1px solid rgba(224, 236, 255, 0.8); 
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease; 
}
.card-abordaje:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0, 82, 204, 0.12); }
.card-abordaje::before { content: ''; width: 6px; flex-shrink: 0; }
.border-cyan::before { background: var(--cyan-med); }
.border-red::before { background: var(--red-med); }
.border-blue::before { background: var(--blue-med); }
.border-purple::before { background: var(--purple-med, #8a2be2); }
.border-green::before { background: var(--green-med, #10b981); }
.border-orange::before { background: var(--orange-med, #f97316); }
.border-fuchsia::before { background: var(--fuchsia-med, #d9065e); }
.card-info { padding: 1.5rem; width: 100%; }
.card-info h3 { color: #0b192c; font-size: 1.15rem; font-weight: 700; }
.card-info p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.4; }
.card-head {display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; /* Agrega esto para dar espacio entre título y etiqueta */margin-bottom: 0.8rem;}
.mini-tag {font-size: 0.6rem; /* Reducir ligeramente de 0.65rem a 0.6rem */font-weight: 800;padding: 0.3rem 0.5rem; /* Un poco menos de padding horizontal */border-radius: 0.5rem;white-space: normal; /* Permite que si es muy largo, baje en dos líneas en vez de cortarse */text-align: center;flex-shrink: 0; /* O la etiqueta se ajusta sin salirse del borde */max-width: 50%; /* Evita que ocupe más de la mitad de la tarjeta */}
.tag-cyan { color: #0066cc; background: #e6f2ff; border: 1px solid #b3d7ff; }
.tag-red { color: #d90036; background: #ffe6ec; border: 1px solid #ffb3c6; }
.tag-blue { color: #0044cc; background: #e6edff; border: 1px solid #b3caff; }
.tag-purple { color: #6b21a8; background: #f3e8ff; border: 1px solid #d8b4fe; }
.tag-orange { color: #c2410c; background: #fff7ed; border: 1px solid #ffedd5; }
.tag-green { color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; }
.tag-fuchsia  { color: #a50d61; background: #ebacc1; border: 1px solid #fde68a; }

/* TRAYECTORIA */
.trayectoria-container { display: grid; gap: 2rem; text-align: center; }
.photo-frame { width: 100%; max-width: 400px; height: 400px; border-radius: 2rem; overflow: hidden; border: 4px solid white; box-shadow: var(--card-shadow); margin: 0 auto; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.cred-item { display: flex; align-items: center; gap: 1rem; background: var(--surface); padding: 1.2rem; border-radius: 1.2rem; margin-bottom: 1rem; text-align: left; border: 1px solid rgba(224, 236, 255, 0.8); box-shadow: var(--card-shadow); }
.cred-item h4 { color: #0b192c; font-weight: 700; }
.cred-item p { color: var(--text-dim); font-size: 0.9rem; }
.cred-icon { width: 48px; height: 48px; background: #e0edff; border-radius: 0.9rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* FAQ */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--surface); border: 1px solid rgba(224, 236, 255, 0.8); border-radius: 1.2rem; margin-bottom: 1rem; padding: 1.2rem 1.5rem; box-shadow: var(--card-shadow); }
.faq-item summary { list-style: none; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: #0b192c; }
.faq-item summary::after { content: '↓'; color: var(--primary); font-weight: 800; font-size: 1.1rem; }
.faq-item[open] summary::after { content: '↑'; }
.faq-item p { color: var(--text-dim); margin-top: 1rem; line-height: 1.5; font-size: 0.95rem; }
.lista-estudios { list-style: none; padding-top: 1rem; width: 100%; }
.lista-estudios li { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 0; border-bottom: 1px solid #edf2f7; gap: 10px; }
.lista-estudios li span { flex: 1; font-size: 0.92rem; color: #334155; }
.lista-estudios li strong { color: var(--primary); font-size: 0.95rem; white-space: nowrap; flex-shrink: 0; font-weight: 700; }

/* UBICACIÓN */
.location-grid { display: flex; flex-direction: column; gap: 1.5rem; text-align: center; }
.location-box { padding: 2rem; border-radius: 1.5rem; background: var(--surface); border: 1px solid rgba(224, 236, 255, 0.8); box-shadow: var(--card-shadow); }
.loc-item { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; color: #0b192c; }
.loc-item p { color: var(--text-dim); font-size: 0.95rem; }
.map-wrapper { width: 100%; height: 280px; border-radius: 1.5rem; overflow: hidden; border: 4px solid white; box-shadow: var(--card-shadow); }

/* FOOTER CHIC */
.main-footer { padding: 2.5rem 0 60px; background: #dbeafe; border-top: 1px solid rgba(0, 82, 204, 0.1); text-align: center; }
.logo-capsule-footer { background: white; padding: 12px 24px; border-radius: 15px; display: inline-block; margin-bottom: 1.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.footer-img { height: 75px; width: auto; }
.footer-slogan { color: var(--primary); font-weight: 700; font-size: 1.1rem; margin-bottom: 0.5rem; }
.footer-legal { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 1.5rem; }
.social-link { color: var(--primary); text-decoration: none; font-weight: 700; }
.footer-credits { margin-top: 2rem; font-size: 0.75rem; color: var(--text-dim); border-top: 1px solid rgba(0, 82, 204, 0.15); padding-top: 1.5rem; }

/* ASISTENTE SOFÍA */
.asistente-pill { 
    position: fixed; 
    bottom: 80px; 
    right: 20px; 
    background: #031838; 
    border: 1px solid #0077ff; 
    padding: 0.6rem 1.4rem; 
    border-radius: 4rem; 
    display: flex; 
    align-items: center; 
    gap: 0.8rem; 
    z-index: 9999 !important; 
    text-decoration: none !important; 
    box-shadow: 0 12px 25px rgba(3, 24, 56, 0.3); 
    transition: transform 0.2s;
}
.asistente-pill:hover { transform: scale(1.05); }
.asistente-avatar { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #00f2ff; overflow: hidden; position: relative; flex-shrink: 0; }
.asistente-avatar img { width: 100%; height: 100%; object-fit: cover; }
.online-dot { position: absolute; bottom: 2px; right: 2px; width: 10px; height: 10px; background: #00ff9d; border-radius: 50%; border: 2px solid #031838; }
.asistente-text small { display: block; font-size: 0.6rem; color: #00f2ff; font-weight: 800; letter-spacing: 0.05em; }
.asistente-text strong { font-size: 0.88rem; color: white; }

/* TAB BAR MOBILE */
.tab-bar { position: fixed; bottom: 0; left: 0; right: 0; height: 75px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(20px); display: flex; justify-content: space-around; align-items: center; border-top: 1px solid rgba(0, 82, 204, 0.12); z-index: 3000; box-shadow: 0 -5px 20px rgba(0,0,0,0.03); }
.tab-link { text-decoration: none; color: var(--text-dim); font-size: 0.68rem; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.tab-link.active { color: var(--primary); font-weight: 700; }

/* LAPTOP / DESKTOP VIEW */
@media (min-width: 1024px) {
    h1 { font-size: 3.8rem; }
    .grid-areas { grid-template-columns: repeat(3, 1fr); }
    .trayectoria-container { grid-template-columns: 1fr 1.5fr; align-items: center; gap: 4rem; text-align: left; }
    .trayectoria-photo { order: 1; }
    .trayectoria-text { order: 2; }
    .location-grid { flex-direction: row-reverse; text-align: left; }
    .loc-item { align-items: flex-start; }
    .map-wrapper { flex: 1.5; height: 400px; }
    .location-box { flex: 1; }
    .footer-content { text-align: center; }
}

@keyframes scroll { 0% { opacity: 1; top: 6px; } 100% { opacity: 0; top: 20px; } }
.instagram-icon {
  color: #E1306C; /* O usa un degradado con background-clip */
}
/* Quita el subrayado y asegura el color base */
a.btn-instagram,
a[href*="instagram"] {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Efecto hover suave al pasar el cursor */
a.btn-instagram:hover,
a[href*="instagram"]:hover {
  opacity: 0.75 !important;
  transform: translateY(-1px);
}

.scroll-indicator { 
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0; 
    color: var(--text-dim); 
    font-size: 0.8rem; 
    font-weight: 600; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 0.5rem; 
    z-index: 5;
}

    /* Ajusta la clase contenedora del texto del scroll */
    .scroll-indicator, .scroll-prompt { 
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    @media (max-width: 768px) {
    /* Clase que usas para las etiquetas pequeñas dentro de las tarjetas */
    .card-tag, .study-badge, .badge-card {
        max-width: 100%;
        white-space: normal;      /* Permite que el texto baje de línea si es muy largo */
        text-align: center;
        font-size: 0.7rem;        /* Reduce un poquito la letra en móvil si es necesario */
        padding: 4px 8px;
        height: auto;
    }
}