/* =======================
   VARIABLES PRINCIPALES
======================= */
:root {
  --font-title: 'Playfair Display', sans-serif;
  --font-subtitle: 'Poppins', sans-serif;
  --font-ui: 'Poppins', sans-serif;

  --base: #fffdf9;
  --content: #69583e;
  --content-light: #d7d5d5;
  --content-dark: #5c4d36;

  --accent: #D4B982;
  --accent-light: #fffdf9;
  --accent-dark: #B88A2E;

  --quiz-correct: #4CAF50;
  --quiz-wrong: #E53935;
}

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

/* =======================
   BASE GLOBAL MEDIA
======================= */
img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: Playfair Display;
  src: url('../fonts/Playfair_Display/PlayfairDisplay-Regular.ttf') format('truetype');
}

body, h1, h2, p {
  font-family: 'Poppins', sans-serif;
}

body {
  font-family: var(--font-ui);
  background-color: var(--base);
  color: var(--content);
  line-height: 1.6;
  text-decoration: none;
  width: 100%;
}

main {
  width: 90%;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
  align-items: center;
}

/* =======================
   HERO (header index)
======================= */
.hero {
  position: relative;
  width: 100%;
  height: 60dvh;
  background: url('../assets/hero.webp') center/cover no-repeat;
  display: flex;
  justify-content: center;
  color: var(--base);
  margin-bottom: 1rem;
}

.hero > div {
  background: rgba(0,0,0,0.72);
  padding: 1rem 2rem;
  border-radius: 8px;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: 3.5rem;
  font-style: italic;
  margin: 0;
  color: var(--accent-light);
}

.hero p {
  font-family: var(--font-subtitle);
  font-size: 1.25rem;
  margin-top: 1rem;
  color: var(--accent-light);
  text-decoration: none;
}

/* =======================
   HEADER rutas y stops
======================= */
header {
  width: 100%;
  background-color: var(--accent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  height: 150px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  flex-wrap: wrap;
  gap: 1rem;
}

header img.logo,
.route-header .route-logo {
  height: 80px;
  flex-shrink: 0;
}

.back-btn-header {
  text-decoration: none;
  background-color: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-block;
}

.back-btn-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

/* =======================
   TITULOS Y PARÁGRAFOS
======================= */
h1 {
  font-size: 2.5rem;
  color: var(--content-dark);
  margin-bottom: 0.5rem;
  text-align: left;
}

h2 {
  font-family: var(--font-subtitle);
  font-size: 2rem;
  color: var(--content-dark);
  margin-top: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  text-align: left;
}

/* =======================
   CONTENEDORES
======================= */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 0;
}

/* =======================
   STOP PAGE
======================= */
/* Contenedor de medios (fotos y vídeos) */
.container.stop-visual > img,
.container.stop-visual > video {
  max-width: min(100%, 1200px);
  border-radius: 12px;
  margin: 0 auto;
  margin-bottom: 2rem;
  width: 100%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* Contenedor de panorámicas (Pannellum) */
.container.stop-visual #panorama {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  object-fit: cover;
  height: 550px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* Juxtapose / sliders interactivos */
.container.stop-slider .jx-component {
  width: 100%;
  max-width: 900px;
  height: 400px;
  margin: 1.5rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.stop-visual .caption {
  font-size: 0.9rem;
  color: var(--content-light);
  text-align: center;
  margin: 2rem 0;
}

/* =======================
   RUTAS GRID
======================= */

.container.stops {
  width: 90%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem auto;
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: clamp(1rem, 4vw, 2rem);
}

.route-card {
  display: block;
  background: var(--base);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.route-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

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

.route-content {
  padding: 1.5rem;
  margin-left: 1.25rem;
}

.route-content h3 {
  font-family: var(--font-title);
  font-size: 20px;
  font-style: italic;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--content-dark);
}

.route-features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

.route-features li {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.route-features li svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  stroke: var(--content-dark);
  fill: #f9f6ff;
  stroke-width: 2;
}

/* =======================
   STOP CARDS
======================= */

.stop-card {
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, max-height 0.6s ease;
  display: flex;
  align-items:center;
  gap: 2rem;
  background: var(--base);
  padding: 1rem;
  border-radius: 8px;
  border-left: 6px solid #000;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  text-decoration: none;
  color: inherit;
  pointer-events: auto;
}

.stop-card h3 {
  font-family: var(--font-title);
  color: var(--content-dark);
  margin-bottom: 0.5rem;
}

.stop-card p {
  color: var(--content-dark);
  text-align: left;
}

.stop-card.visible {
  opacity: 1;
  transform: translateY(0);
  max-height: 200px;
  min-width: none;
  flex: 1 1 auto;
}

.stop-card .padlock {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.stop-card.unlocked {
  border-left-color: var(--accent-dark);
}

.stop-card:hover {
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

/* =======================
   QUIZ / AUDIO ACTIVITY
======================= */
.stop-activity button {
  padding: 0.5rem 1rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  border: none;
  border-radius: 6px;
  background-color: var(--accent);
  color: var(--content-dark);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.stop-activity button:hover {
  background-color: #c0a868;
}

#quiz-result {
  font-weight: bold;
  margin-top: 0.5rem;
}

/* =======================
   FOOTER
======================= */
.footer {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.8rem;
  color: var(--content-light);
}

.footer p {
text-align: center;
}

.footer-btn {
  display: block;           /* ocupa todo el ancho del contenedor */
  text-align: center;       /* centra el contenido */
  margin: 2rem auto;        /* auto para centrar horizontalmente */
  background-color: var(--accent);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-btn a {
  color: var(--base);
  text-decoration: none;
}

.footer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

/* =======================
   RESPONSIVE
======================= */
@media (max-width: 768px) {
  .stop-visual{
    width: 100%;
    padding: 0 1rem;
    align-items: center;
  }

  .hotspot-text,
  .hotspot-component,
  .two-column-wrapper-test {
    width: 100%;
    min-width: auto;
  }

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

  .hero p {
    font-size: 1rem;
  }

  .routes-grid {
    grid-template-columns: 1fr;
  } 
    .body {
    max-width: 100%;
  }

  .route-logo {
    height: 80px;
  }

    .jx-component {
    height: 250px;
  }
}