/* web_3burros/estilos.css
   Hoja de estilos única para todo el sitio público: menú, buscador,
   tarjetas de libro, navegación de textos escolares, nosotros y pie de página. */

/* -------------------------------------------------------------
   BASE
   ------------------------------------------------------------- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #333;
    background-color: #f8f8f8;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.description {
    max-width: 600px;
    margin: 0 auto 20px auto;
}

.main-image {
    max-width: 30%;
    height: auto;
    display: block;
    margin: 10px auto 20px auto;
}

.contenido-pagina {
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    box-sizing: border-box;
}

/* -------------------------------------------------------------
   MENÚ
   ------------------------------------------------------------- */
.menu-principal {
    width: 100%;
    box-sizing: border-box;
    background: white;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.menu-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: bold;
    font-size: 1.2em;
}

.menu-logo img {
    height: 36px;
    width: auto;
}

.menu-links {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

.menu-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95em;
    transition: color 0.2s;
}

.menu-links a:hover {
    color: #3498db;
}

/* -------------------------------------------------------------
   BUSCADOR
   ------------------------------------------------------------- */
.search-container {
    width: 90%;
    max-width: 600px;
    margin: 25px auto 10px auto;
    text-align: center;
}

.search-titulo {
    color: #2c3e50;
}

.search-input {
    width: 100%;
    padding: 12px 20px 12px 40px;
    font-size: 1.1em;
    border: 2px solid #3498db;
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #2980b9;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #3498db;
}

.input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

#search-results-container {
    width: 90%;
    max-width: 900px;
    margin: 20px auto;
}

.htmx-indicator {
    color: #3498db;
    margin-top: 5px;
    display: none;
}

.htmx-indicator.htmx-request {
    display: block;
}

/* -------------------------------------------------------------
   TARJETAS DE LIBRO (resultados del buscador y listas escolares)
   ------------------------------------------------------------- */
.libro-card {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    width: 100%;
    gap: 15px;
}

