:root {
      --primary: #0071e3;
      --primary-hover: #0077ed;
      --background: #f5f5f7;
      --card-bg: #ffffff;
      --text: #1d1d1f;
      --text-light: #86868b;
      --border-radius: 18px;
      --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
      --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
      --gold: #d4af37;
    }

    body, html {
      margin: 0;
      padding: 0;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
      background-color: white; /* Cambiado de var(--background) a white */
      color: var(--text);
      min-height: 100vh;
      line-height: 1.5;
    }

    @font-face {
      font-family: 'Baskerville';
      src: url('media/Fonts/Libre_Baskerville/LibreBaskerville-Regular.ttf') format('truetype');
      font-weight: normal;
      font-style: normal;
    }

    @font-face {
      font-family: 'Baskerville';
      src: url('media/Fonts/Libre_Baskerville/LibreBaskerville-Bold.ttf') format('truetype');
      font-weight: bold;
      font-style: normal;
    }

    .app-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.5rem 1.5rem;
      background: white;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .content-container {
      padding-top: 60px; /* Añadir espacio para el header fijo */
    }

    .logo-container {
      display: flex;
      align-items: center;
      gap: 10px;
      height: 40px; /* Igual que la altura del logo */
    }

    .page-title {
      font-family: 'Baskerville', serif;
      font-size: 2rem;
      text-transform: uppercase;
      color: #79746A;
      margin: 0;
      letter-spacing: 1px;
      font-weight: bold;
      line-height: 40px; /* Igual que la altura del logo */
      display: flex;
      align-items: center;
    }

    .site-logo {
      height: 40px;
      width: auto;
    }

    .page-title {
      font-family: 'Baskerville', serif;
      font-size: 2rem;
      text-transform: uppercase;
      color: #79746A;
      margin: 0;
      letter-spacing: 1px;
      font-weight: bold;
    }

    .language-selector {
      position: relative;
      cursor: pointer;
    }

    .current-language {
      display: flex;
      align-items: center;
    }

    .flag-icon {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      object-fit: cover;
      border: 1px solid rgba(255,255,255,0.3);
    }

    .language-dropdown {
      position: absolute;
      top: 100%;
      right: 0;
      background: var(--card-bg);
      border-radius: 10px;
      box-shadow: var(--shadow);
      padding: 10px;
      display: none;
      z-index: 100;
    }

    .language-option {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 5px 10px;
      cursor: pointer;
      transition: background 0.2s;
      border-radius: 5px;
      margin: 5px 0;
    }

    .language-option:hover {
      background: rgba(0, 113, 227, 0.1);
    }

    .language-selector:hover .language-dropdown {
      display: block;
    }

    .page-subtitle {
      font-size: 1rem;
      color: var(--text-light);
      margin: 0 auto;
      font-weight: 500;
      width: fit-content;
      position: relative;
      top: -0.6rem;
    }

    /* Landing page styles */
    .landing-container {
      max-width: 100%;
      margin: 0;
      padding: 0;
      width: 100%;
      height: 100vh;
      overflow: hidden;
      position: relative;
    }

    .background-image {
      position: absolute;
      top: 0;
      left: -100px;
      width: auto;
      height: 100%;
      min-width: calc(100% + 200px);
      object-position: left center;
      object-fit: cover;
      z-index: 1;
    }

    .overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.6);
      z-index: 2;
    }

    .landing-content {
      position: absolute;
      top: 45%;
      left: 50%;
      transform: translate(-50%, -50%);
      text-align: center;
      color: white;
      z-index: 3;
      width: 90%;
      max-width: 800px;
    }

    .landing-title {
      font-size: 1.8rem;
      font-weight: 400;
      margin-bottom: 2.5rem;
      text-shadow: 0 1px 2px rgba(0,0,0,0.5);
      line-height: 1.4;
      letter-spacing: 0.5px;
      position: relative;
      top: -15px;
    }

    .start-btn {
      background-color: var(--gold);
      color: #1d1d1f;
      border: none;
      padding: 12px 28px;
      font-size: 1.1rem;
      font-weight: 600;
      border-radius: 25px;
      cursor: pointer;
      transition: all 0.3s ease;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      box-shadow: 0 3px 15px rgba(0,0,0,0.2);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      position: relative;
      overflow: hidden;
      text-decoration: none !important;
    }

    .start-btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
      transition: 0.5s;
    }

    .start-btn:hover {
      background-color: #e6c34d;
      transform: translateY(-3px);
      box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    }

    .start-btn:hover::before {
      left: 100%;
    }

    .start-btn i {
      font-size: 1.6rem;
      transition: transform 0.3s ease;
    }

    .start-btn:hover i {
      transform: translateX(5px);
    }

    .app-footer {
      text-align: center;
      padding: 1rem;
      color: var(--text-light);
      font-size: 0.9rem;
      background: rgba(255,255,255,0.8);
      position: relative;
      z-index: 4;
    }

    .app-footer a {
      color: var(--primary);
      text-decoration: none;
      transition: color 0.2s;
    }

    .app-footer a:hover {
      color: var(--primary-hover);
      text-decoration: underline;
    }

    /* Tour page styles */
    .content-container {
      max-width: 100%;
      margin: 0;
      padding: 0;
      width: 100%;
      height: 100vh;
      display: flex;
      flex-direction: column;
      background: white; /* Asegurar que el fondo del contenedor sea blanco */
    }

