/* ══ Banner responsive ════════════════════════════════════════ */
@media (max-width: 640px) {
  .hero-slider { height: 200px; }
  .hero-content { padding: 1rem 3rem; }
  .hero-kicker { font-size: 0.72rem; padding: 0.35rem 0.7rem; }
  .hero-content h1 { font-size: 1.15rem; margin-bottom: 0.4rem; }
  .hero-content p  { font-size: 0.85rem; margin-bottom: 0.7rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .banner-btn { font-size: 0.78rem; padding: 0.45rem 0.85rem; }
  .hero-arrow { width: 32px; height: 32px; font-size: 0.8rem; }
  .hero-arrow-left { left: 0.5rem; }
  .hero-arrow-right { right: 0.5rem; }
  .hero-dot { width: 16px; height: 3px; }
  .hero-slider-controls { bottom: 0.7rem; }
}

/* ══ Certificaciones feature layout ══════════════════════════ */
@media (max-width: 980px) {
  .cert-feature-layout { grid-template-columns: 1fr; }
}

/* ══ Nav / Dropdown ══════════════════════════════════════════ */
@media (max-width: 850px) {
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    text-align: left;
    gap: 0;
    margin-top: 0;
    background: rgba(25,50,44,0.98);
    padding: 0;
  }

  .nav-links.active { display: flex; }

  .nav-links > li {
    padding: 0;
    border-left: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }

  .nav-links > li:last-child { border-right: none; }

  .nav-links > li > a,
  .nav-links .dropdown-trigger {
    display: block;
    padding: 0.85rem 1.2rem;
    font-size: 0.92rem;
  }

  .menu-icon { display: block; }
  .has-dropdown { position: static; }

  .dropdown-menu {
    position: static;
    transform: none;
    display: none;
    background: rgba(0,0,0,0.2);
    margin: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    border-top: none;
    min-width: unset;
  }

  .has-dropdown.open .dropdown-menu { display: block; }
  .has-dropdown:hover .dropdown-menu { display: none; }
  .has-dropdown.open:hover .dropdown-menu { display: block; }

  .dropdown-menu li a {
    padding: 0.65rem 1.8rem;
    font-size: 0.88rem;
  }

  .section { padding: 2rem 1rem; }

  .brand-lockup img { width: 46px; height: 46px; object-fit: cover; }
}

/* ══ Footer ══════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  footer { padding: 2rem 1.2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .footer-brand img { width: 90px; height: 90px; }
  .footer-whatsapp { width: 100%; justify-content: center; }
}

/* ══ WhatsApp float ══════════════════════════════════════════ */
@media (max-width: 640px) {
  .whatsapp-float { right: 14px; bottom: 14px; padding: 0.85rem 1rem; font-size: 0.95rem; }
  .whatsapp-float span { display: none; }
  .whatsapp-float i { font-size: 1.5rem; margin: 0; }
}

/* ══ Ethics header ═══════════════════════════════════════════ */
@media (max-width: 980px) {
  .ethics-header { grid-template-columns: 1fr; align-items: start; }
  .ethics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .ethics-section { padding: 1.2rem; }
  .ethics-heading h3 { font-size: 1.4rem; }
  .ethics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ethics-card { min-height: auto; }
  .ethics-download-btn { width: 100%; justify-content: center; }
}

/* ══ Nosotros – about-top-grid ═══════════════════════════════ */
@media (max-width: 1050px) {
  .about-top-grid { grid-template-columns: 1fr; }
  .about-values-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .about-values-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .about-values-panel, .about-media-card { padding: 1.2rem; }
  .about-values-header h3, .about-media-header h3 { font-size: 1.3rem; }
}

/* ══ Inicio heading ══════════════════════════════════════════ */
@media (max-width: 640px) {
  .inicio-heading { margin-bottom: 1rem; padding: 0.2rem 0 0.5rem; }
  .inicio-title { font-size: 1.7rem; }
  .inicio-subtitle { font-size: 0.92rem; line-height: 1.45; padding: 0 0.3rem; }
}

/* ══ Calendario ══════════════════════════════════════════════ */
@media (max-width: 640px) {
  .cal-grid { grid-template-columns: 1fr; }
  .cal-event-card { padding: 0.85rem; }
}

/* ══ Sub-tabs ════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .subtab-bar { gap: 0.4rem; }
  .subtab-btn { padding: 0.45rem 0.85rem; font-size: 0.78rem; }
}

/* ══ Certificaciones grids – mobile ══════════════════════════ */
@media (max-width: 640px) {
  .cert-grid-two { grid-template-columns: 1fr; }
  .cert-resource-grid { grid-template-columns: 1fr; }
  .cert-stat-row { grid-template-columns: 1fr; }
  .cert-toggle { flex-direction: column; gap: 0; }
  .toggle-btn { width: 100%; }
  .benefits-grid { gap: 1rem; }
  .benefit-item { min-width: 80px; }
}

