/*
Theme Name: Surties
Theme URI: https://surties.com
Author: Surties Media Pvt Ltd
Description: National news theme for Surties. Hindi first, English second. Phone swipe story feed and desktop news portal, IANS credits, key points, background and FAQ blocks with NewsArticle and FAQPage schema. Story extras are REST-enabled for automation.
Version: 1.0.2
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: surties
*/

:root {
	--red: #DA0606;
	--red-logo: #FF0013;
	--red-dark: #a80404;
	--yellow: #F3EB0D;
	--yellow-soft: #fffbd6;
	--ink: #141414;
	--text: #2b2b2b;
	--muted: #555555;
	--line: #e4e4e4;
	--bg-soft: #f1f1f1;
	--radius: 10px;
	--font-hi: "Hind", "Inter", system-ui, sans-serif;
	--font-en: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font-hi); font-size: 17px; line-height: 1.55; }
body.lang-en { font-family: var(--font-en); font-size: 16px; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
button { font: inherit; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--ink); padding: 10px 14px; z-index: 100; }
.skip-link:focus { left: 10px; }
.meta { color: var(--muted); font-size: 13px; }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 8px; font-weight: 700; border: 0; cursor: pointer; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { color: var(--ink); filter: brightness(0.95); }
.chip, .card-cat { display: inline-block; background: var(--red); color: #fff; font-weight: 700; font-size: 13px; padding: 2px 10px; border-radius: 4px; line-height: 1.6; }
.card-cat { background: none; color: var(--red); padding: 0; font-size: 13px; letter-spacing: 0.2px; }
.chip-sponsored { background: var(--yellow); color: var(--ink); font-family: var(--font-en); font-size: 12px; letter-spacing: 0.4px; }

/* Utility bar */
.utility { background: var(--bg-soft); color: #444; font-size: 13px; }
.utility-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.lang-switch { display: flex; gap: 6px; }
.lang-switch a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border: 1px solid #b4b4b4; border-radius: 4px; background: #fff; color: #444; font-weight: 600; }
.lang-switch .lang-hi { font-family: var(--font-hi); }
.lang-switch .lang-en { font-family: var(--font-en); }
.lang-switch a.is-on { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.header-in { display: flex; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.logo img { height: 64px; width: auto; border-radius: 10px; }
.primary-nav { flex: 1 1 auto; }
.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; font-weight: 600; font-size: 15px; }
.primary-nav .menu a { display: inline-block; padding: 8px 0; }
.primary-nav .current-menu-item > a, .primary-nav .current-category-ancestor > a { color: var(--red); }
.primary-nav .sub-menu { list-style: none; margin: 0; padding: 8px 0; display: none; position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 8px; min-width: 180px; z-index: 20; }
.primary-nav li { position: relative; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: block; }
.primary-nav .sub-menu a { padding: 8px 16px; display: block; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid #d0d0d0; background: #fff; border-radius: 8px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.header-search { display: flex; border: 1px solid #d0d0d0; border-radius: 8px; overflow: hidden; }
.header-search input { border: 0; padding: 0 12px; height: 44px; width: 150px; font: inherit; font-size: 15px; }
.header-search button { width: 44px; height: 44px; border: 0; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink); }

/* Breaking strip */
.breaking { background: var(--red); color: #fff; }
.breaking-in { display: flex; gap: 14px; align-items: center; padding-top: 10px; padding-bottom: 10px; font-weight: 600; }
.breaking a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.breaking-label { background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 4px; letter-spacing: 0.5px; flex: 0 0 auto; }

/* Block titles */
.block-title { font-size: 22px; font-weight: 700; padding-bottom: 10px; border-bottom: 3px solid var(--red); margin-bottom: 6px; }
.block-title a { color: inherit; }
.block-title-yellow { border-bottom-color: var(--yellow); }
.block-head { display: flex; justify-content: space-between; align-items: baseline; }
.block-head .block-title { flex: 1; }

/* Ads */
.ad-slot { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; font-family: var(--font-en); }
.ad-slot:empty { display: none; }
.ad-slot span { border: 1px dashed #9a9a9a; border-radius: 8px; background: #f6f6f6; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px; }
.ad-banner { min-height: 96px; margin: 28px 0; }
.ad-inline { min-height: 110px; margin: 8px 0; }
.ad-box { min-height: 250px; }

/* ---------------- Home: portal ---------------- */
.portal { padding-top: 26px; display: flex; flex-direction: column; gap: 36px; }
.hero { display: flex; flex-wrap: wrap; gap: 28px; }
.hero-lead { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.hero-media { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: #e6e6e6; }
.hero-meta { display: flex; gap: 10px; align-items: center; }
.hero-title { font-size: 38px; font-weight: 700; line-height: 1.2; }
.hero-dek { margin: 0; color: #444; font-size: 18px; }
.top-stories { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; }
.row-story { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row-story:last-child { border-bottom: 0; }
.row-thumb { flex: 0 0 104px; width: 104px; height: 76px; object-fit: cover; border-radius: 6px; background: #dcdcdc; }
.row-text { display: flex; flex-direction: column; gap: 4px; }
.row-title { font-weight: 700; font-size: 16px; line-height: 1.35; }

.two-col { display: flex; flex-wrap: wrap; gap: 32px; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.card-link { display: flex; flex-direction: column; gap: 8px; }
.thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #dcdcdc; }
.thumb-empty { display: block; }
.card-title { font-size: 17px; font-weight: 700; line-height: 1.35; }

.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.box-red { background: var(--red); color: #fff; border: 0; }
.box-title { font-size: 18px; }
.markets .block-title { font-size: 17px; border: 0; padding: 0; }

.most-read .block-title { font-size: 18px; }
.mr-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.mr-item:last-child { border-bottom: 0; }
.mr-num { font-family: var(--font-en); font-weight: 800; font-size: 24px; color: var(--red); width: 26px; flex: 0 0 26px; line-height: 1.1; }

.reel-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; margin-top: 12px; }
.reel-card { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 9 / 16; background: #e0e0e0; display: block; }
.reel-img { width: 100%; height: 100%; object-fit: cover; }
.reel-title { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-top: 4px solid var(--yellow); padding: 10px 12px; font-weight: 700; font-size: 15px; line-height: 1.3; }

.sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 32px; }
.section-list { display: flex; flex-direction: column; }
.list-link { padding: 13px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.list-link:last-child { border-bottom: 0; }

.rashi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; padding-top: 14px; }
.rashi { border: 1px solid var(--line); border-radius: 8px; padding: 12px 8px; text-align: center; font-weight: 600; min-height: 48px; }
.rashi:hover { border-color: var(--red); }

/* ---------------- Home: phone feed ---------------- */
.phone-feed { display: none; }

/* ---------------- Article ---------------- */
.article-wrap { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 24px; }
.article { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.article-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.article-head { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.article-title { font-size: 40px; font-weight: 700; line-height: 1.25; }
.article-dek { margin: 0; font-size: 20px; color: #3c3c3c; }
.byline { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.share { display: flex; gap: 8px; }
.share-wa { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 22px; background: var(--red); color: #fff; font-weight: 700; font-size: 14px; }
.share-wa:hover { color: #fff; background: var(--red-dark); }
.share-round { width: 44px; height: 44px; border-radius: 22px; border: 1px solid #d0d0d0; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-en); font-weight: 800; cursor: pointer; color: var(--ink); }
.copy-link.is-copied { background: var(--yellow); border-color: var(--yellow); }
.article-media { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.article-media img, .article-media video { width: 100%; border-radius: var(--radius); background: #e6e6e6; }
.article-media figcaption { font-size: 13px; color: var(--muted); }
.key-points { background: var(--yellow-soft); border: 1px solid #ece27a; border-radius: var(--radius); padding: 18px 20px; }
.key-points h2 { font-size: 19px; margin-bottom: 8px; }
.key-points ul { margin: 0; padding-left: 20px; }
.key-points li { margin: 6px 0; }
.key-points li::marker { color: var(--red); }
.article-body { font-size: 19px; line-height: 1.8; }
.lang-en .article-body { font-size: 18px; }
.article-body p { margin: 0 0 18px; }
.article-body h2 { font-size: 24px; margin: 26px 0 12px; }
.article-body h3 { font-size: 20px; margin: 22px 0 10px; }
.article-body a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote { margin: 18px 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--yellow); font-weight: 500; }
.background-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.background-box h2 { font-size: 19px; margin-bottom: 8px; }
.background-box a { color: var(--red); font-weight: 600; }
.background-box p { margin: 0 0 8px; }
.faq-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { font-size: 17px; margin-bottom: 6px; }
.faq-item p { margin: 0; color: #444; }
.credit { margin: 0; font-size: 15px; color: #444; padding: 12px 16px; background: #f6f6f6; border-radius: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.tags a { background: var(--bg-soft); padding: 8px 14px; border-radius: 18px; }
.follow-box { background: var(--red); color: #fff; border-radius: var(--radius); padding: 20px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.follow-box div { display: flex; flex-direction: column; gap: 2px; }
.follow-box strong { font-size: 19px; }
.rashi-link { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; }
.rashi-link > span:first-child { display: flex; flex-direction: column; }
.rashi-link > span:last-child { color: var(--red); font-weight: 800; font-size: 22px; }

/* Lists, pages */
.list-wrap, .page-wrap { padding-top: 26px; display: flex; flex-direction: column; gap: 22px; }
.page-wrap { max-width: 860px; }
.archive-desc { color: #444; margin-top: 8px; }
.pagination { margin-top: 20px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-flex; min-width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; }
.pagination .current { background: var(--red); border-color: var(--red); color: #fff; }
.empty { color: var(--muted); }
.search-form { display: flex; gap: 8px; }
.search-form .search-field { flex: 1; height: 44px; border: 1px solid #d0d0d0; border-radius: 8px; padding: 0 12px; font: inherit; }
.search-form .search-submit { height: 44px; border: 0; border-radius: 8px; padding: 0 18px; background: var(--red); color: #fff; font-weight: 700; cursor: pointer; }

/* Footer */
.site-footer { background: var(--bg-soft); color: #444; border-top: 4px solid var(--red); margin-top: 48px; font-size: 14px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: center; padding-top: 30px; padding-bottom: 20px; }
.footer-brand { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.logo-footer img { height: 44px; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding-bottom: 24px; color: var(--muted); font-size: 13px; }

/* ---------------- Tablet and phone ---------------- */
@media (max-width: 1024px) {
	.header-search input { width: 110px; }
	.hero-title, .article-title { font-size: 32px; }
}

@media (max-width: 767px) {
	body { font-size: 16px; }
	.wrap { padding: 0 14px; }
	.utility .today { display: none; }
	.utility-in { justify-content: flex-end; }
	.header-in { gap: 10px; padding-top: 10px; padding-bottom: 10px; flex-wrap: nowrap; justify-content: space-between; }
	.logo img { height: 56px; border-radius: 8px; }
	.menu-toggle { display: inline-flex; order: 3; }
	.header-actions { order: 2; margin-left: auto; }
	.header-search input, .send-news { display: none; }
	.header-search { border: 0; }
	.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); z-index: 30; padding: 8px 14px 14px; }
	.primary-nav.is-open { display: block; }
	.site-header { position: relative; }
	.primary-nav .menu { flex-direction: column; gap: 0; font-size: 17px; }
	.primary-nav .menu a { padding: 12px 0; display: block; border-bottom: 1px solid var(--line); }
	.primary-nav .sub-menu { position: static; display: block; border: 0; padding: 0 0 0 14px; }

	/* Home on phones: swipe feed instead of portal */
	.home .portal { display: none; }
	.home .phone-feed { display: block; }
	.home .site-footer { display: none; }
	.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; }
	.chips::-webkit-scrollbar { display: none; }
	.chip-link { flex: 0 0 auto; background: var(--bg-soft); color: var(--text); padding: 9px 16px; border-radius: 22px; font-weight: 600; font-size: 15px; }
	.chip-link.is-on { background: var(--red); color: #fff; }
	.feed-track { height: calc(100svh - 170px); overflow-y: auto; scroll-snap-type: y mandatory; margin: 0 10px; border-radius: 20px; }
	.feed-card { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; border-radius: 20px; overflow: hidden; background: #e6e6e6; margin-bottom: 10px; }
	.feed-media, .feed-media video, .feed-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
	.feed-actions { position: absolute; right: 12px; bottom: 170px; display: flex; flex-direction: column; gap: 12px; }
	.round-btn { width: 48px; height: 48px; border-radius: 24px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: center; }
	.feed-panel { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-top: 4px solid var(--yellow); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
	.feed-meta { display: flex; gap: 8px; align-items: center; }
	.feed-title { font-size: 21px; font-weight: 700; line-height: 1.3; }
	.feed-more { color: var(--red); font-weight: 700; padding: 6px 0; }
	.feed-hint { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 10px; }

	.hero-title, .article-title { font-size: 27px; line-height: 1.3; }
	.article-dek { font-size: 17px; }
	.article-body { font-size: 18px; }
	.article-wrap { gap: 28px; padding-top: 14px; }
	.byline { flex-direction: column; align-items: flex-start; }
	.sections { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.feed-track { scroll-behavior: auto; }
}

.empty-note { color: var(--muted); padding: 20px 0; }
