/* ════════════════════════════════════════════════════════
   VARIABLES GLOBALES
   ════════════════════════════════════════════════════════ */
:root {
  --primary: #710014;
  --primary-light: #F1D27A;
  --text: #f2f1ed;
  --secondarytext: #A1A1AA;
  --border: #161616;
  --bg: #161616;
  --bglight: #1e1e1e;
  --accent: #e7c159;
  --radius: 8px;
  --shadow: 0 8px 20px rgba(181, 127, 228, 0.15);
  --text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  --hovershadow: 20px 50px 50px rgba(181, 127, 228, 0.15);
}

/* ════════════════════════════════════════════════════════
   RESET Y BASE
   ════════════════════════════════════════════════════════ */

* {
  box-sizing: border-box;
  font-family: 'Playfair Display', serif;
}

body {
  margin: 0;
  padding: 20px;
  padding-top: 70px;
  color: var(--text);
  background: var(--bg);
  width: 100%;
}

/* ════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════ */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--bg);
}

.festival-name {
  text-decoration: none;
  color: var(--text);
  font-size: clamp(16px,2rem,40px);
}

.festival-name:hover {
  color: var(--primary-light);
}

.city {
  color: var(--text);
  text-decoration: none;
  font-size: clamp(14px, 2.5vw, 20px);
  padding-bottom: 4px;
}

.city:hover {
  color: var(--primary-light);
}

#togglebtn {
  border: none;
  font-size: 1.5rem;
  background-color: var(--bg);
  color: var(--text);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

#togglebtn:hover {
  color: var(--primary-light);
}

/* ════════════════════════════════════════════════════════
   SECCIÓN PRINCIPAL (HERO)
   ════════════════════════════════════════════════════════ */
.principal {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  min-height: 100vh;
}

.fotoprincipal {
  width: 50vw;
  min-height: 100vh;
  flex-shrink: 0;
}

.textoprincipal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  max-width: 600px;
  color: white;
  padding: 2rem;
}

.title:hover {
  color: var(--accent);
  transform: translateY(-5px);
}

.description {
  color: var(--secondarytext);
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  margin-right: 12px;
  background-color: var(--primary);
  text-decoration: none;
  border: none;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.btn:hover {
  background-color: var(--primary-light);
}

/* ════════════════════════════════════════════════════════
   SCHEDULE (HORARIOS)
   ════════════════════════════════════════════════════════ */
.schedule {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 2rem 0;
}

.horario-tarjetas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-bottom: 10px;
  width: 100%;
}

.tarjeta {
  width: 100%;
  height: 380px;
  display: flex;
  flex-direction: column;
  background-color: #1b1b1b;
  border-radius: var(--radius);
  overflow: hidden;
}

.photohorario {
  width: 100%;
  height: 75%;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.4s ease, filter 0.4s ease;
}

.tarjeta:hover .photohorario {
  transform: scale(1.05);
  filter: brightness(0.9);
}

/* ════════════════════════════════════════════════════════
   TABLA DE CHEFS
   ════════════════════════════════════════════════════════ */
.chefs {
  padding: 4rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}

thead tr {
  border-bottom: 1px solid var(--primary);
}

th {
  text-align: left;
  padding: 12px 16px;
  color: var(--primary-light);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
}

td {
  padding: 16px;
  color: var(--secondarytext);
  border-bottom: 1px solid #222;
  font-size: 0.95rem;
}

td:first-child {
  color: var(--text);
  font-style: italic;
}

tbody tr {
  transition: background 0.2s ease;
}

tbody tr:hover {
  background-color: var(--bglight);
}

tbody tr:hover td {
  color: var(--text);
}

/* ════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════ */
footer {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "contact links";
  align-items: center;
  padding-top: 3rem;
}

.contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.email:hover,
.numero:hover,
.lugar:hover {
  color: var(--primary-light);
}

.links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
}

.link:link,
.link:visited {
  color: var(--secondarytext);
  text-decoration: none;
}

