/*
Theme Name: Dainik MatVaani
Theme URI: https://dainikmatvaani.example
Author: DainikMatVaani
Description: Public news theme for the Local News CPT. Brand Guidelines v5.
Version: 1.2.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: dainik-matvaani
*/

:root {
  --paper: #ffffff;
  --page: #f3f5f8;
  --slate: #3d5273;
  --mist: #8c9bb0;
  --ink: #101828;
  --navy: #152238;
  --navy-2: #1c2f4a;
  --accent: #1d4ed8;
  --gold: #d4a017;
  --opinion: #6b4e8e;
  --line: #e4e9f0;
  --muted: #5c6570;
  --font-ui: Inter, "Noto Sans Devanagari", "Nirmala UI", "Segoe UI", system-ui, sans-serif;
  --font-body: "Noto Sans Devanagari", Inter, "Nirmala UI", "Segoe UI", system-ui, sans-serif;
  --wrap: 1180px;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--slate);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.screen-reader-text,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  width: auto;
  height: auto;
  clip: auto;
  overflow: visible;
  padding: 10px 14px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-ui);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
}

.wrap {
  width: min(var(--wrap), calc(100% - 32px));
  margin-inline: auto;
}

/* Header */
.site-chrome {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}

.admin-bar .site-chrome {
  top: 32px;
}

.topbar {
  background: var(--navy);
  color: #d7deea;
  font-size: 12px;
  font-family: var(--font-ui);
  letter-spacing: 0.04em;
}

.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.topbar-tag {
  color: var(--gold);
  font-weight: 700;
}

.site-header {
  background: var(--paper);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.site-logo:hover {
  text-decoration: none;
}

.site-logo .custom-logo-link {
  display: flex;
  align-items: center;
}

.site-logo .custom-logo {
  max-height: 52px;
  width: auto;
}

.mark {
  width: 48px;
  height: 48px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "Noto Sans Devanagari", sans-serif;
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  position: relative;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mark .dot {
  position: absolute;
  right: 6px;
  bottom: 6px;
  color: var(--gold);
  font-size: 14px;
}

.wordmark .dainik {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.wordmark .brand {
  display: block;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.wordmark .brand .mat {
  color: var(--ink);
}

.wordmark .brand .vaani {
  color: var(--slate);
}

.wordmark .tag {
  display: block;
  font-size: 12px;
  color: var(--slate);
  margin-top: 2px;
}

.header-search {
  flex: 1;
  max-width: 420px;
}

.search-form,
.footer-search {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #f8fafc;
}

.search-form input[type="search"],
.footer-search input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 11px 16px;
  font: 15px var(--font-ui);
}

.search-form button,
.footer-search button {
  border: 0;
  background: var(--navy);
  color: #fff;
  padding: 0 18px;
  font: 700 13px var(--font-ui);
  cursor: pointer;
}

.search-form button:hover,
.footer-search button:hover {
  background: var(--accent);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 8px 12px;
  border-radius: 10px;
  font: 700 13px var(--font-ui);
  cursor: pointer;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle-bars span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
}

.site-nav {
  background: var(--navy);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}

.site-nav a {
  display: block;
  padding: 13px 16px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 650;
  color: #e8eef7;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-search {
  display: none;
}

/* Layout */
.page-main {
  padding: 28px 0 56px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--navy);
  margin-bottom: 18px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.section-head .section-title {
  flex: 1;
  margin-bottom: 18px;
}

.section-more {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--accent);
}

.ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
}

.ticker .chip {
  margin: 0;
  flex-shrink: 0;
}

.ticker-track {
  display: flex;
  gap: 8px 22px;
  min-width: 0;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
}

.ticker-track::-webkit-scrollbar {
  display: none;
}

.ticker-track a {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}

.top-pack {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.lead-link {
  color: inherit;
  text-decoration: none;
}

.lead-link:hover {
  text-decoration: none;
}

.lead-story h1 {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800;
  margin: 12px 0 8px;
}

.lead-link:hover h1 {
  color: var(--slate);
}

.hero-media img,
.lead-story img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: #eef1f5;
}

.lead-rail {
  display: flex;
  flex-direction: column;
}

.rail-story {
  border-bottom: 1px solid var(--line);
}

.rail-story a {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 12px 0;
  color: inherit;
  text-decoration: none;
  align-items: start;
}

.rail-story img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  background: #eef1f5;
  border-radius: 8px;
}

.rail-story h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
}

.rail-story a:hover h2 {
  color: var(--slate);
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.feature-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.feature-card a {
  color: inherit;
  text-decoration: none;
}

.feature-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eef1f5;
  margin-bottom: 10px;
  border-radius: 10px;
}

.feature-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.feature-card a:hover h2 {
  color: var(--slate);
}

.photo-rail {
  margin-bottom: 32px;
}

.photo-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.photo-card {
  color: inherit;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  background: #eef1f5;
}

.photo-card span {
  display: block;
  padding: 8px 10px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.latest-list {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 18px;
}

.list-story {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.list-story:last-child {
  border-bottom: 0;
}

.list-story a {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  align-items: start;
}

.list-story img {
  width: 140px;
  height: 92px;
  object-fit: cover;
  background: #eef1f5;
  border-radius: 8px;
}

.list-story h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
}

.list-story a:hover h3 {
  color: var(--slate);
}

.list-story .dek {
  font-size: 15px;
  margin: 0 0 8px;
}

.list-story .meta {
  margin: 8px 0 0;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 36px;
}

.hero-media img,
.card-media img,
.article-banner img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eef1f5;
}

.hero-copy h1,
.hero-copy h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
}

