@import url("https://fonts.googleapis.com/css2?family=Baloo+Tammudu+2:wght@400;500;600;700&family=Noto+Sans+Telugu:wght@400;500;600;700;800;900&family=Noto+Sans:wght@400;600;700;800;900&family=Noto+Serif+Telugu:wght@400;500;600;700;800&display=swap");

:root {
  --red: #1557ad;
  --red-dark: #0b3d82;
  --ink: #171717;
  --muted: #686868;
  --line: #e7e2dc;
  --paper: #fffaf3;
  --surface: #ffffff;
  --gold: #5bd3ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans Telugu", "Noto Sans", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
}

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

img {
  display: block;
  width: 100%;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: #101010;
  color: #f6f0e7;
  font-size: 13px;
}

.topbar-inner,
.masthead-inner,
.nav-shell,
.nav-row,
.ticker-inner,
.section-title,
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-inner {
  min-height: 34px;
  position: relative;
}

.topbar { background: #061a3d; }
.topbar-subscribe { color: #fff; background: #e62117; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; padding: 5px 15px; font-size: 12px; font-weight: 800; position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.topbar-subscribe:hover { background: #ff3b30; color: #fff; }
.youtube-mark { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 13px; margin-right: 5px; border-radius: 4px; background: #fff; color: #e62117; font-size: 9px; }

.masthead {
  background: linear-gradient(120deg, #071f4d 0%, #1557ad 52%, #16a4d8 100%);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.masthead::after { content: ""; position: absolute; width: 260px; height: 260px; right: -70px; top: -150px; border-radius: 50%; background: rgba(91,211,255,.22); }

.masthead.compact {
  border-top: 5px solid var(--red);
}

.masthead-inner {
  min-height: 112px;
}

.masthead-inner::after { content: ""; margin-left: auto; width: 300px; height: 70px; border-radius: 6px; background: var(--header-ad, url("ad-header-desktop.png")) center/100% 100% no-repeat; box-shadow: 0 5px 14px rgba(0,0,0,.2); }

.ad-slot { margin-top: 18px; margin-bottom: 18px; }
.ad-slot img { display: block; width: 100%; height: 160px; object-fit: fill; border-radius: 6px; box-shadow: 0 3px 12px rgba(15,55,110,.12); }
.ad-slot .ad-mobile-image, .mobile-menu-ad { display: none; }
.story-ad { margin-top: 22px; }

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.masthead .brand > span {
  display: none;
}

.masthead .brand::after {
  content: "Samatha TV";
  color: #fff;
  font-family: "Noto Sans", sans-serif;
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 900;
  letter-spacing: .8px;
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
  text-shadow: 0 3px 10px rgba(0,0,0,.3);
  white-space: nowrap;
}
.masthead .brand::after { display: none; }
.site-title-image { width: 310px; height: 92px; object-fit: contain; border: 0; border-radius: 0; filter: drop-shadow(0 3px 8px rgba(0,0,0,.25)); }

.masthead > .wrap > .admin-link {
  display: none;
}

.brand-logo {
  width: 178px;
  height: 100px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  border: 0;
}

.brand strong {
  display: block;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.admin-link,
.primary-button,
.ghost-button,
.danger-button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.admin-link,
.primary-button {
  background: var(--red);
  color: white;
  padding: 12px 16px;
}

.ghost-button {
  background: #f1ece5;
  color: var(--ink);
  padding: 10px 14px;
}

.danger-button {
  background: #301010;
  color: white;
  padding: 10px 14px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(90deg, #0b3d82, #1557ad 55%, #0b3d82);
  box-shadow: 0 3px 12px rgba(7,31,77,.28);
}

.nav-shell {
  justify-content: space-between;
  min-height: 50px;
}

.nav-row {
  justify-content: flex-start;
  min-height: 50px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.nav-row::-webkit-scrollbar {
  display: none;
}

.menu-icon,
.search-icon {
  flex: 0 0 42px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 4px;
  background: transparent;
  color: white;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.menu-icon { margin-right: 8px; }
.search-icon { margin-left: 8px; font-size: 25px; }
.menu-icon { display: none; }

.legacy-categories { display: none; }

.nav-button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  font-family: "Noto Sans Telugu", sans-serif;
  font-weight: 700;
  padding: 16px 14px;
  white-space: nowrap;
}

.nav-button.active,
.nav-button:hover {
  background: var(--gold);
  color: #201407;
}

.nav-button:first-child::before {
  content: "⌂";
  font-size: 18px;
  margin-right: 6px;
  vertical-align: -1px;
}

.ticker {
  background: #fff;
  border-top: 3px solid #f5c400;
  border-bottom: 1px solid #d9e0ea;
  box-shadow: 0 2px 8px rgba(15,55,110,.08);
}

.ticker-inner {
  min-height: 48px;
  gap: 0;
  overflow: hidden;
}

.ticker span {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  background: #1557ad;
  color: white;
  border-radius: 0;
  font-size: 14px;
  font-weight: 900;
  padding: 11px 28px 11px 15px;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%);
}

.ticker-viewport { min-width: 0; flex: 1; overflow: hidden; position: relative; height: 46px; display: flex; align-items: center; }
.ticker-track { display: inline-block; color: #111827; font-size: 15px; font-weight: 700; line-height: 46px; white-space: nowrap; padding-left: 100%; animation: ticker-scroll 24s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 20px;
  padding: 28px 0 10px;
}

.hero-card,
.side-card,
.article-card,
.widget,
.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.hero-card img {
  height: 390px;
  object-fit: cover;
}

.card-body {
  padding: 18px;
}

.label {
  display: inline-flex;
  background: linear-gradient(135deg, #1557ad, #0f83c9);
  color: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
  padding: 6px 9px;
  text-transform: uppercase;
}

.hero-card h1,
.story-article h1 {
  font-family: "Noto Serif Telugu", Georgia, serif;
  font-weight: 800;
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.side-stack {
  display: grid;
  gap: 20px;
}

.side-card img {
  height: 145px;
  object-fit: cover;
}

.side-card h2,
.article-card h2,
.widget h2 {
  font-family: "Noto Serif Telugu", Georgia, serif;
  font-weight: 700;
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.18;
}

.meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 24px;
  padding: 22px 0 42px;
}

.section-title {
  align-items: end;
  margin-bottom: 16px;
}

.section-title h1 {
  font-family: "Noto Serif Telugu", Georgia, serif;
  font-weight: 800;
  margin: 0;
  font-size: 30px;
}

.section-title input,
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #d9d1c7;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font: inherit;
  padding: 12px;
}

.field input, .field select, .field textarea { color: #111; font-weight: 600; }
.field input::placeholder, .field textarea::placeholder { color: #555; opacity: 1; }

.section-title input {
  max-width: 280px;
}

.article-list {
  display: grid;
  gap: 16px;
}

.article-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.article-card img {
  height: 100%;
  min-height: 160px;
  object-fit: cover;
}

.article-card p,
.hero-card p,
.side-card p,
.story-article p {
  color: #3f3f3f;
  line-height: 1.65;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
}

.widget {
  padding: 18px;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-list button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf6ee;
  cursor: pointer;
  padding: 8px 12px;
}

.ticker, .card-body, .story-copy, .widget, .footer, .meta {
  font-family: "Noto Sans Telugu", "Noto Sans", sans-serif;
}

.mini-list {
  display: grid;
  gap: 14px;
}

.mini-list a {
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  padding-bottom: 12px;
}

.footer {
  background: #121212;
  color: #f9f5ef;
  padding: 32px 0;
}

.legacy-footer {
  display: none;
}

.site-footer {
  border-top: 4px solid #16a4d8;
  padding: 42px 0 0;
}

.site-footer .footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 48px;
  padding-bottom: 34px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer h2 {
  color: #fff;
  font-size: 30px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.footer-brand h2 {
  margin: 0;
}

.footer-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
}

.site-footer h3 {
  color: var(--gold);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.site-footer p {
  color: #cfc8c0;
  line-height: 1.7;
  margin: 0;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-links a,
.footer-contact a {
  color: #fff;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid #393939;
  color: #aaa39b;
  font-size: 13px;
  padding: 18px 0 20px;
}

.footer-bottom strong {
  color: #fff;
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.footer h2,
.footer h3,
.footer p {
  margin-top: 0;
}

.story-shell {
  padding: 34px 0 52px;
}

.story-article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.story-article img {
  max-height: 520px;
  object-fit: cover;
}

.story-copy {
  padding: min(6vw, 44px);
}

.story-copy p {
  font-size: 18px;
}

.story-bullets { margin: 24px 0; padding: 18px 22px 18px 28px; border-left: 4px solid #1557ad; border-radius: 8px; background: #f1f7ff; color: #111; font-size: 19px; line-height: 1.7; list-style: none; }
.story-bullets li { position: relative; margin: 7px 0; padding-left: 24px; font-weight: 600; }
.story-bullets li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 10px; border-radius: 50%; background: #1557ad; box-shadow: 0 0 0 3px rgba(21,87,173,.14); }
.story-bullets li:nth-child(2)::before { background: #f39c12; box-shadow: 0 0 0 3px rgba(243,156,18,.16); }
.story-bullets li:nth-child(3)::before { background: #13a36f; box-shadow: 0 0 0 3px rgba(19,163,111,.16); }
.story-bullets li:nth-child(4)::before { background: #d94c8a; box-shadow: 0 0 0 3px rgba(217,76,138,.16); }
.story-bullets li:nth-child(5)::before { background: #7b4bc4; box-shadow: 0 0 0 3px rgba(123,75,196,.16); }
.story-inline-ad { margin: 26px 0; }
.related-news { margin-top: 32px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.related-news > h2 { color: #1557ad; margin: 0 0 18px; }
.related-card { border-top: 1px solid var(--line); padding: 16px 0; }
.related-card a { display: flex; gap: 16px; color: inherit; }
.related-card img { width: 180px; height: 105px; object-fit: cover; border-radius: 8px; }
.related-card h3 { margin: 7px 0; color: #111; }
.related-card p { margin: 0; color: #334155; }
.story-inline-ad img { width: 100%; height: 150px; object-fit: fill; border-radius: 6px; box-shadow: 0 3px 12px rgba(15,55,110,.12); }
.story-inline-ad .ad-mobile-image { display: none; }

.skeleton {
  min-height: 240px;
  background: linear-gradient(100deg, #eee4d8 20%, #f9f2e9 40%, #eee4d8 60%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (max-width: 780px) {
  .topbar-inner,
  .masthead-inner,
  .section-title,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .lead-grid,
  .content-grid,
  .article-card {
    grid-template-columns: 1fr;
  }

  .hero-card img {
    height: 250px;
  }

  .article-card img {
    height: 210px;
  }

  .brand-logo {
    width: 126px;
    height: 78px;
  }

  .site-footer .footer-main {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .masthead-inner {
    min-height: 86px;
    justify-content: center;
  }

  .masthead-inner::after { display: none; }
  .masthead .brand { justify-content: center; width: 100%; gap: 10px; }
  .masthead .brand-logo { width: 112px; height: 72px; }
  .site-title-image { width: 210px; height: 70px; }

  .masthead .brand::after {
    font-size: 24px;
  }

  .menu-icon {
    display: block;
  }

  .topbar-inner { min-height: 38px; flex-direction: row; justify-content: center; gap: 8px; }
  .topbar .wrap { width: 100%; padding: 7px 14px; }
  .topbar { font-size: 12px; }
  .topbar-inner { line-height: 1.25; }
  .topbar-email { display: none; }
  .topbar #siteDate, .topbar #siteTime { display: none; }
  .topbar-subscribe { position: static; transform: none; padding: 4px 10px; font-size: 10px; }
  #siteTime { margin-left: auto; }
  .nav-shell { position: relative; }
  .menu-icon { order: 1; }
  .mobile-menu-ad { display: block; order: 2; flex: 1; min-width: 0; height: 34px; margin: 0 8px; overflow: hidden; border-radius: 4px; }
  .mobile-menu-ad img { width: 100%; height: 34px; object-fit: fill; }
  .nav-row { order: 3; }
  .search-icon { order: 4; }
  .nav-row { display: none; position: absolute; left: 0; right: 0; top: 50px; z-index: 20; min-height: 0; max-height: 70vh; overflow-y: auto; background: var(--red-dark); flex-direction: column; align-items: stretch; padding: 6px 0; box-shadow: 0 8px 16px rgba(0,0,0,.25); }
  .nav-row.is-open { display: flex; }
  .nav-button { text-align: left; padding: 13px 18px; border-bottom: 1px solid rgba(255,255,255,.14); }
  .nav-button:first-child::before { display: none; }

  .ticker-inner { width: 100%; }
  .ticker span { font-size: 12px; padding-left: 12px; padding-right: 22px; }
  .ticker-viewport { height: 43px; }
  .ticker-track { font-size: 13px; line-height: 43px; animation-duration: 18s; }
  .ad-slot { margin-top: 14px; margin-bottom: 14px; }
  .ad-slot img { height: 100px; border-radius: 4px; }
  .ad-slot .ad-desktop-image { display: none; }
  .ad-slot .ad-mobile-image { display: block; }
  .story-inline-ad img { height: 100px; }
  .story-inline-ad .ad-desktop-image { display: none; }
  .story-inline-ad .ad-mobile-image { display: block; }

  .section-title input {
    max-width: none;
  }
}
