/*
Theme Name: Swastik Agri Press
Theme URI: https://swastikagripress.aswathcyber.com
Author: Swastik Agri Press
Description: Agriculture news portal - national, state-wise, ICAR, universities, jobs, mandi rates and e-paper. Built for high post volume with breaking-news ticker, featured slider and section grids.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: swastik
*/

/* -------------------------------------------------------------------------
   Tokens
   ---------------------------------------------------------------------- */
:root {
	--green: #1c7a3f;
	--green-dark: #145c2f;
	--green-light: #eaf5ee;
	--saffron: #e8710a;
	--ink: #1a1a1a;
	--muted: #5f5f5f;
	--faint: #8b8b8b;
	--line: #e2e2e2;
	--bg: #f4f5f3;
	--surface: #ffffff;
	--breaking: #c22026;

	--wrap: 1220px;
	--gutter: clamp(.85rem, 3vw, 1.75rem);
	--gap: clamp(1rem, 2vw, 1.5rem);

	--sans: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Noto Sans Devanagari", Arial, sans-serif;
	--head: "Segoe UI", system-ui, "Noto Sans Devanagari", Arial, sans-serif;
	--ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--head); font-weight: 700; line-height: 1.25; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* -------------------------------------------------------------------------
   Top bar
   ---------------------------------------------------------------------- */
