/* ============================================================
   DARPAN NEWS CMS — Main Stylesheet (English Version)
   Sky-blue + white + deep-navy newspaper aesthetic
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  --sky-50:  #f0f8ff;
  --sky-100: #e0f0fe;
  --sky-200: #bae0fd;
  --sky-300: #7dc8fa;
  --sky-400: #38adf1;
  --sky-500: #0e93de;
  --sky-600: #0274bc;
  --sky-700: #025d99;
  --sky-800: #064e80;
  --sky-900: #0a3d61;
  --navy:    #0a2540;
  --red:     #c0392b;
  --gold:    #d4a820;
  --white:   #ffffff;
  --off:     #f4f8fc;
  --ink:     #1a1a2e;
  --ink-lt:  #5a6a7e;
  --border:  #d0e4f0;

  --font-display: 'Playfair Display', serif;
  --font-body:    'Source Sans 3', sans-serif;

  --shadow-sm: 0 2px 10px rgba(2,116,188,.10);
  --shadow-md: 0 8px 28px rgba(2,116,188,.16);
  --shadow-lg: 0 20px 60px rgba(10,37,64,.22);

  --radius:    8px;
  --radius-lg: 14px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--off); color: var(--ink); line-height: 1.6; min-height: 100vh; }
a { color: var(--sky-600); text-decoration: none; transition: color .2s; }
a:hover { color: var(--sky-800); }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Breaking News Ticker ───────────────────────────────────── */
.ticker-wrap {
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  height: 36px;
  overflow: hidden;
}
.ticker-label {
  background: var(--navy);
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: .72rem;
  white-space: nowrap;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.ticker-inner { flex: 1; overflow: hidden; }
.ticker-track {
  display: flex;
  gap: 60px;
  animation: ticker 32s linear infinite;
  white-space: nowrap;
}
.ticker-item { font-size: .8rem; }
.ticker-item a { color: #fff; }
.ticker-sep { opacity: .5; padding: 0 4px; }
@keyframes ticker {
  from { transform: translateX(100%); }
  to   { transform: translateX(-100%); }
}

/* ── Masthead ───────────────────────────────────────────────── */
.masthead {
  background: linear-gradient(160deg, var(--sky-900) 0%, var(--navy) 100%);
  color: #fff;
  padding: 18px 0 0;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-lg);
}
.masthead-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding-bottom: 14px;
}
.masthead-meta {
  font-size: .74rem;
  color: var(--sky-200);
  line-height: 1.7;
}
.meta-date { display: block; font-weight: 600; }
.meta-edition { display: block; font-size: .66rem; opacity: .7; letter-spacing: .5px; }
.masthead-brand { text-align: center; }
.brand-main {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.5vw, 4.8rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #fff 40%, var(--sky-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(.75rem, 1.5vw, 1rem);
  letter-spacing: 2px;
  color: var(--sky-300);
  margin-top: 2px;
}
.brand-sub {
  font-size: .66rem;
  color: rgba(255,255,255,.45);
  letter-spacing: 1.5px;
  margin-top: 3px;
  text-transform: uppercase;
}
.price-badge, .edition-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 3px;
  margin: 2px;
}
.price-badge  { background: var(--gold); color: var(--navy); }
.edition-badge { background: rgba(255,255,255,.1); color: var(--sky-200); border: 1px solid rgba(255,255,255,.2); }
.masthead-rule { border-top: 3px solid var(--sky-500); margin: 0 -24px; }

/* ── Site Nav ───────────────────────────────────────────────── */
.site-nav {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav a {
  color: rgba(255,255,255,.65);
  padding: 11px 18px;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all .2s;
  letter-spacing: .3px;
}
.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  border-bottom-color: var(--gold);
  background: rgba(255,255,255,.06);
}

/* ── Edition Hero ───────────────────────────────────────────── */
.edition-hero {
  background: linear-gradient(180deg, var(--sky-700) 0%, var(--sky-500) 100%);
  color: #fff;
  padding: 38px 0 28px;
  text-align: center;
}
.edition-hero.small { padding: 24px 0 18px; }
.edition-eyebrow {
  font-size: .7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--sky-200);
  margin-bottom: 8px;
}
.edition-eyebrow a { color: var(--sky-200); }
.edition-eyebrow a:hover { color: #fff; }
.edition-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  letter-spacing: 2px;
  color: #fff;
  font-weight: 700;
}
.edition-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}
.edition-rule span { height: 2px; width: 60px; background: var(--gold); opacity: .8; }
.edition-rule .diamond { color: var(--gold); }

