/*
Theme Name: AstroBlog Pro
Theme URI: https://yourdomain.com
Author: Your Name
Description: A clean, secure astrology blog theme with 9 planetary sections, slider, ads spaces, and consultation CTAs.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: astroblog-pro
*/

/* ============================================================
   CSS VARIABLES & RESET
   ============================================================ */
:root {
  --primary:     #1a1035;
  --accent:      #c9a84c;
  --accent-light:#f0d080;
  --bg:          #0d0b1e;
  --bg-card:     #1c1738;
  --bg-card2:    #221e40;
  --text:        #e8e0f0;
  --text-muted:  #9d91bb;
  --border:      rgba(201,168,76,0.25);
  --ads-bg:      #120f2a;
  --ads-border:  #2e2855;
  --radius:      10px;
  --shadow:      0 4px 24px rgba(0,0,0,0.45);
  --font-head:   'Cinzel', Georgia, serif;
  --font-body:   'Hind', 'Noto Sans Devanagari', sans-serif;
  --header-h:    64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); color: var(--accent); line-height: 1.3; }

/* ============================================================
   TOP HEADER BAR (CTA bar)
   ============================================================ */
.top-cta-bar {
  background: var(--primary);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}
.top-cta-bar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}
.cta-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.cta-btn:hover, .cta-btn.primary {
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
}

/* ============================================================
   MAIN HEADER
   ============================================================ */
.site-header {
  background: var(--primary);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 20px rgba(0,0,0,0.6);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 20px;
}

/* ADS space - right of header */
.header-ads {
  flex: 0 0 728px;
  max-width: 728px;
  height: 90px;
  background: var(--ads-bg);
  border: 1px dashed var(--ads-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  border-radius: 4px;
  overflow: hidden;
}

/* LOGO - right */
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.site-branding img.custom-logo {
  height: 48px;
  width: auto;
}
.site-title {
  font-family: var(--font-head);
  font-size: 22px;
  color: var(--accent);
  line-height: 1.1;
}
.site-tagline {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-nav-wrap {
  background: #120f2a;
  border-bottom: 1px solid var(--border);
}
.main-nav-wrap .container {
  display: flex;
  align-items: center;
}
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.main-nav ul li a {
  display: block;
  padding: 13px 18px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
  border-bottom: 3px solid transparent;
}
.main-nav ul li a:hover,
.main-nav ul li.current-menu-item > a {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(201,168,76,0.06);
}
/* Dropdown */
.main-nav ul li { position: relative; }
.main-nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--primary);
  min-width: 200px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  z-index: 999;
  flex-direction: column;
}
.main-nav ul li:hover > ul { display: flex; }
.main-nav ul li ul li a {
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  font-size: 12px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
  margin-left: auto;
}

/* ============================================================
   ADS BANNER (full width below nav)
   ============================================================ */
.ads-banner-section {
  background: var(--ads-bg);
  border-top: 1px solid var(--ads-border);
  border-bottom: 1px solid var(--ads-border);
  padding: 10px 0;
}
.ads-banner-inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--ads-border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 1px;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-fluid { width: 100%; padding: 0 20px; }

/* ============================================================
   SLIDER SECTION
   ============================================================ */
.latest-posts-slider {
  padding: 40px 0 30px;
  background: linear-gradient(180deg, #0d0b1e 0%, #1a1035 100%);
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-size: 24px;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.slider-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.slider-track {
  display: flex;
  transition: transform 0.5s ease;
}
.slide-card {
  flex: 0 0 100%;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 340px;
  background: var(--bg-card);
}
.slide-card img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  opacity: 0.6;
}
.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(0deg, rgba(13,11,30,0.95) 0%, transparent 100%);
}
.slide-cat {
  background: var(--accent);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 10px;
}
.slide-title { font-size: 22px; color: #fff; margin-bottom: 8px; }
.slide-meta  { font-size: 12px; color: var(--text-muted); }

.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}
.slider-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.slider-btn:hover { background: var(--accent); color: var(--primary); }
.slider-dots { display: flex; gap: 8px; }
.slider-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s;
}
.slider-dot.active { background: var(--accent); }

/* ============================================================
   PLANET SECTIONS
   ============================================================ */
