/* Comprehensive responsive refinements for all FCPB pages */

/* Smoother base scaling on small viewports */
html { -webkit-text-size-adjust: 100%; }

/* === Container tightens on small screens === */
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
}

/* === NAV === */
@media (max-width: 720px) {
  .fcpb-nav { padding: 12px 0; }
  .fcpb-nav.is-scrolled { padding: 8px 0; }
  .fcpb-nav-inner { gap: 12px; padding: 0 16px; }
  .fcpb-brand img { width: 44px !important; height: 44px !important; }
  .fcpb-brand-name { font-size: 15px !important; letter-spacing: 1.5px; }
  .fcpb-cta { padding: 9px 12px; font-size: 11px; }
}

/* === HOME HERO === */
@media (max-width: 720px) {
  .home-hero { padding-top: 100px; }
  .home-hero-title { font-size: clamp(44px, 12vw, 72px) !important; line-height: 0.95 !important; }
  .home-hero-lede { font-size: 16px; }
  .home-hero-ctas .btn-primary, .home-hero-ctas .btn-ghost { padding: 14px 18px; font-size: 13px; width: 100%; justify-content: center; }
  .home-hero-ctas { flex-direction: column; width: 100%; }
  .home-hero-stats { margin-top: 40px; }
  .home-hero-stat-n { font-size: 32px !important; }
  .home-hero-stat-s { font-size: 10px; }
  .home-hero-right { max-width: none; }
  .home-ticker { font-size: 12px; padding: 10px 0; }
}

/* === Section titles === */
@media (max-width: 720px) {
  .section-title { font-size: clamp(32px, 9vw, 52px) !important; line-height: 1 !important; }
  .page-hero { padding: 120px 0 48px; }
  .page-hero h1 { font-size: clamp(40px, 11vw, 64px) !important; }
  .page-hero p { font-size: 16px; }
}

/* === CATEGORIAS === */
@media (max-width: 720px) {
  .cats-scroll { gap: 14px; padding: 4px 20px 24px; margin: 0 -20px; }
  .cat-card { flex: 0 0 82vw; max-width: 320px; }
  .cat-title { font-size: 26px; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .cats-actions { width: 100%; justify-content: space-between; }
}

/* === CALENDAR === */
@media (max-width: 720px) {
  .cal-box, .cal-detail { padding: 18px; border-radius: 14px; }
  .cal-day { font-size: 12px; padding: 4px; }
  .cal-day-dot { width: 4px; height: 4px; }
  .cal-weekdays div { font-size: 10px; padding: 4px 0; }
  .cal-month { font-size: 18px; }
  .cal-detail-date { font-size: 20px; }
  .cal-filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
  .cal-filter { flex-shrink: 0; font-size: 11px; padding: 6px 12px; }
  .match-row { padding: 12px; gap: 10px; }
  .match-hhmm { font-size: 18px; }
  .match-teams { font-size: 14px; flex-wrap: wrap; }
  .match-venue { font-size: 11px; }
}

/* === VALORES === */
@media (max-width: 720px) {
  .valor-card { padding: 24px 20px; }
  .valor-icon { font-size: 32px; margin: 14px 0 10px; }
  .valor-t { font-size: 19px; }
  .valor-d { font-size: 13px; }
}

/* === SCHEDULE TABLE (mobile stacks) === */
@media (max-width: 760px) {
  .schedule-table { border-radius: 12px; }
  .schedule-row { grid-template-columns: 1fr; padding: 16px 18px; gap: 4px; }
  .schedule-cat { font-size: 18px; margin-bottom: 6px; }
  .schedule-cell { text-align: left; font-size: 14px; display: flex; justify-content: space-between; padding: 2px 0; }
  .schedule-cell::before {
    content: attr(data-d);
    opacity: 0.5; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-size: 11px;
  }
}

/* === GALLERY === */
@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; gap: 8px; }
}
@media (max-width: 420px) {
  .gallery-grid { grid-auto-rows: 140px; }
}

/* === SPONSORS === */
@media (max-width: 480px) {
  .sponsors-grid { grid-template-columns: 1fr 1fr; }
  .sponsor-item { padding: 22px 14px; font-size: 12px; }
}

/* === CTA box === */
@media (max-width: 720px) {
  .cta-box { padding: 56px 24px; border-radius: 18px; }
  .cta-bg-ball { font-size: 180px; right: -30px; top: -30px; }
  .cta-lede { font-size: 15px; }
}

/* === STAFF === */
@media (max-width: 720px) {
  .staff-grid { gap: 12px; }
  .staff-card { padding: 12px; }
  .staff-name { font-size: 14px; }
  .staff-role { font-size: 11px; }
}

/* === FOOTER === */
@media (max-width: 720px) {
  .fcpb-footer { padding: 56px 0 0; margin-top: 80px; }
  .fcpb-footer-inner { grid-template-columns: 1fr; gap: 32px; padding: 0 20px 40px; }
  .fcpb-footer-bottom { padding: 18px 20px; font-size: 11px; }
}

/* === INSCRIPCION page === */
@media (max-width: 900px) {
  .insc-form { padding: 24px; border-radius: 14px; }
  .step-indicator { flex-wrap: wrap; gap: 6px; }
  .step-pill { flex: 1 1 45%; font-size: 11px; padding: 10px 8px; }
}
@media (max-width: 540px) {
  .insc-form h2 { font-size: 22px !important; }
  .form-actions .btn-navy, .form-actions .btn-ghost, .form-actions .btn-primary { padding: 12px 16px; font-size: 13px; }
  .success-box { padding: 32px 20px; }
  .success-box h2 { font-size: 28px !important; }
}