.libro-image {
    flex-shrink: 0;
    width: 100px;
    height: 140px;
    overflow: hidden;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.libro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.placeholder-img {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 2em;
    color: #bbb;
}

.libro-info {
    flex-grow: 1;
}

.libro-title {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.libro-autor,
.libro-editorial,
.libro-isbn {
    font-size: 0.9em;
    color: #555;
    margin: 3px 0;
}

.libro-precio {
    font-weight: bold;
    color: #3498db;
    margin: 5px 0 10px 0;
}

.disponibilidad-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #eee;
    padding-top: 5px;
    margin-top: 5px;
}

.disponibilidad-texto {
    font-size: 0.85em;
    color: #27ae60;
    font-weight: 600;
    margin: 0;
}

.btn-whatsapp-reserva {
    background-color: #25d366;
    color: white !important;
    padding: 6px 10px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.8em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
}

.btn-whatsapp-reserva:hover {
    background-color: #128c7e;
    text-decoration: none;
}

/* -------------------------------------------------------------
   TEXTOS ESCOLARES: navegación en grillas
   ------------------------------------------------------------- */
.breadcrumb {
    text-align: left;
    font-size: 0.9em;
    color: #777;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
    cursor: pointer;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.grilla-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.card-navegable {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card-navegable:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    border-color: #3498db;
}

.card-icono {
    font-size: 1.8em;
    color: #3498db;
    margin-bottom: 10px;
}

.card-navegable h3 {
    margin: 5px 0;
    color: #2c3e50;
    font-size: 1.05em;
}

.card-navegable p {
    margin: 0;
    font-size: 0.85em;
    color: #777;
}

.grilla-libros {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.mensaje-vacio {
    text-align: center;
    color: #999;
    padding: 30px 0;
}

.htmx-indicator-nav {
    display: none;
    text-align: center;
    color: #3498db;
    padding: 20px 0;
}

.htmx-request .htmx-indicator-nav {
    display: block;
}

/* -------------------------------------------------------------
   NOSOTROS
   ------------------------------------------------------------- */
.contador-antiguedad {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    max-width: 600px;
    margin: 0 auto 25px auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    color: #2c3e50;
}

.nosotros-bloque {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
    flex-wrap: wrap;
}

.nosotros-imagen {
    width: 280px;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.nosotros-texto {
    flex: 1;
    min-width: 280px;
}

/* -------------------------------------------------------------
   PIE DE PÁGINA
   ------------------------------------------------------------- */
.pie-pagina {
    width: 100%;
    margin-top: 40px;
    padding: 30px 20px 20px 20px;
    box-sizing: border-box;
    border-top: 1px solid #eee;
    background-color: #f1f1f1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sucursales-container {
    width: 90%;
    max-width: 900px;
}

.sucursales-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
    text-align: left;
}

.sucursal-item h3 {
    color: #3498db;
    margin-bottom: 5px;
}

.sucursal-item p {
    font-size: 0.9em;
    color: #555;
}

.social-links {
    margin-top: 30px;
    margin-bottom: 20px;
    display: flex;
    gap: 25px;
}

.social-links a {
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #2980b9;
}

.footer-text {
    margin-top: 10px;
    font-size: 0.8em;
    color: #777;
    max-width: 700px;
}

/* -------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .main-image {
        max-width: 60%;
    }
    .sucursales-grid {
        grid-template-columns: 1fr;
    }
    .sucursales-container {
        width: 95%;
    }
    .nosotros-bloque {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }
    .main-image {
        max-width: 80%;
    }
    .description,
    .footer-text {
        font-size: 0.9em;
    }
    .social-links {
        flex-direction: column;
        gap: 15px;
    }
    .menu-links {
        justify-content: center;
    }
}

/* -------------------------------------------------------------
 *   AGENDA: grilla de eventos
 *   ------------------------------------------------------------- */
.agenda-grilla {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.agenda-card {
    position: relative;
    display: block;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.agenda-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    border-color: #3498db;
}

.agenda-card-miniatura {
    width: 100%;
    height: 130px;
    background-color: #f1f1f1;
    overflow: hidden;
}

.agenda-card-miniatura img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.agenda-card-miniatura .placeholder-img {
    height: 100%;
    font-size: 2em;
    color: #bbb;
}

.agenda-card h3 {
    margin: 12px 15px 4px 15px;
    font-size: 1.02em;
    color: #2c3e50;
}

.agenda-card-fecha {
    margin: 0 15px 4px 15px !important;
    font-size: 0.88em;
    color: #3498db;
    font-weight: 600;
}

.agenda-card-por {
    margin: 0 15px 15px 15px !important;
    font-size: 0.85em;
    color: #777;
}

.cucarda-gratis {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e03131;
    color: white;
    font-size: 0.7em;
    font-weight: bold;
    padding: 4px 9px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.agenda-proximamente-titulo {
    text-align: left;
    color: #2c3e50;
    margin: 35px 0 15px 0;
    font-size: 1.1em;
    border-top: 1px solid #eee;
    padding-top: 25px;
}

.agenda-card-fecha-tbd {
    margin: 0 15px 4px 15px !important;
    font-size: 0.85em;
    color: #999;
    font-style: italic;
}

/* -------------------------------------------------------------
 *   FICHA DE EVENTO (Agenda, detalle)
 *   ------------------------------------------------------------- */
.ficha-evento,
.ficha-post {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    background: white;
    border-radius: 10px;
    padding: 25px 30px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.ficha-evento h1,
.ficha-post h1 {
    text-align: left;
    margin-bottom: 2px;
}

.ficha-subtitulo {
    color: #777;
    font-style: italic;
    margin-top: 0;
    margin-bottom: 18px;
}

.ficha-datos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.92em;
    color: #4a5568;
}

.ficha-datos strong {
    color: #2c3e50;
}

.ficha-cuerpo {
    line-height: 1.7;
}

.ficha-cuerpo .imagen-incrustada {
    margin: 18px 0;
    text-align: center;
}

.ficha-cuerpo .imagen-incrustada img {
    max-width: 100%;
    border-radius: 8px;
}

.ficha-cuerpo .imagen-incrustada figcaption {
    font-size: 0.82em;
    color: #888;
    margin-top: 6px;
    font-style: italic;
}

.ficha-acciones {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-volver {
    display: inline-block;
    margin-bottom: 20px;
    color: #3498db;
    text-decoration: none;
    font-size: 0.9em;
}

.btn-volver:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------
 *   ENLACES INCRUSTADOS (YouTube / Spotify / SoundCloud / Vimeo / Bandcamp)
 *   ------------------------------------------------------------- */
.enlace-embed {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
}

.enlace-embed-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
}

.enlace-embed-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.enlace-embed-spotify iframe {
    width: 100%;
    height: 152px;
    border: 0;
}

.enlace-embed-audio iframe {
    width: 100%;
    height: 166px;
    border: 0;
}

/* -------------------------------------------------------------
 *   BLOG: grilla de posteos
 *   ------------------------------------------------------------- */
.blog-grilla {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 800px;
    margin: 0 auto;
}

.blog-card {
    display: block;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    border-color: #3498db;
}

.blog-card-imagen {
    width: 100%;
    max-height: 340px;
    overflow: hidden;
    background-color: #f1f1f1;
}

.blog-card-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-card-cuerpo {
    padding: 18px 20px;
}

.blog-card-cuerpo h2 {
    margin: 0 0 4px 0;
    font-size: 1.2em;
    color: #2c3e50;
    text-align: left;
}

.blog-card-subtitulo {
    color: #777;
    font-style: italic;
    margin: 0 0 10px 0;
    font-size: 0.95em;
}

.blog-card-fecha {
    font-size: 0.8em;
    color: #999;
    margin-bottom: 10px;
}

.blog-card-extracto {
    color: #444;
    font-size: 0.95em;
    margin-bottom: 8px;
}

.leer-mas {
    color: #3498db;
    font-weight: 600;
    font-size: 0.9em;
    text-decoration: none;
}

.leer-mas:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------
 *   COMENTARIOS (Blog, detalle)
 *   ------------------------------------------------------------- */
.comentarios-seccion {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.comentarios-seccion h3 {
    text-align: left;
    color: #2c3e50;
    margin-bottom: 15px;
}

.comentario-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 12px;
}

.comentario-nombre {
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.9em;
}

.comentario-fecha {
    font-size: 0.78em;
    color: #999;
    margin-left: 8px;
}

.comentario-texto {
    margin: 6px 0 0 0;
    font-size: 0.92em;
    color: #444;
}

.mensaje-sin-comentarios {
    color: #999;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.form-comentario {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
}

.form-comentario input,
.form-comentario textarea {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
    box-sizing: border-box;
}

.form-comentario textarea {
    min-height: 90px;
    resize: vertical;
}

.form-comentario button {
    align-self: flex-start;
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.form-comentario button:hover {
    background-color: #2980b9;
}

.aviso-comentario-pendiente {
    color: #27ae60;
    font-size: 0.88em;
    margin-top: -4px;
}

.error-comentario {
    color: #e03131;
    font-size: 0.85em;
}

/* -------------------------------------------------------------
 *   RESPONSIVE (Agenda / Blog)
 *   ------------------------------------------------------------- */
@media (max-width: 480px) {
    .ficha-evento,
    .ficha-post {
        padding: 18px 16px;
    }
    .ficha-datos {
        flex-direction: column;
        gap: 4px;
    }
}
