/* ============================================================
   Taurina de Buendía — style.css
   Guía de Plazas de Toros en España
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --tb-rojo: #9B1C1C;
  --tb-rojo-dark: #7A1515;
  --tb-rojo-light: #B52A2A;
  --tb-oro: #C9A84C;
  --tb-oro-light: #D4BA6E;
  --tb-negro: #1A1A1A;
  --tb-crema: #F5F0E8;
  --tb-texto: #2C2C2C;
  --tb-fondo: #FFFFFF;
  --tb-gris: #6B6B6B;
  --tb-borde: #E0D8CC;
  --tb-font-serif: 'Lora', Georgia, serif;
  --tb-font-sans: 'Open Sans', Arial, sans-serif;
  --tb-max-width: 1080px;
  --tb-gap: 1.5rem;
  --tb-radius: 4px;
  --tb-transition: 0.25s ease;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--tb-font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--tb-texto);
  background-color: var(--tb-crema);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--tb-rojo);
  text-decoration: none;
  transition: color var(--tb-transition);
}

a:hover {
  color: var(--tb-rojo-dark);
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--tb-font-serif);
  color: var(--tb-negro);
  line-height: 1.3;
}

h1 {
  font-size: 2.2rem;
  font-weight: 700;
}

h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

/* --- Layout --- */
.tb-wrap {
  max-width: var(--tb-max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Header --- */
.tb-masthead {
  background-color: var(--tb-crema);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  border-bottom: 2px solid var(--tb-oro);
}

.tb-masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  max-width: var(--tb-max-width);
  margin: 0 auto;
}

.tb-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.tb-brand img {
  height: 96px;
  width: auto;
  border-radius: 50%;
}

.tb-brand-name {
  font-family: var(--tb-font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tb-rojo);
  letter-spacing: 0.02em;
}

/* Navigation */
.tb-site-nav {
  display: flex;
  align-items: center;
}

.tb-site-nav > ul {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.tb-site-nav a {
  color: var(--tb-texto);
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--tb-radius);
  transition: background-color var(--tb-transition), color var(--tb-transition);
}

.tb-site-nav a:hover {
  background-color: var(--tb-rojo);
  color: #fff;
}

/* Dropdown */
.tb-dropdown {
  position: relative;
}

.tb-dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.tb-dropdown-toggle::after {
  content: '▾';
  font-size: 0.7em;
}

.tb-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--tb-fondo);
  min-width: 260px;
  border: 1px solid var(--tb-borde);
  border-radius: var(--tb-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  padding: 0.5rem 0;
  z-index: 999;
}

.tb-dropdown-menu a {
  display: block;
  color: var(--tb-texto);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 0;
}

.tb-dropdown-menu a:hover {
  background-color: var(--tb-crema);
  color: var(--tb-rojo);
}

.tb-dropdown.is-open .tb-dropdown-menu {
  display: block;
}


/* Hamburger */
.tb-ham-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.tb-ham-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--tb-negro);
  margin: 5px 0;
  transition: transform var(--tb-transition), opacity var(--tb-transition);
}

/* --- Hero --- */
.tb-hero {
  background: linear-gradient(135deg, var(--tb-rojo) 0%, var(--tb-rojo-dark) 100%);
  color: #fff;
  padding: 3rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tb-hero h1 {
  color: #fff;
  margin-bottom: 0.75rem;
  font-size: 2.4rem;
}

.tb-hero-subtitle {
  font-family: var(--tb-font-sans);
  font-size: 1.1rem;
  color: var(--tb-oro-light);
  font-weight: 400;
}

.tb-hero-plaza {
  position: relative;
  overflow: hidden;
}

.tb-hero-deco {
  position: absolute;
  opacity: 0.06;
  pointer-events: none;
  z-index: 1;
}

.tb-hero-deco--arena {
  width: 280px;
  height: 280px;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
}

.tb-hero-deco--toro {
  width: 220px;
  left: -30px;
  bottom: -10px;
}

/* Section divider decoration */
.tb-section-divider {
  display: block;
  width: 200px;
  max-width: 60%;
  height: 20px;
  margin: 0 auto 1.25rem;
}

.tb-section-title .tb-section-divider {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Breadcrumb */
.tb-breadcrumb {
  padding: 0.75rem 0;
  font-size: 0.85rem;
  color: var(--tb-gris);
}

.tb-breadcrumb a {
  color: var(--tb-gris);
}

.tb-breadcrumb a:hover {
  color: var(--tb-rojo);
}

.tb-breadcrumb span {
  margin: 0 0.4rem;
}

/* --- Content Sections --- */
.tb-section {
  padding: 2.5rem 0;
}

.tb-section:nth-child(even) {
  background-color: var(--tb-fondo);
}

.tb-section-title {
  font-family: var(--tb-font-serif);
  color: var(--tb-rojo);
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--tb-oro);
}

/* --- Data Table --- */
.tb-datos-tabla {
  width: 100%;
  border: 1px solid var(--tb-borde);
  border-radius: var(--tb-radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.tb-datos-tabla th,
.tb-datos-tabla td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--tb-borde);
}

.tb-datos-tabla th {
  background: var(--tb-rojo);
  color: #fff;
  font-family: var(--tb-font-serif);
  font-weight: 600;
  width: 40%;
}

.tb-datos-tabla td {
  background: var(--tb-fondo);
}

.tb-datos-tabla tr:last-child th,
.tb-datos-tabla tr:last-child td {
  border-bottom: none;
}

/* Alias classes (consistent styling for all tables) */
.tb-tabla,
.tb-tabla-datos table {
  width: 100%;
  border: 1px solid var(--tb-borde);
  border-radius: var(--tb-radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
}

.tb-tabla th,
.tb-tabla td,
.tb-tabla-datos th,
.tb-tabla-datos td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--tb-borde);
}

