:root {
  --primary: #1f5570;
  --accent: #e67e22;
  --bg: #ffffff;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: #333;
}

/* HEADER */
header {
  background: var(--primary);
  color: rgb(255, 255, 255);
  text-align: center;
  padding: 2rem;
}

.search-container {
  margin-top: 1rem;
}

#buscador {
  width: 80%;
  max-width: 500px;
  padding: 10px;
  border-radius: 20px;
  border: none;
  outline: none;
}

/* GRID */
.grid-libros {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  padding: 30px;
}

/* PORTADAS */
.book-cover {
  cursor: pointer;
  transition: transform .2s ease;
}

.book-cover img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.15);
}

.book-cover:hover {
  transform: scale(1.05);
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 20px;
  position: relative;
}

.modal-img {
  width: 100%;
  border-radius: 8px;
  margin: 10px 0;
}

#closeModal {
  position: absolute;
  top: 10px;
  right: 15px;
  border: none;
  background: var(--accent);
  color: white;
  padding: 5px 10px;
  border-radius: 50%;
  cursor: pointer;
}
.main-footer {
    background-color: #2c3e50; /* Un tono oscuro para contrastar con el header */
    color: #ecf0f1;
    padding: 3rem 0 1rem;
    margin-top: 50px;
    font-family: 'Segoe UI', sans-serif;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 0 40px;
}

.footer-section h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
}

/* Línea decorativa bajo los títulos */
.footer-section h3::after {
    display: block;
    width: 30px;
    height: 2px;
    background: var(--accent);
    margin-top: 8px;
}

.footer-section p {
    line-height: 1.6;
    color: #bdc3c7;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--accent);
}

/* Formulario Newsletter */
.footer-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.footer-form input {
    padding: 0.6rem;
    border-radius: 5px;
    border: none;
    flex: 1;
}

