/* ================================================
   Andhra Pravasi — Custom Styles
   andhrapravasi.online
   ================================================ */

/* --- Google Fonts --- */

/* ================================================
   CSS CUSTOM PROPERTIES
   ================================================ */
:root {
  --clr-navy:          #0a1628;
  --clr-navy-800:      #0f2040;
  --clr-red:           #e31c25;
  --clr-gold:          #f59e0b;
  --clr-bg:            #f1f5f9;
  --clr-card:          #ffffff;
  --clr-text:          #0f172a;
  --clr-text-muted:    #64748b;
  --clr-border:        #e2e8f0;
  --clr-politics:      #1d4ed8;
  --clr-sports:        #16a34a;
  --clr-business:      #0d9488;
  --clr-tech:          #7c3aed;
  --clr-entertainment: #db2777;
  --clr-health:        #ea580c;
  --clr-opinion:       #92400e;
}

.dark {
  --clr-bg:          #0f172a;
  --clr-card:        #1e293b;
  --clr-text:        #f1f5f9;
  --clr-text-muted:  #94a3b8;
  --clr-border:      #334155;
}

/* ================================================
   BASE
   ================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--clr-bg);
  color: var(--clr-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body, header, nav, footer, .t-transition, a, button, input {
  transition: background-color 0.25s ease, border-color 0.2s ease, color 0.15s ease;
}
img { transition: transform 0.45s ease; }

.font-headline { font-family: 'Playfair Display', Georgia, serif; }

/* ================================================
   TICKER / MARQUEE
   ================================================ */
@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-wrap { overflow: hidden; position: relative; flex: 1; min-width: 0; }
.ticker-inner {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee-scroll 38s linear infinite;
  will-change: transform;
}
.ticker-wrap:hover .ticker-inner { animation-play-state: paused; }

/* Utility bar guard: keep marquee from visually colliding with LIVE badge. */
#utility-bar .ticker-wrap { min-width: 0; }
#utility-bar .ticker-wrap.flex .badge-breaking,
#utility-bar .ticker-wrap.flex .badge-live {
  position: relative;
  z-index: 2;
}
#utility-bar .ticker-wrap.flex .ticker-inner {
  position: relative;
  z-index: 1;
  padding-left: 0.2rem;
}

@keyframes pulse-anim {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}
.badge-live, .badge-breaking { animation: pulse-anim 1.4s ease-in-out infinite; }

/* ================================================
   STICKY HEADER
   ================================================ */
#main-header {
  position: sticky; top: 0; z-index: 100;
  transition: transform 0.35s ease, box-shadow 0.3s ease;
}
#main-header.header-scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.10); }
#main-header.header-hidden   { transform: translateY(-100%); }

/* ================================================
   NEWS CARDS
   ================================================ */
.news-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 16px 42px rgba(0,0,0,0.13); }
.dark .news-card:hover { box-shadow: 0 16px 42px rgba(0,0,0,0.45); }

.img-wrap { overflow: hidden; }
.img-wrap img { width:100%; height:100%; object-fit:cover; display:block; }
.news-card:hover .img-wrap img { transform: scale(1.07); }

.hero-card { transition: box-shadow 0.4s ease; }
.hero-card:hover { box-shadow: 0 20px 60px rgba(0,0,0,0.28); }
.hero-card:hover .img-wrap img { transform: scale(1.04); }

/* ================================================
   SECTION LABELS
   ================================================ */
