/* ============================================
   TABLÓN DE TABERNA MEDIEVAL - Liga de Aventureros de Vigo
   ============================================ */

:root {
  --wood-dark: #3b2012;
  --wood-mid: #5c3a1e;
  --wood-light: #7a4f2b;
  --wood-grain: #4a2e16;
  --parchment: #f4e4c1;
  --parchment-dark: #e8d5a3;
  --parchment-aged: #dcc68f;
  --ink: #2a1a0a;
  --ink-soft: #4a3520;
  --gold: #d4a017;
  --gold-bright: #f0c040;
  --gold-dark: #a67c00;
  --red-wax: #8b1a1a;
  --red-accent: #a02020;
  --metal: #6b6b6b;
  --metal-light: #999;
  --nail: #555;
  --shadow-heavy: rgba(0, 0, 0, 0.6);
  --shadow-mid: rgba(0, 0, 0, 0.35);
  --shadow-light: rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Nunito', cursive, sans-serif;
  color: var(--ink);
  background: var(--wood-dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === FONDO DE MADERA === */
.wood-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 120px,
      rgba(0, 0, 0, 0.08) 120px,
      rgba(0, 0, 0, 0.08) 122px
    ),
    repeating-linear-gradient(
      180deg,
      transparent,
      rgba(0, 0, 0, 0.02) 4px,
      transparent 8px
    ),
    linear-gradient(
      135deg,
      var(--wood-dark) 0%,
      var(--wood-mid) 30%,
      var(--wood-dark) 50%,
      var(--wood-grain) 70%,
      var(--wood-dark) 100%
    );
}

.wood-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(90, 55, 20, 0.3), transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(60, 35, 15, 0.4), transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(40, 25, 10, 0.3), transparent 45%);
}

img {
  max-width: 100%;
  display: block;
}

/* === CONTENEDOR === */
.page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

/* === CABECERA - CARTEL DE TABERNA === */
.tavern-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0 2rem;
}

.tavern-sign {
  position: relative;
  display: flex;
  justify-content: center;
}

.sign-board {
  position: relative;
  background:
    linear-gradient(145deg, var(--wood-mid), var(--wood-light), var(--wood-mid));
  border: 4px solid var(--wood-grain);
  border-radius: 12px;
  padding: 1.5rem 2.5rem;
  text-align: center;
  box-shadow:
    0 8px 30px var(--shadow-heavy),
    inset 0 2px 4px rgba(255, 255, 255, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.sign-board::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 2px solid var(--gold-dark);
  border-radius: 8px;
  opacity: 0.6;
  pointer-events: none;
}

.sign-chain {
  position: absolute;
  top: -20px;
  width: 4px;
  height: 24px;
  background: repeating-linear-gradient(
    180deg,
    var(--metal),
    var(--metal-light) 3px,
    var(--metal) 6px
  );
  border-radius: 2px;
  box-shadow: 0 2px 4px var(--shadow-mid);
}

.sign-chain.left {
  left: 20%;
}

.sign-chain.right {
  right: 20%;
}

.sign-icon {
  display: block;
  color: var(--gold-bright);
  font-size: 2rem;
  margin-bottom: 0.4rem;
  text-shadow: 0 2px 6px rgba(212, 160, 23, 0.5);
}

.sign-title {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  color: var(--gold-bright);
  margin: 0;
  text-shadow:
    0 1px 0 var(--gold-dark),
    0 3px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
}

.sign-subtitle {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--parchment-dark);
  margin: 0.3rem 0 0;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.tavern-nav {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.tavern-nav a {
  color: var(--parchment-dark);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tavern-nav a:hover,
.tavern-nav a:focus-visible {
  color: var(--gold-bright);
  background: rgba(212, 160, 23, 0.15);
  transform: translateY(-1px);
}

/* === MARCO DEL TABLÓN === */
.board-frame {
  position: relative;
  background:
    linear-gradient(135deg, var(--wood-light), var(--wood-mid));
  border: 8px solid var(--wood-grain);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow:
    0 12px 50px var(--shadow-heavy),
    inset 0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 -2px 8px rgba(0, 0, 0, 0.2);
}

.board-frame::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  border: 3px solid rgba(90, 55, 20, 0.5);
  border-radius: 12px;
  pointer-events: none;
}

/* Superficie del tablón (corcho) */
.board-surface {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(180, 140, 80, 0.11), transparent 42%),
    radial-gradient(ellipse at 70% 60%, rgba(160, 120, 60, 0.08), transparent 38%),
    repeating-linear-gradient(32deg, rgba(255, 230, 175, 0.02) 0 3px, rgba(110, 78, 35, 0.03) 3px 7px),
    linear-gradient(145deg, #8b6914, #a07828, #8b6914);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.28),
    inset 0 -2px 10px rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 1.5rem;
}

/* === NOTAS CLAVADAS (pergaminos) === */
.pinned-note {
  position: relative;
  background:
    linear-gradient(160deg, var(--parchment), var(--parchment-dark) 60%, var(--parchment-aged));
  border: none;
  border-radius: 4px;
  padding: 2rem 1.5rem 1.5rem;
  box-shadow:
    3px 4px 12px var(--shadow-mid),
    -1px -1px 3px rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pinned-note::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(139, 100, 50, 0.04) 28px,
      rgba(139, 100, 50, 0.04) 29px
    );
  pointer-events: none;
  border-radius: 4px;
}

/* Efecto de bordes quemados / envejecidos */
.pinned-note::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 4px;
  box-shadow:
    inset 0 0 30px rgba(139, 90, 30, 0.15),
    inset 0 0 60px rgba(100, 60, 20, 0.05);
  pointer-events: none;
}