.tb-tabla th,
.tb-tabla-datos th {
  background: var(--tb-rojo);
  color: #fff;
  font-family: var(--tb-font-serif);
  font-weight: 600;
  width: 40%;
}

.tb-tabla td,
.tb-tabla-datos td {
  background: var(--tb-fondo);
}

.tb-tabla tr:last-child th,
.tb-tabla tr:last-child td,
.tb-tabla-datos tr:last-child th,
.tb-tabla-datos tr:last-child td {
  border-bottom: none;
}

/* Section alt background */
.tb-section--alt {
  background-color: var(--tb-fondo);
}

/* Datos rapidos section */
.tb-datos-rapidos {
  padding: 2.5rem 0;
  background-color: var(--tb-fondo);
}

/* --- Plaza Cards Grid --- */
.tb-plaza-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--tb-gap);
  margin-top: 1.5rem;
}

.tb-plaza-card {
  background: var(--tb-fondo);
  border: 1px solid var(--tb-borde);
  border-radius: var(--tb-radius);
  overflow: hidden;
  transition: border-color var(--tb-transition);
}

.tb-plaza-card:hover {
  border-color: var(--tb-oro);
}

.tb-plaza-card-body {
  padding: 1.25rem;
}

.tb-plaza-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.tb-plaza-card h3 a {
  color: var(--tb-negro);
}

.tb-plaza-card h3 a:hover {
  color: var(--tb-rojo);
}

.tb-plaza-card-meta {
  font-size: 0.85rem;
  color: var(--tb-gris);
  margin-bottom: 0.75rem;
}

.tb-plaza-card-aforo {
  font-family: var(--tb-font-serif);
  font-weight: 700;
  color: var(--tb-rojo);
  font-size: 0.95rem;
}

.tb-plaza-card-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--tb-rojo);
  font-weight: 600;
  border-bottom: 1px solid transparent;
}

.tb-plaza-card-link:hover {
  border-bottom-color: var(--tb-rojo);
}

/* --- Map --- */
.tb-mapa-container {
  height: 420px;
  width: 100%;
  border-radius: var(--tb-radius);
  border: 1px solid var(--tb-borde);
  margin-bottom: 1.5rem;
}

.tb-mapa-embed {
  width: 100%;
  height: 350px;
  border: none;
  border-radius: var(--tb-radius);
  margin-top: 1rem;
}

/* --- FAQ --- */
.tb-faq-item {
  margin-bottom: 1rem;
  border: 1px solid var(--tb-borde);
  border-radius: var(--tb-radius);
  overflow: hidden;
}

.tb-faq-question {
  width: 100%;
  background: var(--tb-fondo);
  border: none;
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: var(--tb-font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--tb-negro);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--tb-transition);
}

.tb-faq-question:hover {
  background-color: var(--tb-crema);
}

.tb-faq-question::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--tb-rojo);
  font-weight: 700;
  flex-shrink: 0;
  margin-left: 1rem;
}

.tb-faq-item.is-open .tb-faq-question::after {
  content: '−';
}

.tb-faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  background: var(--tb-fondo);
  font-size: 0.95rem;
  line-height: 1.6;
}

.tb-faq-item.is-open .tb-faq-answer {
  display: block;
}

/* --- Entradas Info --- */
.tb-entradas-aviso {
  background: linear-gradient(135deg, var(--tb-crema) 0%, #EDE8DD 100%);
  border-left: 4px solid var(--tb-oro);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--tb-radius) var(--tb-radius) 0;
  margin-bottom: 1.5rem;
}

/* --- Footer --- */
.tb-pie {
  background-color: var(--tb-negro);
  color: var(--tb-crema);
  padding: 2.5rem 1.25rem 1.5rem;
  font-size: 0.85rem;
}