.topbar {
	background: var(--green-dark);
	color: #dff0e5;
	font-size: .8rem;
}
.topbar-inner { display: flex; align-items: center; gap: 1rem; min-height: 38px; }
.topbar .date { white-space: nowrap; }
.topbar .ticker-mini { flex: 1; overflow: hidden; white-space: nowrap; }
.topbar .socials { display: flex; gap: .65rem; margin-left: auto; }
.topbar .socials a { color: #dff0e5; opacity: .85; transition: opacity .2s; }
.topbar .socials a:hover { opacity: 1; }
.topbar .socials svg { width: 16px; height: 16px; fill: currentColor; display: block; }
.topsearch { display: flex; }
.topsearch input {
	border: 0; padding: .35rem .6rem; font: inherit; font-size: .8rem;
	width: 130px; background: rgba(255,255,255,.14); color: #fff;
}
.topsearch input::placeholder { color: #cfe3d6; }
.topsearch button { border: 0; background: var(--saffron); color: #fff; padding: 0 .7rem; cursor: pointer; }

/* -------------------------------------------------------------------------
   Header
   ---------------------------------------------------------------------- */
.site-header { background: var(--surface); border-bottom: 3px solid var(--green); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: .8rem; }
.brand-logo {
	width: 56px; height: 56px; border-radius: 50%;
	background: var(--green); color: #fff; display: grid; place-items: center;
	font-family: var(--head); font-weight: 800; font-size: 1.5rem; flex-shrink: 0;
}
.brand-text b { font-family: var(--head); font-size: 1.7rem; font-weight: 800; color: var(--green-dark); letter-spacing: -.01em; display: block; line-height: 1; }
.brand-text span { font-size: .78rem; color: var(--muted); }
.header-ad { margin-left: auto; color: var(--faint); font-size: .8rem; border: 1px dashed var(--line); padding: .8rem 2rem; text-align: center; }

/* -------------------------------------------------------------------------
   Main navigation
   ---------------------------------------------------------------------- */
.mainnav { background: var(--green); position: sticky; top: 0; z-index: 50; }
.mainnav-inner { display: flex; align-items: center; }
.mainnav ul { display: flex; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.mainnav a {
	display: block; color: #fff; font-weight: 600; font-size: .9rem;
	padding: .85rem 1.1rem; transition: background .2s;
}
.mainnav a:hover, .mainnav .current-menu-item > a, .mainnav .current_page_item > a { background: var(--green-dark); }
.mainnav .menu-item-has-children > a::after { content: " \25be"; font-size: .7em; opacity: .8; }
.mainnav li { position: relative; }
.mainnav .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 210px;
	background: var(--surface); box-shadow: 0 10px 30px rgba(0,0,0,.16);
	flex-direction: column; display: none; z-index: 60; padding: .3rem 0;
}
.mainnav li:hover > .sub-menu { display: flex; }
.mainnav .sub-menu a { color: var(--ink); padding: .6rem 1.1rem; font-weight: 500; }
.mainnav .sub-menu a:hover { background: var(--green-light); color: var(--green-dark); }
.nav-toggle { display: none; background: none; border: 0; padding: .6rem 1rem; cursor: pointer; margin-left: auto; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .3s var(--ease); }

/* -------------------------------------------------------------------------
   Breaking news
   ---------------------------------------------------------------------- */
.breaking { background: var(--surface); border: 1px solid var(--line); display: flex; align-items: stretch; overflow: hidden; margin-block: var(--gap); }
.breaking-tag { background: var(--breaking); color: #fff; font-weight: 700; padding: .6rem 1rem; display: flex; align-items: center; gap: .4rem; white-space: nowrap; text-transform: uppercase; font-size: .82rem; letter-spacing: .04em; }
.breaking-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: sap-blink 1s steps(2, start) infinite; }
@keyframes sap-blink { to { opacity: .2; } }
.ticker { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 3rem; white-space: nowrap; animation: sap-scroll 40s linear infinite; padding-left: 1rem; }
.ticker:hover ul { animation-play-state: paused; }
.ticker a { font-weight: 500; font-size: .9rem; }
.ticker a:hover { color: var(--green-dark); }
@keyframes sap-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* -------------------------------------------------------------------------
   Section scaffolding
   ---------------------------------------------------------------------- */
.section { margin-block: clamp(1.75rem, 4vw, 2.75rem); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--green); margin-bottom: 1.25rem; }
.section-head h2 {
	font-size: 1.15rem; color: #fff; background: var(--green);
	padding: .55rem 1.1rem; position: relative; text-transform: uppercase; letter-spacing: .02em;
}
.section-head h2::after { content: ""; position: absolute; right: -12px; top: 0; border: 18px solid transparent; border-left-color: var(--green); border-right: 0; }
.section-head .more { font-size: .82rem; font-weight: 600; color: var(--green-dark); }
.section-head .more:hover { color: var(--saffron); }

/* -------------------------------------------------------------------------
   Hero
   ---------------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: 2fr 1fr; gap: var(--gap); margin-top: var(--gap); }
.slider { position: relative; overflow: hidden; background: #000; border-radius: 4px; }
.slides { position: relative; aspect-ratio: 16 / 9; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease); }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-cap { position: absolute; inset-inline: 0; bottom: 0; padding: 2.5rem 1.5rem 1.25rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.slide-cap .cat { display: inline-block; background: var(--saffron); font-size: .72rem; font-weight: 700; text-transform: uppercase; padding: .18rem .6rem; margin-bottom: .5rem; }
.slide-cap h2 { font-size: clamp(1.1rem, 2.4vw, 1.7rem); }
.slider-dots { position: absolute; bottom: 1rem; right: 1.25rem; display: flex; gap: .4rem; z-index: 3; }
.slider-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; }
.slider-dots button.is-active { background: #fff; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(0,0,0,.4); color: #fff; border: 0; width: 38px; height: 52px; cursor: pointer; font-size: 1.3rem; }
.slider-arrow:hover { background: rgba(0,0,0,.65); }
.slider-arrow.prev { left: 0; }
.slider-arrow.next { right: 0; }

.topstories { display: grid; grid-template-rows: repeat(4, 1fr); gap: .7rem; }
.topstory { display: grid; grid-template-columns: 92px 1fr; gap: .7rem; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.topstory .thumb { aspect-ratio: 1; overflow: hidden; background: var(--line); }
.topstory img { width: 100%; height: 100%; object-fit: cover; }
.topstory .body { padding: .5rem .6rem .5rem 0; display: flex; flex-direction: column; justify-content: center; }
.topstory h3 { font-size: .85rem; font-weight: 600; line-height: 1.3; }
.topstory .meta { font-size: .72rem; color: var(--faint); margin-top: .25rem; }
.topstory:hover h3 { color: var(--green-dark); }

/* -------------------------------------------------------------------------
   Card grids
   ---------------------------------------------------------------------- */
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.news-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-2px); }
.card-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: .8rem .9rem 1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card .cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--saffron); letter-spacing: .03em; }
.card h3 { font-size: .98rem; font-weight: 600; line-height: 1.35; }
.card:hover h3 { color: var(--green-dark); }
.card .meta { font-size: .74rem; color: var(--faint); margin-top: auto; }
.card p { font-size: .84rem; color: var(--muted); margin: 0; }

