/*
Theme Name: Peña Flamenca El Almíbar
Theme URI: https://elalmibar.com
Author: Emilio Contreras (econga.es)
Description: Tema oficial a medida para la Peña Flamenca El Almíbar (Córdoba). Sincronizado automáticamente con la base de datos de reservas y galería rápida de cartelería.
Version: 1.1.0
Text Domain: almibar
*/

:root {
  /* Paleta Principal */
  --bg-cream: #EEEEE2;
  --bg-card: #F8F8F2;
  --bg-cream-alt: #E5E5D6;
  --almibar-green: #3E8356;
  --almibar-green-dark: #2B5E3D;
  --almibar-green-soft: rgba(62, 131, 86, 0.12);
  --almibar-pink: #FE2668;
  --almibar-pink-dark: #D41752;
  --almibar-pink-soft: rgba(254, 38, 104, 0.10);

  /* Complementarios Tipográficos y Bordes */
  --text-main: #18221D;
  --text-muted: #4E5D55;
  --border-subtle: #D6D6C7;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 10px 25px -5px rgba(24, 34, 29, 0.08), 0 4px 10px -6px rgba(24, 34, 29, 0.04);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- HEADER NAVEGACIÓN --- */
.site-header {
  background-color: var(--almibar-green);
  color: var(--bg-cream);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(238, 238, 226, 0.16);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.main-nav a {
  opacity: 0.92;
  transition: opacity 0.2s, color 0.2s;
}

.main-nav a:hover {
  opacity: 1;
  color: #FFFFFF;
  text-decoration: underline;
  text-decoration-color: var(--almibar-pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.nav-cta {
  background: var(--almibar-pink);
  color: #FFFFFF !important;
  padding: 0.48rem 0.95rem;
  border-radius: 6px;
  border: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(254, 38, 104, 0.28);
}

.nav-cta:hover {
  background: var(--almibar-pink-dark);
  text-decoration: none !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(238, 238, 226, 0.5);
  color: #FFFFFF;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* --- HERO PORTADA DINÁMICO --- */
.hero-almibar {
  background: linear-gradient(135deg, var(--almibar-green) 0%, var(--almibar-green-dark) 100%);
  color: #FFFFFF;
  padding: 4.25rem 0 4.75rem;
  position: relative;
  border-bottom: 4px solid var(--almibar-pink);
}

.hero-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-logo-box {
  text-align: center;
}

.hero-logo-box img {
  max-width: 280px;
  margin: 0 auto;
  filter: drop-shadow(0 8px 20px rgba(24, 34, 29, 0.22));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(24, 34, 29, 0.28);
  border: 1px solid rgba(238, 238, 226, 0.22);
  color: var(--bg-cream);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #FFFFFF;
}

.hero-meta {
  font-size: 1.1rem;
  color: var(--bg-cream);
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.hero-submeta {
  font-size: 0.95rem;
  color: rgba(238, 238, 226, 0.85);
  margin: 0 0 1.85rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.55rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-white {
  background: var(--almibar-pink);
  color: #FFFFFF;
  box-shadow: 0 8px 22px rgba(254, 38, 104, 0.35);
}

.btn-white:hover {
  background: var(--almibar-pink-dark);
}

.btn-outline-white {
  background: transparent;
  color: var(--bg-cream);
  border-color: rgba(238, 238, 226, 0.65);
}

.btn-outline-white:hover {
  background: rgba(238, 238, 226, 0.14);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

.btn-crimson {
  background: var(--almibar-pink);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(254, 38, 104, 0.25);
}

.btn-crimson:hover {
  background: var(--almibar-pink-dark);
}

.btn-outline-dark {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-outline-dark:hover {
  border-color: var(--almibar-green);
  color: var(--almibar-green);
}

/* --- SECCIONES GENERALES --- */
.section {
  padding: 4.5rem 0;
  background-color: var(--bg-cream);
}

.section-alt {
  background-color: var(--bg-cream-alt);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.75rem;
}

.section-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-main);
  margin: 0;
}

.section-divider {
  width: 50px;
  height: 3px;
  background: var(--almibar-pink);
  border-radius: 2px;
  margin: 0.9rem auto 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* --- BLOQUE RESERVAS & AGENDA TEMPORADA --- */
.reserva-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2rem;
  border: 1px solid var(--border-subtle);
  border-left: 5px solid var(--almibar-pink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.25rem;
}

.reserva-info h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  color: var(--text-main);
}

.reserva-info p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.agenda-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1rem;
}

.agenda-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.2s, transform 0.15s;
}

.agenda-item:hover {
  border-color: var(--almibar-green);
}

.agenda-item.is-next {
  border: 2px solid var(--almibar-green);
  background: #FFFFFF;
  box-shadow: 0 8px 20px rgba(62, 131, 86, 0.12);
}

.agenda-item.is-past {
  opacity: 0.58;
}

.agenda-date-box {
  min-width: 58px;
  text-align: center;
  background: var(--bg-cream-alt);
  color: var(--text-main);
  border-radius: 8px;
  padding: 0.45rem 0.35rem;
  font-weight: 700;
}

.agenda-item.is-next .agenda-date-box {
  background: var(--almibar-green);
  color: #FFFFFF;
}

.agenda-day {
  display: block;
  font-size: 1.2rem;
  line-height: 1.1;
}

.agenda-month {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.agenda-details {
  flex: 1;
}

.agenda-details strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
}

.agenda-details span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.agenda-item.is-next .agenda-details span {
  color: var(--almibar-pink);
  font-weight: 700;
}

/* --- BANNER YOUTUBE FUCSIA / CARMESÍ --- */
.banner-youtube {
  background: linear-gradient(125deg, rgba(254, 38, 104, 0.94), rgba(185, 22, 74, 0.95)),
              url('assets/img/youtube-bg.jpg') center/cover no-repeat;
  color: #FFFFFF;
  text-align: center;
  padding: 4.5rem 1.25rem;
}

.yt-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

.yt-icon {
  background: var(--bg-cream);
  color: var(--almibar-pink);
  width: 48px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* --- GALERÍA DE CARTELERÍA --- */
.carteles-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.cartel-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--text-main);
  aspect-ratio: 1 / 1.414;
  box-shadow: 0 4px 14px rgba(24, 34, 29, 0.10);
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  padding: 0;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.cartel-card:hover {
  transform: translateY(-4px);
  border-color: var(--almibar-pink);
  box-shadow: 0 14px 26px rgba(24, 34, 29, 0.18);
}

.cartel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cartel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24, 34, 29, 0.88) 0%, rgba(24, 34, 29, 0) 55%);
  color: var(--bg-cream);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.75rem;
  text-align: left;
  opacity: 0;
  transition: opacity 0.2s;
}

.cartel-card:hover .cartel-overlay,
.cartel-card:focus-visible .cartel-overlay {
  opacity: 1;
}

.cartel-overlay span {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
}

.carteles-footer {
  text-align: center;
  margin-top: 2rem;
}

/* --- LIGHTBOX MODAL --- */
dialog.almibar-lightbox {
  border: 1px solid rgba(238, 238, 226, 0.15);
  border-radius: 12px;
  padding: 0;
  background: #141C18;
  color: var(--bg-cream);
  max-width: 92vw;
  max-height: 92vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

dialog.almibar-lightbox::backdrop {
  background: rgba(24, 34, 29, 0.88);
  backdrop-filter: blur(4px);
}

.lightbox-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-height: 80vh;
  max-width: 88vw;
  width: auto;
  object-fit: contain;
}

.lightbox-bar {
  width: 100%;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #1D2923;
  font-size: 0.9rem;
}

.lightbox-controls {
  display: flex;
  gap: 0.5rem;
}

.lb-btn {
  background: rgba(238, 238, 226, 0.12);
  border: none;
  color: #FFFFFF;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s;
}

.lb-btn:hover {
  background: var(--almibar-pink);
}

/* --- NOTICIAS --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.75rem;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(24, 34, 29, 0.05);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.news-card:hover {
  border-color: var(--almibar-green);
}

.news-thumb {
  aspect-ratio: 16 / 10;
  background: var(--bg-cream-alt);
  overflow: hidden;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-date {
  font-size: 0.78rem;
  color: var(--almibar-green);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.news-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: var(--text-main);
}

.news-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  flex: 1;
}

/* --- FOOTER CLÁSICO --- */
.site-footer {
  background: var(--bg-cream-alt);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-logo {
  max-width: 190px;
  margin: 0 auto 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--almibar-green);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  transition: background 0.2s, transform 0.15s;
}

.social-links a:hover {
  background: var(--almibar-pink);
  transform: translateY(-2px);
}

/* --- RESPONSIVE --- */
@media (max-width: 960px) {
  .carteles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.75rem;
  }
  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .carteles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .menu-toggle {
    display: inline-block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--almibar-green-dark);
    flex-direction: column;
    padding: 1.25rem;
    gap: 1rem;
    border-bottom: 3px solid var(--almibar-pink);
  }
  .main-nav.is-open {
    display: flex;
  }
}
/* Convierte el logo oscuro del hero a blanco puro sobre fondo verde */
.hero-logo-box img {
  filter: brightness(0) invert(1) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
}
.badge-estado {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}

.badge-disponible {
  background: var(--almibar-green-soft);
  color: var(--almibar-green-dark);
  border: 1px solid rgba(62, 131, 86, 0.3);
}
.badge-estado {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}

.badge-disponible {
  background: var(--almibar-green-soft);
  color: var(--almibar-green-dark);
  border: 1px solid rgba(62, 131, 86, 0.3);
}

.badge-completo {
  background: var(--almibar-pink-soft);
  color: var(--almibar-pink-dark);
  border: 1px solid rgba(254, 38, 104, 0.35);
}
.badge-completo {
  background: var(--almibar-pink-soft);
  color: var(--almibar-pink-dark);
  border: 1px solid rgba(254, 38, 104, 0.35);
}