/*
Theme Name: India Daily News 2026
Theme URI: https://indiadailyrise.com/
Author: India Daily News Desk
Author URI: https://indiadailyrise.com/
Description: Authentic newspaper UI replicating The Hindu's visual layout, typography (Merriweather, Playfair Display, Faustina, Merriweather Sans), 3-column hairline grid, red topic kickers, and real photojournalism cards.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: india-daily-2026
*/

:root {
  --th-bg: #FFFFFF;
  --th-bg-alt: #F7F7F7;
  --th-bg-opinion: #FAF8F5;
  --th-ink: #000000;
  --th-ink-body: #141414;
  --th-ink-sub: #505050;
  --th-ink-muted: #6E6E6E;
  --th-red: #B00020;
  --th-red-dark: #8E001A;
  --th-border: #D8D8D8;
  --th-border-dark: #000000;

  --font-serif-headline: 'Merriweather', 'Faustina', Georgia, 'Times New Roman', serif;
  --font-serif-display: 'Playfair Display', Georgia, serif;
  --font-sans: 'Merriweather Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --container-width: 1300px;
}

[data-theme="dark"] {
  --th-bg: #121212;
  --th-bg-alt: #1C1C1C;
  --th-bg-opinion: #181818;
  --th-ink: #F5F5F5;
  --th-ink-body: #E5E5E5;
  --th-ink-sub: #B0B0B0;
  --th-ink-muted: #8E8E8E;
  --th-red: #FF3B5C;
  --th-red-dark: #FF6B84;
  --th-border: #2E2E2E;
  --th-border-dark: #E0E0E0;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--th-bg);
  color: var(--th-ink-body);
  font-family: var(--font-serif-headline);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

.th-container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 15px;
}

/* ==========================================================================
   HEADER & MASTHEAD (THE HINDU EXACT LAYOUT)
   ========================================================================== */
.header-outer {
  background: var(--th-bg);
  border-bottom: 1px solid var(--th-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.th-top-bar {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--th-border);
  gap: 10px;
}

@media (min-width: 992px) {
  .th-top-bar {
    grid-template-columns: 260px 1fr 260px;
  }
}

.th-weather-date {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--th-ink-sub);
  display: flex;
  align-items: center;
  gap: 12px;
}

.th-weather-date .epaper-link {
  font-weight: 700;
  color: var(--th-ink);
  padding-left: 12px;
  border-left: 1px solid var(--th-border);
}
.th-weather-date .epaper-link:hover {
  color: var(--th-red);
}

.th-logo-center {
  text-align: center;
}

.th-masthead-title {
  font-family: var(--font-serif-display);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--th-ink);
  text-transform: uppercase;
}

.th-masthead-subtitle {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--th-ink-muted);
  margin-top: 4px;
}

.th-header-btns {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-family: var(--font-sans);
}

.btn-th-outline {
  border: 1px solid var(--th-ink);
  background: transparent;
  color: var(--th-ink);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
}
.btn-th-outline:hover {
  background: var(--th-ink);
  color: var(--th-bg);
}

.btn-th-subscribe {
  background: var(--th-red);
  color: #FFFFFF;
  border: 1px solid var(--th-red);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
}
.btn-th-subscribe:hover {
  background: var(--th-red-dark);
}

/* Main Section Navigation Bar */
.th-menu-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 12px;
}

.th-menu-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 0;
  flex: 1;
  justify-content: center;
}
.th-menu-nav::-webkit-scrollbar {
  display: none;
}

.th-nav-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--th-ink);
  white-space: nowrap;
  padding: 8px 2px;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.th-nav-link:hover,
.th-nav-link.active {
  color: var(--th-red);
  border-bottom-color: var(--th-red);
}

.th-search-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--th-ink-sub);
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.th-search-btn:hover {
  color: var(--th-red);
}

/* Sub-navigation Topics Strip */
.th-topics-strip {
  background: var(--th-bg-alt);
  border-bottom: 1px solid var(--th-border);
  padding: 6px 0;
  font-family: var(--font-sans);
  font-size: 11.5px;
}

.th-topics-strip__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.th-topics-strip__inner::-webkit-scrollbar {
  display: none;
}

.th-topics-kicker {
  color: var(--th-red);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   THE HINDU CARD ELEMENTS (.element, .bigger, .row-element, .smaller)
   ========================================================================== */
.top-section {
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--th-border);
}

.th-top-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  .th-top-grid {
    grid-template-columns: 6fr 3fr 3fr;
    gap: 0;
  }
}

.th-col-main {
  padding-right: 0;
}
.th-col-mid {
  padding: 0;
}
.th-col-right {
  padding-left: 0;
}

@media (min-width: 1024px) {
  .th-col-main {
    padding-right: 20px;
    border-right: 1px solid var(--th-border);
  }
  .th-col-mid {
    padding: 0 20px;
    border-right: 1px solid var(--th-border);
  }
  .th-col-right {
    padding-left: 20px;
  }
}

.element {
  padding: 14px 0;
  border-bottom: 1px solid var(--th-border);
}
.element:first-child {
  padding-top: 0;
}
.element:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Category / Topic Red Kicker (.label) */
.element .label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--th-red);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.element .label.kicker-outline span {
  border: 1px solid var(--th-red);
  padding: 2px 7px;
  border-radius: 2px;
  color: var(--th-red);
}

.element .label.live-span {
  color: var(--th-red);
}
.element .label.live-span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--th-red);
  animation: thLivePulse 1.6s infinite;
}

@keyframes thLivePulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.25); }
  100% { opacity: 1; transform: scale(1); }
}