/* === CATEGORIAS page === */
@media (max-width: 640px) {
  .cats-full-grid { gap: 14px; }
  .cat-full-card { border-radius: 14px; }
  .fact-strip { border-radius: 12px; }
  .fact-cell { padding: 22px 16px; }
  .fact-n { font-size: 40px; }
  .fact-l { font-size: 10px; letter-spacing: 1.5px; }
}

/* === CONTACTO page === */
@media (max-width: 900px) {
  .contacto-grid { gap: 24px; padding: 40px 0 24px; }
  .info-card { padding: 22px; }
  .map-box { aspect-ratio: 4/3; }
}
@media (max-width: 540px) {
  .info-icon { width: 36px; height: 36px; font-size: 16px; }
  .info-value { font-size: 14px; }
  .info-row { padding: 10px 0; gap: 10px; }
}

/* === Tweaks panel: don't overflow on mobile === */
@media (max-width: 380px) {
  [style*="position: fixed"][style*="right: 20"] { right: 10px !important; left: 10px !important; width: auto !important; }
}

/* === Prevent horizontal overflow === */
html, body { overflow-x: hidden; max-width: 100%; }
img, video { max-width: 100%; height: auto; }

/* Ensure tap targets on mobile are >= 44px */
@media (max-width: 720px) {
  .fcpb-link { padding: 10px 0; }
  .cal-filter { min-height: 36px; }
  .arrow-btn { width: 40px; height: 40px; }
}

/* Utility: form field sizes */
@media (max-width: 540px) {
  .form-field input, .form-field select, .form-field textarea { padding: 12px 14px; font-size: 15px; }
  .form-field label { font-size: 11px; }
}

/* ============================================================
   FCPB · Aviso emergente del club (popup administrable)
   ============================================================ */
.fcpb-aviso-fondo {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(11, 37, 69, .55); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .22s ease;
}
.fcpb-aviso-fondo.is-visible { opacity: 1; }
.fcpb-aviso-fondo.is-cerrando { opacity: 0; }
.fcpb-aviso {
  position: relative; background: #fff; border-radius: 18px;
  max-width: 440px; width: 100%; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(11, 37, 69, .5);
  transform: translateY(16px) scale(.97);
  transition: transform .28s cubic-bezier(.3, 1.2, .4, 1);
}
.fcpb-aviso-fondo.is-visible .fcpb-aviso { transform: none; }
.fcpb-aviso-top { height: 6px; background: var(--c, #1D4ED8); }
.fcpb-aviso-x {
  position: absolute; top: 14px; right: 12px;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  border: none; background: #F1F5F9; color: #5F6B7A; font-size: 14px; line-height: 1;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.fcpb-aviso-x:hover { background: #FBEAEA; color: #D64545; transform: rotate(90deg); }
.fcpb-aviso-in { padding: 26px 24px; font-family: 'Inter', system-ui, sans-serif; }
.fcpb-aviso-ico { font-size: 40px; line-height: 1; }
.fcpb-aviso-tit {
  font-family: 'Archivo', system-ui, sans-serif; font-size: 21px; font-weight: 800;
  margin: 10px 0 8px; color: #0B2545; line-height: 1.25;
}
.fcpb-aviso-msg { font-size: 15px; line-height: 1.65; color: #3C4657; }
.fcpb-aviso-msg p { margin: 0 0 10px; }
.fcpb-aviso-msg p:last-child { margin-bottom: 0; }
.fcpb-aviso-msg ul { margin: 0 0 10px; padding-left: 20px; }
.fcpb-aviso-msg a { color: var(--c, #1D4ED8); }
.fcpb-aviso-btn {
  display: inline-block; margin-top: 16px; background: var(--c, #1D4ED8); color: #fff;
  text-decoration: none; padding: 11px 20px; border-radius: 10px;
  font-weight: 700; font-size: 15px; transition: filter .18s ease, transform .18s ease;
}
.fcpb-aviso-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
@media (max-width: 520px) {
  .fcpb-aviso-fondo { align-items: flex-end; padding: 0; }
  .fcpb-aviso { border-radius: 20px 20px 0 0; max-width: 100%; }
  .fcpb-aviso-in { padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); }
  .fcpb-aviso-btn { display: block; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .fcpb-aviso-fondo, .fcpb-aviso { transition: none; }
}

/* ---------- Galería: ampliar foto ---------- */
.gal-lightbox {
  position: fixed; inset: 0; z-index: 9500;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(6, 23, 53, .92); backdrop-filter: blur(4px);
  animation: galIn .2s ease both; cursor: zoom-out;
}
.gal-lightbox img {
  max-width: min(1100px, 100%); max-height: 88vh; object-fit: contain;
  border-radius: 12px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); cursor: default;
}
.gal-lightbox-x {
  position: absolute; top: 18px; right: 20px; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 18px;
  transition: background .18s ease, transform .18s ease;
}
.gal-lightbox-x:hover { background: rgba(255,255,255,.24); transform: rotate(90deg); }
@keyframes galIn { from { opacity: 0; } to { opacity: 1; } }

/* Bajada bajo el título de sección */
.section-sub {
  font-size: 15px; line-height: 1.6; opacity: .7;
  margin: 10px 0 0; max-width: 520px;
}
