/*
Theme Name:  Yatri Kosh
Theme URI:   https://yatrikosh.com/blog/
Author:      Yatri Kosh
Description: Blog theme that matches yatrikosh.com — uses the main website's header, footer, fonts, colours, booking popup and enquiry form. Install WordPress in the /blog folder of the website.
Version:     1.0.0
Requires PHP: 8.0
Text Domain: yatrikosh
*/

/* Everything else (colours, fonts, buttons, header, footer, forms) comes from /css/style.css */

/* ---------- Blog home / categories / search ---------- */
.blog .page-hero__frame,
.archive .page-hero__frame,
.search .page-hero__frame { min-height: clamp(400px, 56svh, 600px); }

.blog-list { padding-top: clamp(40px, 5vw, 64px); }
.blog-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: clamp(28px, 4vw, 44px); }
.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link {
    display: inline-flex; align-items: center; padding: 10px 16px;
    background: var(--white); border: 2px solid var(--ink); border-radius: 999px;
    font-weight: 700; font-size: .92rem; line-height: 1;
    box-shadow: 3px 3px 0 var(--ink); transition: background-color .2s ease, translate .2s ease;
}
.chip-link:hover { background: var(--sun); translate: -1px -1px; }
.chip-link.is-active { background: var(--ink); color: var(--cream); box-shadow: 3px 3px 0 var(--chilli); }

.blog-search { display: flex; gap: 8px; width: min(100%, 420px); }
.blog-search input {
    flex: 1; min-width: 0; padding: 12px 18px;
    font: inherit; background: var(--white); border: 2px solid var(--ink); border-radius: 999px;
}
.blog-search input:focus { outline: none; border-color: var(--chilli); box-shadow: 0 0 0 4px rgba(232, 54, 30, .22); }

/* ---------- Post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.post-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius-lg);
    box-shadow: 6px 6px 0 var(--ink); transition: translate .25s ease, box-shadow .25s ease;
}
.post-card:hover { translate: -3px -3px; box-shadow: 9px 9px 0 var(--ink); }
.post-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 2px solid var(--ink); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: scale .8s ease; }
.post-card:hover .post-card__media img { scale: 1.05; }
.post-card__tag {
    position: absolute; top: 14px; left: 14px; padding: 8px 13px;
    background: var(--sun); border: 2px solid var(--ink); border-radius: 999px;
    font-weight: 800; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
}
.post-card__body { display: flex; flex: 1; flex-direction: column; padding: clamp(18px, 2vw, 26px); }
.post-card__meta { margin: 0 0 8px; font-size: .86rem; font-weight: 600; color: var(--ink-soft); }
.post-card__title { margin: 0 0 10px; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 1.8vw, 1.55rem); line-height: 1.08; letter-spacing: -.03em; }
.post-card__title a:hover { color: var(--chilli); }
.post-card__excerpt { margin: 0 0 18px; color: var(--ink-soft); }
.post-card__more { margin-top: auto; font-weight: 800; color: var(--chilli); }

.post-card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; }
.post-card--featured .post-card__media { aspect-ratio: auto; min-height: 380px; border-bottom: 0; border-right: 2px solid var(--ink); }
.post-card--featured .post-card__body { justify-content: center; padding: clamp(24px, 4vw, 48px); }
.post-card--featured .post-card__title { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: .98; }
.post-card--featured .post-card__excerpt { font-size: 1.1rem; }

.blog-pages { margin-top: 44px; }
.blog-pages .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.blog-pages .page-numbers {
    display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 14px;
    background: var(--white); border: 2px solid var(--ink); border-radius: 999px; font-weight: 700;
}
.blog-pages .page-numbers.current { background: var(--ink); color: var(--cream); }
.blog-pages .page-numbers.dots { border: 0; background: none; }

.blog-empty { padding: 40px 20px; text-align: center; }
.blog-empty__emoji { margin: 0; font-size: 3.4rem; }
.blog-empty p { color: var(--ink-soft); }
.blog-trips { padding-top: 0; }

/* ---------- One post ---------- */
.post-head { max-width: 980px; padding-top: clamp(40px, 6vw, 80px); }
.post-head__crumbs { color: var(--ink-soft); }
.post-head__crumbs a:hover { color: var(--chilli); }
.post-head .eyebrow { margin-top: 4px; }
.post-head__title { margin: .3em 0 .25em; font-size: clamp(2.3rem, 5.4vw, 4.6rem); line-height: .98; }
.post-head__lead { max-width: 60ch; margin: 0 0 22px; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); }
.post-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; font-size: .95rem; color: var(--ink-soft); }
.post-head__avatar { display: grid; place-items: center; width: 40px; height: 40px; background: var(--white); border: 2px solid var(--ink); border-radius: 50%; overflow: hidden; }
.post-head__avatar img { width: 26px; height: 26px; }

.post-cover { margin-block: clamp(26px, 4vw, 44px) 0; }
.post-cover img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border: 2px solid var(--ink); border-radius: var(--radius-xl); box-shadow: 8px 8px 0 var(--ink); }
.post-cover figcaption { margin-top: 12px; font-size: .9rem; color: var(--ink-soft); text-align: center; }