.dek {
  color: var(--muted);
  font-size: 18px;
  margin: 8px 0 12px;
}

.meta {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
}

.chip {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font: 700 11px/1 var(--font-ui);
  letter-spacing: 0.08em;
  padding: 6px 9px;
  margin-bottom: 10px;
  border-radius: 6px;
}

.chip-opinion {
  background: var(--opinion);
}

.chip-analysis {
  background: var(--mist);
  color: var(--ink);
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-side a {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.hero-side img {
  width: 96px;
  height: 72px;
  object-fit: cover;
}

.hero-side h3 {
  font-size: 16px;
  font-weight: 650;
}

/* Cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 18px;
  font-weight: 650;
  margin-top: 10px;
}

.card .dek {
  font-size: 15px;
  margin: 6px 0 0;
}

.news-grid + .news-grid {
  margin-top: 22px;
}

.card a {
  color: inherit;
  text-decoration: none;
}

.card a:hover h3 {
  color: var(--slate);
}

.card-media img {
  border-radius: 10px;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 108px;
}

.sidebar-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.widget_recent_comments {
  display: none !important;
}

.trend-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.trend-item:last-child {
  border-bottom: 0;
}

.trend-num {
  font-family: var(--font-ui);
  font-weight: 800;
  color: var(--mist);
}

.trend-item h3 {
  font-size: 15px;
  font-weight: 650;
}

/* Article */
.breadcrumbs {
  margin: 0 0 16px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 10px;
  color: var(--mist);
}

.breadcrumbs a {
  color: var(--slate);
}

.article-header {
  max-width: 760px;
  margin-bottom: 20px;
}

.article-header h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
}

.article-banner {
  margin: 0 0 24px;
}

.article-banner img {
  border-radius: 14px;
}

.article-body {
  max-width: 680px;
  font-size: 18px;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote {
  margin: 0 0 1.1em;
}

.article-body h2 {
  font-size: 28px;
  margin-top: 1.4em;
}

.article-body img,
.article-body figure,
.article-body .wp-block-image,
.article-body .wp-caption,
.article-body .wp-block-gallery,
.article-body video,
.article-body iframe {
  max-width: 100%;
  height: auto;
}

.article-body img,
.article-body .wp-block-image img,
.article-body .wp-caption img,
.article-body figure img,
.article-body .aligncenter img,
.article-body .alignwide img,
.article-body .alignfull img,
.article-body img.size-full,
.article-body img.size-large,
.article-body img.size-medium_large {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

.article-body .alignleft,
.article-body img.alignleft {
  float: left;
  margin: 0 16px 12px 0;
  max-width: min(100%, 280px);
  width: auto;
}

.article-body .alignright,
.article-body img.alignright {
  float: right;
  margin: 0 0 12px 16px;
  max-width: min(100%, 280px);
  width: auto;
}

.article-body figure {
  margin: 1.4em 0;
}

.article-body figcaption,
.article-body .wp-caption-text {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.article-body iframe,
.article-body .wp-block-embed iframe,
.article-body video {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  margin: 0 0 1.2em;
}

.article-body table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 28px 0;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: #c5d0de;
  padding: 48px 0 20px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.footer-brand p {
  margin: 14px 0 18px;
  max-width: 36ch;
  line-height: 1.6;
}

.site-footer .wordmark .dainik,
.site-footer .wordmark .tag {
  color: #9bb0cc;
}

.site-footer .wordmark .brand .mat {
  color: #fff;
}

.site-footer .wordmark .brand .vaani {
  color: #b8c7db;
}

.site-footer h2 {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 0 0 10px;
}

.site-footer a {
  color: #c5d0de;
}

.site-footer a:hover {
  color: #fff;
}

.footer-search {
  max-width: 320px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.footer-search input[type="search"] {
  color: #fff;
}

.footer-search input::placeholder {
  color: #9bb0cc;
}

.footer-search button {
  background: var(--gold);
  color: var(--navy);
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  font-size: 12px;
  color: #8ea0b8;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  font-family: var(--font-ui);
}

.pagination a,
.pagination span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
}

.search-page h1,
.error-page h1,
.archive-head h1 {
  font-size: 32px;
  margin-bottom: 20px;
}

.error-page {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}

@media (max-width: 960px) {
  .layout,
  .hero,
  .top-pack,
  .feature-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .photo-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    position: static;
  }

  .header-search {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav .wrap {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 16px;
  }

  .site-nav ul {
    flex-direction: column;
  }

  .nav-search {
    display: block;
    padding: 8px 0 4px;
  }

  .nav-search .search-form {
    background: #fff;
  }

  .news-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-body .alignleft,
  .article-body .alignright,
  .article-body img.alignleft,
  .article-body img.alignright {
    float: none;
    margin: 0 0 1em;
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 782px) {
  .admin-bar .site-chrome {
    top: 46px;
  }
}

@media (max-width: 640px) {
  body.nav-open {
    overflow: hidden;
  }

  .wrap {
    width: min(var(--wrap), calc(100% - 24px));
  }

  .site-header .wrap {
    padding: 12px 0;
    gap: 12px;
  }

  .mark {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .wordmark .brand {
    font-size: 18px;
  }

  .news-grid,
  .gallery-grid,
  .hero-side a,
  .rail-story a,
  .list-story a,
  .photo-track {
    grid-template-columns: 1fr;
  }

  .rail-story img,
  .list-story img,
  .photo-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .top-pack,
  .latest-list,
  .feature-card,
  .card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .article-header h1 {
    font-size: 28px;
  }

  .article-body {
    font-size: 17px;
  }
}
