/* ===============================
   HERO + BUSCADOR
================================ */

.hero {
  position: relative;
  padding: 32px 0px 90px 0px;
  background:
    linear-gradient(
      135deg,
      rgba(27, 188, 155, 0.12),
      rgba(255, 255, 255, 0.92)
    ),
    url("../img/hero-home.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center; /* 🔑 CLAVE */
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero .subtitle {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
}


/* ===============================
   BUSCADOR
================================ */

.search-wrapper {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  height: 56px;
  padding: 0 20px 0 52px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background-color: #FFFFFF;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(27, 188, 155, 0.15);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--color-text-secondary);
}

/* ===============================
   PUBLICIDAD SUPERIOR
================================ */

.ad-top {
  max-width: 1200px;
  margin: 32px auto 64px;
  height: 90px;
  background-color: var(--color-bg-soft);
  border: 1px dashed var(--color-border);
}

/* ===============================
   MAPA
================================ */


.map-section {
  padding: 64px 0;
}

.map-section h2 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.map-section p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
}

/* Contenedor del mapa */
.map-container {
  max-width: 920px;
  margin: 0 auto;
}

/* SVG */
.map-container svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Provincias */
.map-container .province {
  fill: #F3F4F6;
  stroke: #FFFFFF;
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.15s ease, transform 0.15s ease;
}

/* Hover / foco */
.map-container .province:hover,
.map-container .province:focus {
  fill: var(--color-primary);  
  outline: none;

}

/* Tooltip */
.map-container .province {
  position: relative;
}

.map-container .province:hover::after {
  content: attr(data-name);
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #ffffff;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}



/* ===============================
   CALENDARIOS MÁS VISITADOS
================================ */

.featured {
  padding: 64px 0;
}

.featured h2 {
  font-size: 1.6rem;
  margin-bottom: 32px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.featured-card {
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.featured-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 16px;
  background-color: var(--color-primary);
  color: #fff;
  font-size: 0.85rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.featured-card:hover .featured-btn {
  background-color: var(--color-primary-dark);
}


.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.featured-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.featured-card p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* ===============================
   PUBLICIDAD INTERMEDIA
================================ */

.ad-middle {
  max-width: 1200px;
  margin: 64px auto;
  height: 250px;
  background-color: var(--color-bg-soft);
  border: 1px dashed var(--color-border);
}

/* ===============================
   COMUNIDADES AUTÓNOMAS
================================ */

.regions {
  padding: 64px 0;
}

.regions h2 {
  font-size: 1.6rem;
  margin-bottom: 32px;
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.region-item {
  padding: 20px 12px;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background-color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.region-item:hover {
  background-color: rgba(27, 188, 155, 0.08);
  color: var(--color-primary);
}

/* ===============================
   AUTOCOMPLETADO FINAL
================================ */

.search-results {
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 200;
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
  background: rgba(27,188,155,0.08);
}

.search-result-type {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.search-year {
  color: var(--color-text-secondary);
  font-weight: 500;
}
/* ===============================
   AUTOCOMPLETADO PREMIUM
================================ */

.search-result-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-icon-type {
  font-size: 0.9rem;
}

.search-highlight {
  background-color: rgba(27,188,155,0.15);
  padding: 0 2px;
  border-radius: 3px;
}



/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 640px) {
  .hero {
    padding: 72px 16px 64px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .map-section {
    display: none;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

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