#map {
  width: 100%;
  height: 80vh;  /* Aumentado de 70vh a 80vh */
  border-radius: 0;
  overflow: hidden;
  margin: 0;
  box-shadow: none;
  border: none;
  position: sticky;
  top: 0;
  z-index: 1;
  margin-bottom: 0;
  padding-bottom: 0; /* Asegurar que no hay padding inferior */
}

    .tour-controls {
      flex: 1;
      overflow-y: auto;
      padding: 0 1rem 0.5rem 1rem; /* Eliminado padding superior, mantenido inferior y laterales */
      margin-bottom: 0;
      margin-top: 0; /* Asegurar que no hay margen superior */
      background: white; /* Asegurar que el fondo de los controles sea blanco */
    }

#tour-list {
  max-height: 35vh; /* Aumentado a 35vh */
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--background);
  margin-top: 2px;
  padding: 10px;
  background: white; /* Fondo blanco explícito */
}

    #tour-list::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }

    #tour-list::-webkit-scrollbar-track {
      background: var(--background);
      border-radius: 10px;
    }

    #tour-list::-webkit-scrollbar-thumb {
      background-color: var(--primary);
      border-radius: 10px;
      border: 2px solid var(--background);
    }

    #tour-list::-webkit-scrollbar-thumb:hover {
      background-color: var(--primary-hover);
    }

    .modern-btn {
      background-color: var(--primary);
      color: white;
      border: none;
      padding: 12px 24px;
      border-radius: 30px;
      font-size: 1rem;
      font-weight: 500;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 0 auto;
      transition: var(--transition);
      box-shadow: 0 4px 10px rgba(0, 113, 227, 0.3);
    }

    .modern-btn:hover {
      background-color: var(--primary-hover);
      transform: translateY(-2px);
      box-shadow: 0 6px 15px rgba(0, 113, 227, 0.4);
    }

    #tour-list {
      background: white; /* Fondo blanco en lugar de var(--card-bg) */
      border-radius: 0; /* Eliminado el borde redondeado */
      padding: 0 24px; /* Eliminado completamente el padding vertical */
      margin: 0 auto 0; /* Eliminado el margen superior */
      box-shadow: none; /* Eliminada la sombra */
      max-width: 600px;
    }

    #tour-list h3 {
      margin: 0; /* Eliminar margen del título */
      font-size: 1rem; /* Reducir tamaño de fuente */
      line-height: 1; /* Reducir altura de línea */
    }

    .badge {
      background-color: #f5f5f7;
      color: var(--text-light);
      padding: 0 12px; /* Eliminado padding vertical completamente */
      border-radius: 20px;
      font-size: 0.85rem;
      font-weight: 500;
      margin: 0; /* Eliminado cualquier margen */
      line-height: 1.2; /* Reducido line-height */
      display: inline-block; /* Para que el line-height funcione correctamente */
    }

    .fancy-list {
      margin-top: 4px; /* Pequeño margen para separar del título */
    }

