/* ══════════════════════════════════════════════════════════════
   FESTIVIDAD DE LA TIRANA — temática temporal
   Cargado solo cuando tirana_activa() (ver includes/festividad.php).
   Paleta tomada de la máscara de diablada: rojo, ámbar, azul, verde.
   ══════════════════════════════════════════════════════════════ */

:root {
  --tirana-rojo:    #C22F2F;
  --tirana-ambar:   #E39A1C;
  --tirana-azul:    #3E7CB1;
  --tirana-verde:   #2E5339;
  --tirana-crema:   #FFF6E8;
  --tirana-noche:   #2A1508;
}

/* ── Máscara en el header ── */
.tirana-nav-mask {
  height: 56px;
  width: auto;
  flex-shrink: 0;
  margin-left: 14px;
  filter: drop-shadow(0 3px 6px rgba(42, 21, 8, .25));
  animation: tirana-sway 4.5s ease-in-out infinite;
  transform-origin: 50% 0;
}

@keyframes tirana-sway {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

@media (max-width: 992px) {
  .tirana-nav-mask { height: 42px; margin-left: 8px; }
}

/* ── Máscara en el footer ── */
.tirana-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0 4px;
}
.tirana-footer-mask {
  height: 64px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 14px rgba(227, 154, 28, .35));
  animation: tirana-sway 5s ease-in-out infinite;
  transform-origin: 50% 0;
}
.tirana-footer-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--accent-gold, #D4A574);
  margin: 0;
}
.tirana-footer-note strong {
  display: block;
  color: #fff;
  font-size: 14px;
}

/* ── Grilla de acceso rápido con 8 tarjetas ── */
@media (min-width: 992px) {
  .quick-grid--8.row > .col { width: 12.5%; }
  /* Con 8 columnas las tarjetas son más angostas: compactar padding e ícono */
  .quick-grid--8 .quick-card { padding: 14px; gap: 10px; }
  .quick-grid--8 .quick-card-icon { width: 38px; height: 38px; }
  .quick-grid--8 .quick-card-icon i { width: 18px; height: 18px; }
  .quick-grid--8 .quick-card--tirana .quick-card-icon img { width: 22px; height: 22px; }
}

/* ── Tarjeta "La Tirana" ── */
.quick-card--tirana {
  background:
    linear-gradient(var(--bg-primary, #fff), var(--bg-primary, #fff)) padding-box,
    linear-gradient(135deg, var(--tirana-rojo), var(--tirana-ambar), var(--tirana-azul)) border-box;
  border: 1.5px solid transparent;
}
.quick-card--tirana:hover {
  box-shadow: 0 6px 22px rgba(194, 47, 47, .18);
  border-color: transparent;
}
.quick-card--tirana .quick-card-icon {
  background: linear-gradient(150deg, rgba(227, 154, 28, .18), rgba(194, 47, 47, .12));
}
.quick-card--tirana .quick-card-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.quick-card--tirana .quick-card-text span { color: var(--tirana-rojo); font-weight: 600; }

/* ── Modal informativo ── */
.tirana-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tirana-modal[hidden] { display: none; }

.tirana-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 21, 8, .72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.tirana-modal-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--tirana-crema);
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(42, 21, 8, .5);
  animation: tirana-modal-in .45s cubic-bezier(.2, .9, .3, 1.1) both;
}

@keyframes tirana-modal-in {
  from { opacity: 0; transform: translateY(26px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Cabecera festiva con banderines */
.tirana-modal-head {
  position: relative;
  background:
    radial-gradient(circle at 18% 30%, rgba(227, 154, 28, .35), transparent 45%),
    radial-gradient(circle at 84% 60%, rgba(62, 124, 177, .3), transparent 40%),
    linear-gradient(160deg, #7A2A1B 0%, var(--tirana-rojo) 55%, #A03A2A 100%);
  padding: 30px 24px 22px;
  text-align: center;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}
/* Banderines triangulares (guirnalda) */
.tirana-modal-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background:
    conic-gradient(from 135deg at 50% 0, var(--tirana-ambar) 0 90deg, transparent 90deg) 0 0 / 40px 16px repeat-x;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .15));
}
.tirana-modal-head::after {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: -20px;
  height: 16px;
  background:
    conic-gradient(from 135deg at 50% 0, var(--tirana-azul) 0 90deg, transparent 90deg) 0 0 / 80px 15px repeat-x;
  opacity: .85;
}
.tirana-modal-mask {
  height: 88px;
  width: auto;
  margin-bottom: 8px;
  /* Arte lineal oscuro → en blanco para contrastar sobre el fondo rojo */
  filter: brightness(0) invert(1) drop-shadow(0 4px 10px rgba(0, 0, 0, .3));
  animation: tirana-sway 4s ease-in-out infinite;
  transform-origin: 50% 10%;
}
.tirana-modal-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #F7CE84;
  margin-bottom: 4px;
}
.tirana-modal-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.15;
}
.tirana-modal-dates {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 246, 232, .16);
  border: 1px solid rgba(255, 246, 232, .35);
  color: #FFE9C4;
  font-size: 13px;
  font-weight: 600;
}

/* Cuerpo */
.tirana-modal-body { padding: 22px 26px 8px; }
.tirana-modal-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 13px 0;
}
.tirana-modal-item + .tirana-modal-item {
  border-top: 1px dashed rgba(194, 47, 47, .25);
}
.tirana-modal-item-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.tirana-modal-item-icon i { width: 22px; height: 22px; }
.tirana-modal-item-icon--ruta   { background: linear-gradient(150deg, var(--tirana-ambar), #C97F0E); }
.tirana-modal-item-icon--sos    { background: #fff; border: 2px solid var(--tirana-verde); }
.tirana-modal-item-icon--sos img { width: 32px; height: 32px; object-fit: contain; }
.tirana-modal-item-icon--fiesta { background: linear-gradient(150deg, var(--tirana-azul), #2B5E8C); }

.tirana-modal-item-text h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--tirana-noche);
  margin: 0 0 3px;
}
.tirana-modal-item-text p {
  font-size: 14px;
  line-height: 1.6;
  color: #5C4F42;
  margin: 0;
}
.tirana-modal-item-text strong { color: var(--tirana-rojo); }

.tirana-modal-fonos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tirana-modal-fonos a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(46, 83, 57, .1);
  border: 1px solid rgba(46, 83, 57, .3);
  color: var(--tirana-verde);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s;
}
.tirana-modal-fonos a:hover { background: rgba(46, 83, 57, .2); }

/* Pie */
.tirana-modal-foot {
  padding: 14px 26px 24px;
  text-align: center;
}
.tirana-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--tirana-rojo), #A03A2A);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(194, 47, 47, .35);
  transition: transform .15s, box-shadow .15s;
}
.tirana-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(194, 47, 47, .45);
}

.tirana-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(42, 21, 8, .35);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.tirana-modal-close:hover { background: rgba(42, 21, 8, .6); }

@media (max-width: 480px) {
  .tirana-modal { padding: 12px; }
  .tirana-modal-body { padding: 18px 18px 4px; }
  .tirana-modal-foot { padding: 12px 18px 20px; }
  .tirana-modal-mask { height: 72px; }
}

/* Accesibilidad: sin animaciones si el usuario las reduce */
@media (prefers-reduced-motion: reduce) {
  .tirana-nav-mask,
  .tirana-footer-mask,
  .tirana-modal-mask,
  .tirana-modal-dialog {
    animation: none;
  }
}