.pinned-note:hover {
  box-shadow:
    4px 6px 18px var(--shadow-mid),
    -1px -1px 4px rgba(255, 255, 255, 0.15);
}

/* Rotaciones sutiles para aspecto natural */
.note-hero { transform: rotate(-0.3deg); }
.note-countdown { transform: rotate(0.5deg); }
.note-about { transform: rotate(-0.4deg); }
.note-steps { transform: rotate(0.2deg); }
.note-highlights { transform: rotate(-0.3deg); }
.note-faq { transform: rotate(0.4deg); }
.note-rules { transform: rotate(-0.2deg); }
.note-contact { transform: rotate(0.3deg); }

/* === PIN / CLAVO === */
.pin {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 35% 35%, #d44, var(--red-wax), #600);
  border-radius: 50%;
  box-shadow:
    0 2px 5px var(--shadow-mid),
    inset 0 -2px 3px rgba(0, 0, 0, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
  z-index: 5;
}

.pin.pin-right {
  left: auto;
  right: 14px;
  transform: none;
}

.pin.pin-left {
  left: 14px;
  right: auto;
  transform: none;
}

/* === SELLO DE CERA === */
.wax-seal {
  position: absolute;
  top: -10px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: radial-gradient(circle at 40% 35%, #c44, var(--red-wax), #500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  font-size: 1rem;
  box-shadow:
    0 3px 10px var(--shadow-mid),
    inset 0 -2px 4px rgba(0, 0, 0, 0.4),
    inset 0 2px 3px rgba(255, 100, 100, 0.3);
  z-index: 5;
}

/* === TIPOGRAFÍA DE NOTAS === */
.note-tag {
  display: inline-block;
  /* font-family: 'Cinzel', serif; */
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--red-accent);
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.pinned-note h2 {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--ink);
  margin: 0 0 0.8rem;
  line-height: 1.3;
}

.pinned-note h3 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--ink);
  margin: 0 0 0.6rem;
  line-height: 1.3;
}

.pinned-note h4 {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 0.3rem;
}

.pinned-note p,
.note-body {
  color: var(--ink-soft);
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
}