.planet-section {
  padding: 50px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.planet-section:nth-child(odd) { background: var(--bg); }
.planet-section:nth-child(even) { background: #110e25; }

.planet-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.planet-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  border: 2px solid var(--accent);
  background: var(--bg-card);
}
.planet-name { font-size: 26px; margin: 0; }
.planet-desc { color: var(--text-muted); font-size: 13px; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.post-card-img {
  width: 100%; height: 160px;
  object-fit: cover;
  background: var(--bg-card2);
}
.post-card-img-placeholder {
  width: 100%; height: 160px;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card2) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.post-card-body { padding: 16px; }
.post-card-cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 6px;
}
.post-card-title {
  font-size: 15px;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
  font-family: var(--font-head);
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--accent); }
.post-card-meta { font-size: 11px; color: var(--text-muted); }
.post-card-excerpt { font-size: 13px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
.read-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* VIEW ALL LINK */
.planet-footer {
  text-align: right;
  margin-top: 20px;
}
.view-all-btn {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.2s;
}
.view-all-btn:hover { background: var(--accent); color: var(--primary); }

/* INLINE ADS (between planet sections) */
.inline-ads {
  background: var(--ads-bg);
  border-top: 1px solid var(--ads-border);
  border-bottom: 1px solid var(--ads-border);
  padding: 12px 0;
}
.inline-ads-inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--ads-border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 1px;
  text-align: center;
}

/* ============================================================
   SIDEBAR ADS (if sidebar used)
   ============================================================ */
.ads-sidebar-box {
  background: var(--ads-bg);
  border: 1px dashed var(--ads-border);
  border-radius: var(--radius);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  margin-bottom: 24px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--primary);
  border-top: 2px solid var(--accent);
  padding: 40px 0 20px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-about .site-title { font-size: 20px; margin-bottom: 12px; }
.footer-about p { font-size: 13px; color: var(--text-muted); }
.footer-col h4 { font-size: 14px; color: var(--accent); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--text-muted); font-size: 13px; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-ads { display: none; }
}
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: flex; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav ul li ul { position: static; display: none; }
  .main-nav ul li.open > ul { display: flex; }
  .main-nav-wrap .container { flex-wrap: wrap; }
  .slide-title { font-size: 16px; }
  .top-cta-bar .container { gap: 6px; }
  .cta-btn { padding: 4px 8px; font-size: 11px; }
}

/* ============================================================
   4-COLUMN GRID (homepage sections)
   ============================================================ */
.posts-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) {
  .posts-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .posts-grid-4 { grid-template-columns: 1fr; }
}

/* ============================================================
   CATEGORY PAGE — HERO
   ============================================================ */
.cat-hero {
  background: linear-gradient(135deg, #1a1035 0%, #2e1a5e 100%);
  border-bottom: 2px solid var(--accent);
  padding: 40px 0 32px;
}
.cat-hero-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}
.cat-hero-icon {
  font-size: 52px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cat-hero-title {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 6px;
}
.cat-hero-desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 4px;
}
.cat-hero-count {
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

/* ============================================================
   CATEGORY PAGE — LAYOUT
   ============================================================ */
.cat-page-wrap {
  padding-top: 36px;
  padding-bottom: 60px;
}
.cat-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-sidebar { display: none; }
}

/* Toolbar */
.cat-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.cat-toolbar-label { font-size: 13px; color: var(--text-muted); }

/* Posts grid on category page — 2 columns */
.cat-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 600px) {
  .cat-posts-grid { grid-template-columns: 1fr; }
}

/* Category post card */
.cat-post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.cat-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.cat-post-thumb-link { display: block; }
.cat-post-thumb {
  width: 100%; height: 180px;
  object-fit: cover;
  display: block;
}
.cat-post-thumb-placeholder {
  width: 100%; height: 180px;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card2) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.cat-post-body { padding: 16px; }
.cat-post-cats { margin-bottom: 6px; }
.cat-post-title {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
  font-family: var(--font-head);
  line-height: 1.4;
}
.cat-post-title a { color: inherit; }
.cat-post-title a:hover { color: var(--accent); }
.cat-post-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.cat-post-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}
.cat-read-more {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cat-read-more:hover { color: var(--accent-light); }

/* Pagination */
.cat-pagination {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.cat-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.cat-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  transition: all 0.2s;
}
.cat-pagination .page-numbers.current,
.cat-pagination .page-numbers:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--primary);
  font-weight: 700;
}
.cat-pagination .page-numbers.prev,
.cat-pagination .page-numbers.next {
  width: auto;
  padding: 0 14px;
}

/* No posts */
.cat-no-posts {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 16px;
}
.cat-no-posts p { margin-bottom: 20px; font-size: 20px; }

/* Sidebar */
.cat-sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
}
.cat-sidebar-heading {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-head);
}
.cat-section-list { list-style: none; }
.cat-section-list li {
  margin-bottom: 4px;
  border-radius: 6px;
  transition: background 0.15s;
}
.cat-section-list li:hover,
.cat-section-list li.active {
  background: rgba(201,168,76,0.1);
}
.cat-section-list li.active a { color: var(--accent); font-weight: 700; }
.cat-section-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
}
.cat-section-list li a:hover { color: var(--accent); }
.section-list-icon { font-size: 16px; flex-shrink: 0; }