.footer-form button {
    padding: 0.6rem 1rem;
    background-color: var(--accent);
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.footer-form button:hover {
    background-color: #d35400;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Iconos sociales (simulados) */
.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: #34495e;
    color: white;
    text-align: center;
    line-height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
    background: var(--primary);
}
.grid-autores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.autor-card {
  background: rgba(104, 152, 222, 0.638); /* Fondo sutil si usas modo oscuro */
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.autor-card:hover {
  transform: translateY(-10px);
}

.autor-foto {
  width: 150px;
  height: 150px;
  border-radius: 50%; /* Fotos circulares */
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid #fdffff22; /* El azul turquesa de tu logo */
}

.autor-card h3 {
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.autor-bio {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #e8e6e6;
  margin-bottom: 1rem;
}

.btn-ver-libros {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #00bcd4;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}
:root {
  --primary: #1f5570;
  --primary-color: #00bcd4;
  --accent: #e67e22;
  --bg: #ffffff;
  --bg-dark: #121212;
  --text-light: #ffffff;
}

/* Contenedor Principal del Header */
.main-header {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px); /* Efecto cristal */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 2rem;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo */
.nav-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.nav-logo img {
    height: 40px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* Enlaces de Navegación */
.nav-links {
    display: flex;            /* Pone los elementos en fila */
    justify-content: center;   /* Centra el grupo de enlaces horizontalmente */
    align-items: center;       /* Centra los elementos verticalmente */
    list-style: none;         /* Quita los puntos de la lista */
    padding: 0;
    margin: 20px 0;           /* Espacio arriba y abajo del menú */
    gap: 30px;
}

.nav-item {
   text-decoration: none;
    color: #f8f8f8;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary-color);
}

/* Caja de Búsqueda Integrada */
.nav-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.943);
    border-radius: 20px;
    padding: 5px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-search input {
    background: none;
    border: none;
    color: #1a1a1a;
    padding: 5px;
    outline: none;
    width: 200px;
}

.nav-search input::placeholder {
    color: #777;
}

.nav-search button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Aquí podrías implementar un menú hamburguesa */
    }
    .nav-search input {
        width: 100px;
    }
}
.btn-ir-ruta, .btn-mapa {
    display: inline-block;
    background-color: #00bcd4;
    color: #111;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-ir-ruta:hover, .btn-mapa:hover {
    background-color: #008ba3;
    color: white;
}

.ruta-meta {
    color: #00bcd4;
    font-size: 0.9rem;
    margin-bottom: 10px;
}
/* Cuadrícula principal */
.grid-rutas {
    display: grid;
    /* Cambiamos a auto-fill para que no estire las tarjetas si hay pocas */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 30px;
    padding: 40px 5%;
    max-width: 1400px; /* Evita que el grid se disperse en monitores UltraWide */
    margin: 0 auto;    /* Centra todo el bloque del grid */
}

/* Tarjeta de Ruta */
.ruta-card {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(88, 88, 88, 0.886);
    border: 1px solid #202020;
    transition: transform 0.3s ease;
}

.ruta-card:hover {
    transform: translateY(-10px);
    border-color: #00bcd4; /* Azul turquesa */
}

/* Banner superior con imagen */
.ruta-banner {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.ruta-overlay {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.057));
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.ruta-libro-tag {
    background: #00bcd4;
    color: #111;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Contenido de la tarjeta */
.ruta-body {
    padding: 20px;
}

.ruta-body h3 {
    margin: 0 0 10px 0;
    color: #fff;
}

.ruta-descripcion {
    color: #bbb;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 20px;
}

/* El Timeline de paradas */
.timeline {
    border-left: 2px solid #333;
    margin-left: 10px;
    margin-bottom: 25px;
}

.parada-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
}

.parada-icon {
    position: absolute;
    left: -12px;
    top: 0;
    background: #1e1e1e;
    color: #00bcd4;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.parada-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #eee;
}

.parada-info p {
    margin: 3px 0 0 0;
    font-size: 0.85rem;
    color: #888;
}

/* Botón interactivo */
.btn-mapa-interactivo {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid #00bcd4;
    color: #00bcd4;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-mapa-interactivo:hover {
    background: #00bcd4;
    color: #111;
}

.mapa-estilo {
  height: 350px; /* Si no tiene altura, el mapa no se ve */
  width: 100%;
  display: block;
  background-color: #eee;
  border-radius: 12px;
  margin: 15px 0;
}
@media (max-width:600px){
  div.img{
   display:block; 
  }  
}
/* SECCIÓN INTRODUCCIÓN A RUTAS (CON NEGRITA) */
.intro-rutas {
    text-align: center;
    padding: 60px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.intro-rutas h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 2.5rem;
  color: #000000; /* CAMBIA ESTO A NEGRO */
  margin-bottom: 15px;
  font-weight: bold; 
}

.intro-rutas p {
    font-size: 1.2rem;
    color: #bbb;
    line-height: 1.6;
    position: relative;
    font-weight: 700; /* Aplica la negrita al párrafo descriptivo */
}

.intro-rutas h2 img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(0, 188, 212, 0.3));
}

/* Línea turquesa debajo del texto */
.intro-rutas p::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 20px auto 0;
    border-radius: 2px;
}
/* =========================================
   ADAPTACIÓN PARA DISPOSITIVOS MÓVILES
   ========================================= */

@media (max-width: 768px) {
    .intro-rutas {
        padding: 40px 15px;
    }

    .intro-rutas h2 {
        font-size: 2rem;
        flex-direction: column; /* Icono arriba, texto abajo */
        gap: 10px;
    }

    .intro-rutas h2 img {
        height: 60px;
    }

    .intro-rutas p {
        font-size: 1.1rem;
    }
}
/* PASAPORTE LITERARIO */
.pasaporte-btn-container {
    text-align: center;
    margin: 30px 0;
}
.btn-ir-pasaporte {
    display: inline-block;
    background-color: #e67e22; /* El color naranja de tu acento */
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}
.btn-ir-pasaporte:hover {
    background-color: #d35400;
}
/* CONTENEDOR GENERAL */
.pasaporte-main-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Courier New', Courier, monospace;
}