/* ══ ¿Dirigido a? grid ═══════════════════════════════════════ */
@media (max-width: 640px) {
  .dirigido-grid { grid-template-columns: 1fr; }
}

/* ══ Mesa / Junta grids ══════════════════════════════════════ */
@media (max-width: 640px) {
  .mesa-grid { grid-template-columns: 1fr; }
}

/* ══ Grid neurocirujanos ═════════════════════════════════════ */
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* ══ Section visual ══════════════════════════════════════════ */
@media (max-width: 640px) {
  .section-visual img { height: 160px; }
  #nosotros-gobierno .section-visual img { object-position: right center; }
  #nosotros-quienes .section-visual img { object-position: left center; }
  .section-title { font-size: 1.7rem; }
}

/* ══ Historia slider – legible en móvil ═════════════════════ */
@media (max-width: 640px) {
  .historia-slider-frame {
    overflow-x: auto !important;
    justify-content: flex-start !important;
    padding: 0 40px !important;
    min-height: 280px !important;
    -webkit-overflow-scrolling: touch;
  }
  .historia-slide-img {
    min-width: 700px !important;
    width: 700px !important;
    max-height: none !important;
  }
}

/* ══ Hero responsive extended ════════════════════════════════ */
@media (max-width: 1100px) {
  .hero-slider { min-height: 540px; height: 540px; }
  .hero-content { padding: 3rem 2rem 3rem; }
  .hero-content h1 { font-size: clamp(2rem, 4vw, 3rem); }
  .hero-visual { padding: 1.5rem 1.5rem 1.5rem 0; }
  .hero-visual-frame { height: 360px; }
}

@media (max-width: 900px) {
  .hero-slider { min-height: 500px; height: auto; }
  .hero-slide { grid-template-columns: 1fr; }
  .hero-content { padding: 2rem 1.4rem 1rem; }
  .hero-content h1 { max-width: none; font-size: 2rem; }
  .hero-content p { font-size: 0.98rem; line-height: 1.55; }
  .hero-visual { padding: 0 1.4rem 4.6rem; }
  .hero-visual-frame { width: 100%; max-width: none; height: 240px; }
  .hero-slider-controls { bottom: 1rem; }
  .hero-arrow { width: 40px; height: 40px; }
}

@media (max-width: 640px) {
  .hero-slider { min-height: 430px; }
  .hero-content { padding: 1.35rem 3.5rem 0.8rem; }
  .hero-kicker { font-size: 0.72rem; padding: 0.4rem 0.75rem; }
  .hero-content h1 { font-size: 1.55rem; line-height: 1.05; margin-bottom: 0.7rem; }
  .hero-content p { font-size: 0.92rem; line-height: 1.45; margin-bottom: 1rem; }
  .hero-actions { gap: 0.6rem; }
  .hero-actions .btn-download { padding: 0.68rem 1rem; font-size: 0.82rem; }
  .hero-visual { padding: 0 1rem 4.2rem; }
  .hero-visual-frame { height: 185px; }
  .hero-dot { width: 14px; height: 3px; }
  .hero-arrow { width: 36px; height: 36px; }
}

/* ══ Comités responsive ══════════════════════════════════════ */
@media (max-width: 768px) {
  .comite-header-layout { flex-direction: column; align-items: flex-start; }
  .comite-header-icon { align-self: center; }
  .comite-etapas-row { flex-direction: column; }
  .comite-etapa-arrow { transform: rotate(90deg); }
  .comite-funciones-grid { grid-template-columns: 1fr; }
  .comites-otros-grid { grid-template-columns: 1fr; }
  .comite-resp-grid { grid-template-columns: 1fr; }
}

/* ══ Gallery mobile ══════════════════════════════════════════ */
@media (max-width: 640px) {
  .gallery-main-img { height: 220px; }
  .gallery-thumb img { width: 80px; height: 55px; }
}

/* ══ Cert comparison mobile ══════════════════════════════════ */
@media (max-width: 640px) {
  .cert-comparison-grid { grid-template-columns: 1fr; }
  .derechos-grid { grid-template-columns: 1fr; }
}

/* ══ Welcome / Gobierno desc mobile ══════════════════════════ */
@media (max-width: 720px) {
  .welcome-message { flex-direction: column; }
  .welcome-img { width: 100%; }
  .welcome-img img { height: 180px; }
  .gobierno-desc-layout { flex-direction: column; }
  .gobierno-desc-img { width: 100%; }
  .gobierno-desc-img img { height: 200px; }
}
