/* ─────────────────────────────────────────────
   RESPONSIVE — Mobile First
   Breakpoints: 480 / 768 / 1024 / 1280
───────────────────────────────────────────── */

/* ════════════════════════════════
   BASE: 0 → 479px (móvil pequeño)
   Todo el layout base ya es mobile
════════════════════════════════ */

/* Cursor oculto en touch */
@media (hover: none) {
  #cur, #cur-follower { display: none; }
  body { cursor: auto; }
  button, a { cursor: pointer; }
}

/* NAV mobile */
@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* HERO mobile — columna única */
@media (max-width: 767px) {
  #hero {
    grid-template-columns: 1fr;
    min-height: 100svh;
  }

  .hero__left {
    display: none; /* La imagen hero se mueve al right en mobile */
  }

  .hero__right {
    padding: clamp(6rem, 15vw, 8rem) var(--pad-x) clamp(3rem, 8vw, 4rem);
    justify-content: flex-end;
    min-height: 100svh;
    /* Imagen de fondo suave en mobile */
    background-image: url('../img/modigliana.webp');
    background-size: 55% auto;
    background-repeat: no-repeat;
    background-position: right top;
  }

  .hero__name-inner {
    font-size: clamp(3.5rem, 14vw, 5.5rem);
  }

  .hero__name-inner--sub {
    font-size: clamp(2.8rem, 11vw, 4.5rem);
  }

  .hero__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .hero__desc {
    max-width: 100%;
  }
}

/* COUNTDOWN mobile */
@media (max-width: 600px) {
  .cd__grid {
    gap: clamp(0.75rem, 3vw, 1.5rem);
  }

  .cd__sep {
    font-size: clamp(2rem, 8vw, 4rem);
    padding-top: 0.15em;
  }

  .cd__event {
    gap: clamp(1rem, 3vw, 1.5rem);
  }

  .cd__event-divider {
    display: none;
  }
}

@media (max-width: 380px) {
  .cd__num {
    font-size: clamp(3rem, 15vw, 5rem);
  }
  .cd__sep { display: none; }
  .cd__grid { gap: 1.5rem; }
}

/* BIO mobile */
@media (max-width: 767px) {
  #bio {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .bio__portrait-wrap {
    height: clamp(280px, 70vw, 400px);
  }

  .bio__portrait-gradient {
    background: linear-gradient(
      to bottom,
      transparent 60%,
      var(--bg-hero) 100%
    );
  }

  .bio__content {
    padding: clamp(2.5rem, 6vw, 3rem) var(--pad-x);
  }

  .bio__stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* GALLERY mobile */
@media (max-width: 767px) {
  .gallery__grid {
    grid-template-columns: 1fr 1fr;
    margin: 0 var(--pad-x);
  }

  .gallery__grid--featured {
    grid-template-columns: 1fr;
  }

  .obra-card__inner {
    min-height: clamp(220px, 55vw, 320px);
    padding: clamp(0.75rem, 2vw, 1.25rem);
  }
}

@media (max-width: 479px) {
  .gallery__grid {
    grid-template-columns: 1fr;
    margin: 0 var(--pad-x);
  }

  .obra-card__inner {
    min-height: clamp(260px, 75vw, 380px);
  }
}

/* MODAL mobile — pantalla completa */
@media (max-width: 767px) {
  #modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  #modal-box {
    grid-template-columns: 1fr;
    max-height: 95svh;
    max-width: 100%;
    width: 100%;
    transform: translateY(60px) scale(1);
    border-radius: 0;
  }

  #modal-overlay.is-open #modal-box {
    transform: translateY(0) scale(1);
  }

  #modal-img-wrap {
    position: relative;
    min-height: clamp(220px, 55vw, 320px);
  }

  #modal-img {
    max-height: 40svh;
  }

  #modal-info {
    padding: clamp(1.5rem, 4vw, 2rem);
  }
}

/* EXPOSICIÓN mobile */
@media (max-width: 767px) {
  .expo__data {
    grid-template-columns: 1fr 1fr;
  }

  .expo__data-item:nth-child(2) {
    border-right: none;
  }

  .expo__data-item:nth-child(3) {
    border-top: 1px solid var(--border);
  }

  .expo__data-item {
    border-right: 1px solid var(--border);
  }

  .expo__data-item:nth-child(even) {
    border-right: none;
  }
}

@media (max-width: 479px) {
  .expo__data {
    grid-template-columns: 1fr;
  }
  .expo__data-item {
    border-right: none;
    border-top: 1px solid var(--border);
  }
}

/* CONTACTO mobile */
@media (max-width: 767px) {
  .contact__top {
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 3rem);
  }
}

/* MARQUEE — no necesita breakpoints, usa clamp */

/* ════════════════════════════════
   768px+ (tablet)
════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1023px) {
  #hero {
    grid-template-columns: 1fr 1fr;
  }

  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery__grid--featured {
    grid-template-columns: 1.5fr 1fr;
  }

  .expo__data {
    grid-template-columns: repeat(2, 1fr);
  }

  .expo__data-item:nth-child(2) {
    border-right: none;
  }
  .expo__data-item:nth-child(3) {
    border-top: 1px solid var(--border);
  }
  .expo__data-item:nth-child(4) {
    border-right: none;
    border-top: 1px solid var(--border);
  }
}

/* ════════════════════════════════
   1024px+ (desktop)
════════════════════════════════ */
@media (min-width: 1024px) {
  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery__grid--featured {
    grid-template-columns: 2fr 1fr;
  }
}

/* ════════════════════════════════
   1280px+ (desktop grande)
════════════════════════════════ */
@media (min-width: 1280px) {
  .hero__name-inner {
    font-size: clamp(5.5rem, 7vw, 8rem);
  }
}