/* Compact list used by ICAR / Jobs / State columns. */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.list-item { display: flex; gap: .7rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .thumb { width: 64px; height: 48px; flex-shrink: 0; border-radius: 3px; overflow: hidden; background: var(--line); }
.list-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-item h4 { font-size: .84rem; font-weight: 600; line-height: 1.3; }
.list-item .meta { font-size: .7rem; color: var(--faint); margin-top: .2rem; }
.list-item:hover h4 { color: var(--green-dark); }

/* -------------------------------------------------------------------------
   Multi-column section blocks (ICAR, Jobs, Research, State)
   ---------------------------------------------------------------------- */
.col-blocks { display: grid; gap: var(--gap); }
.col-blocks.c2 { grid-template-columns: repeat(2, 1fr); }
.col-blocks.c3 { grid-template-columns: repeat(3, 1fr); }
.col-blocks.c4 { grid-template-columns: repeat(4, 1fr); }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.block-head { background: var(--green-light); color: var(--green-dark); font-weight: 700; font-size: .88rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .4rem; }
.block ul { list-style: none; margin: 0; padding: .3rem 0; }
.block li a { display: block; padding: .5rem .9rem; font-size: .84rem; font-weight: 500; border-bottom: 1px solid #f0f0f0; }
.block li:last-child a { border-bottom: 0; }
.block li a:hover { background: var(--green-light); color: var(--green-dark); }
.block .empty { padding: .8rem .9rem; color: var(--faint); font-size: .82rem; }

/* -------------------------------------------------------------------------
   State cards / chips
   ---------------------------------------------------------------------- */
.state-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: .7rem; }
.state-card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1rem .6rem; text-align: center; font-weight: 600; font-size: .86rem; transition: .2s; }
.state-card:hover { background: var(--green); color: #fff; border-color: var(--green); }
.state-card .count { display: block; font-size: .72rem; color: var(--faint); font-weight: 500; margin-top: .2rem; }
.state-card:hover .count { color: #dff0e5; }

/* -------------------------------------------------------------------------
   Schemes / feature chips
   ---------------------------------------------------------------------- */
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.chip { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--saffron); border-radius: 4px; padding: 1rem 1.1rem; }
.chip h3 { font-size: .95rem; color: var(--green-dark); margin-bottom: .3rem; }
.chip p { font-size: .82rem; color: var(--muted); margin: 0; }

/* -------------------------------------------------------------------------
   Mandi table
   ---------------------------------------------------------------------- */
.mandi-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow-x: auto; }
.mandi { width: 100%; border-collapse: collapse; min-width: 640px; }
.mandi th, .mandi td { padding: .65rem .9rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .86rem; }
.mandi thead th { background: var(--green); color: #fff; font-weight: 600; }
.mandi tbody tr:nth-child(even) { background: #fafbfa; }
.mandi .num { text-align: right; font-variant-numeric: tabular-nums; }
.mandi .modal { font-weight: 700; color: var(--green-dark); }

/* -------------------------------------------------------------------------
   Videos
   ---------------------------------------------------------------------- */
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.video { background: #000; border-radius: 4px; overflow: hidden; }
.video .frame { position: relative; aspect-ratio: 16 / 9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .cap { color: #fff; font-size: .84rem; font-weight: 600; padding: .6rem .8rem; background: #111; }

/* -------------------------------------------------------------------------
   E-Paper
   ---------------------------------------------------------------------- */
.epaper { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.edition { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.edition .cover { aspect-ratio: 3 / 4; overflow: hidden; background: var(--line); }
.edition .cover img { width: 100%; height: 100%; object-fit: cover; }
.edition .body { padding: .7rem .8rem; }
.edition h3 { font-size: .88rem; }
.edition .meta { font-size: .74rem; color: var(--faint); margin: .2rem 0 .6rem; }

/* -------------------------------------------------------------------------
   WhatsApp join band
   ---------------------------------------------------------------------- */
.join { background: linear-gradient(120deg, #128c3e, #25d366); color: #fff; border-radius: 6px; padding: clamp(1.5rem, 4vw, 2.5rem); text-align: center; }
.join h2 { color: #fff; font-size: clamp(1.3rem, 3vw, 1.9rem); margin-bottom: .5rem; }
.join p { margin: 0 auto 1.4rem; max-width: 46ch; opacity: .95; }
.join .btn-wa { display: inline-flex; align-items: center; gap: .6rem; background: #fff; color: #075e33; font-weight: 700; padding: .85rem 2rem; border-radius: 50px; font-size: 1rem; }
.join .btn-wa svg { width: 22px; height: 22px; fill: #25d366; }
.join .btn-wa:hover { transform: scale(1.03); }

/* -------------------------------------------------------------------------
   Buttons / misc
   ---------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; background: var(--green); color: #fff; font-weight: 600; padding: .7rem 1.5rem; border-radius: 4px; border: 0; cursor: pointer; font-size: .88rem; }
.btn:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--green-dark); border: 1px solid var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }
.center { text-align: center; }
.mt { margin-top: 1.5rem; }

/* -------------------------------------------------------------------------
   Article / archive
   ---------------------------------------------------------------------- */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: clamp(1.5rem, 3vw, 2.5rem); margin-block: var(--gap); }
.article { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: clamp(1.2rem, 3vw, 2.2rem); }
.article h1 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); line-height: 1.2; margin-bottom: .8rem; }
.article .meta { color: var(--faint); font-size: .82rem; margin-bottom: 1.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.article .featured { margin: 0 0 1.4rem; border-radius: 4px; overflow: hidden; }
.article .entry { font-size: 1.02rem; line-height: 1.75; }
.article .entry p { margin: 0 0 1.1rem; }
.article .entry h2, .article .entry h3 { margin: 1.6rem 0 .7rem; }
.breadcrumb { font-size: .8rem; color: var(--faint); margin-bottom: 1rem; }
.breadcrumb a:hover { color: var(--green-dark); }

.sidebar > * + * { margin-top: var(--gap); }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.widget-head { background: var(--green); color: #fff; font-weight: 700; font-size: .9rem; padding: .55rem .9rem; }
.widget .list-item { padding: .6rem .9rem; }

.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 1.4rem; }
.page-head h1 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); color: var(--green-dark); }
.page-head .crumb { font-size: .8rem; color: var(--faint); margin-top: .3rem; }

.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-block; padding: .5rem .85rem; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; font-size: .86rem; }
.pagination .page-numbers.current { background: var(--green); color: #fff; border-color: var(--green); }
.pagination a.page-numbers:hover { background: var(--green-light); }

/* -------------------------------------------------------------------------
   Footer
   ---------------------------------------------------------------------- */
.site-footer { background: #14201a; color: #c6d3cb; margin-top: clamp(2rem, 5vw, 3.5rem); }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2rem; padding-block: clamp(2rem, 5vw, 3rem); }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer a { color: #c6d3cb; font-size: .86rem; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: .86rem; margin: 0 0 .5rem; }
.footer-social { display: flex; gap: .7rem; margin-top: 1rem; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.footer-social svg { width: 17px; height: 17px; fill: #fff; }
.footer-social a:hover { background: var(--green); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 1rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .8rem; color: #8ba393; }
.footer-nav ul { display: flex; gap: 1.2rem; flex-wrap: wrap; }

.wa-float { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; width: 54px; height: 54px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* -------------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.news-grid, .news-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
	.state-cards { grid-template-columns: repeat(4, 1fr); }
	.col-blocks.c4, .chips { grid-template-columns: repeat(2, 1fr); }
	.videos, .epaper { grid-template-columns: repeat(2, 1fr); }
	.layout { grid-template-columns: 1fr; }
	.footer-top { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
	.hero { grid-template-columns: 1fr; }
	.header-ad { display: none; }
	.nav-toggle { display: block; }
	.mainnav ul { display: none; flex-direction: column; width: 100%; }
	.mainnav.is-open ul { display: flex; }
	.mainnav-inner { flex-wrap: wrap; }
	.mainnav .sub-menu { position: static; box-shadow: none; display: block; background: var(--green-dark); }
	.mainnav .sub-menu a { color: #dff0e5; }
	.col-blocks.c3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.news-grid, .news-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
	.state-cards { grid-template-columns: repeat(3, 1fr); }
	.videos, .epaper, .chips, .col-blocks.c2, .col-blocks.c4 { grid-template-columns: 1fr; }
	.topsearch { display: none; }
	.footer-top { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.ticker ul { animation: none; }
	.slide { transition: none; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
