/* NutryTastyBlogTheme — paleta, tipografías y componentes tomados de
   NutryTasty/wwwroot/css/nutry-home.css y nutry-home-new.css (fuente de verdad
   visual). Adaptado y autocontenido dentro del Theme: no depende de assets
   servidos por el proceso MVC. */

:root {
    --nt-bg: #FAF8F1;
    --nt-bg-alt: #F1F7E8;
    --nt-bg-soft: #FFF3E6;
    --nt-dark: #24351F;
    --nt-green: #7CB342;
    --nt-green-dark: #3F6F2A;
    --nt-lime: #DCEB8B;
    --nt-orange: #F28C38;
    --nt-orange-dark: #E97722;
    --nt-text: #263322;
    --nt-text-muted: #697564;
    --nt-white: #FFFFFF;
    --nt-line: rgba(63, 111, 42, 0.14);
    --nt-shadow: 0 24px 65px rgba(63, 111, 42, 0.12);
    --nt-radius: 28px;
    --nt-max: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--nt-white);
    color: var(--nt-text);
    font-family: "Plus Jakarta Sans", sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Fraunces", serif; line-height: 1.1; letter-spacing: -0.03em; color: var(--nt-text); }
p { color: var(--nt-text-muted); }
ul, ol { margin: 0; padding: 0; list-style: none; }

.ntb-shell { width: min(var(--nt-max), calc(100% - 40px)); margin: auto; }

/* Header */
.ntb-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(250, 248, 241, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--nt-line);
}
.ntb-header__inner { height: 84px; display: flex; align-items: center; gap: 28px; }
.ntb-brand img { width: 150px; height: 62px; object-fit: contain; }
.ntb-nav { flex: 1; }
.ntb-nav ul { display: flex; justify-content: center; gap: 25px; font-size: 0.9rem; font-weight: 700; flex-wrap: wrap; }
.ntb-nav a:hover, .ntb-nav a[aria-current="page"] { color: var(--nt-orange); }
.ntb-menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--nt-line); border-radius: 14px; background: #fff; padding: 11px; }
.ntb-menu-toggle span { display: block; height: 2px; background: var(--nt-text); margin: 4px; }
.ntb-header__cta { margin-left: auto; }

/* Buttons */
.ntb-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 50px; padding: 0 1.35rem; border-radius: 999px;
    border: 1px solid transparent; font-weight: 800; transition: .2s transform, .2s box-shadow;
    cursor: pointer;
}
.ntb-btn:hover { transform: translateY(-2px); }
.ntb-btn--primary { background: var(--nt-orange); color: #fff; box-shadow: 0 12px 28px rgba(242,140,56,.25); }
.ntb-btn--primary:hover { background: var(--nt-orange-dark); }
.ntb-btn--ghost { border-color: var(--nt-green); color: var(--nt-green-dark); background: rgba(255,255,255,.7); }
.ntb-btn--ghost:hover { background: var(--nt-bg-alt); }

/* Editorial header (Blog home) */
.ntb-page-head { padding: 64px 0 40px; background: var(--nt-bg); }
.ntb-kicker { color: var(--nt-green-dark); font-size: .76rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 800; }
.ntb-page-head h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 10px 0 16px; }
.ntb-page-head p { max-width: 700px; font-size: 1.05rem; }

.ntb-section { padding: 48px 0 100px; }

/* Heading above the article list */
.ntb-list-heading { margin-bottom: 28px; }
.ntb-list-heading h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 6px; }
.ntb-list-heading p { margin: 0; }

/* Listing grid (cards use the summary shape).
   Orchard's ListPart wraps each contained item's Summary shape in its own
   <ul class="list-group">/<li class="list-group-item">; "display:contents"
   lets the <li> children participate directly in this grid instead of the
   <ul> counting as a single grid cell. */
.ntb-blog-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ntb-blog-list > ul.list-group { display: contents; list-style: none; margin: 0; padding: 0; }
.ntb-blog-list > ul.list-group > li.list-group-item { list-style: none; margin: 0; padding: 0; border: 0; background: none; }

.ntb-card {
    background: #fff; border-radius: 24px; overflow: hidden;
    box-shadow: 0 10px 35px rgba(38,66,40,.07); border: 1px solid var(--nt-line);
    display: flex; flex-direction: column;
}
.ntb-card__img { width: 100%; height: 200px; object-fit: cover; background: var(--nt-bg-soft); }
.ntb-card__img--placeholder { display: flex; align-items: center; justify-content: center; font-size: 2.4rem; }
.ntb-card__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ntb-card__meta { display: flex; gap: 10px; align-items: center; font-size: .78rem; color: var(--nt-text-muted); }
.ntb-tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #edf4e4; color: var(--nt-green-dark); font-size: .7rem; font-weight: 800; }
.ntb-card__title { font-size: 1.25rem; margin: 0; }
.ntb-card__subtitle { font-size: .92rem; margin: 0; }
.ntb-card__link { margin-top: auto; font-weight: 800; color: var(--nt-green-dark); }
.ntb-card__link span { color: var(--nt-orange); }

/* Post detail — cabecera compacta: back-link, kicker, título, subtítulo y
   fecha quedan cerca entre sí; el espacio "de respiro" se concentra antes
   del Banner Image, no entre cada línea de la cabecera. */
