/* =============================================================================
   responsive.css — adaptación a tablet y escritorio
   El desktop NO es el mobile estirado: cambia la composición del hero, los
   filtros pasan a barra persistente, HOY pasa a panel lateral y la grilla
   semanal se vuelve una grilla real de 6 columnas.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   TABLET · ≥640px
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  :root { --gutter: 32px; }

  .mosaic { grid-template-columns: repeat(3, 1fr); }
  .btn { width: auto; min-width: 220px; }
  .btn-stack { flex-direction: row; flex-wrap: wrap; }
  .campaigns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
  .campaign-card { margin-bottom: 0; }
  .join { margin-inline: 0; padding-inline: 26px; border-radius: var(--radius); }
  .success__title { font-size: 42px; }
}

/* -----------------------------------------------------------------------------
   DESKTOP · ≥1024px
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  :root { --header-h: 66px; --nav-h: 66px; --logo-unsam-h: 37px; --logo-dh-h: 30px; }

  /* --- Header + nav en una sola barra ------------------------------------- */
  .site-header__inner { flex-wrap: nowrap; gap: 32px; }
  .brand-unsam, .cobrand { height: var(--header-h); }
  .cobrand__divider { height: 28px; }

  .site-nav {
    flex: 1 1 auto; order: 2; min-width: 0;
    margin-inline: 0; border-top: 0;
  }
  .site-header .chiprow-wrap { -webkit-mask-image: none; mask-image: none; }
  .site-header .site-nav__scroll { overflow: visible; justify-content: center; }
  .site-nav a {
    height: var(--header-h); font-size: 15px;
    padding-inline: 18px; border-bottom-width: 3px;
  }
  .site-nav a:first-child, .site-nav a:last-child { padding-inline: 18px; }
  .cobrand { order: 3; }
  .brand-unsam { order: 1; }

  /* --- Hero editorial de dos columnas, sin fotografía ---------------------
     El título ocupa la columna izquierda y la bajada con el buscador la
     derecha, alineadas al pie para que compartan línea de base. El espacio
     se resuelve con aire y una regla, sin ilustraciones.                   */
  .hero { padding: 30px 0 4px; }
  .hero__kicker { margin-bottom: 14px; }
  .hero__grid {
    display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 0 72px; align-items: end;
    border-top: 1px solid var(--border-strong); padding-top: 30px;
  }
  .hero h1, .hero__title {
    font-size: clamp(60px, 5.6vw, 82px); margin-bottom: 0;
  }
  .hero__aside { padding-bottom: 4px; }
  .hero__lede { font-size: 18px; max-width: 36ch; margin-bottom: 20px; }
  .search { height: 58px; }
  .search input { font-size: 17px; }

  /* --- Filtros: barra persistente de dos líneas ---------------------------- */
  .filters {
    margin-top: 20px; padding: 14px 0; border-top: 2px solid var(--border-strong);
    border-bottom: 1px solid var(--border-strong);
  }
  .filter-group { display: flex; align-items: center; gap: 14px; }
  .filter-group + .filter-group { margin-top: 10px; }
  .filter-group__label {
    display: block; flex: 0 0 62px;
    font-size: 11px; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--text-muted);
  }
  .chiprow { overflow: visible; flex-wrap: wrap; }
  .filters__bar { border-top: 0; padding-top: 2px; margin-top: 8px; }
  .results { margin-top: 10px; }

  /* --- Resultados ---------------------------------------------------------- */
  /* "Hoy" mantiene su lugar en el orden de la home (después de PARTICIPÁ) y
     gana ancho repartiéndose en dos columnas, en vez de pasar a un lateral.  */
  .today-rows {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px;
    border-top: 1px solid var(--border);
  }
  .row-activity { padding: 20px 40px 20px 0; }
  .row-activity__name { font-size: 26px; }
  .row-activity__inner { display: grid; grid-template-columns: 1fr 230px; gap: 24px; align-items: start; }
  .row-activity__where { text-align: right; padding-top: 22px; }

  .section__title { font-size: 34px; }
  .mosaic { grid-template-columns: repeat(4, 1fr); }
  .tile { aspect-ratio: 4 / 5; }   /* aplica igual a placeholder y a fotografía */
  .tile__name { font-size: 18px; }

  /* --- Territorio Debe Haber ----------------------------------------------- */
  .dh-rotulo { flex-direction: row; align-items: center; gap: 14px; }
  .dh-rotulo img, .dh-rotulo svg { height: 40px; }
  .dh-title { font-size: 46px; max-width: 24ch; }
  .campaign-card { padding: 22px 24px 24px; }
  .campaign-card__title { font-size: 25px; }

  /* --- Ficha de actividad en dos columnas ---------------------------------- */
  .detail-grid {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 52px; align-items: start;
  }
  .detail-grid__aside { position: sticky; top: calc(var(--header-h) + 20px); }
  .detail__name { font-size: clamp(48px, 4.4vw, 62px); }
  .join { padding: 26px 28px; }

  /* --- Grilla semanal real de 6 columnas ----------------------------------- */
  /* En desktop desaparecen las pestañas y el panel de un solo día: manda la
     grilla completa. Una vista por ancho, nunca las dos juntas.            */
  .daytabs, #panel-dia { display: none; }
  .weekgrid-wrap { display: block; }
  .weekgrid {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px; background: var(--border); border: 1px solid var(--border-strong);
  }
  .weekgrid__col { background: var(--background); min-height: 200px; }
  .weekgrid__head {
    position: sticky; top: var(--header-h); z-index: 10;
    background: var(--unsam-primary); color: var(--text-invert);
    padding: 9px 10px;
    font-family: var(--font-display); font-size: 14px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    display: flex; justify-content: space-between; align-items: baseline;
  }
  .weekgrid__head span { font-family: var(--font-body); font-size: 11px; opacity: .72; font-weight: 500; }
  .weekgrid__slot {
    display: block; padding: 10px; border-bottom: 1px solid var(--border);
    transition: background var(--t-fast);
  }
  .weekgrid__slot:hover { background: var(--unsam-primary-soft); }
  .weekgrid__time {
    font-family: var(--font-display); font-size: 15px; font-weight: 700;
    font-variant-numeric: tabular-nums; color: var(--unsam-primary);
  }
  .weekgrid__name { font-size: 13.5px; font-weight: 600; line-height: 1.18; margin-top: 1px; }
  .weekgrid__where { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
  .weekgrid__empty { padding: 16px 10px; font-size: 12.5px; color: var(--text-muted); }

  /* --- Sedes --------------------------------------------------------------- */
  #map, .map { height: 420px; }
  .venues-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }

  /* --- Más herramientas: dos bloques editoriales lado a lado --------------- */
  .tools { padding-block: 38px 44px; }
  .tools__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; }
  .tools__title { font-size: 34px; }
  .tools__toggle { margin-top: 0; flex: 0 0 auto; }
  .tools__grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: 24px; }
  .tool { border-bottom: 0; padding: 22px 40px 4px 0; }
  .tool + .tool { border-left: 1px solid var(--border); padding-left: 40px; }
  .tool:last-child { padding-bottom: 4px; }

  /* --- Footer -------------------------------------------------------------- */
  .footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; align-items: start; }
  .logo-plaque--unsam img { height: 30px; }
  .logo-plaque--dh img    { height: 25px; }
  .footer-block + .footer-block { margin-top: 0; padding-top: 0; border-top: 0; }

  /* --- Jabalí: popover anclado en vez de sheet ----------------------------- */
  .jabali-dock { right: 26px; bottom: 22px; gap: 10px; }
  .jabali-fab { width: 96px; }
  .jabali-bubble { max-width: 226px; font-size: 14px; }
  .jabali-bubble::after { right: 40px; }
  .sheet {
    left: auto; right: 28px; bottom: 108px;
    width: 420px; max-height: 74vh;
    border: 1px solid var(--border-strong); border-top: 4px solid var(--unsam-primary);
    transform: translateY(12px); opacity: 0;
    transition: transform var(--t-base) var(--ease), opacity var(--t-base);
  }
  .sheet.is-open { transform: none; opacity: 1; }
  .sheet__handle { display: none; }
  .scrim { background: rgba(10,16,26,.28); }
  .page-bottom-space { height: 72px; }
}

/* -----------------------------------------------------------------------------
   ANCHO GRANDE · ≥1400px
   -------------------------------------------------------------------------- */
@media (min-width: 1400px) {
  :root { --gutter: 48px; }
  .hero h1 { font-size: 96px; }
}