.link:hover,
.link:active {
  color: var(--primary-light);
  text-decoration: none;
}

/* ════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════ */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  background: black;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

#sidebar.active {
  transform: translateX(0);
}

.sidebarbtn {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
  border: none;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  padding: 8px 8px;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  width: 100%;

}

.sidebarbtn:hover {
  color: var(--primary-light);
  background-color: var(--bglight);
  
}

/* ════════════════════════════════════════════════════════
   FORMULARIO
   ════════════════════════════════════════════════════════ */
#form {
  padding: 16px;
  border-radius: var(--radius);
  margin-top: 30px;
  width: 100%;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  padding: 8px;
  gap: 6px;
}

.field:hover {
  background-color: var(--bglight);
  color: var(--accent);
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid #333;
  background: #0f0f0f;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
}

textarea {
  resize: none;
  min-height: 80px;
}

.submitbtn {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submitbtn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

/* ════════════════════════════════════════════════════════
   MULTIMEDIA
   ════════════════════════════════════════════════════════ */
.multimedia {
  padding-bottom: 4rem;
}

.contenedor-multimedia {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.tarjetamtd {
  position: relative;
  overflow: hidden;
  width: 80vw;
  margin-top: 5rem;
  border-radius: var(--radius);
}

.photo {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .55s cubic-bezier(.25, .46, .45, .94);
}

.tarjetamtd:hover .photo {
  transform: scale(1.04);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24, 20, 14, .75) 0%, transparent 55%);
  opacity: 0;
  transition: opacity .3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
}

.tarjetamtd:hover .photo-overlay {
  opacity: 1;
}

.item-title {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1rem, 2vw, 2rem);
  font-weight: 300;
  color: white;
  transform: translateY(8px);
  transition: transform .3s ease;
}

.tarjetamtd:hover .item-title,
.tarjetamtd:hover .item-meta {
  transform: translateY(0);
}

.item-title:hover {
  color: var(--accent);
}

/* ════════════════════════════════════════════════════════
   CARRUSEL
   ════════════════════════════════════════════════════════ */
.carrusel {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 1rem;
  height: 600px;
  overflow-y: hidden;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-block: 8px;
}

.carrusel::-webkit-scrollbar {
  height: 8px;
}

.carrusel::-webkit-scrollbar-track {
  background: transparent;
}

.carrusel::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: var(--radius);
  border: 2px solid transparent;
  background-clip: content-box;
}

.carrusel::-webkit-scrollbar-thumb:hover {
  background: #333;
}

.carrusel-arrow {
  position: absolute;
  z-index: 2;
  border-radius: 100%;
  border: 1px solid #1b1b1b;
  padding: 8px;
  width: 40px;
  height: 40px;
  background-color: #3333337d;
  color: white;
  top: 40%;
}

