/*
Theme Name:  AllAngle
Theme URI:   https://yoursite.com
Description: A minimalist Indian news aggregator theme — Left, Center, and Right perspectives. Designed for WP RSS Aggregator with clean, non-intrusive ad zones built in.
Author:      Your Name
Version:     2.0.0
License:     GNU General Public License v2 or later
Text Domain: allangle
*/

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ff-sans:   'DM Sans', sans-serif;
  --ff-serif:  'DM Serif Display', serif;

  --c-bg:        #f9f9f7;
  --c-surface:   #ffffff;
  --c-border:    rgba(0,0,0,0.08);
  --c-text:      #111110;
  --c-muted:     #6b6b67;
  --c-faint:     #e8e8e4;

  --c-left:      #1a56db;
  --c-left-bg:   #eff4ff;
  --c-center:    #057a55;
  --c-center-bg: #ecfdf3;
  --c-right:     #c27803;
  --c-right-bg:  #fffbeb;
  --c-accent:    #e34c26;

  /* Ad zones — subtle, warm off-white so they read as distinct without jarring */
  --c-ad-bg:     #f2f1ed;
  --c-ad-border: rgba(0,0,0,0.10);
  --c-ad-text:   #8a8a86;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --max-w:      1100px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--ff-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { cursor: pointer; font-family: var(--ff-sans); }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.3px; }
.serif { font-family: var(--ff-serif); font-weight: 400; }

/* =============================================
   LAYOUT HELPERS
   ============================================= */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: var(--c-border);
}

.divider { height: 0.5px; background: var(--c-border); margin: 56px 0; }

/* =============================================
   AD ZONES — Core Styles
   All 5 ad zones share this base.
   They sit in generous whitespace so they
   breathe alongside content, not fight it.
   ============================================= */

/* Wrapper that adds consistent rhythm around every ad */
.ad-zone {
  margin: 40px 0;
  position: relative;
}

/* The tiny "Advertisement" label above every unit */
.ad-zone__label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-ad-text);
  text-align: center;
  margin-bottom: 6px;
}

/* Shared visual shell — used for placeholder styling */
.ad-zone__shell {
  background: var(--c-ad-bg);
  border: 0.5px solid var(--c-ad-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Zone 1: Leaderboard ─────────────────────────
   Sits just below the sticky nav, full width.
   52px height — barely there on desktop.
   On mobile collapses to a 50px anchor unit.  */
.ad-zone--leaderboard {
  margin: 0;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--c-border);
  background: var(--c-bg);
}
.ad-zone--leaderboard .ad-zone__shell {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 52px;
  border-radius: 0;
  border: none;
  background: transparent;
}
/* AdSense / ad network code drops directly inside .ad-zone__shell */

/* ── Zone 2: In-Feed Native ──────────────────────
   Styled to match the news card grid.
   "Sponsored" label replaces the category label.
   Full card width in the news grid column.       */
.ad-zone--infeed {
  margin: 0; /* handled by grid gap */
}
.ad-infeed-card {
  background: var(--c-surface);
  border: 0.5px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.ad-infeed-card__sponsored {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ad-text);
  margin-bottom: 10px;
}
.ad-infeed-card__content {
  /* AdSense native ad or manual sponsor content goes here */
  min-height: 80px;
}

/* ── Zone 3: Mid-Feed Rectangle ─────────────────
   Sits between story rows. 300×250 standard unit.
   Centered with generous breathing room.          */
.ad-zone--rectangle {
  text-align: center;
}
.ad-zone--rectangle .ad-zone__shell {
  width: 300px;
  height: 250px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
}

/* ── Zone 4: Mid-Article ─────────────────────────
   Inside single.php, injected after paragraph 3.
   Responsive: 320×50 on mobile, 728×90 desktop.  */
.ad-zone--mid-article {
  margin: 32px 0;
}
.ad-zone--mid-article .ad-zone__shell {
  height: 90px;
  border-radius: var(--radius-md);
}
@media (max-width: 640px) {
  .ad-zone--mid-article .ad-zone__shell { height: 50px; }
}

/* ── Zone 5: Pre-Footer Newsletter / Sponsor ─────
   Dark full-width CTA. Can be used as a
   house ad (free newsletter) or a premium
   sponsor takeover. Not an AdSense unit.          */
.ad-zone--prefooter {
  margin: 0;
  padding: 0;
}
.prefooter-cta {
  background: var(--c-text);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.prefooter-cta__copy h3 {
  font-family: var(--ff-serif);
  font-size: 22px;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 6px;
}
.prefooter-cta__copy p {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
}
.prefooter-cta__form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.prefooter-cta__input {
  background: rgba(255,255,255,0.1);
  border: 0.5px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 9px 18px;
  font-family: var(--ff-sans);
  font-size: 13px;
  color: #fff;
  width: 220px;
  outline: none;
  transition: border-color 0.15s;
}
.prefooter-cta__input::placeholder { color: rgba(255,255,255,0.35); }
.prefooter-cta__input:focus { border-color: rgba(255,255,255,0.5); }
.prefooter-cta__btn {
  background: #fff;
  color: var(--c-text);
  border: none;
  font-family: var(--ff-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 20px;
  transition: opacity 0.15s;
}
.prefooter-cta__btn:hover { opacity: 0.85; }

/* =============================================
   NAVIGATION
   ============================================= */
#site-header {
  background: rgba(249,249,247,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 200;
  height: 60px;
}
#site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo { display: flex; align-items: baseline; gap: 5px; flex-shrink: 0; }
.site-logo a { font-family: var(--ff-serif); font-size: 24px; letter-spacing: -0.5px; color: var(--c-text); }
.logo-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); margin-bottom: 3px; }

#primary-nav { display: flex; gap: 2px; }
#primary-nav a {
  font-size: 13px; font-weight: 400; color: var(--c-muted);
  padding: 6px 13px; border-radius: 20px;
  transition: color 0.15s, background 0.15s;
}
#primary-nav a:hover,
#primary-nav a.current-menu-item { color: var(--c-text); background: var(--c-faint); font-weight: 500; }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-icon {
  background: none; border: none; color: var(--c-muted); padding: 7px;
  border-radius: var(--radius-sm); display: flex; align-items: center;
  transition: color 0.15s, background 0.15s; font-size: 18px;
}
.btn-icon:hover { color: var(--c-text); background: var(--c-faint); }
.btn-subscribe {
  background: var(--c-text); color: #fff; border: none;
  font-size: 13px; font-weight: 500; padding: 7px 18px; border-radius: 20px;
  transition: opacity 0.15s;
}
.btn-subscribe:hover { opacity: 0.78; }
.nav-toggle { display: none; background: none; border: none; color: var(--c-text); font-size: 22px; padding: 4px; }

