/* ================================================
   GRUPO MÉDICO MJB — Rediseño página de inicio
   Inspirado en doctorate-template.webflow.io
   (tipografía, colores y patrones de layout —
   contenido 100% de MJB)

   Se carga SOLO en index.html, después de style.css,
   para no afectar servicios/ ni blog/.
   ================================================ */

:root {
    --primary: #0a66c2;
    --primary-hover: #07306e;
    --primary-light: #eaf3ff;
    --dark: #141414;
    --text: #333333;
    --text-gray: #555555;
    --bg-light: #f3faff;
    --radius-md: 16px;
    --radius-lg: 20px;
    --font-display: 'Poppins', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

h1, h2, h3, h4,
.logo-text,
.nav-links a,
.mobile-menu a,
.btn {
    font-family: var(--font-display);
}

.btn { border-radius: 15px; font-weight: 600; }
.nav-links a { font-weight: 500; }

/* ── TOPBAR (teléfono + redes) ── */
.topbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 8px 0;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar-socials { display: flex; align-items: center; gap: 14px; }
.topbar-socials .social-icon-img {
    height: 17px;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
}
.topbar-socials .social-icon-img:hover { opacity: 1; transform: scale(1.12); }
.topbar-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
    transition: color 0.2s;
}
.topbar-phone i { color: var(--primary); font-size: 0.78rem; }
.topbar-phone:hover { color: var(--primary); }

@media (max-width: 480px) {
    .topbar { padding: 6px 0; }
    .topbar-phone { font-size: 0.72rem; }
    .topbar-socials { gap: 10px; }
    .topbar-socials .social-icon-img { height: 15px; }
}

/* Barra de navegación más ancha */
.navbar .container,
.topbar .container {
    max-width: 1340px;
}

/* ── NAV CTA PILL ── */
.nav-cta-btn {
    display: inline-flex;
    align-items: center;
    background: var(--primary);
    color: #fff !important;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 9px 20px;
    border-radius: 15px;
    transition: background 0.2s;
    white-space: nowrap;
}
.nav-cta-btn:hover { background: var(--primary-hover); }
@media (max-width: 768px) { .nav-cta-btn { display: none; } }

/* ── HERO CON FOTO DE FONDO ── */
.hero-v2 {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 0;
    min-height: 620px;
    display: flex;
    align-items: center;
    color: #fff;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
}
.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7,48,110,0.82) 0%, rgba(7,48,110,0.68) 45%, rgba(20,20,20,0.78) 100%);
}
.hero-v2 .hero-container {
    grid-template-columns: 1fr;
    position: relative;
    z-index: 1;
    width: 100%;
}
.hero-v2 .hero-text { max-width: 720px; margin: 0 auto; }
.hero-v2 .badge-top,
.hero-v2 .hero-ctas { justify-content: center; }

/* ── ESTADO ABIERTO/CERRADO ── */
.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(22, 163, 74, 0.18);
    border: 1px solid rgba(74, 222, 128, 0.5);
    color: #bbf7d0;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 22px;
    backdrop-filter: blur(4px);
}
.hero-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
    animation: hero-status-pulse 1.6s infinite;
    flex-shrink: 0;
}
@keyframes hero-status-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
    70%  { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.hero-status.is-closed {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.85);
}
.hero-status.is-closed .hero-status-dot {
    background: #94a3b8;
    animation: none;
    box-shadow: none;
}
.hero-v2 .badge-top {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.35);
    backdrop-filter: blur(4px);
}
.hero-v2 .hero-text h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); color: #fff; }
.hero-v2 .hero-text h1 .highlight { color: #93c5fd; }
.hero-v2 .hero-text p { color: rgba(255,255,255,0.92); }
.hero-v2 .hero-text strong { color: #fff; }
.hero-v2 .btn-outline {
    color: #fff;
    border-color: rgba(255,255,255,0.7);
}
.hero-v2 .btn-outline:hover {
    background: #fff;
    color: var(--primary-hover);
}

@media (max-width: 768px) {
    .hero-v2 { min-height: 520px; }
}

/* ── BOTÓN "VER PERFIL" EN TARJETA DESTACADA DEL EQUIPO ── */
.team-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: var(--primary);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
}
.team-card--featured:hover .team-card-cta { text-decoration: underline; }

/* ── SOBRE NOSOTROS (2 columnas) ── */
.about-section .about-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 56px;
    align-items: center;
}
.about-img-wrap {
    display: block;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.about-img-wrap::before {
    content: '';
    position: absolute;
    inset: -12px -12px 12px 12px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    z-index: 0;
}
.about-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 460px;
    object-fit: cover;
    object-position: center 20%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.about-content .section-label { margin-bottom: 14px; }
.about-content h2 {
    font-size: clamp(1.7rem, 2.8vw, 2.2rem);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
    line-height: 1.25;
}
.about-content > p {
    color: var(--text-gray);
    margin-bottom: 24px;
    line-height: 1.75;
}
.about-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-bottom: 32px;
}
.about-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--dark);
}
.about-list li i { color: var(--primary); flex-shrink: 0; }

@media (max-width: 900px) {
    .about-section .about-grid { grid-template-columns: 1fr; gap: 32px; }
    .about-img { height: 320px; }
    .about-list { grid-template-columns: 1fr; }
}

/* ── GRILLA DE SERVICIOS (home) ── */
.services-home-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.service-home-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 22px;
    text-align: center;
    transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
}
.service-home-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--primary);
}
.service-home-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.service-home-icon img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}
.service-home-card h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.service-home-card p { font-size: 0.85rem; color: var(--text-gray); line-height: 1.6; margin: 0; }
.services-home-more { text-align: center; margin-top: 40px; }

@media (max-width: 992px) {
    .services-home-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .services-home-grid { grid-template-columns: 1fr 1fr; }
}

/* ── AVISO "DOS DEDOS" SOBRE EL MAPA (solo en pantallas táctiles) ── */
.map-container { position: relative; }
.map-hint {
    display: none;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.78);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 50px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 2;
}
@media (hover: none) and (pointer: coarse) {
    .map-hint { display: block; }
}

/* ── BLOG (home) ── */
.blog-home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.blog-home-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
}
.blog-home-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--primary);
}
.blog-home-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 16px;
}
.blog-home-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 12px;
}
.blog-home-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.35;
    margin-bottom: 10px;
}
.blog-home-card p {
    font-size: 0.86rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}
.blog-home-meta {
    font-size: 0.78rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 6px;
}
.blog-home-meta i { color: var(--primary); }
.blog-home-more { text-align: center; margin-top: 40px; }

@media (max-width: 900px) {
    .blog-home-grid { grid-template-columns: 1fr; }
}

/* ── ESTADÍSTICAS ── */
.stats-section { padding: 60px 0; background: var(--bg-light); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: center;
}
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 6px;
}
.stat-number { font-size: 2.4rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-item p { color: var(--text-gray); font-size: 0.9rem; font-weight: 600; margin: 0; }

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; gap: 32px; }
}