/* Lead Story (.element.bigger) */
.element.bigger .picture {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9.2;
  overflow: hidden;
  background: var(--th-bg-alt);
  margin-bottom: 12px;
}

.element.bigger .picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.element.bigger:hover .picture img {
  transform: scale(1.02);
}

.element.bigger .title {
  font-family: var(--font-serif-headline);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  line-height: 1.28;
  color: var(--th-ink);
  margin-bottom: 8px;
}
.element.bigger .title a:hover {
  color: var(--th-red);
}

.element.bigger .sub-text {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--th-ink-sub);
  margin-bottom: 8px;
}

/* Author Byline (.by-line) */
.by-line {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--th-ink-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.by-line .person-name {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--th-ink-body);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Row Element (.element.row-element) */
.element.row-element {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.element.row-element .picture {
  width: 128px;
  height: 84px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--th-bg-alt);
}
.element.row-element .picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.element.row-element.thumb-right .picture {
  width: 82px;
  height: 82px;
  order: 2;
}
.element.row-element.thumb-right .content {
  order: 1;
  flex: 1;
}

.element.row-element .content {
  flex: 1;
  min-width: 0;
}

.element.row-element .title,
.element.smaller .title {
  font-family: var(--font-serif-headline);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--th-ink);
}
.element.row-element .title a:hover,
.element.smaller .title a:hover {
  color: var(--th-red);
}

/* ==========================================================================
   SECTION BLOCKS & DIVIDERS (.title-with-link, .section-title)
   ========================================================================== */
.th-section-block {
  padding: 28px 0;
  border-bottom: 1px solid var(--th-border);
}

.th-section-block.bg-opinion {
  background-color: var(--th-bg-opinion);
}

.title-with-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--th-border-dark);
  position: relative;
}

.section-title {
  font-family: var(--font-serif-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 900;
  color: var(--th-ink);
  letter-spacing: -0.01em;
}
.section-title a:hover {
  color: var(--th-red);
}

.see-more {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--th-red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.see-more:hover {
  text-decoration: underline;
}

/* 4-Column Newspaper Grid with Hairlines */
.th-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .th-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .th-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
  .th-grid-4 > .th-card-col {
    padding: 0 18px;
    border-right: 1px solid var(--th-border);
  }
  .th-grid-4 > .th-card-col:first-child {
    padding-left: 0;
  }
  .th-grid-4 > .th-card-col:last-child {
    padding-right: 0;
    border-right: none;
  }
}

.th-card .picture {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--th-bg-alt);
  margin-bottom: 10px;
}
.th-card .picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.th-card:hover .picture img {
  transform: scale(1.03);
}

.th-card .label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--th-red);
  margin-bottom: 5px;
}

.th-card .title {
  font-family: var(--font-serif-headline);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--th-ink);
  margin-bottom: 6px;
}
.th-card .title a:hover {
  color: var(--th-red);
}

.th-card .sub-text {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--th-ink-sub);
  line-height: 1.48;
  margin-bottom: 6px;
}

/* ==========================================================================
   SINGLE ARTICLE VIEW (THE HINDU ARTICLE LAYOUT)
   ========================================================================== */
.th-article-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 15px 50px;
}

.th-article-kicker {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--th-red);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.th-article-headline {
  font-family: var(--font-serif-headline);
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 700;
  line-height: 1.24;
  color: var(--th-ink);
  margin-bottom: 12px;
}

.th-article-subheadline {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--th-ink-sub);
  margin-bottom: 16px;
}

.th-article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--th-border);
  border-bottom: 1px solid var(--th-border);
  margin-bottom: 22px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--th-ink-muted);
  gap: 12px;
}

.th-article-figure {
  margin-bottom: 24px;
  background: var(--th-bg-alt);
}
.th-article-figure img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}
.th-article-caption {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--th-ink-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--th-border);
}

.th-article-body {
  font-family: var(--font-serif-headline);
  font-size: var(--article-font-size, 18px);
  line-height: 1.8;
  color: var(--th-ink-body);
}
.th-article-body p {
  margin-bottom: 20px;
}
.th-article-body h2, .th-article-body h3 {
  font-family: var(--font-serif-headline);
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--th-ink);
}

/* Search Modal & Toast */
.idn-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 15px;
}
.idn-modal-backdrop.is-open {
  display: flex;
}
.idn-search-modal {
  width: 100%;
  max-width: 640px;
  background: var(--th-bg);
  border: 1px solid var(--th-border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}
.idn-search-modal__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--th-border);
}
.idn-search-modal__input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 16px;
  font-family: var(--font-sans);
  color: var(--th-ink);
  outline: none;
}
.idn-search-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 12px 18px;
  font-family: var(--font-sans);
}
.idn-search-hit {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--th-border);
}
.idn-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--th-ink);
  color: var(--th-bg);
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2500;
}
.idn-toast.is-visible {
  opacity: 1;
}

/* Footer */
.th-footer {
  background: var(--th-bg-alt);
  border-top: 3px solid var(--th-ink);
  padding: 40px 0 28px;
  margin-top: 40px;
  font-family: var(--font-sans);
}
.th-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--th-border);
}
@media (min-width: 768px) {
  .th-footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}
.th-footer-heading {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--th-ink);
  margin-bottom: 12px;
}
.th-footer-links li + li {
  margin-top: 7px;
}
.th-footer-links a {
  font-size: 13px;
  color: var(--th-ink-sub);
}
.th-footer-links a:hover {
  color: var(--th-red);
}