.ntb-post-head { padding: 32px 0 0; background: var(--nt-bg); }
.ntb-post-back { margin-bottom: 14px; }
.ntb-kicker + .ntb-post-title { margin-top: 4px; }
.ntb-post-title { font-size: clamp(2rem, 4.4vw, 3rem); margin: 6px 0 8px; }
.ntb-post-subtitle { font-size: 1.05rem; color: var(--nt-text-muted); max-width: 720px; margin-bottom: 10px; }
.ntb-post-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 0 0 20px; font-size: .85rem; color: var(--nt-text-muted); }

/* Banner Image: ancho completo del shell, altura acotada en desktop
   (480px) para que no domine la pantalla; se reduce progresivamente en
   tablet/mobile. object-fit: cover conserva el encuadre sin deformar la
   imagen; el Media Field / archivo almacenado no se modifica. */
.ntb-post-banner { width: 100%; height: 480px; object-fit: cover; border-radius: var(--nt-radius); box-shadow: var(--nt-shadow); margin: 0 0 32px; }

.ntb-post-content {
    max-width: 720px; margin: 0 auto; padding: 0 0 60px; font-size: 1.05rem;
}
.ntb-post-content h2, .ntb-post-content h3 { margin: 1.6em 0 .6em; }
.ntb-post-content p { color: var(--nt-text); margin-bottom: 1.2em; }
.ntb-post-content ul, .ntb-post-content ol { list-style: revert; padding-left: 1.4em; margin-bottom: 1.2em; }
.ntb-post-content li { margin-bottom: .4em; color: var(--nt-text); }
.ntb-post-content img { max-width: 100%; height: auto; border-radius: 18px; margin: 1.4em 0; }
.ntb-post-content a { color: var(--nt-green-dark); text-decoration: underline; }
.ntb-post-content strong { color: var(--nt-text); font-weight: 800; }
.ntb-post-content em { font-style: italic; }
.ntb-post-content blockquote {
    margin: 1.6em 0; padding: 4px 24px; border-left: 4px solid var(--nt-orange);
    color: var(--nt-text-muted); font-family: "Fraunces", serif; font-size: 1.15rem; font-style: italic;
}
.ntb-post-content blockquote p:last-child { margin-bottom: 0; }

.ntb-post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px auto; max-width: 720px; }

.ntb-post-back { max-width: 720px; margin: 0 auto 40px; }

.ntb-final { padding: 60px 0; background: var(--nt-green-dark); color: #fff; text-align: center; }
.ntb-final h2 { color: #fff; margin-bottom: 10px; }
.ntb-final p { color: rgba(255,255,255,.8); margin-bottom: 24px; }

/* Footer (mirrors NutryTasty MVC footer) */
.ntb-footer { padding: 70px 0 25px; background: #192a1d; color: #fff; }
.ntb-footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 45px; }
.ntb-footer p, .ntb-footer li { color: rgba(255,255,255,.65); font-size: .86rem; }
.ntb-footer ul { display: grid; gap: 8px; margin-top: 18px; }
.ntb-footer h3 { font-size: 1rem; color: #fff; }
.ntb-brand--footer img { width: 170px; height: 70px; object-fit: contain; }
.ntb-footer__bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; color: rgba(255,255,255,.55); }

/* Assistant FAB (visual fallback only, JBR Conversa NOT active) */
.ntb-assistant-fab {
    position: fixed; right: 20px; bottom: 20px; z-index: 30;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--nt-orange); color: #fff; border: none; border-radius: 999px;
    padding: 14px 18px; font-weight: 800; box-shadow: var(--nt-shadow); cursor: pointer;
}

/* Overlay semitransparente detrás del panel móvil + bloqueo de scroll del
   body mientras el menú está abierto. */
.ntb-nav-overlay {
    position: fixed; inset: 0; z-index: 19; background: rgba(36, 53, 31, 0.45);
    opacity: 0; pointer-events: none; transition: .2s;
}
.ntb-nav-overlay.is-open { opacity: 1; pointer-events: auto; }
body.ntb-scroll-locked { overflow: hidden; }

@media (max-width: 1000px) {
    .ntb-header__cta { display: none; }
    .ntb-menu-toggle { display: block; margin-left: auto; }
    .ntb-nav {
        position: absolute; top: 75px; left: 20px; right: 20px; background: #fff;
        padding: 20px; border-radius: 18px; box-shadow: var(--nt-shadow);
        opacity: 0; pointer-events: none; transform: translateY(-8px); transition: .2s;
        z-index: 20;
    }
    .ntb-nav.is-open { opacity: 1; pointer-events: auto; transform: none; }
    .ntb-nav ul { flex-direction: column; align-items: flex-start; }
    .ntb-blog-list { grid-template-columns: repeat(2, 1fr); }
    .ntb-footer__grid { grid-template-columns: repeat(2, 1fr); }
    .ntb-post-banner { height: 360px; }
}

@media (max-width: 700px) {
    .ntb-shell { width: min(var(--nt-max), calc(100% - 28px)); }
    .ntb-header__inner { height: 74px; }
    /* Ajuste moderado: menos aire vertical en el hero de /blog solo en
       mobile, para que "Últimos artículos" aparezca un poco antes sin
       perder la jerarquía visual (desktop queda intacto). */
    .ntb-page-head { padding: 40px 0 26px; }
    .ntb-brand img { width: 125px; height: 54px; }
    .ntb-blog-list { grid-template-columns: 1fr; }
    .ntb-footer__grid { grid-template-columns: 1fr; }
    .ntb-post-banner { height: 220px; border-radius: 18px; }
    .ntb-post-head { padding: 24px 0 0; }
}
