/* Dainik Dharmveer platform upgrade layer.
   Applies consistent premium branding across the existing deployed static pages. */
:root {
  --dd-brand-red: #d71920;
  --dd-ink: #111111;
  --dd-muted: #5b544c;
  --dd-paper: #fffefa;
  --dd-cream: #f7f1e6;
  --dd-line: #d8cfbf;
  --dd-blue: #174ea6;
  --dd-green: #0f7a4f;
  --dd-shadow: 0 18px 45px rgba(17, 17, 17, 0.12);
  --dd-serif: Georgia, "Times New Roman", "Noto Serif Devanagari", serif;
  --dd-sans: "Nirmala UI", Arial, sans-serif;
}

html {
  text-rendering: geometricPrecision;
}

body {
  color: var(--dd-ink);
  background: var(--dd-paper);
  font-family: var(--dd-sans);
  overflow-x: hidden;
}

body.dd-platform-upgraded {
  padding-top: 0;
}

.dd-platform-bar {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(12px, 3vw, 34px);
  color: #ffffff;
  background: #111111;
  border-bottom: 4px solid var(--dd-brand-red);
  box-shadow: 0 6px 20px rgba(17, 17, 17, 0.18);
  max-width: 100vw;
}

.dd-platform-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.dd-platform-brand img {
  width: 132px;
  max-height: 48px;
  object-fit: contain;
  padding: 4px;
  background: #ffffff;
}

.dd-platform-brand strong {
  display: block;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.dd-platform-brand span {
  display: block;
  margin-top: 3px;
  color: #ffd9d9;
  font-size: 12px;
  font-weight: 900;
}

.dd-platform-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  min-width: 0;
  max-width: 100%;
}

.dd-platform-nav a,
.dd-platform-actions a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-decoration: none;
  font-size: 12px;
  font-weight: 1000;
  white-space: nowrap;
}

.dd-platform-actions {
  display: flex;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.dd-platform-actions a:first-child {
  background: var(--dd-brand-red);
  border-color: var(--dd-brand-red);
}

.dd-breaking-ribbon {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 36px;
  padding: 0 clamp(12px, 3vw, 34px);
  color: #ffffff;
  background: var(--dd-brand-red);
  overflow: hidden;
}

.dd-breaking-ribbon strong {
  flex: 0 0 auto;
  font-size: 12px;
  text-transform: uppercase;
}

.dd-breaking-ribbon span {
  min-width: max-content;
  font-size: 13px;
  font-weight: 900;
  animation: ddTicker 24s linear infinite;
}

@keyframes ddTicker {
  from { transform: translateX(24%); }
  to { transform: translateX(-100%); }
}

.dd-platform-footer {
  margin-top: 40px;
  padding: 26px clamp(14px, 4vw, 44px);
  color: #ffffff;
  background: #111111;
  border-top: 5px solid var(--dd-brand-red);
}

.dd-platform-footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 0.6fr));
  gap: 18px;
  max-width: 1240px;
  margin: 0 auto;
}

.dd-platform-footer img {
  width: 160px;
  padding: 5px;
  background: #ffffff;
}

.dd-platform-footer h3,
.dd-platform-footer strong {
  margin: 0 0 8px;
  display: block;
}

.dd-platform-footer a,
.dd-platform-footer p,
.dd-platform-footer span {
  color: #eee4d7;
  font-size: 13px;
  line-height: 1.5;
}

.dd-platform-footer a {
  display: block;
  text-decoration: none;
}

.dd-premium-news-shell main,
.dd-premium-news-shell .home-main,
.dd-premium-news-shell .edition-main,
.dd-premium-news-shell .article-main {
  max-width: 1240px;
  margin-inline: auto;
}

.dd-premium-news-shell h1,
.dd-premium-news-shell h2,
.dd-premium-news-shell h3,
.article-title,
.edition-title {
  letter-spacing: 0;
}

.dd-premium-news-shell h1,
.article-title {
  font-family: var(--dd-serif);
  font-weight: 900;
  line-height: 0.98;
}

.dd-international-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  padding: clamp(18px, 3vw, 34px);
  border-bottom: 1px solid var(--dd-line);
}

.dd-international-hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 86px);
}

.dd-international-hero p {
  max-width: 740px;
  color: var(--dd-muted);
  font-size: 18px;
  line-height: 1.5;
}

.dd-edition-upgrade-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  background: var(--dd-line);
  border: 1px solid var(--dd-line);
}

.dd-edition-upgrade-strip a {
  min-height: 72px;
  display: grid;
  align-content: center;
  padding: 10px;
  color: var(--dd-ink);
  background: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 1000;
  overflow-wrap: anywhere;
}

.dd-ai-newsroom-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  gap: 14px;
  margin: 20px 0;
  padding: 18px;
  background: #111111;
  color: #ffffff;
  border-top: 5px solid var(--dd-brand-red);
}

.dd-ai-newsroom-panel textarea {
  min-height: 120px;
  padding: 12px;
  color: #111111;
  background: #ffffff;
  border: 0;
  font: 800 14px/1.35 var(--dd-sans);
}

.dd-ai-newsroom-panel button {
  min-height: 42px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--dd-brand-red);
  border: 0;
  font-weight: 1000;
  cursor: pointer;
}

.dd-ai-result-box {
  padding: 12px;
  color: #111111;
  background: #fff7d6;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.45;
}

.dd-article-enhance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  max-width: 1180px;
  margin: 24px auto;
  padding: 0 16px;
}

.dd-article-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.dd-article-tools button,
.dd-article-tools a {
  min-height: 36px;
  padding: 0 12px;
  color: #ffffff;
  background: #111111;
  border: 0;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.dd-article-tools button:first-child {
  background: var(--dd-brand-red);
}

.dd-popular-sidebar {
  padding: 14px;
  background: var(--dd-cream);
  border: 1px solid var(--dd-line);
}

.dd-popular-sidebar h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.dd-popular-sidebar a {
  display: block;
  padding: 9px 0;
  color: #111111;
  border-top: 1px solid var(--dd-line);
  text-decoration: none;
  font-weight: 900;
  line-height: 1.25;
}

.dd-mobile-bottom-nav {
  display: none;
}

@media (max-width: 920px) {
  .dd-platform-bar {
    grid-template-columns: 1fr;
    gap: 8px;
    position: relative;
  }

  .dd-platform-nav {
    justify-content: flex-start;
  }

  .dd-platform-actions {
    overflow-x: auto;
  }

  .dd-platform-footer-grid,
  .dd-international-hero,
  .dd-ai-newsroom-panel,
  .dd-article-enhance {
    grid-template-columns: 1fr;
  }

  .dd-edition-upgrade-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dd-mobile-bottom-nav {
    position: sticky;
    bottom: 0;
    z-index: 9999;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #111111;
    border-top: 3px solid var(--dd-brand-red);
  }

  .dd-mobile-bottom-nav a {
    min-height: 48px;
    display: grid;
    place-items: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 1000;
  }
}

@media (max-width: 520px) {
  .dd-platform-brand img {
    width: 106px;
  }

  .dd-platform-brand strong {
    font-size: 16px;
  }

  .dd-platform-nav a,
  .dd-platform-actions a {
    min-height: 32px;
    padding: 0 8px;
    font-size: 11px;
  }

  .dd-platform-footer {
    padding-bottom: 72px;
  }
}

@media print {
  .dd-platform-bar,
  .dd-breaking-ribbon,
  .dd-platform-footer,
  .dd-mobile-bottom-nav,
  .dd-article-tools {
    display: none !important;
  }
}