.carrusel-arrow:hover {
  background-color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.carrusel-arrow-left {
  margin-left: 8px;
}

.carrusel-arrow-right {
  right: 0;
  margin-right: 8px;
}

.cardcarrusel {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  background-color: var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

.foto-carrusel {
  width: 100%;
  height: 80%;
  object-fit: cover;
  display: block;
  transition: transform .55s cubic-bezier(.25, .46, .45, .94);
}

.cardcarrusel:hover .foto-carrusel {
  transform: scale(1.04);
}

/* ════════════════════════════════════════════════════════
   MEDIA QUERIES

   Aplican estilos condicionalmente según el tamaño
   de la pantalla.

   max-width: activa en pantallas MENORES O IGUALES al valor.
   min-width: activa en pantallas MAYORES O IGUALES al valor.

   El CSS base está pensado para desktop.
   Las media queries sobreescriben para pantallas menores.
   ════════════════════════════════════════════════════════ */

/* ─── MÓVIL PEQUEÑO ≤ 480px ──────────────────────────── */
@media (max-width: 480px) {

  body {
    padding: 12px;
    padding-top: 70px;
  }

  .principal {
    flex-direction: column;
    min-height: auto;
    gap: 0;
  }

  .fotoprincipal {
    width: 100vw;
    min-height: 55vw;
    margin-left: -12px;
    order: -1;
  }

  .textoprincipal {
    max-width: 100%;
    padding: 1.5rem 0.5rem;
  }

  .introtitle {
    font-size: clamp(1.8rem, 9vw, 2.5rem);
  }

  .btn {
    display: block;
    margin-right: 0;
    margin-top: 12px;
    text-align: center;
  }

  .horario-tarjetas {
    grid-template-columns: 1fr;
  }

  .tarjeta {
    height: 320px;
  }

  .tarjetamtd {
    width: 95vw;
    margin-top: 2rem;
  }

  .cardcarrusel {
    max-width: 260px;
  }

  .carrusel {
    height: 340px;
  }

  footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "contact"
      "links";
    gap: 1.5rem;
  }

  .links {
    align-items: flex-start;
  }

  /* ── Tabla responsive ───────────────────────────────── */
  table, thead, tbody, tr, th, td {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    background-color: #1b1b1b;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    padding: 12px;
  }

  td {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #2a2a2a;
    padding: 10px 8px;
    font-size: 0.9rem;
  }

  td:last-child {
    border-bottom: none;
  }

  td::before {
    content: attr(data-label);
    color: var(--primary-light);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-right: 1rem;
  }

}

/* ─── MÓVIL GRANDE / TABLET CHICA: 481px–767px ──────── */
@media (min-width: 481px) and (max-width: 767px) {

  .principal {
    flex-direction: column;
    min-height: auto;
  }

  .fotoprincipal {
    width: 100vw;
    min-height: 50vw;
    margin-left: -20px;
    order: -1;
  }

  .textoprincipal {
    max-width: 100%;
    padding: 2rem 1rem;
  }

  .introtitle {
    font-size: clamp(2rem, 7vw, 3rem);
  }

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

  .tarjeta {
    height: 340px;
  }

  .tarjetamtd {
    width: 90vw;
  }

  .cardcarrusel {
    max-width: 300px;
  }

  .carrusel {
    height: 420px;
  }

  footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "contact"
      "links";
    gap: 1.5rem;
  }

  .links {
    align-items: flex-start;
  }

}

/* ─── TABLET: 768px–1023px ───────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {

  .principal {
    flex-direction: column;
    min-height: auto;
  }

  .fotoprincipal {
    width: 100vw;
    min-height: 45vw;
    margin-left: -20px;
    order: -1;
  }

  .textoprincipal {
    max-width: 100%;
    padding: 2rem;
  }

  .introtitle {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
  }

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

  .tarjetamtd {
    width: 85vw;
  }

  .cardcarrusel {
    max-width: 340px;
  }

  .carrusel {
    height: 480px;
  }

}

/* ─── DESKTOP: ≥ 1024px ──────────────────────────────── */
@media (min-width: 1024px) {

  .principal {
    flex-direction: row;
    min-height: 100vh;
  }

  .fotoprincipal {
    width: 50vw;
    min-height: 100vh;
    margin-left: 0;
    order: 0;
  }

  .textoprincipal {
    max-width: 600px;
    padding: 2rem;
  }

  .horario-tarjetas {
    grid-template-columns: repeat(3, 1fr);
  }

  .tarjeta {
    height: 380px;
  }

  .tarjetamtd {
    width: 80vw;
  }

  .cardcarrusel {
    max-width: 400px;
  }

  .carrusel {
    height: 600px;
  }

}

/* ─── DESKTOP GRANDE: ≥ 1440px ───────────────────────── */
@media (min-width: 1440px) {

  .textoprincipal {
    padding-left: 4rem;
  }

  .introtitle {
    font-size: 4rem;
  }

  .horario-tarjetas {
    gap: 32px;
  }

  .tarjetamtd {
    width: 70vw;
  }

}

/* ─── ACCESIBILIDAD: REDUCED MOTION ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}