/* PANEL DEL CONTROL DE FRONTERAS */
.validador-rutas-panel {
    background: #1a252f;
    border-radius: 12px;
    padding: 20px;
    color: #ecf0f1;
    margin-bottom: 30px;
    border-left: 5px solid #00bcd4;
}
.validador-rutas-panel h3 {
    margin-top: 0;
    color: #00bcd4;
}
.controles-validador {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}
#selector-ruta-pasaporte {
    flex: 1;
    min-width: 250px;
    padding: 12px;
    border-radius: 6px;
    border: none;
    background: #fff;
    font-size: 1rem;
    font-weight: bold;
}
.btn-accion-estampar {
    padding: 12px 24px;
    background: #e67e22;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}
.btn-accion-estampar:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
}
.btn-accion-estampar.ya-estampado {
    background: #2ecc71;
}

/* EL PASAPORTE FÍSICO */
.libro-pasaporte {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f4edd2; /* Color papel antiguo/oficial */
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,0,0,0.2);
    border: 8px solid #34495e; /* Borde simulando el lomo de cuero */
    overflow: hidden;
    min-height: 550px;
}

/* HOJAS */
.hoja-pasaporte {
    padding: 25px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}
.hoja-identidad {
    border-right: 2px dashed rgba(0,0,0,0.15);
    background-image: radial-gradient(rgba(0, 188, 212, 0.05) 1px, transparent 0);
    background-size: 10px 10px;
}
.hoja-sellos {
    background-image: linear-gradient(rgba(230, 126, 34, 0.03) 1px, transparent 0);
    background-size: 100% 20px;
}

/* DETALLES DE IDENTIDAD */
.encabezado-pais, .encabezado-sellos {
    text-align: center;
    border-bottom: 1px dashed #7f8c8d;
    padding-bottom: 10px;
    color: #2c3e50;
}
.encabezado-pais h4, .encabezado-sellos h4 { margin: 5px 0 0 0; font-weight: bold;}
.cuerpo-identidad {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}
.foto-usuario-pasaporte {
    width: 120px;
    height: 150px;
    background: #d5dbdb;
    border: 2px dashed #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #95a5a6;
}
.datos-usuario-pasaporte {
    flex: 1;
}
.campo-dato {
    margin-bottom: 10px;
}
.campo-dato label {
    display: block;
    font-size: 0.7rem;
    color: #7f8c8d;
    text-transform: uppercase;
}
.campo-dato span {
    font-size: 0.95rem;
    font-weight: bold;
    color: #2c3e50;
}
.valor-dato-resaltado {
    color: #e67e22 !important;
    font-size: 1.2rem !important;
}
.huella-seguridad {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(0,0,0,0.1);
    font-size: 2.5rem;
}
.codigo-lectura-mecanica {
    font-family: monospace;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #555;
    line-height: 1.4;
}

/* REJILLA DE SELLOS (TINTA REALISTA) */
.grid-sellos-estampados {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    flex: 1;
    margin-top: 20px;
}

/* ESTILO VISUAL DE LOS SELLOS */
.sello-oficial {
    border: 4px double;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    position: relative;
    transform: rotate(-5deg); /* Efecto de estampado manual imperfecto */
    animation: golpeSello 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: transparent;
}

/* Colores de tinta por localización */
.sello-toledo { color: #8e44ad; border-color: #8e44ad; transform: rotate(4deg); }
.sello-madrid { color: #c0392b; border-color: #c0392b; transform: rotate(-6deg); }
.sello-baztan { color: #27ae60; border-color: #27ae60; transform: rotate(8deg); }
.sello-roma { color: #d35400; border-color: #d35400; transform: rotate(-3deg); }

.sello-oficial h5 {
    margin: 0;
    font-size: 0.9rem;
    letter-spacing: 1px;
}
.sello-oficial .fecha-entrada {
    font-size: 0.8rem;
    background: rgba(0,0,0,0.05);
    padding: 2px 5px;
    margin: 5px 0;
    display: inline-block;
}
.sello-oficial .meta-sello {
    font-size: 0.65rem;
    display: block;
    margin-top: 5px;
}

/* Efecto golpe de tampón de tinta */
@keyframes golpeSello {
    0% { transform: scale(3); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsivo en móviles */
@media (max-width: 768px) {
    .libro-pasaporte { grid-template-columns: 1fr; }
    .hoja-identidad { border-right: none; border-bottom: 2px dashed rgba(0,0,0,0.15); }
}