.section-label {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--clr-text); line-height: 1.2;
}
.section-label::before {
  content: '';
  display: block; width: 5px; min-height: 26px; align-self: stretch;
  border-radius: 3px; background: var(--clr-red); flex-shrink: 0;
}
.section-label.politics::before    { background: var(--clr-politics);      }
.section-label.sports::before      { background: var(--clr-sports);        }
.section-label.business::before    { background: var(--clr-business);      }
.section-label.tech::before        { background: var(--clr-tech);          }
.section-label.entertainment::before { background: var(--clr-entertainment); }
.section-label.opinion::before     { background: var(--clr-opinion);       }
.dark .section-label { color: #f1f5f9; }

/* ================================================
   CATEGORY BADGES
   ================================================ */
.cat-badge {
  display: inline-block; padding: 2px 8px; border-radius: 2px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; background: var(--clr-red); color: #fff;
  line-height: 1.7; white-space: nowrap;
}
.cat-badge.politics      { background: var(--clr-politics);      }
.cat-badge.sports        { background: var(--clr-sports);        }
.cat-badge.business      { background: var(--clr-business);      }
.cat-badge.tech          { background: var(--clr-tech);          }
.cat-badge.entertainment { background: var(--clr-entertainment); }
.cat-badge.health        { background: var(--clr-health);        }
.cat-badge.opinion       { background: var(--clr-opinion);       }
.cat-badge.live          { background: var(--clr-red); animation: pulse-anim 1s ease-in-out infinite; }

/* ================================================
   MOBILE MENU OVERLAY
   ================================================ */
#mobile-menu {
  position: fixed; inset: 0; z-index: 300;
  background: var(--clr-navy);
  transform: translateX(-100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden; display: flex; flex-direction: column;
}
#mobile-menu .mob-nav-scroll {
  flex: 1 1 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#mobile-menu.is-open { transform: translateX(0); }

.mob-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,0.07);
  color: #cbd5e1; font-size: 1rem; font-weight: 500;
  transition: color 0.2s, background 0.2s; text-decoration: none;
}
.mob-nav-link:hover { color: #fff; background: rgba(255,255,255,0.06); }

/* ================================================
   HERO OVERLAY
   ================================================ */
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.93) 0%,
    rgba(0,0,0,0.50) 38%,
    rgba(0,0,0,0.04) 100%
  );
}

/* ================================================
   VIDEO PLAY BUTTON
   ================================================ */
.play-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease, background 0.2s ease;
}
.play-btn svg { margin-left: 3px; }
.news-card:hover .play-btn { transform: translate(-50%,-50%) scale(1.14); background: #fff; }

/* ================================================
   PHOTO GALLERY
   ================================================ */
.photo-item { position: relative; overflow: hidden; border-radius: 12px; }
.photo-item img { width:100%; height:100%; object-fit:cover; transition:transform 0.5s ease; }
.photo-item:hover img { transform: scale(1.08); }
.photo-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: #fff; font-size: 0.7rem; line-height: 1.4;
  transform: translateY(100%); transition: transform 0.3s ease;
}
.photo-item:hover .photo-caption { transform: translateY(0); }

/* ================================================
   HORIZONTAL SCROLL STRIP
   ================================================ */
.scroll-strip {
  display: flex; gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; padding-bottom: 4px;
}
.scroll-strip::-webkit-scrollbar { height: 3px; }
.scroll-strip::-webkit-scrollbar-track { background: rgba(255,255,255,0.08); }
.scroll-strip::-webkit-scrollbar-thumb { background: var(--clr-red); border-radius: 2px; }
.scroll-strip > * { scroll-snap-align: start; flex-shrink: 0; }

/* ================================================
   OPINION CARD
   ================================================ */
.opinion-card {
  border-top: 4px solid var(--clr-opinion);
  background: var(--clr-card); border-radius: 14px; padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.opinion-card:hover { transform: translateY(-4px); box-shadow: 0 16px 44px rgba(0,0,0,0.11); }

/* ================================================
   LANGUAGE BUTTONS
   ================================================ */
.lang-btn { transition: background 0.2s ease, color 0.2s ease; }
.lang-btn.active-lang { background: var(--clr-red); color: #fff; border-radius: 999px; }

/* ================================================
   SEARCH BAR
   ================================================ */
#search-bar { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
#search-bar.is-open { max-height: 72px; }

/* ================================================
   LIVE DOT
   ================================================ */
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--clr-red); animation: pulse-anim 0.9s ease-in-out infinite;
}

/* ================================================
   TRENDING NUMBER
   ================================================ */