/* === BOTÓN ESTILO TABERNA === */
.btn-tavern {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  background:
    linear-gradient(145deg, var(--red-accent), var(--red-wax));
  color: var(--parchment);
  border: 2px solid var(--gold-dark);
  border-radius: 6px;
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow:
    0 4px 12px rgba(139, 26, 26, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-tavern:hover,
.btn-tavern:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 6px 18px rgba(139, 26, 26, 0.5),
    inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

/* === BADGES === */
.note-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.note-badges li {
  padding: 0.45rem 0.75rem;
  background: rgba(139, 100, 50, 0.1);
  border: 1px solid rgba(139, 100, 50, 0.3);
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.note-badges li i {
  color: var(--gold-dark);
}

.note-actions {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

/* === CUENTA ATRÁS === */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.time-block {
  background: rgba(139, 100, 50, 0.1);
  border: 1px solid rgba(139, 100, 50, 0.25);
  border-radius: 6px;
  padding: 0.7rem 0.4rem;
  text-align: center;
}

.time-block span {
  display: block;
  font-size: 1.5rem;
  font-family: 'Cinzel Decorative', serif;
  color: var(--red-accent);
  line-height: 1;
}

.time-block small {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.65rem;
  font-family: 'Cinzel', serif;
}

/* === PASOS === */
.steps-grid {
  display: grid;
  gap: 1rem;
  margin-top: 0.8rem;
}

.step-item {
  background: rgba(139, 100, 50, 0.08);
  border: 1px solid rgba(139, 100, 50, 0.2);
  border-radius: 6px;
  padding: 1rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-accent), var(--gold-dark));
  color: var(--parchment);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 6px var(--shadow-light);
}

.step-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* === TARJETAS INFO === */
.cards-grid {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.info-card {
  background: rgba(139, 100, 50, 0.08);
  border: 1px solid rgba(139, 100, 50, 0.2);
  border-radius: 6px;
  padding: 1rem;
}

.info-card i {
  color: var(--gold-dark);
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.info-card h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0.3rem 0;
}

.info-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* === FAQ === */
.faq-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.faq-item {
  background: rgba(139, 100, 50, 0.08);
  border: 1px solid rgba(139, 100, 50, 0.2);
  border-radius: 6px;
  padding: 0.8rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

.faq-item summary:hover {
  color: var(--red-accent);
}

.faq-item p {
  margin-top: 0.6rem;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* === REGLAS === */
.rules-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.rule-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 6px;
  background: rgba(139, 100, 50, 0.08);
  border: 1px solid rgba(139, 100, 50, 0.2);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rule-card:hover,
.rule-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--gold-dark);
  background: rgba(139, 100, 50, 0.14);
}

.rule-card.featured {
  background: rgba(212, 160, 23, 0.12);
  border-color: var(--gold-dark);
  border-width: 2px;
}

.rule-card h4 {
  font-family: 'Cinzel', serif;
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--ink);
}

.rule-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.rule-card > i {
  color: var(--gold-dark);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* === CONTACTO === */
.contact-links {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  background: rgba(139, 100, 50, 0.08);
  border: 1px solid rgba(139, 100, 50, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--gold-dark);
  background: rgba(139, 100, 50, 0.14);
}

.contact-links a i {
  color: var(--gold-dark);
  font-size: 1.1rem;
}

/* === FOOTER === */
.tavern-footer {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  color: var(--parchment-dark);
  font-size: 0.85rem;
}

.tavern-footer p {
  margin: 0.3rem 0;
  color: var(--parchment-dark);
}

.tavern-footer i {
  color: var(--gold);
}

/* === SCROLL TOP === */
.scroll-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--gold-dark);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wood-mid), var(--wood-dark));
  color: var(--gold-bright);
  box-shadow: 0 4px 14px var(--shadow-mid);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 1000;
  font-size: 1rem;
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover,
.scroll-top:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--wood-light), var(--wood-mid));
}

/* === RESPONSIVE === */
@media (min-width: 600px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .board-surface {
    padding: 2rem;
  }
}

@media (max-width: 767.98px) {
  .page-shell {
    padding-top: 0.75rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .tavern-header {
    padding-top: 0.35rem;
  }

  .board-frame {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .board-frame::before {
    display: none;
  }

  .board-surface {
    padding: 0;
    background: transparent;
    box-shadow: none;
    gap: 1rem;
  }
}

@media (min-width: 768px) {
  .page-shell {
    padding: 0.75rem 1.5rem 2.5rem;
  }

  .tavern-header {
    padding-top: 0.5rem;
  }

  .board-frame {
    padding: 1.5rem;
  }

  .board-surface {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  /* Notas que ocupan todo el ancho */
  .note-hero,
  .note-steps,
  .note-highlights,
  .note-faq,
  .note-rules {
    grid-column: 1 / -1;
  }

  .note-contact {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .pinned-note {
    padding: 2.2rem 2rem 1.8rem;
  }
}