#mobile-nav { display: none; flex-direction: column; gap: 4px; padding: 16px 24px; border-bottom: 0.5px solid var(--c-border); background: var(--c-surface); }
#mobile-nav.open { display: flex; }
#mobile-nav a { font-size: 15px; color: var(--c-text); padding: 10px 0; border-bottom: 0.5px solid var(--c-border); }
#mobile-nav a:last-child { border-bottom: none; }

/* =============================================
   HERO
   ============================================= */
.site-hero { text-align: center; padding: 64px 24px 48px; }
.site-hero h1 { font-family: var(--ff-serif); font-size: clamp(32px,5vw,48px); font-weight: 400; letter-spacing: -1px; line-height: 1.15; margin-bottom: 14px; }
.site-hero p { font-size: 15px; color: var(--c-muted); font-weight: 300; max-width: 460px; margin: 0 auto 28px; }
.bias-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; }
.bias-pill { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--c-muted); }
.bias-dot { width: 8px; height: 8px; border-radius: 50%; }

/* =============================================
   FEATURED STORY
   ============================================= */
.featured-story { margin-bottom: 64px; }
.story-headline { font-family: var(--ff-serif); font-size: clamp(22px,3vw,30px); font-weight: 400; letter-spacing: -0.5px; line-height: 1.25; margin-bottom: 10px; }
.story-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.story-category { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); }
.story-time { font-size: 12px; color: var(--c-muted); font-weight: 300; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--c-muted); }
.coverage-bar { display: flex; gap: 3px; height: 3px; border-radius: 4px; overflow: hidden; margin-bottom: 22px; }
.coverage-bar span { height: 100%; border-radius: 2px; }
.bar-left { background: var(--c-left); opacity: 0.7; }
.bar-center { background: var(--c-center); opacity: 0.7; }
.bar-right { background: var(--c-right); opacity: 0.7; }

/* =============================================
   PERSPECTIVE CARDS
   ============================================= */
.perspectives-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.perspective-card { background: var(--c-surface); border: 0.5px solid var(--c-border); border-radius: var(--radius-lg); padding: 20px; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.perspective-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.07); }
.persp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.persp-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 9px; border-radius: 20px; }
.label-left   { background: var(--c-left-bg);   color: var(--c-left); }
.label-center { background: var(--c-center-bg); color: var(--c-center); }
.label-right  { background: var(--c-right-bg);  color: var(--c-right); }
.persp-source { font-size: 11px; color: var(--c-muted); }
.persp-title { font-size: 14px; font-weight: 500; line-height: 1.45; margin-bottom: 10px; color: var(--c-text); }
.persp-summary { font-size: 13px; color: var(--c-muted); line-height: 1.6; font-weight: 300; }
.persp-read { margin-top: 16px; font-size: 12px; font-weight: 500; color: var(--c-muted); display: flex; align-items: center; gap: 4px; transition: color 0.15s; }
.persp-read:hover { color: var(--c-text); }