.trend-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 800;
  color: #e2e8f0; line-height: 1; flex-shrink: 0; min-width: 36px;
}
.dark .trend-num { color: #334155; }

/* ================================================
   MARKET ROWS
   ================================================ */
.market-row {
  padding: 10px 0; border-bottom: 1px solid var(--clr-border);
  display: flex; justify-content: space-between; align-items: center;
}
.market-row:last-child { border-bottom: none; }

/* ================================================
   NEWSLETTER INPUT
   ================================================ */
.newsletter-input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff; border-radius: 10px; padding: 12px 18px;
  font-size: 0.9rem; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-input:focus {
  outline: none; border-color: var(--clr-red);
  box-shadow: 0 0 0 3px rgba(227,28,37,0.28);
}

/* ================================================
   AD SLOT
   ================================================ */
.ad-slot {
  background: repeating-linear-gradient(-45deg, #f8fafc, #f8fafc 6px, #f1f5f9 6px, #f1f5f9 12px);
  border: 2px dashed #cbd5e1; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.dark .ad-slot {
  background: repeating-linear-gradient(-45deg, #1e293b, #1e293b 6px, #1a2540 6px, #1a2540 12px);
  border-color: #334155; color: #475569;
}

/* ================================================
   ARROW HOVER LINK
   ================================================ */
.arrow-link { display: inline-flex; align-items: center; gap: 4px; transition: gap 0.2s ease; text-decoration: none; }
.arrow-link:hover { gap: 8px; }

/* ================================================
   NAV LINK
   ================================================ */
.nav-link { position: relative; transition: color 0.2s; text-decoration: none; }
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 16px; right: 16px;
  height: 3px; border-radius: 2px 2px 0 0; background: var(--clr-red);
  transform: scaleX(0); transition: transform 0.25s ease;
}
.nav-link:hover::after { transform: scaleX(1); }

/* ================================================
   SCROLLBAR
   ================================================ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }

/* ================================================
   UTILITIES
   ================================================ */
.line-clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.line-clamp-3 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.line-clamp-4 { display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
a, button { -webkit-tap-highlight-color: transparent; }

/* ================================================
   PREFERS-REDUCED-MOTION (Accessibility)
   ================================================ */
@media (prefers-reduced-motion: reduce) {
  .ticker-inner { animation: none; }
  .badge-live, .badge-breaking, .live-dot, .cat-badge.live { animation: none; }
  .news-card, .news-card:hover { transform: none; transition: none; }
  .news-card:hover .img-wrap img { transform: none; }
  .hero-card:hover img { transform: none; }
  .photo-item:hover img { transform: none; }
  img { transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================================================
   FONT SIZE CONTROL (Article reading experience)
   ================================================ */
:root { --ap-prose-size: 1.0625rem; }
.article-prose p,
.article-prose ul li,
.article-prose ol li { font-size: var(--ap-prose-size); }
.prose-sm { --ap-prose-size: 0.9rem; }
.prose-md { --ap-prose-size: 1.0625rem; }
.prose-lg { --ap-prose-size: 1.2rem; }
.prose-xl { --ap-prose-size: 1.35rem; }

/* Font-size control toolbar */
.reading-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.rt-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px; font-size: 0.78rem; font-weight: 600;
  border: 1.5px solid var(--clr-border); color: var(--clr-text-muted);
  background: transparent; cursor: pointer; transition: all 0.2s; line-height: 1;
  white-space: nowrap;
}
.rt-btn:hover { border-color: var(--clr-red); color: var(--clr-red); }
.rt-btn.active { background: var(--clr-navy); color: #fff; border-color: var(--clr-navy); }
.rt-btn.listening { background: var(--clr-red); color: #fff; border-color: var(--clr-red); }

/* ================================================
   EMOJI REACTIONS
   ================================================ */
.reactions-section {
  border-top: 2px solid var(--clr-border);
  border-bottom: 2px solid var(--clr-border);
  padding: 20px 0;
  margin: 2rem 0;
}
.reaction-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  border: 1.5px solid var(--clr-border); background: transparent;
  color: var(--clr-text-muted); cursor: pointer; transition: all 0.2s;
  user-select: none;
}
.reaction-btn:hover { border-color: var(--clr-red); color: var(--clr-red); transform: scale(1.05); }
.reaction-btn.reacted {
  background: var(--clr-red); color: #fff; border-color: var(--clr-red);
  transform: scale(1.05);
}
.reaction-emoji { font-size: 1.1rem; line-height: 1; }
.reaction-count { font-variant-numeric: tabular-nums; }

/* ================================================
   SKIP LINK (Accessibility)
   ================================================ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
.skip-link {
  position: absolute; top: -100px; left: 8px; z-index: 9999;
  background: var(--clr-red); color: #fff; padding: 10px 20px; border-radius: 8px;
  font-weight: 700; font-size: 0.9rem; text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 8px; outline: 3px solid #fff; outline-offset: 2px; }

/* ================================================
   ARTICLE PAGE STYLES
   ================================================ */
#progress-bar {
  position: fixed; top: 0; left: 0;
  height: 3px; background: var(--clr-red);
  z-index: 9999; width: 0%; border-radius: 0 2px 2px 0;
}
.article-prose p {
  font-size: var(--ap-prose-size, 1.0625rem); line-height: 1.85;
  color: var(--clr-text); margin-bottom: 1.5rem;
}
.dark .article-prose p { color: #e2e8f0; }
.article-prose h2 {
  font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700;
  color: var(--clr-text); margin-top: 2.4rem; margin-bottom: 0.8rem; line-height: 1.25;
}
.dark .article-prose h2 { color: #f1f5f9; }
.article-prose h3 {
  font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 600;
  color: var(--clr-text); margin-top: 1.8rem; margin-bottom: 0.5rem;
}
.dark .article-prose h3 { color: #f1f5f9; }
.article-prose blockquote {
  border-left: 4px solid var(--clr-red); margin: 2rem 0; padding: 0.5rem 0 0.5rem 1.5rem;
  font-family: 'Playfair Display', serif; font-size: 1.2rem; font-style: italic;
  color: #334155; line-height: 1.55;
}
.dark .article-prose blockquote { color: #94a3b8; }
.article-prose figure { margin: 2.5rem 0; }
.article-prose figure img { width: 100%; border-radius: 14px; }
.article-prose figure figcaption {
  margin-top: 0.6rem; font-size: 0.8rem; color: var(--clr-text-muted);
  text-align: center; font-style: italic; line-height: 1.5;
}
.article-prose a { color: var(--clr-red); text-decoration: underline; text-underline-offset: 2px; }
.article-prose ul, .article-prose ol { margin: 0.75rem 0 1.5rem 1.5rem; line-height: 1.85; }
.article-prose ul li { list-style: disc; margin-bottom: 0.35rem; }
.article-prose ol li { list-style: decimal; margin-bottom: 0.35rem; }
.dark .article-prose ul li, .dark .article-prose ol li { color: #e2e8f0; }

.key-points {
  background: #eff6ff; border-left: 5px solid var(--clr-politics);
  border-radius: 0 14px 14px 0; padding: 20px 24px; margin-bottom: 2rem;
}
.dark .key-points { background: #1e2d4a; border-left-color: #3b82f6; }
.key-points .kp-title {
  font-family: 'Playfair Display', serif; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--clr-politics); margin-bottom: 10px;
}
.dark .key-points .kp-title { color: #60a5fa; }
.key-points ul { margin: 0; padding: 0; list-style: none; }
.key-points ul li {
  font-size: 0.875rem; color: var(--clr-text); line-height: 1.55;
  padding: 4px 0 4px 20px; position: relative;
}
.key-points ul li::before { content: '\2192'; position: absolute; left: 0; color: var(--clr-politics); font-weight: 700; }
.dark .key-points ul li { color: #cbd5e1; }
.dark .key-points ul li::before { color: #60a5fa; }

.share-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.share-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s; cursor: pointer; border: none;
}
.share-btn:hover { transform: scale(1.1); }

.tag-pill {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; background: #f1f5f9; color: #475569;
  transition: background 0.2s, color 0.2s; text-decoration: none;
}
.tag-pill:hover { background: var(--clr-navy); color: #fff; }
.dark .tag-pill { background: #334155; color: #cbd5e1; }
.dark .tag-pill:hover { background: var(--clr-red); color: #fff; }

.sidebar-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.sidebar-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.10); }
