/*
Theme Name: Sports News Pro
Theme URI: https://example.com/
Author: Your Company
Description: A fast, ad-ready sports news theme. Cricket-first with football, kabaddi and tennis. Includes an ad manager with configurable placements, a homepage top-story picker, editor's picks, notification alerts and a one-click starter content importer.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.8
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: snp
Tags: news, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments
*/

/* Race Sport: add RaceSport.woff2 to assets/fonts (check its licence). Falls back to Poppins. */
@font-face {
  font-family: "Race Sport";
  src: url("assets/fonts/RaceSport.woff2") format("woff2"), url("assets/fonts/RaceSport.ttf") format("truetype");
  font-display: swap;
}

:root {
  --navy: #080A52;
  --pink: #EA2087;
  --pink-dark: #C9166F;
  --white: #FFFFFF;
  --navy-50: #E6E7EF;
  --navy-100: #CFD0E0;
  --navy-400: #6A6B92;
  --navy-700: #22235E;
  --pink-50: #FBE8F2;
  --bg: #F4F5F9;
  --surface: #FFFFFF;
  --ink: var(--navy);
  --muted: var(--navy-400);
  --line: var(--navy-100);
  --display: "Race Sport", "Poppins", sans-serif;
  --head: "Poppins", "Segoe UI", Arial, sans-serif;
  --body: "Hind", "Segoe UI", Arial, sans-serif;
  --header-h: 66px;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.05rem; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, video, iframe { max-width: 100%; }
img { display: block; height: auto; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { width: min(1480px, 100% - 2rem); margin-inline: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 1rem; top: 1rem; z-index: 100; width: auto; height: auto; clip: auto; background: var(--pink); color: #fff; padding: .6rem 1rem; }

.rs { font-family: var(--display); font-style: italic; font-weight: 800; letter-spacing: .02em; font-size: 1.6rem; margin: 0 0 1rem; line-height: 1.1; }
.rs--sm { font-size: 1.05rem; margin-bottom: .7rem; }
.rs--lg { font-size: clamp(2rem, 4vw, 2.8rem); margin: .2rem 0 .3rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy); color: #fff; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.header-in { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); padding: .6rem 0; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand .custom-logo { height: 40px; width: auto; }
.brand-word { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.5rem; letter-spacing: .03em; border: 2px dashed rgba(255,255,255,.55); padding: .1rem .7rem; border-radius: 4px; line-height: 1.3; }
.sport-tabs { margin-right: auto; min-width: 0; }
.sport-tabs ul { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.sport-tabs ul::-webkit-scrollbar { display: none; }
.sport-tabs a { display: block; white-space: nowrap; color: #fff; opacity: .82; font-family: var(--head); font-weight: 600; font-size: .95rem; padding: .4rem 1rem; border-radius: 999px; }
.sport-tabs a:hover { opacity: 1; background: rgba(255,255,255,.08); }
.sport-tabs .current-menu-item > a, .sport-tabs .current-post-ancestor > a, .sport-tabs .current-category-ancestor > a, .sport-tabs .current-menu-parent > a { background: var(--pink); opacity: 1; }
.header-actions { display: flex; gap: .5rem; flex: none; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.1); border: 0; color: #fff; display: grid; place-items: center; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--pink); }
.bell-dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); border: 2px solid var(--navy); }

.drop { position: absolute; right: max(1rem, (100vw - 1480px) / 2); top: calc(100% + 8px); width: min(340px, calc(100vw - 2rem)); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 1.1rem 1.2rem; box-shadow: 0 18px 50px rgba(8,10,82,.28); border-top: 4px solid var(--pink); }
.drop h2 { font-family: var(--head); font-size: 1.1rem; margin: 0; }
.drop-sub { margin: .1rem 0 .7rem; color: var(--muted); font-size: .92rem; }
.drop fieldset { border: 0; padding: 0; margin: 0 0 .9rem; display: grid; gap: .35rem; }
.drop label { display: flex; align-items: center; gap: .55rem; cursor: pointer; }
.drop input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--pink); }
.btn { display: inline-block; background: var(--pink); color: #fff; border: 0; border-radius: 6px; padding: .6rem 1.1rem; font-family: var(--head); font-weight: 600; text-align: center; }
.btn:hover { background: var(--pink-dark); color: #fff; }
.btn--block { width: 100%; }
.notif-status { font-size: .88rem; color: var(--muted); margin: .6rem 0 0; min-height: 1.2em; }
.search-form { display: flex; gap: .5rem; }
.search-form input[type=search] { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: .55rem .7rem; background: #fff; }

/* ---------- Ads ---------- */
.ad { position: relative; margin-inline: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: 100%; overflow: hidden; }
.ad-label { font-family: var(--head); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.ad--placeholder { background: repeating-linear-gradient(135deg, var(--navy-50) 0 12px, #EEEFF5 12px 24px); border: 1px dashed var(--navy-100); border-radius: 4px; color: var(--navy-400); font-family: var(--head); font-size: .75rem; text-align: center; padding: .5rem; }
.ad--placeholder strong { display: block; font-size: .8rem; }
.ad-top { background: var(--surface); border-bottom: 1px solid var(--line); padding: .7rem 1rem; }
.ad--header, .ad--home_infeed, .ad--archive_infeed, .ad--after_article { width: 100%; max-width: 970px; }
.ad--home_infeed, .ad--archive_infeed { margin: .5rem auto 2rem; grid-column: 1 / -1; }
.ad--after_article { margin: 2rem auto; }
.ad--in_article { margin: 1.8rem auto; width: 100%; max-width: 336px; }
.ad--rail_left, .ad--rail_right { width: 160px; position: sticky; top: calc(var(--header-h) + 1rem); }
.ad--sidebar_top { width: 300px; max-width: 100%; }
.ad--sidebar_sticky { width: 300px; max-width: 100%; position: sticky; top: calc(var(--header-h) + 1rem); }
.ad--mobile_sticky { display: none; }
@media (max-width: 767px) { .ad--desktop { display: none !important; } }
@media (min-width: 768px) { .ad--mobile { display: none !important; } }

/* ---------- Page grid with side rails ---------- */
.page { display: grid; grid-template-columns: minmax(0, 1120px); justify-content: center; gap: 1.75rem; padding: 1.5rem 1rem 3rem; }
.page.has-rails { grid-template-columns: 160px minmax(0, 1120px) 160px; }
.rail { min-width: 0; }
.page-main { min-width: 0; }
@media (max-width: 1240px) {
  .page.has-rails { grid-template-columns: minmax(0, 1120px); }
  .rail { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; display: block; border-radius: 12px; overflow: hidden; background: var(--navy); min-height: 420px; aspect-ratio: 16 / 7; color: #fff; }
.hero .img-wrap { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.hero img { transition: transform .6s ease; }
.hero:hover img { transform: scale(1.03); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,10,82,.95) 0%, rgba(8,10,82,.55) 45%, rgba(8,10,82,0) 80%); pointer-events: none; }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: clamp(1.2rem, 3vw, 2.4rem); max-width: 800px; }
.pill { display: inline-block; background: var(--pink); color: #fff; font-family: var(--head); font-weight: 700; font-size: .75rem; padding: .2rem .7rem; border-radius: 999px; }
.hero h1 { font-family: var(--head); font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.08; margin: .6rem 0 .5rem; }
.hero p { margin: 0 0 1.1rem; opacity: .9; font-size: 1.1rem; max-width: 58ch; }
.hero-cta { display: inline-block; background: #fff; color: var(--navy); font-family: var(--head); font-weight: 700; font-size: .9rem; padding: .55rem 1.2rem; border-radius: 6px; }
.hero:hover .hero-cta { background: var(--pink); color: #fff; }

/* ---------- Images ---------- */
.img-wrap { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--navy-50); }
.img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .img-wrap img, .mini:hover .img-wrap img { transform: scale(1.05); }
.img-wrap.ph { background: radial-gradient(circle at 80% 20%, rgba(234,32,135,.55), transparent 55%), linear-gradient(135deg, var(--navy), var(--navy-700)); display: grid; place-items: center; }
.img-wrap.ph::before { content: attr(data-label); color: #fff; font-family: var(--display); font-style: italic; font-weight: 800; font-size: clamp(1.1rem, 3vw, 2rem); letter-spacing: .04em; opacity: .9; }

/* ---------- Cards ---------- */
.top-stories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin: 1.5rem 0 2.2rem; }
.mini__title { font-family: var(--head); font-weight: 600; font-size: 1rem; line-height: 1.3; margin: .15rem 0 0; }
.tag { display: inline-block; font-family: var(--head); font-weight: 700; font-size: .75rem; color: var(--pink); }
.tag:hover { text-decoration: underline; }
.kind { display: inline-block; margin-left: .5rem; font-family: var(--head); font-weight: 600; font-size: .68rem; color: var(--navy); background: var(--navy-50); padding: .05rem .5rem; border-radius: 3px; vertical-align: 1px; }
.card__meta { margin-top: .7rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.6rem 1.3rem; }
.card { display: flex; flex-direction: column; min-width: 0; }
.card__title { font-family: var(--head); font-weight: 700; font-size: 1.06rem; line-height: 1.3; margin: .3rem 0 .3rem; }
.card__title a:hover, .mini:hover .mini__title, .picks a:hover { color: var(--pink); }
.card__excerpt { margin: 0 0 .4rem; color: var(--muted); font-size: .95rem; }
.date { font-size: .8rem; color: var(--muted); margin-top: auto; }
.card--lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: center; }
.card--lead .card__title { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; }
.block { padding: 0 0 1.8rem; }
.block + .block { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.more { font-family: var(--head); font-weight: 600; font-size: .88rem; color: var(--pink); white-space: nowrap; }
.more:hover { text-decoration: underline; }
.archive-head { padding: .3rem 0 1.5rem; }
.archive-head p { margin: 0; color: var(--muted); }
.crumbs { font-size: .85rem; color: var(--muted); margin: 0 0 .5rem; }
.crumbs a:hover { color: var(--pink); }

.sidebar { display: flex; flex-direction: column; gap: 1.3rem; }
.panel, .widget { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.1rem; border-top: 4px solid var(--pink); }
.widget-title { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.05rem; margin: 0 0 .7rem; }
.widget ul { margin: 0; padding-left: 1.1rem; }
.picks { margin: 0; padding: 0; list-style: none; counter-reset: pick; }
.picks li { counter-increment: pick; display: grid; grid-template-columns: 2rem 1fr; padding: .55rem 0; border-bottom: 1px solid var(--line); font-family: var(--head); font-weight: 600; font-size: .9rem; line-height: 1.35; }
.picks li:last-child { border-bottom: 0; }
.picks li::before { content: counter(pick); font-family: var(--display); font-style: italic; color: var(--pink); font-size: 1.2rem; line-height: 1.1; }
.follow { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.follow a { display: flex; align-items: center; gap: .5rem; font-family: var(--head); font-weight: 600; font-size: .85rem; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; }
.follow a:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.follow svg { flex: none; }
.yt-play { fill: #fff; }
.foot-social .yt-play, .follow a:hover .yt-play { fill: var(--navy); }

/* ---------- Article ---------- */
.story { min-width: 0; }
.story__title { font-family: var(--head); font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.12; margin: .3rem 0 .6rem; }
.dek { font-size: 1.2rem; color: var(--muted); margin: 0 0 .8rem; }
.byline { font-size: .88rem; color: var(--muted); margin: 0 0 1.2rem; }
.byline a { color: var(--ink); font-weight: 600; }
.story__figure { margin: 0 0 1.5rem; }
.story__figure .img-wrap { aspect-ratio: 16 / 9; border-radius: 10px; }
.story__figure figcaption, .wp-caption-text, .wp-element-caption { font-size: .8rem; color: var(--muted); margin-top: .4rem; }
.entry { max-width: 70ch; }
.entry > * { margin-top: 0; margin-bottom: 1.1rem; }
.entry h2 { font-family: var(--head); font-weight: 700; font-size: 1.3rem; margin: 1.8rem 0 .4rem; }
.entry h3 { font-family: var(--head); font-weight: 700; font-size: 1.12rem; margin: 1.5rem 0 .4rem; }
.entry a { color: var(--pink); text-decoration: underline; }
.entry blockquote { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.2rem; border-left: 4px solid var(--pink); font-size: 1.15rem; }
.entry figure { margin: 1.5rem 0; }
.entry img { border-radius: 6px; }
.entry table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.entry th, .entry td { border-bottom: 1px solid var(--line); padding: .5rem; text-align: left; }
.entry iframe { width: 100%; }
.alignleft { float: left; margin: .3rem 1.2rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.2rem; }
.aligncenter { margin-inline: auto; }
.tags-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.tags-list a { display: inline-block; font-size: .8rem; font-family: var(--head); font-weight: 600; background: var(--navy-50); padding: .2rem .7rem; border-radius: 999px; }
.tags-list a:hover { background: var(--pink); color: #fff; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 2rem 0; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share > span { font-family: var(--head); font-weight: 700; font-size: .9rem; margin-right: .4rem; }
.share a { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--head); font-weight: 600; font-size: .85rem; background: var(--navy); color: #fff; border-radius: 999px; padding: .4rem .9rem .4rem .7rem; }
.share a:hover { background: var(--pink); }
.share svg { width: 16px; height: 16px; }
.plain { max-width: 780px; }
.plain .entry { max-width: none; }

/* Pagination */
.pagination { margin: 2rem 0 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.page-numbers { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 .8rem; border-radius: 6px; background: var(--surface); font-family: var(--head); font-weight: 600; font-size: .9rem; border: 1px solid var(--line); }
.page-numbers.current, a.page-numbers:hover { background: var(--pink); border-color: var(--pink); color: #fff; }

/* Comments */
.comments { margin-top: 2rem; }
.comment-list { list-style: none; padding: 0; }
.comment-body { background: var(--surface); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: .6rem; }
.comment-form .submit { background: var(--pink); color: #fff; border: 0; border-radius: 6px; padding: .6rem 1.2rem; font-family: var(--head); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding-top: 2.4rem; }
.footer-in { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer p { opacity: .85; font-size: .95rem; }
.foot-links, .foot-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.site-footer a:hover { color: var(--pink); }
.foot-social { display: flex; gap: .5rem; flex-wrap: wrap; }
.foot-social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.foot-social a:hover { background: var(--pink); color: #fff; }
.copy { font-size: .8rem !important; border-top: 1px solid rgba(255,255,255,.15); padding: 1rem 0 1.5rem; margin: 1.5rem auto 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .ad--sidebar_sticky { display: none; }
  .top-stories { grid-template-columns: repeat(2, 1fr); }
  .footer-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .header-in { flex-wrap: wrap; gap: .6rem 1rem; justify-content: space-between; }
  .sport-tabs { order: 3; width: 100%; margin-right: 0; }
  .hero { aspect-ratio: auto; min-height: 460px; }
  .top-stories { gap: 1rem; }
  .card--lead { grid-template-columns: 1fr; }
  .footer-in { grid-template-columns: 1fr; }
  .ad--mobile_sticky { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0px)); }
  .ad--mobile_sticky .ad-label { display: none; }
  body.has-mobile-sticky { padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero img, .img-wrap img { transition: none; }
}

/* Ad placeholder links */
.ad--placeholder a { display: block; color: inherit; }
.ad--placeholder a:hover { color: var(--pink); }
.hero .img-wrap.ph::before { display: none; }
