/* Cuerpo general*/
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Jost', sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
}

main {
  flex: 1 0 auto;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 16px;
  box-sizing: border-box;
}

:root {
  --verde-reposo-fondo: #C9E4D6;
  --verde-reposo-texto: #519173;
  --verde-hover-fondo: #44916F;
  --verde-hover-texto: #FAFCF4;

  --azul-reposo-fondo: #A6CED9;
  --azul-reposo-texto: #27717A;
  --azul-hover-fondo: #247D7F;
  --azul-hover-texto: #FAFBF4;

  --verde-tituloH1: #2C5739;
  --verde-tituloH2: #417A52;

  --azul-tituloH1: #27717A;
  --azul-tituloH2: #3D8F92;

  --marron-borde: #7D6042;
  --marron-texto: #4C3A26;
  --marron-fondo: #F6EEE1;

  /* Colores "activos" que usan h1/h2 — por defecto, el tema verde */
  --color-tituloH1: var(--verde-tituloH1);
  --color-tituloH2: var(--verde-tituloH2);
  --color-reposo-fondo: var(--verde-reposo-fondo);
  --color-reposo-texto: var(--verde-reposo-texto);
  --color-hover-fondo: var(--verde-hover-fondo);
  --color-hover-texto: var(--verde-hover-texto);
}

.tema-senderismo {
  /* Colores "activos" que usan h1/h2 — por defecto, el tema azul */
  --color-tituloH1: var(--azul-tituloH1);
  --color-tituloH2: var(--azul-tituloH2);
  --color-reposo-fondo: var(--azul-reposo-fondo);
  --color-reposo-texto: var(--azul-reposo-texto);
  --color-hover-fondo: var(--azul-hover-fondo);
  --color-hover-texto: var(--azul-hover-texto);
}

h1 {
  display: block;
  text-align: left;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--color-tituloH1);
  margin: 0 0 2.5rem;
}

h1::after {
  content: "✦";
  text-align: center;
  display: block;
  width: 75%;
  padding-top: 0.5rem;
  border-top: 2px solid var(--color-tituloH1);
  font-size: 1rem;
  color: var(--color-tituloH1);
}

h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--color-tituloH2);
  margin: 2rem 0 0.75rem;
}

h3 {
  font-family: 'Playfair Display', serif;
  color: var(--color-tituloH2);
}

.brand-title {
  font-family: 'Playfair Display', serif;
}

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


/* CABECERA */

.site-header {
  position: relative;
}

.header-image {
  width: 100%;
  height: auto;
  aspect-ratio: 2400 / 400;
  object-fit: cover;
  object-position: center;
  display: block;
}

.site-logo {
  position: absolute;
  top: -2px;
  left: 8px;
  z-index: 10;
}

.site-logo__img {
  width: 80px;
  height: auto;
  max-height: 100px;
  display: block;
}

@media (min-width: 1000px) {
  .header-image {
    max-width: 1800px;
    height: 220px;
    aspect-ratio: auto;
    object-position: center 55%;
    margin: 0 auto;
  }

  .site-logo {
    top: -6px;
    left: 12px;
  }

  .site-logo__img {
    width: 190px;
    max-height: 190px;
  }
}

/* MENU SUPERIOR */

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  margin: 14px 20px 0;
  border-bottom: 1px solid var(--verde-reposo-texto);
}

.nav-list {
  order: 2;
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 65%;
}

.nav-list li {
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.7rem;
  padding: 0 1.4rem;
  background: var(--verde-reposo-fondo);
  color: var(--verde-reposo-texto);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--verde-reposo-texto);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  transition: background 0.2s ease, color 0.2s ease;
  box-sizing: border-box;
}

.nav-link:hover,
.nav-link.active {
  background: var(--verde-hover-fondo);
  color: var(--verde-hover-texto);
}

.nav-toggle {
  order: 1;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 2.7rem;
  height: 2.7rem;
  background: var(--verde-reposo-fondo);
  border: 1px solid var(--verde-reposo-texto);
  border-radius: 6px;
  cursor: pointer;
  padding: 10px 8px;
  box-sizing: border-box;
  margin: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--verde-hover-fondo);
}

.nav-search {
  order: 3;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 20%;
  height: 2.7rem;
  margin: 0;
  padding: 0;
}

.nav-search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0;
  font-family: 'Jost', sans-serif;
  font-size: 0.95rem;
  color: var(--verde-reposo-texto);
  outline: none;
}