.tb-pie-inner {
  max-width: var(--tb-max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.tb-pie-col {
  flex: 1;
  min-width: 220px;
}

.tb-pie-col h4 {
  font-family: var(--tb-font-serif);
  color: var(--tb-oro);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.tb-pie-col a {
  color: var(--tb-crema);
  display: block;
  padding: 0.2rem 0;
  font-size: 0.85rem;
}

.tb-pie-col a:hover {
  color: var(--tb-oro);
}

.tb-pie-col p {
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.tb-pie-bottom {
  max-width: var(--tb-max-width);
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.8rem;
  color: var(--tb-gris);
}

/* --- Utility --- */
.tb-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Responsive --- */

/* Mobile (< 768px) */
@media (max-width: 767px) {
  .tb-ham-btn {
    display: block;
  }

  .tb-site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--tb-fondo);
    border-top: 1px solid var(--tb-borde);
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }

  .tb-site-nav.is-open {
    display: block;
  }

  .tb-site-nav > ul {
    flex-direction: column;
    gap: 0;
  }

  .tb-site-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--tb-texto);
    border-bottom: 1px solid var(--tb-borde);
  }

  .tb-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--tb-crema);
    min-width: auto;
  }

  .tb-dropdown-menu a {
    color: var(--tb-texto);
    padding-left: 2rem;
  }

  .tb-dropdown-menu a:hover {
    background: var(--tb-fondo);
    color: var(--tb-rojo);
  }

  h1 {
    font-size: 1.75rem;
  }

  .tb-hero {
    padding: 2rem 1rem;
  }

  .tb-hero h1 {
    font-size: 1.8rem;
  }

  .tb-brand-name {
    font-size: 0.95rem;
    color: var(--tb-rojo);
  }

  .tb-plaza-grid {
    grid-template-columns: 1fr;
  }

  .tb-pie-inner {
    flex-direction: column;
    gap: 1.5rem;
  }

  .tb-mapa-container {
    height: 300px;
  }
}

/* Tablet (768-1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .tb-plaza-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  h1 {
    font-size: 2.4rem;
  }

  .tb-hero {
    padding: 4rem 1.25rem;
  }

  .tb-hero h1 {
    font-size: 2.8rem;
  }
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
  border-radius: var(--tb-radius) !important;
}

.leaflet-popup-content {
  font-family: var(--tb-font-sans);
  font-size: 0.9rem;
  line-height: 1.5;
}

.leaflet-popup-content a {
  color: var(--tb-rojo);
  font-weight: 600;
}

/* --- Hero image --- */
.tb-hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.3;
}

.tb-hero .tb-wrap {
  position: relative;
  z-index: 1;
}

/* Plaza detail hero image (non-overlay) */
.tb-hero-img-block {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .tb-hero-img-block {
    height: 380px;
  }
}

/* --- Leaflet custom marker --- */
.tb-marker {
  background: none;
  border: none;
}

/* --- Huelva cross-link box --- */
.tb-cross-link {
  background: var(--tb-crema);
  border: 1px solid var(--tb-borde);
  border-radius: var(--tb-radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.tb-cross-link h3 {
  font-size: 1rem;
  color: var(--tb-rojo);
  margin-bottom: 0.5rem;
}

.tb-cross-link ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.tb-cross-link a {
  font-size: 0.9rem;
}

/* --- Huelva plazas list --- */
.tb-plazas-huelva {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.tb-plazas-huelva li {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--tb-borde);
  font-size: 0.95rem;
  line-height: 1.5;
}

.tb-plazas-huelva li:last-child {
  border-bottom: none;
}

.tb-plazas-huelva a {
  font-weight: 600;
  color: var(--tb-rojo);
}

/* --- Sobre Nosotros --- */
.tb-feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.tb-feature-list li {
  padding: 0.75rem 0 0.75rem 1.5rem;
  position: relative;
  border-bottom: 1px solid var(--tb-borde);
  line-height: 1.6;
}

.tb-feature-list li:last-child {
  border-bottom: none;
}

.tb-feature-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--tb-oro);
  font-weight: 700;
}

.tb-plaza-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.tb-plaza-grid-compact a {
  display: block;
  padding: 0.6rem 1rem;
  background: var(--tb-crema);
  border-left: 3px solid var(--tb-rojo);
  color: var(--tb-texto);
  text-decoration: none;
  font-size: 0.9rem;
  transition: border-color var(--tb-transition), background var(--tb-transition);
}

.tb-plaza-grid-compact a:hover {
  border-left-color: var(--tb-oro);
  background: var(--tb-fondo);
}

.tb-impressum {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.tb-impressum-block h3 {
  font-family: var(--tb-font-serif);
  font-size: 1.15rem;
  color: var(--tb-rojo);
  margin-bottom: 0.75rem;
}

.tb-impressum-block address {
  font-style: normal;
  line-height: 1.8;
}

.tb-impressum-block address a {
  color: var(--tb-rojo);
  text-decoration: none;
}

.tb-impressum-block address a:hover {
  text-decoration: underline;
}
