/* ============================================================
   web_blog.css — Estilos del blog público (listing + post)
   ============================================================ */

/* ---- Contenido del artículo (.blog-content) -----------------
 *
 * Estiliza el HTML que viene crudo de la base de datos.
 * El editor guarda <h2>, <p>, <ul>, <img>, etc. sin clases —
 * estos estilos los hacen legibles sin depender de ningún
 * framework externo.
 * ------------------------------------------------------------ */

.blog-content {
    color: #010D00;
    font-size: 1.0625rem;   /* 17px — más cómodo para leer que 16px */
    line-height: 1.8;
    max-width: 72ch;        /* ancho óptimo de lectura: ~65-75 caracteres */
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
    font-weight: 700;
    color: #010D00;
    line-height: 1.25;
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
}

.blog-content h1 { font-size: 2rem; }
.blog-content h2 { font-size: 1.5rem; }
.blog-content h3 { font-size: 1.25rem; }
.blog-content h4 { font-size: 1.0625rem; text-transform: uppercase; letter-spacing: 0.05em; }

.blog-content p {
    margin-bottom: 1.375rem;
}

.blog-content a {
    color: #055902;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-content a:hover {
    color: #044002;
}

.blog-content strong,
.blog-content b {
    font-weight: 700;
    color: #010D00;
}

.blog-content em,
.blog-content i {
    font-style: italic;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.375rem;
    padding-left: 1.5rem;
}

.blog-content ul { list-style-type: disc; }
.blog-content ol { list-style-type: decimal; }

.blog-content li {
    margin-bottom: 0.375rem;
}

.blog-content li > ul,
.blog-content li > ol {
    margin-top: 0.375rem;
    margin-bottom: 0;
}

.blog-content blockquote {
    border-left: 4px solid #055902;
    margin: 1.75rem 0;
    padding: 0.75rem 1.25rem;
    color: #5a6b59;
    font-style: italic;
    background: #f3f7f0;
    border-radius: 0 0.5rem 0.5rem 0;
}

.blog-content blockquote p {
    margin-bottom: 0;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin: 1.75rem 0;
}

.blog-content figure {
    margin: 1.75rem 0;
}

.blog-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #5a6b59;
    margin-top: 0.5rem;
}

.blog-content hr {
    border: none;
    border-top: 2px solid #A1BF73;
    margin: 2.5rem 0;
    opacity: 0.4;
}

.blog-content code {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.875em;
    background: #f3f4f6;
    color: #055902;
    padding: 0.15em 0.35em;
    border-radius: 0.25rem;
}

.blog-content pre {
    background: #1a1a1a;
    color: #e5e7eb;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.75rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.blog-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.75rem 0;
    font-size: 0.9375rem;
}

.blog-content th,
.blog-content td {
    border: 1px solid #d1d5db;
    padding: 0.625rem 1rem;
    text-align: left;
}

.blog-content th {
    background: #f3f7f0;
    font-weight: 700;
    color: #055902;
}

.blog-content tr:nth-child(even) td {
    background: #fafafa;
}

/* ---- FAB "Reservar mesa" — aparece al hacer scroll ---------- */

.blog-fab {
    position: fixed;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(8px);
}

.blog-fab.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Móvil: barra full-width fija al fondo */
.blog-fab {
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1.25rem;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
}

/* Desktop: pill en esquina inferior derecha */
@media (min-width: 640px) {
    .blog-fab {
        bottom: 1.75rem;
        right: 1.75rem;
        left: auto;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }
}