.nav-search__input::placeholder {
  color: var(--verde-reposo-texto);
  opacity: 0.65;
}

.nav-search__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: var(--verde-reposo-texto);
  -webkit-mask-image: url('/assets/img/icono-lupa.svg');
  mask-image: url('/assets/img/icono-lupa.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  pointer-events: none;
}

.nav-search__results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--verde-reposo-texto);
  border-radius: 8px;
  max-height: 240px;
  overflow-y: auto;
  display: none;
  z-index: 20;
}

.nav-search__results.open {
  display: block;
}

.nav-search__results li a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--verde-reposo-texto);
  text-decoration: none;
}

.nav-search__results li a:hover {
  background: var(--verde-reposo-fondo);
}

@media (max-width: 768px) {
  .main-nav {
    border-bottom: none;
    margin: 14px 12px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-search {
    width: auto;
    flex: 1;
    max-width: 220px;
  }

  .nav-list {
    order: 4;
    display: none;
    flex-direction: column;
    width: 100%;
    flex-basis: 100%;
    margin-top: 10px;
  }

  .nav-list.open {
    display: flex;
  }

  .nav-link {
    border-radius: 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
}


/* FOOTER */

.site-footer {
  flex-shrink: 0;
  background: var(--verde-reposo-fondo);
  color: var(--verde-reposo-texto);
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-brand {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
}

.footer-meta {
  margin: 0;
  font-size: 0.85rem;
}

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.footer-icon-btn:hover {
  background-color: var(--verde-hover-fondo);
}

.footer-icon {
  width: 30px;
  height: 30px;
  background-color: var(--verde-reposo-texto);
  transition: background-color 0.2s ease;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-position: center;
  mask-position: center;
}

.footer-icon-btn:hover .footer-icon {
  background-color: var(--verde-hover-texto);
}

.footer-icon--instagram {
  -webkit-mask-image: url('/assets/img/icono-instagram-verde.svg');
  mask-image: url('/assets/img/icono-instagram-verde.svg');
}

.footer-icon--email {
  -webkit-mask-image: url('/assets/img/icono-email-verde.svg');
  mask-image: url('/assets/img/icono-email-verde.svg');
}

.footer-star {
  color: var(--verde-hover-fondo);
  font-size: 0.9em;
}

.footer-legal-link {
  color: inherit;
  text-decoration: underline;
}

.footer-legal-link:hover {
  color: var(--verde-hover-fondo);
}


/* TEXTOS LEGALES */

.legal-content {
  font-size: 0.85rem;
  color: #444;
}

.legal-content h1 {
  font-size: 1.5rem;
}

.legal-content h3 {
  font-size: 1rem;
  margin-top: 1.5rem;
}

.legal-content strong {
  font-weight: 400;
}


/* CONÓCENOS */

.persona-block {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin: 5rem 0;
}

.persona-block--reverse {
  flex-direction: row-reverse;
}

.persona-block__image {
  flex: 0 0 25%;
  max-width: 25%;
}

.persona-block__image img {
  width: 100%;
  border-radius: 12px;
}

.persona-block__text {
  flex: 1;
}

.persona-block__text h2 {
  margin-top: 0;
}

@media (max-width: 700px) {
  .persona-block,
  .persona-block--reverse {
    flex-direction: column;
  }

  .persona-block__image {
    max-width: 200px;
    margin: 0 auto;
  }
}

.conocenos-outro {
  text-align: center;
  margin-top: 2.5rem;
}

.btn-mailto {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 1.8rem;
  background: var(--verde-reposo-fondo);
  color: var(--verde-reposo-texto);
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-mailto:hover {
  background: var(--verde-hover-fondo);
  color: var(--verde-hover-texto);
}


/* LAYOUT CON COLUMNA LATERAL (reutilizable: home, consejos, y lo que venga) */

.layout-with-sidebar {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.layout-main {
  flex: 1;
  min-width: 0;
}

.layout-sidebar {
  flex: 0 0 30%;
  max-width: 30%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 800px) {
  .layout-with-sidebar {
    flex-direction: column;
  }

  .layout-sidebar {
    max-width: 100%;
    width: 100%;
  }
}


/* PANEL INFORMATIVO (marrón) */

.panel-info {
  border: 1px dashed var(--marron-borde);
  background: var(--marron-fondo);
  color: var(--marron-texto);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
}

.panel-info__title {
  margin: 0 0 0.6rem;
  font-family: 'Playfair Display', serif;
  color: var(--marron-texto);
  font-size: 1.05rem;
}

.panel-info__list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-style: italic;
}

.panel-info__list li::before {
  content: "✦ ";
}

.panel-info__list li {
  margin-bottom: 0.4rem;
}

.panel-info__list a {
  color: var(--marron-texto);
}

.panel-oculto {
  display: none;
}

/* home */
.hero {
  position: relative;
  margin-bottom: 2.5rem;
}

.hero img {
  width: 100%;
  border-radius: 12px;
}

.hero__text {
  margin: 0.75rem 0;
  font-style: italic;
}

.hero__btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: var(--verde-reposo-fondo);
  color: var(--verde-reposo-texto);
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.hero__btn:hover {
  background: var(--verde-hover-fondo);
  color: var(--verde-hover-texto);
}

.post-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  min-height: 60px;
}

.post-card {
  display: block;
  width: 220px;
  text-decoration: none;
  color: var(--verde-reposo-texto);
  background: var(--verde-reposo-fondo);
  border: 1px solid var(--verde-reposo-texto);
  border-radius: 12px;
  overflow: hidden;
  transition: background 0.2s ease, color 0.2s ease;
}

.post-card:hover {
  background: var(--verde-hover-fondo);
  color: var(--verde-hover-texto);
}

.post-card__icon {
  display: block;
  width: 100px;
  height: 100px;
  margin: 1.25rem auto;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
}

.post-card__icon:hover{
  background-color: var(--verde-hover-texto);
}

.post-card__icon--viaje {
  -webkit-mask-image: url('/assets/img/icono-viaje.svg');
  mask-image: url('/assets/img/icono-viaje.svg');
}

.post-card__icon--senderismo {
  -webkit-mask-image: url('/assets/img/icono-senderismo.svg');
  mask-image: url('/assets/img/icono-senderismo.svg');
}

.post-card__text {
  margin: 0;
  padding: 0.9rem 1rem;
  text-align: center;
  background: #fff;
  color: var(--verde-reposo-texto);
  border-top: 1px solid var(--verde-reposo-texto);
}

.panel-icon {
  display: inline-block;
  width: 30px;
  height: 30px;
  vertical-align: middle;
  margin-right: 4px;
}


/* Viajes y Senderismo */
.continent-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.continent-btn {
  padding: 0.6rem 1.4rem;
  background: var(--color-reposo-fondo);
  color: var(--color-reposo-texto);
  text-decoration: none;
  font-weight: 500;
  border-radius: 20px;
  transition: background 0.2s ease, color 0.2s ease;
}

.continent-btn:hover {
  background: var(--color-hover-fondo);
  color: var(--color-hover-texto);
}

.continent-section {
  margin-bottom: 3rem;
  scroll-margin-top: 1rem;
}

.country-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.country-card {
  display: block;
  width: 220px;
  text-decoration: none;
  color: var(--color-reposo-texto);
  border: 1px solid var(--color-reposo-texto);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.country-card:hover {
  transform: translateY(-3px);
}

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

.country-card__name {
  display: block;
  padding: 0.6rem;
  text-align: center;
  font-weight: 500;
  background: #fff;
}

.panel-construccion {
  text-align: center;
  margin-top: 1rem;
}


/* Mapa españa */
.mapa-container {
  max-width: 1500px;
  margin: 0 auto;
}

.mapa-espana {
  width: 100%;
  height: auto;
  display: block;
}

/* Base para todas las provincias */
.provincia {
  stroke: var(--marron-borde);
  fill-opacity:1;
  stroke-width: 0.48;
  stroke-linecap:square;
  stroke-miterlimit:10;
  transition: fill 0.2s ease;
}

.provincia-label {
  text-anchor: start;
  pointer-events: none;

  font-weight:400;
  font-size:7.92px;
  line-height:0%;
  fill:var(--marron-texto);
}
    
/* Sin información: Gris neutro */
.provincia.no-info {
  fill: var(--marron-fondo); 
  color: var(--marron-texto);
  cursor: default;
}
    
/* Con información:  */
.provincia.con-info {
  fill: var(--color-reposo-fondo);
  color: var(--color-reposo-texto);
  cursor: pointer;
}
    
/* Efecto Hover solo en provincias con información */
.provincia.con-info:hover {
  fill: var(--color-hover-fondo);
  color: var(--color-hover-texto);
  opacity: 0.9;
}

.provincia.con-info ~ .provincia-label {
  fill: var(--color-reposo-texto);
}

.provincia.con-info:hover ~ .provincia-label {
  fill: var(--color-hover-texto);
}