.point-item {
  padding: 0 16px;
  margin: 0;
  border-radius: 8px;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 0.8;
  font-size: 0.85rem;
  margin-bottom: -2px;
  position: relative;
}

@media (prefers-color-scheme: dark) {
  .point-item {
    color: #f5f5f5 !important;
    background: #2d2d2d !important;
  }
  
  .point-item:hover {
    background: rgba(0, 113, 227, 0.3) !important;
  }

  .point-item.completed {
    background-color: #1a3a1a !important;
    color: #e0ffe0 !important;
  }
}

    .point-item:before {
      content: attr(data-number); /* Usará el número del atributo data-number */
      display: flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      border: 1.5px solid var(--gold); /* Borde del color de Itálica (dorado) */
      background-color: transparent;
      color: var(--gold); /* Color del número */
      font-weight: bold;
      font-size: 0.7rem; /* Tamaño pequeño para el número */
    }

    .custom-div-icon {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .marker-pin {
      width: 30px;
      height: 30px;
      background-color: red;
      border-radius: 50% 50% 50% 0;
      transform: rotate(-45deg);
      position: absolute;
      left: 0px;
      top: 0px;
      border: 1px solid #fff;
    }

    .marker-number {
      position: absolute;
      top: 7px;
      left: 0;
      width: 100%;
      text-align: center;
      color: white;
      font-size: 12px;
      font-weight: bold;
      z-index: 1;
    }

    .popup-content {
      max-width: 225px;
      padding: 6px; /* Reducido de 8px */
    }

    .popup-content audio {
      width: 100%;
      margin-top: 6px;
      border-radius: 0;
      background: #f5f5f7;
      height: 30px;
      padding: 2px 0;
    }
    
    /* Estilos para controles de audio en popups */
    .popup-content audio {
      width: 100%;
      height: 40px;
      background: #f5f5f7;
    }
    .popup-content audio::-webkit-media-controls-panel {
      background: #f5f5f7;
      display: flex;
      align-items: center;
      padding: 0 8px;
    }
    .popup-content audio::-webkit-media-controls-play-button {
      margin-right: 8px;
    }
    .popup-content audio::-webkit-media-controls-timeline {
      flex: 1;
      margin: 0 8px;
    }
    .popup-content audio::-webkit-media-controls-current-time-display,
    .popup-content audio::-webkit-media-controls-time-remaining-display {
      display: none;
    }

    .popup-content p {
      margin: 8px 0;
      line-height: 1.4;
    }

    .popup-description {
      max-height: 5.6em; /* Reducido de ~8.4em (6 líneas) a ~5.6em (4 líneas) */
      overflow-y: auto;
      padding-right: 8px;
      margin: 8px 0;
      scrollbar-width: thin;
      scrollbar-color: #0071e3 #f5f5f7;
    }

    .popup-description::-webkit-scrollbar {
      width: 6px;
    }

    .popup-description::-webkit-scrollbar-track {
      background: #f5f5f7;
      border-radius: 3px;
    }

    .popup-description::-webkit-scrollbar-thumb {
      background-color: #0071e3;
      border-radius: 3px;
    }

    @media (max-width: 767px) {
      #map {
        height: 60vh;
      }

      .page-title {
        font-size: 1.8rem;
      }

      .popup-content {
        max-width: 200px;
      }

      #tour-list {
        padding: 16px;
      }

      .point-item {
        padding: 12px;
        font-size: 0.9rem;
      }
    }

@media (prefers-color-scheme: dark) {
      :root {
        --background: #121212;
        --card-bg: #1e1e1e;
        --text: #f5f5f5;
        --text-light: #aaa;
        --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
      }

      .popup-content {
        background: #2d2d2d;
        color: var(--text);
      }

      .point-item {
        background: #2d2d2d;
        color: #f5f5f5;
      }
      
      .badge {
        background: #333;
        color: #ddd;
      }

      .tour360-btn {
        background: #0077ed !important;
        color: white !important;
      }

      #tour-list h3 {
        color: #1d1d1f; /* Negro permanente incluso en modo oscuro */
      }
    }