.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas: "body toc" "body trip";
    grid-template-rows: auto 1fr;
    gap: 0 clamp(30px, 5vw, 70px);
    padding-block: clamp(36px, 5vw, 64px);
}
.post-body { grid-area: body; min-width: 0; max-width: 760px; }
.toc { grid-area: toc; align-self: start; margin-bottom: 24px; padding: 18px 20px; background: var(--cream-2); border: 2px solid var(--ink); border-radius: var(--radius); }
.toc summary { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.toc ol { display: grid; gap: 8px; margin: 14px 0 0; padding-left: 20px; font-weight: 600; font-size: .95rem; }
.toc .toc__l3 { margin-left: 14px; font-weight: 500; list-style: circle; }
.toc a:hover { color: var(--chilli); text-decoration: underline; }
.post-trip { grid-area: trip; align-self: start; position: sticky; top: calc(var(--header-h) + 24px); }

/* Related-trip card next to the article */
.side-trip { overflow: hidden; background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius-lg); box-shadow: 6px 6px 0 var(--ink); }
.side-trip__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 2px solid var(--ink); }
.side-trip__media img { width: 100%; height: 100%; object-fit: cover; }
.side-trip__sticker { position: absolute; right: 12px; bottom: 14px; rotate: -6deg; font-size: .85rem; }
.side-trip__body { padding: 20px; }
.side-trip__title { margin: 12px 0 6px; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; line-height: 1; letter-spacing: -.03em; text-transform: uppercase; }
.side-trip__title a:hover { color: var(--chilli); }
.side-trip__meta { margin: 0 0 12px; font-size: .92rem; color: var(--ink-soft); }
.side-trip__price { margin: 0 0 16px; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; }
.side-trip__price small { font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.side-trip__actions { display: grid; gap: 10px; }
.side-trip__actions .btn { justify-content: center; }
.side-trip--plain { background: var(--sun); }

/* Article text */
.prose { font-size: 1.12rem; line-height: 1.75; }
.prose > * { margin-block: 0 1.1em; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: calc(var(--header-h) + 20px); font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.prose h2 { margin: 1.9em 0 .55em; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.prose h3 { margin: 1.5em 0 .45em; font-size: clamp(1.3rem, 2vw, 1.55rem); }
.prose h4 { margin: 1.3em 0 .4em; font-size: 1.15rem; }
.prose a { color: var(--chilli); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--chilli-dk); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--chilli); font-weight: 800; }
.prose strong { color: var(--ink); }
.prose img { border: 2px solid var(--ink); border-radius: var(--radius); }
.prose figure { margin-inline: 0; }
.prose figcaption { margin-top: 8px; font-size: .9rem; text-align: center; color: var(--ink-soft); }
.prose blockquote { margin-inline: 0; padding: 18px 22px; background: var(--white); border: 2px solid var(--ink); border-left: 8px solid var(--chilli); border-radius: var(--radius); font-weight: 600; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 2px dashed rgba(27, 21, 17, .25); margin-block: 2em; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 1rem; background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(27, 21, 17, .15); }
.prose th, .prose td:first-child { width: 38%; background: var(--cream-2); font-weight: 800; }
.prose tr:last-child th, .prose tr:last-child td { border-bottom: 0; }
.prose .wp-block-table { overflow-x: auto; }
.prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.prose .wp-block-button__link { display: inline-flex; padding: 14px 24px; background: var(--chilli); color: var(--white); border: 2px solid var(--ink); border-radius: 999px; box-shadow: var(--shadow-hard); font-weight: 700; text-decoration: none; }
.prose .callout { padding: 20px 22px; background: var(--sun); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--ink); }
.prose .callout p:last-child { margin-bottom: 0; }

.post-foot { display: grid; gap: 20px; margin-top: 40px; padding-top: 28px; border-top: 2px dashed rgba(27, 21, 17, .25); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 700; }
.post-share > span { margin-right: 4px; }

.related-posts { padding-top: 0; }
.blog-404__search { display: flex; justify-content: center; margin-bottom: 24px; }

/* ---------- Phones & tablets ---------- */
@media (max-width: 1100px) {
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .post-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "toc" "body" "trip"; grid-template-rows: auto; gap: 0; }
    .post-body { max-width: none; }
    .post-trip { position: static; margin-top: 36px; }
    .side-trip:not(.side-trip--plain) { display: grid; grid-template-columns: 40% 1fr; }
    .side-trip:not(.side-trip--plain) .side-trip__media { aspect-ratio: auto; border-bottom: 0; border-right: 2px solid var(--ink); }
    .toc:not([open]) { margin-bottom: 8px; }
}
@media (max-width: 760px) {
    .post-grid { grid-template-columns: minmax(0, 1fr); }
    .post-card--featured { display: flex; }
    .post-card--featured .post-card__media { min-height: 0; aspect-ratio: 16 / 10; border-right: 0; border-bottom: 2px solid var(--ink); }
    .blog-search { width: 100%; }
    .post-cover img { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); }
    .prose { font-size: 1.06rem; }
}
@media (max-width: 520px) {
    .side-trip:not(.side-trip--plain) { display: block; }
    .side-trip:not(.side-trip--plain) .side-trip__media { aspect-ratio: 16 / 9; border-right: 0; border-bottom: 2px solid var(--ink); }
}