/* =============================================
   BLINDSPOT BANNER
   ============================================= */
.blindspot-banner { background: var(--c-surface); border: 0.5px solid var(--c-border); border-left: 3px solid var(--c-accent); border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 64px; display: flex; align-items: flex-start; gap: 14px; }
.blindspot-icon { width: 34px; height: 34px; border-radius: 10px; background: #fff3f0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; color: var(--c-accent); }
.blindspot-content h4 { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 4px; }
.blindspot-content p { font-size: 14px; line-height: 1.5; margin-bottom: 4px; }
.blindspot-content span { font-size: 12px; color: var(--c-muted); }

/* =============================================
   NEWS CARD GRID
   ============================================= */
.news-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-bottom: 40px; }
.news-card { background: var(--c-surface); border: 0.5px solid var(--c-border); border-radius: var(--radius-lg); padding: 22px; transition: transform 0.18s ease, box-shadow 0.18s ease; display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.07); }
.news-card-cat { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 10px; }
.news-card h3 { font-family: var(--ff-serif); font-size: 19px; font-weight: 400; line-height: 1.3; letter-spacing: -0.3px; margin-bottom: 10px; }
.news-card p { font-size: 13px; color: var(--c-muted); line-height: 1.6; font-weight: 300; flex: 1; }
.coverage-chips { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.chip { font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 20px; letter-spacing: 0.05em; text-transform: uppercase; }
.chip-left   { background: var(--c-left-bg);   color: var(--c-left); }
.chip-center { background: var(--c-center-bg); color: var(--c-center); }
.chip-right  { background: var(--c-right-bg);  color: var(--c-right); }

/* =============================================
   SINGLE POST
   ============================================= */
.single-hero { padding: 56px 0 40px; }
.single-hero .story-category { display: inline-block; margin-bottom: 16px; }
.single-hero h1 { font-family: var(--ff-serif); font-size: clamp(28px,4vw,42px); font-weight: 400; letter-spacing: -0.8px; line-height: 1.2; max-width: 780px; margin-bottom: 20px; }
.single-byline { font-size: 13px; color: var(--c-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.single-content { max-width: 700px; margin: 0 auto; padding: 40px 24px 80px; }
.single-content p { font-size: 17px; line-height: 1.75; margin-bottom: 24px; color: var(--c-text); }
.single-content h2 { font-family: var(--ff-serif); font-size: 26px; font-weight: 400; margin: 40px 0 16px; }
.single-content blockquote { border-left: 3px solid var(--c-faint); padding-left: 20px; margin: 32px 0; font-style: italic; color: var(--c-muted); font-size: 18px; line-height: 1.7; }

/* =============================================
   SIDEBAR
   ============================================= */
.content-with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.sidebar-widget { background: var(--c-surface); border: 0.5px solid var(--c-border); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 20px; }
.widget-title { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 16px; }

/* Sidebar ad zone — 300×250 sticky unit */
.sidebar-ad-zone { position: sticky; top: 80px; }
.sidebar-ad-zone .ad-zone__shell { width: 300px; height: 250px; border-radius: var(--radius-lg); margin-bottom: 16px; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 48px 0; }
.pagination a, .pagination span { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; border: 0.5px solid var(--c-border); background: var(--c-surface); color: var(--c-muted); transition: all 0.15s; }
.pagination a:hover { color: var(--c-text); border-color: var(--c-text); }
.pagination .current { background: var(--c-text); color: #fff; border-color: var(--c-text); }

/* =============================================
   FOOTER
   ============================================= */
#site-footer { border-top: 0.5px solid var(--c-border); padding: 48px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand p { font-size: 13px; color: var(--c-muted); line-height: 1.7; max-width: 240px; margin-top: 12px; font-weight: 300; }
.footer-col h5 { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 13px; color: var(--c-muted); transition: color 0.15s; }
.footer-col a:hover { color: var(--c-text); }
.footer-bottom { border-top: 0.5px solid var(--c-border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--c-muted); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
  .sidebar-ad-zone { position: static; }
  .sidebar-ad-zone .ad-zone__shell { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  #primary-nav { display: none; }
  .nav-toggle { display: flex; }
  .prefooter-cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .perspectives-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-hero { padding: 40px 16px 32px; }
  .btn-subscribe { display: none; }
  .ad-zone--rectangle .ad-zone__shell { width: 100%; }
  .prefooter-cta { padding: 24px 20px; }
}