/* ── Pages Section ──────────────────────────────────────────── */
.pages-section { padding: 44px 0 60px; }
.pages-intro {
  font-size: .85rem;
  color: var(--ink-lt);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* ── Pages Grid ─────────────────────────────────────────────── */
.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 22px;
}
.page-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all .25s ease;
  overflow: hidden;
}
.page-card:hover {
  transform: translateY(-7px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: var(--sky-400);
}
.page-card-inner { height: 100%; display: flex; flex-direction: column; }
.page-thumb-wrap {
  position: relative;
  overflow: hidden;
  background: var(--sky-50);
  aspect-ratio: 3/4;
}
.page-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.page-card:hover .page-thumb { transform: scale(1.04); }
.page-pdf-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pdf-icon { max-width: 90px; }
.page-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2,116,188,.78);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s;
}
.page-card:hover .page-hover-overlay { opacity: 1; }
.overlay-btn {
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .5px;
}
.overlay-btn svg { width: 28px; height: 28px; }
.page-card-footer {
  padding: 10px 14px;
  background: var(--sky-50);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-num  { font-size: .82rem; color: var(--ink-lt); flex: 1; font-weight: 500; }
.page-badge {
  background: var(--sky-600);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 3px;
  letter-spacing: .5px;
}
.page-dl { color: var(--sky-600); font-size: 1rem; padding: 0 4px; }

/* ── No Edition ─────────────────────────────────────────────── */
.no-edition {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-lt);
}
.no-edition-icon { font-size: 4rem; margin-bottom: 20px; }
.no-edition p { font-size: 1.05rem; line-height: 1.8; }
.btn-primary-link {
  display: inline-block;
  margin-top: 20px;
  background: var(--sky-600);
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background .2s;
}
.btn-primary-link:hover { background: var(--sky-800); color: #fff; }

.edition-footer-cta {
  margin-top: 32px;
  text-align: center;
  color: var(--ink-lt);
  font-size: .88rem;
}

/* ── Archive Teaser Strip ───────────────────────────────────── */
.gallery-teaser {
  background: var(--sky-50);
  border-top: 3px solid var(--sky-200);
  padding: 48px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}
.section-head h2 { font-family: var(--font-display); font-size: 1.55rem; color: var(--sky-900); }
.view-all-btn {
  font-size: .82rem;
  color: var(--sky-600);
  font-weight: 600;
  border: 1px solid var(--sky-400);
  padding: 6px 16px;
  border-radius: 20px;
  transition: all .2s;
}
.view-all-btn:hover { background: var(--sky-600); color: #fff; border-color: var(--sky-600); }
.archive-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.archive-card {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .22s;
  color: var(--ink);
  text-align: center;
}
.archive-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--sky-400);
  color: var(--ink);
}
.archive-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.arc-no-img {
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: var(--sky-50);
}
.arc-date {
  padding: 8px 6px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--sky-700);
  border-top: 1px solid var(--border);
}

/* ── Gallery Page ───────────────────────────────────────────── */
.gallery-hero {
  background: linear-gradient(135deg, var(--sky-800), var(--sky-500));
  color: #fff;
  padding: 40px 0 28px;
  text-align: center;
}
.gallery-hero h1 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 8px; letter-spacing: 1px; }
.gallery-hero p  { color: var(--sky-200); font-size: .9rem; }
.gallery-main { padding: 44px 0 64px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}
.gallery-card {
  display: block;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .25s;
  color: var(--ink);
}
.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--sky-400);
  color: var(--ink);
}
.gallery-thumb {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--sky-50);
  overflow: hidden;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-card:hover .gallery-thumb img { transform: scale(1.05); }
.gallery-no-img {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; font-size: 2.4rem; color: var(--ink-lt);
}
.gallery-date-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--red);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 14px;
  letter-spacing: .3px;
}
.gallery-card-body { padding: 12px 14px; border-top: 1px solid var(--border); }
.gallery-date-main  { font-size: .9rem; font-weight: 700; color: var(--sky-900); margin-bottom: 3px; }
.gallery-date-day   { font-size: .72rem; color: var(--ink-lt); margin-bottom: 6px; }
.gallery-pages-count { font-size: .75rem; color: var(--sky-600); font-weight: 600; }
.gallery-pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.pag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--sky-700);
  background: #fff;
  transition: all .2s;
}
.pag-btn:hover,
.pag-btn.active { background: var(--sky-600); color: #fff; border-color: var(--sky-600); }

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,37,64,.97);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.lightbox-overlay.open { opacity: 1; pointer-events: all; }
.lightbox-header {
  background: rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  flex-shrink: 0;
}
.lb-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--sky-300);
  font-weight: 900;
  letter-spacing: 2px;
}
.lb-title { color: #fff; font-size: .88rem; flex: 1; }
.lb-controls { display: flex; gap: 8px; align-items: center; }
.lb-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: .75rem;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.lb-btn:hover { background: var(--sky-600); border-color: var(--sky-600); color: #fff; }
.lb-close {
  background: var(--red);
  border: none;
  color: #fff;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s;
}
.lb-close:hover { background: #922b21; }
.lightbox-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}
.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.lb-pdf { width: 100%; height: 100%; border: none; border-radius: 4px; }
.lightbox-footer {
  background: rgba(0,0,0,.4);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 10px 18px;
  flex-shrink: 0;
}
.lb-thumbnails {
  display: flex;
  gap: 8px;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--sky-600) transparent;
}
.lb-thumb-item {
  width: 50px; height: 66px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  background: rgba(255,255,255,.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: .58rem;
  color: rgba(255,255,255,.6);
  transition: border-color .2s;
  gap: 2px;
  padding: 4px;
}
.lb-thumb-item.active { border-color: var(--gold); }
.lb-thumb-item:hover { border-color: var(--sky-400); }
.lb-thumb-item img { width: 100%; height: 100%; object-fit: cover; }

/* ── Site Footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: var(--sky-200);
  padding: 48px 0 20px;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 3px;
  margin-bottom: 10px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 16px;
}
.footer-grid h5 {
  color: #fff;
  font-size: .78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid ul li a { color: var(--sky-200); font-size: .84rem; }
.footer-grid ul li a:hover { color: #fff; }
.footer-grid p { font-size: .82rem; line-height: 1.9; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: rgba(255,255,255,.35);
}

/* ── Utilities ──────────────────────────────────────────────── */
.text-end   { text-align: right; }
.text-muted { color: var(--ink-lt); }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.small { font-size: .82rem; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .masthead-inner { grid-template-columns: 1fr auto; }
  .masthead-meta:last-child { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
  .brand-main { font-size: 2.8rem; }
  .pages-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .archive-strip { grid-template-columns: repeat(3, 1fr); }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .lb-controls { gap: 4px; }
  .lb-btn { padding: 5px 10px; font-size: .72rem; }
}
@media (max-width: 480px) {
  .pages-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .archive-strip { grid-template-columns: repeat(2, 1fr); }
}
