/*
Theme Name: Halvad News
Description: Gujarati local news and editorial publishing.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: halvad-news
*/

:root {
    --ink: #17252b;
    --muted: #4d6065;
    --paper: #f8f7f3;
    --rule: #d5e0db;
    --red: #ad2924;
    --green: #152f2d;
    --font: "Nirmala UI", "Noto Sans Gujarati", Shruti, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--font); }
a { color: inherit; text-underline-offset: .18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid #bb462f; outline-offset: 4px; }
img { max-width: 100%; height: auto; }
.wrap { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: white; border-bottom: 1px solid var(--rule); }
.top { background: var(--green); color: white; }
.top-inner { min-height: 37px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: .875rem; }
.masthead { min-height: 132px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-block; width: fit-content; font-size: clamp(2.4rem, 6vw, 4.45rem); font-weight: 850; line-height: 1.03; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.brand strong { color: var(--red); }
.brand span { display: block; margin-top: .75rem; color: var(--muted); font: 750 .77rem/1 system-ui, sans-serif; letter-spacing: .25em; }
.search { display: flex; width: min(100%, 330px); }
.search input, .search button { border: 1px solid var(--rule); font: inherit; padding: .55rem .8rem; border-radius: 0; }
.search input { min-width: 0; flex: 1; background: var(--paper); color: var(--ink); }
.search button { background: var(--green); color: white; cursor: pointer; font-weight: 700; border-color: var(--green); }
.menu { border-top: 1px solid var(--rule); }
.menu ul { display: flex; flex-wrap: wrap; gap: 0 1.65rem; list-style: none; padding: 0; margin: 0; }
.menu a { display: block; padding: .7rem 0; font-weight: 750; text-decoration: none; border-bottom: 3px solid transparent; }
.menu a[aria-current="page"] { color: var(--red); border-color: var(--red); }
.content { padding: 2.5rem 0 4rem; min-height: 55vh; }
.edition {
    display: flex;
    align-items: flex-end;
    min-height: clamp(360px, 49vw, 540px);
    padding: clamp(1.5rem, 6vw, 5rem);
    margin-bottom: clamp(2rem, 5vw, 4rem);
    color: white;
    background: linear-gradient(90deg, #132b2a 5%, #132b2ae0 30%, #132b2a22 86%),
        linear-gradient(0deg, #132b2a99, transparent 58%), url("edition.webp") center / cover, #2d5047;
    border-radius: 1.2rem;
}
.edition-copy p { margin: 0 0 .8rem; color: #ffcf9b; font-size: .95rem; font-weight: 750; }
.edition-copy h1 { margin: 0 0 1.5rem; font-size: clamp(2.45rem, 6.6vw, 5.8rem); line-height: 1.16; letter-spacing: -.045em; }
.edition-copy a { display: inline-flex; background: #f9e0bd; color: #242b24; padding: .65rem 1.1rem; border-radius: .35rem; font-weight: 800; text-decoration: none; }
.edition-copy a:hover { background: white; }
.section-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; border-bottom: 3px solid var(--green); margin-bottom: 1.35rem; padding-bottom: .55rem; }
.section-heading h1, .section-heading h2, .story h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3.3rem); line-height: 1.26; overflow-wrap: anywhere; }
.section-heading span { color: var(--muted); font-size: 1rem; }
.feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem; }
.feed-home .card:first-child { grid-column: span 2; grid-row: span 2; }
.feed-home .card:first-child .card-title { font-size: clamp(1.55rem, 3.2vw, 2.75rem); }
.card { background: white; border: 1px solid var(--rule); min-width: 0; border-radius: .85rem; overflow: hidden; }
.card:focus-within { outline: 3px solid #bb462f; outline-offset: 3px; }
.card-art { position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 16 / 9; color: #f2f6f2; background: repeating-linear-gradient(135deg, #ffffff0c 0 1px, transparent 1px 24px), linear-gradient(145deg, #244840, #122927); text-decoration: none; }
.card-art:hover { color: white; }
.card-art span { font-size: clamp(1.45rem, 3.4vw, 3rem); font-weight: 800; }
.card-art b { color: #ffad99; }
.card-art img { display: block; width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.card-copy { padding: 1rem 1.15rem 1.25rem; overflow-wrap: anywhere; }
.category { color: var(--red); font-size: .875rem; font-weight: 800; }
.category a, .card-title a { text-decoration: none; }
.category a:hover, .card-title a:hover { text-decoration: underline; }
.card-title { margin: .28rem 0 .5rem; line-height: 1.36; font-size: 1.28rem; }
.card p { margin: 0 0 .6rem; color: var(--muted); }
.meta { color: var(--muted); font-size: .875rem; }
.story { max-width: 820px; margin-inline: auto; overflow-wrap: anywhere; }
.story h1 { margin: .4rem 0; }
.story-image { display: block; width: 100%; margin: 1.5rem 0; }
.story-body { font-size: 1.125rem; }
.story-body iframe { max-width: 100%; }
.story-links { margin-top: 2rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.story-links > a { display: inline-block; background: var(--green); color: white; padding: .55rem .9rem; text-decoration: none; }
.empty { padding: 3rem clamp(1.25rem, 5vw, 4rem); background: white; border: 1px solid var(--rule); }
.empty p, .empty h1 { margin-top: 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.page-numbers { padding: .4rem .7rem; border: 1px solid var(--rule); }
.page-numbers.current { color: white; background: var(--green); }
.footer { background: var(--green); color: white; padding: 2.3rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; }
.footer .brand { font-size: 1.9rem; }
.footer a:hover, .footer strong { color: #ffad99; }
.footer .brand span { color: #d5e3dc; }
.visually-hidden, .screen-reader-text, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 100000; top: .45rem; left: .45rem; padding: .65rem 1rem; background: white; }
@media (max-width: 900px) {
    .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feed-home .card:first-child { grid-row: auto; }
}
@media (max-width: 600px) {
    .wrap { width: calc(100% - 32px); }
    .masthead { flex-direction: column; align-items: stretch; padding: 1.25rem 0; gap: 1rem; }
    .search { width: 100%; }
    .menu ul { gap: 0 1rem; }
    .menu a { font-size: .9rem; padding: .5rem 0; }
    .content { padding-top: 1.6rem; }
    .feed { grid-template-columns: minmax(0, 1fr); }
    .feed-home .card:first-child { grid-column: auto; }
}
