/* sede.html only — Mobile design polish (native iOS/Android feel).
   Scope: <= 768px, or touch devices <= 1024px (cubre iPhone Pro Max en horizontal).
   NO afecta escritorio ni otras páginas. Incluido solo en sede.html. */

@media (max-width: 768px),
  ((hover: none) and (pointer: coarse) and (max-width: 1024px)) {
  /* ───────────────── 1. Base canvas ───────────────── */
  body.body-bg {
    background: #f4f5f7 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  a,
  button,
  .btn-main,
  .hotel-btn {
    -webkit-tap-highlight-color: transparent;
  }
  ::selection {
    background: rgba(166, 137, 69, 0.25);
  }

  .container.section-padding30 {
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-top: 8px !important;
    margin-top: 4px !important;
    max-width: 100% !important;
  }

  /* Quitamos offset decorativo de Talavera en móvil para bordes limpios */
  .intro-content.talavera-offset,
  .video-section.talavera-offset {
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
  .intro-content.talavera-offset {
    padding: 2.75rem 1.25rem !important;
  }

  /* ───────────────── 2. Intro / Hero ───────────────── */
  .intro-content > div {
    max-width: 100% !important;
  }
  .intro-content > div > p.mb-3 {
    font-size: 0.92rem !important;
    margin-bottom: 14px !important;
    line-height: 1.55 !important;
    opacity: 0.88;
  }
  .intro-content h1 {
    font-size: clamp(1.45rem, 5.5vw, 1.85rem) !important;
    line-height: 1.22 !important;
    letter-spacing: -0.015em !important;
    margin-bottom: 14px !important;
    font-weight: 800 !important;
  }
  .intro-content > div > p:not(.mb-3) {
    font-size: 1rem !important;
    margin-bottom: 1.75rem !important;
    line-height: 1.4 !important;
  }
  .intro-content > div > p:not(.mb-3) span {
    font-size: 0.82rem !important;
    opacity: 0.85;
  }
  .intro-content .btn-main {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 14px 40px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
    min-height: 52px;
    min-width: 220px;
    letter-spacing: 0.005em;
    box-shadow:
      0 6px 20px rgba(166, 137, 69, 0.4),
      0 2px 6px rgba(166, 137, 69, 0.25);
    transition:
      transform 0.15s ease,
      box-shadow 0.2s ease;
    touch-action: manipulation;
  }
  .intro-content .btn-main:active {
    transform: scale(0.97);
    box-shadow:
      0 3px 10px rgba(166, 137, 69, 0.3),
      0 1px 3px rgba(166, 137, 69, 0.2);
  }

  /* ───────────────── 3. Section titles ───────────────── */
  .container h2 {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.25 !important;
    padding-bottom: 6px !important;
  }
  .container .row.mb-5 > .col-12.text-center h2 {
    font-size: 1.55rem !important;
    margin-bottom: 2px !important;
  }
  .container .row.mb-5 > .col-12.text-center.mb-4 {
    margin-bottom: 16px !important;
  }
  .mb-30 {
    margin-bottom: 14px !important;
  }
  .container h3.mb-30 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    text-align: left !important;
    padding: 0 2px;
  }

  /* ───────────────── 4. Comités Organizadores (iOS grouped list) ───────────────── */
  .committee-box {
    border-radius: 14px !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow:
      0 1px 3px rgba(0, 0, 0, 0.03),
      0 8px 24px rgba(0, 0, 0, 0.04) !important;
    margin-bottom: 14px !important;
    overflow: hidden !important;
    background: white !important;
  }
  .committee-box h4 {
    font-size: 0.92rem !important;
    padding: 14px 18px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
  }
  .committee-box > div[style*="padding"] {
    padding: 2px 18px 10px 18px !important;
  }
  .committee-box ul {
    column-count: 1 !important;
    padding-left: 0 !important;
    margin-bottom: 0 !important;
    display: block !important;
    grid-template-columns: none !important;
    column-gap: 0 !important;
    gap: 0 !important;
  }
  .committee-box ul li {
    font-size: 0.9rem !important;
    padding: 12px 2px !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    line-height: 1.45 !important;
    color: #2a2d35;
  }
  .committee-box ul li:last-child {
    border-bottom: none !important;
  }
  .committee-box ul li strong {
    color: var(--buap-blue) !important;
    font-weight: 700 !important;
  }

  /* ───────────────── 5. Info Cards (ICUAP / BUAP + Weather) ───────────────── */
  .grid-premium {
    gap: 14px !important;
    grid-template-columns: 1fr !important;
  }
  .info-card {
    border-radius: 16px !important;
    padding: 22px 20px !important;
    box-shadow:
      0 1px 3px rgba(0, 0, 0, 0.04),
      0 10px 30px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
  }
  .info-card h2 {
    font-size: 1.25rem !important;
    margin-bottom: 14px !important;
  }
  .info-card h3 {
    font-size: 1.05rem !important;
    margin-top: 20px !important;
    font-weight: 700 !important;
  }
  .info-card p {
    font-size: 0.95rem !important;
    line-height: 1.65 !important;
  }
  .info-card ul {
    margin-top: 12px !important;
  }
  .info-card ul li {
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
    margin-bottom: 0.95rem !important;
  }
  .info-card > div[style*="aspect-ratio"] {
    margin-bottom: 1.5rem !important;
    border-radius: 12px !important;
  }

  .weather-widget {
    border-radius: 14px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
  }
  .weather-widget h4 {
    font-size: 1rem !important;
  }

  /* ───────────────── 6. Hotel SEDE — featured card ───────────────── */
  .hotel-sede-card {
    flex-direction: column !important;
    border-radius: 18px !important;
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.05),
      0 16px 40px rgba(0, 0, 0, 0.06) !important;
    overflow: hidden !important;
  }
  .hotel-sede-img {
    flex: 0 0 auto !important;
    min-height: 240px !important;
    width: 100% !important;
  }
  .hotel-sede-badge {
    font-size: 0.7rem !important;
    padding: 6px 14px !important;
    top: 14px !important;
    left: 14px !important;
    letter-spacing: 1px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  .hotel-sede-info {
    padding: 22px 18px !important;
    flex: 1 1 auto !important;
  }
  .hotel-sede-info h3 {
    font-size: 1.3rem !important;
    margin-bottom: 4px !important;
    font-weight: 700 !important;
    color: var(--buap-blue) !important;
  }
  .hotel-sede-info .hotel-subtitle {
    font-size: 0.88rem !important;
    margin-bottom: 18px !important;
  }
  .hotel-detail-row {
    font-size: 0.88rem !important;
    margin-bottom: 0 !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    gap: 10px !important;
    align-items: flex-start !important;
    line-height: 1.5 !important;
  }
  .hotel-detail-row:first-of-type {
    padding-top: 6px !important;
  }
  .hotel-detail-row:last-of-type {
    border-bottom: none !important;
  }
  .hotel-detail-row .icon {
    font-size: 1rem !important;
    min-width: 22px !important;
    margin-top: 1px;
  }
  .hotel-detail-row a {
    word-break: break-word;
  }
  .hotel-buttons {
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 18px !important;
  }
  .hotel-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 14px 20px !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
    min-height: 50px;
    font-weight: 600 !important;
    touch-action: manipulation;
  }
  .hotel-btn:active {
    transform: scale(0.98);
  }

  /* ───────────────── 7. Alt Hotels (Calli, El Cristo) ───────────────── */
  .row.justify-content-center > .col-lg-5.col-md-6 {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 14px !important;
  }
  .hotel-sec-card {
    border-radius: 16px !important;
    margin-bottom: 0 !important;
    box-shadow:
      0 1px 3px rgba(0, 0, 0, 0.04),
      0 10px 30px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
  }
  .hotel-sec-img {
    height: 190px !important;
  }
  .hotel-sec-info {
    padding: 18px 18px 20px !important;
  }
  .hotel-sec-info h4 {
    font-size: 1.15rem !important;
    margin-bottom: 12px !important;
    color: var(--buap-blue) !important;
    font-weight: 700 !important;
  }
  .h-sec-row {
    font-size: 0.88rem !important;
    padding: 10px 0 !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    gap: 10px;
    align-items: flex-start;
    line-height: 1.5;
  }
  .h-sec-row:last-of-type {
    border-bottom: none;
  }
  .h-sec-row .icon {
    min-width: 22px;
    text-align: center;
  }
  .hotel-sec-details {
    margin-top: 14px !important;
  }
  .hotel-sec-details summary {
    font-size: 0.9rem !important;
    padding: 13px 16px !important;
    border-radius: 10px !important;
  }
  .h-prices {
    font-size: 0.82rem !important;
    margin-top: 12px !important;
  }
  .h-prices th,
  .h-prices td {
    padding: 10px 6px !important;
  }

  /* ───────────────── 8. Cuotas — iOS grouped table ───────────────── */
  .table-responsive {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 16px !important;
    overflow-x: hidden !important;
  }
  .table-responsive > table {
    border-radius: 16px !important;
    overflow: hidden !important;
    background: white !important;
    box-shadow:
      0 1px 3px rgba(0, 0, 0, 0.04),
      0 10px 30px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }
  .table-responsive th,
  .table-responsive td {
    font-size: 0.82rem !important;
    padding: 12px 8px !important;
    vertical-align: middle !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
  }
  .table-responsive thead th {
    font-size: 0.75rem !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
  }
  .table-responsive tbody tr[style*="e9ecef"] td {
    font-size: 0.75rem !important;
    letter-spacing: 0.08em !important;
    padding: 10px 8px !important;
  }

  /* ───────────────── 9. Sponsors ───────────────── */
  .sponsors-wrapper {
    padding: 0 !important;
  }
  .sponsors-header {
    margin-bottom: 12px !important;
  }
  .sponsors-header h2 {
    font-size: 1.3rem !important;
  }
  .sponsors-header h3 {
    font-size: 1.1rem !important;
    margin-bottom: 4px !important;
  }

  /* ───────────────── 10. Section rhythm / misc ───────────────── */
  .row.mb-5,
  .row.justify-content-center.mb-5 {
    margin-bottom: 24px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .row.mb-5 > .col-12,
  .row.mb-5 > .col-lg-10 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .header-top {
    padding: 12px 0 !important;
  }
  .header-top .header-social {
    gap: 18px !important;
  }
  .header-top .header-social li a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .header-top .header-social li a:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.92);
  }

  footer.footer-area {
    padding: 22px 16px !important;
    font-size: 0.85rem !important;
    text-align: center !important;
    margin-top: 2rem !important;
  }
  footer.footer-area p {
    margin: 0 !important;
  }
  #back-top {
    position: fixed;
    right: 12px;
    bottom: max(84px, calc(env(safe-area-inset-bottom) + 68px));
    z-index: 30;
  }
}

/* Very small phones (iPhone SE, older Android) */
@media (max-width: 400px) {
  .intro-content h1 {
    font-size: 1.45rem !important;
  }
  .container h2 {
    font-size: 1.3rem !important;
  }
  .container .row.mb-5 > .col-12.text-center h2 {
    font-size: 1.4rem !important;
  }
  .committee-box ul li {
    font-size: 0.87rem !important;
  }
  .hotel-sede-info h3 {
    font-size: 1.2rem !important;
  }
  .hotel-sec-info h4 {
    font-size: 1.1rem !important;
  }
  .table-responsive th,
  .table-responsive td {
    font-size: 0.78rem !important;
    padding: 10px 6px !important;
  }
}
