/*
Theme Name: AstroPro - Medhini Jyotish
Theme URI: https://medhinijyotish.com
Author: PM Labs
Author URI: https://medhinijyotish.com
Description: AstroPro — Vedic Astrology WordPress Theme. Features classical sidereal calculations, multi-language support, custom ACF homepage blocks, dynamic affiliate store, book sales page, audio podcast player, and interactive charts.
Version: 1.2.1
License: GNU General Public License v2 or later
Text Domain: medhini-jyotish
*/

:root {
  /* Semantic Design Tokens */
  --brand-primary: #C24A2E;
  --brand-secondary: #EE8A4C;
  --bg-primary: #FCEFDD;
  --bg-secondary: #F7E1BF;
  --text-primary: #3A1C10;
  --text-muted: #8A6350;
  --border-line: rgba(194,74,46,0.18);

  /* Backward Compatible Token Aliases */
  --bg: var(--bg-primary);
  --bg-2: var(--bg-secondary);
  --gold: var(--brand-secondary);
  --violet: var(--brand-primary);
  --text: var(--text-primary);
  --muted: var(--text-muted);
  --line: var(--border-line);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; overflow-x: hidden; }
h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 500; letter-spacing: -0.01em; }
.mono { font-family: 'JetBrains Mono', monospace; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 48px; }

/* Language bar */
.lang-bar {
  background: var(--violet); color: #FCEFDD; font-size: 12px;
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  padding: 6px 48px; position: relative; z-index: 60;
}
.lang-bar span { opacity: 0.75; }
.lang-bar select {
  background: transparent; color: #FCEFDD; border: 1px solid rgba(252,239,221,0.4);
  border-radius: 2px; font-size: 12px; padding: 3px 8px; cursor: pointer;
}
.lang-bar select option { color: var(--text); background: var(--bg); }

/* Site Header & Navigation */
.site-header {
  position: sticky; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(252,239,221,0.9);
  border-bottom: 1px solid var(--line);
}
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 48px; max-width: 1280px; margin: 0 auto; position: relative;
}
.logo-wrapper { display: flex; align-items: center; }
.logo-wrapper .custom-logo { max-height: 44px; width: auto; display: block; }
.logo { font-family: 'Fraunces', serif; font-size: 20px; letter-spacing: 0.02em; color: var(--gold); }
.logo span { color: var(--text); }

/* Nav Links & List Structure */
.nav-links-wrapper { display: flex; align-items: center; }
.nav-links {
  list-style: none; display: flex; align-items: center; gap: 28px;
  margin: 0; padding: 0; font-size: 14px; color: var(--muted);
}
.nav-links li { position: relative; list-style: none; }
.nav-links a {
  display: inline-block; padding: 6px 0; transition: color .25s ease;
  color: var(--muted); font-weight: 500;
}
.nav-links a:hover,
.nav-links a.active,
.nav-links li.active > a,
.nav-links li.current-menu-item > a,
.nav-links li.current-menu-parent > a {
  color: var(--violet);
}

/* Dropdown Menu (Desktop) */
.menu-item-has-children {
  display: flex; align-items: center; position: relative;
}
.dropdown-toggle {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 4px 6px; font-size: 11px; display: inline-flex; align-items: center;
  transition: transform .2s ease, color .2s ease;
}
.dropdown-toggle:hover { color: var(--violet); }
.nav-links .sub-menu {
  list-style: none; position: absolute; top: calc(100% + 12px); left: 0;
  min-width: 210px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 0; margin: 0;
  box-shadow: 0 12px 30px rgba(58,28,16,0.12);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 80;
}
.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-links .sub-menu li { display: block; width: 100%; }
.nav-links .sub-menu a {
  display: block; padding: 9px 18px; font-size: 13px; color: var(--text);
  transition: background .2s ease, color .2s ease;
}
.nav-links .sub-menu a:hover,
.nav-links .sub-menu li.active > a {
  background: rgba(194,74,46,0.08); color: var(--violet);
}

/* Nav Actions & CTA */
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-cta {
  border: 1px solid var(--violet); color: var(--violet);
  padding: 9px 20px; border-radius: 2px; font-size: 13px; letter-spacing: 0.04em;
  transition: all .25s; cursor: pointer; background: none; font-family: inherit; font-weight: 500;
}
.nav-cta:hover { background: var(--violet); color: #FCEFDD; }
.mobile-nav-cta { display: none; }

/* Hamburger Toggle Button */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; z-index: 60;
}
.hamburger-bar {
  display: block; width: 22px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform .3s ease, opacity .3s ease;
}
.site-nav.is-open .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav.is-open .hamburger-bar:nth-child(2) { opacity: 0; }
.site-nav.is-open .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Responsive Mobile Navigation */
@media (max-width: 900px) {
  .site-nav { padding: 14px 24px; }
  .lang-bar { padding: 6px 24px; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav-links-wrapper {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 24px; flex-direction: column; align-items: stretch;
    box-shadow: 0 16px 36px rgba(58,28,16,0.15); max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .site-nav.is-open .nav-links-wrapper { display: flex; }

  .nav-links {
    flex-direction: column; align-items: stretch; gap: 14px; width: 100%;
  }
  .nav-links li { width: 100%; }
  .nav-links a { font-size: 15px; padding: 8px 0; display: block; }
  
  .menu-item-has-children {
    flex-wrap: wrap; justify-content: space-between;
  }
  .dropdown-toggle { font-size: 14px; padding: 8px 12px; }
  .menu-item-has-children.is-expanded .dropdown-toggle .dropdown-icon {
    transform: rotate(180deg); display: inline-block;
  }

  .nav-links .sub-menu {
    position: static; box-shadow: none; border: none; background: rgba(247,225,191,0.5);
    border-radius: 4px; padding: 6px 0 6px 14px; margin-top: 6px;
    opacity: 1; visibility: visible; transform: none; display: none; width: 100%;
  }
  .menu-item-has-children.is-expanded > .sub-menu { display: block; }
  .nav-links .sub-menu a { font-size: 14px; padding: 6px 12px; }

  .mobile-nav-cta { display: block; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
  .mobile-nav-cta .btn-primary { width: 100%; text-align: center; }
}

/* Page hero (inner pages) */
.page-hero {
  padding: 64px 48px 48px; text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, #F9D9A0 100%);
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.2em;
  color: var(--violet); text-transform: uppercase; margin-bottom: 14px;
}
.page-hero h1 { font-size: clamp(32px, 5vw, 52px); }
.page-hero p { color: var(--muted); max-width: 560px; margin: 16px auto 0; font-size: 15px; line-height: 1.7; }

/* Buttons */
.btn-primary {
  display: inline-block; background: var(--violet); color: #FCEFDD; padding: 15px 32px; border-radius: 2px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.03em; border: none; cursor: pointer; font-family: inherit;
  transition: transform .25s, box-shadow .25s; text-align: center;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(194,74,46,0.3); }
.btn-ghost {
  display: inline-block; border: 1px solid rgba(58,28,16,0.25); padding: 15px 32px; border-radius: 2px;
  font-size: 14px; letter-spacing: 0.03em; transition: border-color .25s; color: var(--text); background: none; cursor: pointer; font-family: inherit; text-align: center;
}
.btn-ghost:hover { border-color: var(--text); }
.btn-sm { padding: 10px 20px; font-size: 13px; }

/* Sticky CTA bar */
.sticky-cta {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 55;
  background: var(--text); color: #FCEFDD; padding: 12px 22px; border-radius: 40px;
  display: flex; align-items: center; gap: 14px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.sticky-cta button {
  background: var(--gold); color: #2A1208; border: none; padding: 9px 18px; border-radius: 30px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
}

section { padding: 88px 48px; max-width: 1180px; margin: 0 auto; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 44px; flex-wrap: wrap; gap: 16px; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); }
.section-head p { color: var(--muted); font-size: 14px; max-width: 340px; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  transition: transform .3s, border-color .3s; opacity: 0; transform: translateY(24px);
}
.card.visible { opacity: 1; transform: translateY(0); transition: opacity .7s ease, transform .7s ease; }
.card:hover { transform: translateY(-6px); border-color: var(--violet); }
.card .card-img { height: 160px; background: var(--bg-2); }
.card-body { padding: 26px; }
.card .tag { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--violet); letter-spacing: 0.1em; }
.card h3 { font-size: 20px; margin: 12px 0 8px; }
.card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.card .price { color: var(--violet); font-family: 'JetBrains Mono', monospace; font-size: 15px; }

@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr; } section { padding: 56px 24px; } }

/* Footer */
.site-footer {
  background: var(--brand-primary);
  color: #FCEFDD;
  padding: 44px 24px;
  text-align: center;
  font-size: 13px;
  border-top: none;
}
.footer-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer-copy { color: rgba(252,239,221,0.95); font-weight: 400; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: #FCEFDD; opacity: 0.9; transition: opacity .25s, color .25s; text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: #FFFFFF; opacity: 1; }

/* Starfield / dust motes */
#stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* Hero entrance animation */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.fx-1 { opacity: 0; animation: fadeUp .9s ease forwards .1s; }
.fx-2 { opacity: 0; animation: fadeUp 1s ease forwards .3s; }
.fx-3 { opacity: 0; animation: fadeUp 1s ease forwards .5s; }
.fx-4 { opacity: 0; animation: fadeUp 1s ease forwards .7s; }
.fx-5 { opacity: 0; animation: fadeUp 1.2s ease forwards .95s; }

/* Chart ring signature element */
.ring-wrap { position: relative; width: 260px; height: 260px; margin: 44px auto 0; }
.ring { position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 50%; animation: spin 60s linear infinite; }
.ring.r2 { inset: 24px; animation-duration: 90s; animation-direction: reverse; border-color: rgba(194,74,46,0.28); }
.ring.r3 { inset: 48px; animation-duration: 45s; }
.ring i { position: absolute; width: 6px; height: 6px; background: var(--violet); border-radius: 50%; box-shadow: 0 0 12px var(--violet); }
@keyframes spin { to { transform: rotate(360deg); } }
.ring-center {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); letter-spacing: 0.15em;
}

/* Zodiac marquee ticker */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 14px 0; }
.marquee-track { display: flex; width: max-content; gap: 48px; animation: scroll-left 28s linear infinite; }
.marquee-track span { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--violet); letter-spacing: 0.08em; white-space: nowrap; }
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Stat counters */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-num { font-family: 'Fraunces', serif; font-size: clamp(30px, 4vw, 44px); color: var(--violet); }
.stat-label { font-size: 12px; color: var(--muted); letter-spacing: 0.05em; margin-top: 6px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: 1fr 1fr; } }

/* Card tilt micro-interaction */
.card { transform-style: preserve-3d; }
.card .card-img img { transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.06); }

/* About teaser */
.about-teaser { display: flex; gap: 48px; align-items: center; flex-wrap: wrap; }
.about-teaser .photo { width: 280px; height: 220px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(58,28,16,0.55); z-index: 100;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg); border-radius: 10px; max-width: 420px; width: 100%; padding: 36px; position: relative;
  border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(58,28,16,0.2);
}
.modal-close { position: absolute; top: 16px; right: 18px; background: none; border: none; font-size: 24px; color: var(--muted); cursor: pointer; line-height: 1; }
.modal-box h3 { font-size: 24px; margin-bottom: 6px; }
.modal-box .sub { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.form-field input, .form-field select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 4px;
  background: #fff; color: var(--text); font-size: 14px; font-family: inherit;
}
.form-field input:focus, .form-field select:focus { outline: none; border-color: var(--violet); }
.modal-box .btn-primary { width: 100%; text-align: center; margin-top: 6px; }
.form-success { display: none; text-align: center; padding: 20px 0; }
.form-success.show { display: block; }
.form-success i { font-size: 14px; }

/* WordPress Alignment & Core Classes */
.aligncenter { display: block; margin: 0 auto 1.5em; }
.alignright { float: right; margin: 0 0 1.5em 1.5em; }
.alignleft { float: left; margin: 0 1.5em 1.5em 0; }
.wp-caption { max-width: 100%; clear: both; }
.wp-caption-text { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }

/* Page Content & Entry Content Typography */
.page-content-section { padding: 64px 24px; }
.page-featured-image {
  max-height: 420px; overflow: hidden; border-radius: 8px; margin-bottom: 48px; border: 1px solid var(--line);
}
.page-featured-image img { width: 100%; height: 100%; object-fit: cover; }

.entry-content {
  max-width: 820px; margin: 0 auto; line-height: 1.85; font-size: 16px; color: var(--text);
}
.entry-content-fullwidth { max-width: 100%; }

.entry-content p { margin-bottom: 1.6em; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 {
  color: var(--text); margin: 2em 0 0.8em; line-height: 1.3;
}
.entry-content h2 { font-size: clamp(24px, 3.5vw, 32px); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.entry-content h3 { font-size: clamp(20px, 2.5vw, 24px); }
.entry-content h4 { font-size: 18px; }

.entry-content blockquote {
  border-left: 3px solid var(--violet); padding: 12px 24px; margin: 2em 0;
  background: rgba(247, 225, 191, 0.4); border-radius: 0 6px 6px 0;
  font-style: italic; color: var(--muted);
}
.entry-content ul, .entry-content ol { margin-bottom: 1.6em; padding-left: 28px; }
.entry-content li { margin-bottom: 0.5em; }

.entry-content hr { border: none; border-top: 1px solid var(--line); margin: 3em 0; }

.entry-content table {
  width: 100%; border-collapse: collapse; margin: 2em 0; background: var(--bg-2);
  border-radius: 6px; overflow: hidden; border: 1px solid var(--line);
}
.entry-content th, .entry-content td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.entry-content th { background: rgba(194, 74, 46, 0.08); font-weight: 600; color: var(--violet); }

/* Book Showcase Layout */
.book-showcase-section { padding: 64px 24px; }
.book-layout-grid {
  display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; max-width: 1180px; margin: 0 auto;
}
.book-cover-card {
  border-radius: 8px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(58, 28, 16, 0.15);
}
@media (max-width: 900px) {
  .book-layout-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* Contact Page Layout */
.contact-section { padding: 64px 24px; }
.contact-grid {
  display: grid; grid-template-columns: 360px 1fr; gap: 56px; max-width: 1180px; margin: 0 auto; align-items: start;
}
.contact-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 28px;
}
.contact-card h3 { font-size: 20px; color: var(--text); }
.contact-form-panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 36px; }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* Single Course Detail Layout */
.course-detail-section { padding: 64px 24px; }
.course-detail-layout {
  display: grid; grid-template-columns: 1fr 360px; gap: 56px; max-width: 1180px; margin: 0 auto; align-items: start;
}
.course-featured-banner {
  max-height: 420px; overflow: hidden; border-radius: 8px; margin-bottom: 36px; border: 1px solid var(--line);
}
.course-featured-banner img { width: 100%; height: 100%; object-fit: cover; }
.course-sidebar { position: sticky; top: 100px; }
.course-sidebar-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 32px;
  box-shadow: 0 16px 40px rgba(58, 28, 16, 0.12);
}
.sidebar-price-tag {
  display: flex; flex-direction: column; gap: 4px; padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.price-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.price-value { font-family: 'Fraunces', serif; font-size: 32px; color: var(--violet); }
.sidebar-meta-list { display: flex; flex-direction: column; gap: 18px; margin: 24px 0; }
.sidebar-meta-item { display: flex; gap: 14px; align-items: flex-start; }
.sidebar-meta-item .meta-icon { font-size: 18px; line-height: 1.3; }
.sidebar-meta-item strong { display: block; font-size: 13px; color: var(--text); }
.sidebar-meta-item p { font-size: 13px; color: var(--muted); margin: 2px 0 0; line-height: 1.4; }
.sidebar-cta-wrap { margin-top: 24px; }
.sidebar-guarantee { font-size: 12px; color: var(--muted); text-align: center; margin-top: 10px; line-height: 1.4; }

@media (max-width: 900px) {
  .course-detail-layout { grid-template-columns: 1fr; }
  .course-sidebar { position: static; margin-top: 36px; }
}

/* Single Podcast Detail Layout */
.podcast-detail-section { padding: 64px 24px; }
.podcast-content-container { max-width: 820px; margin: 0 auto; }
.podcast-player-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 28px;
  margin-bottom: 36px; box-shadow: 0 12px 30px rgba(58, 28, 16, 0.1);
}
.audio-player-wrapper { margin-bottom: 20px; }
.podcast-platform-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.platform-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.platform-btn {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 4px;
  background: rgba(252, 239, 221, 0.8); border: 1px solid var(--line); font-size: 13px;
  color: var(--text); transition: all .25s ease;
}
.platform-btn:hover { background: var(--violet); color: #FCEFDD; border-color: var(--violet); }
.podcast-featured-banner { margin-bottom: 36px; }
.podcast-show-notes { margin-top: 36px; }
.podcast-footer-nav { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }

/* Archive & Gallery Pagination */
.pagination {
  margin: 64px auto 0;
  text-align: center;
  width: 100%;
}
.pagination .nav-links {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
a.page-numbers,
span.page-numbers {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  vertical-align: middle !important;
  min-width: 44px !important;
  height: 44px !important;
  line-height: 1 !important;
  padding: 0 18px !important;
  border-radius: 6px !important;
  background: var(--bg-2) !important;
  border: 1px solid var(--line) !important;
  color: var(--text) !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  transition: all .2s ease !important;
}
a.page-numbers:not(.prev):not(.next):not(.dots),
span.page-numbers:not(.prev):not(.next):not(.dots) {
  width: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
}
a.page-numbers.prev,
a.page-numbers.next {
  padding: 0 20px !important;
  gap: 6px !important;
}
a.page-numbers:hover,
a.page-numbers:focus {
  background: var(--violet) !important;
  color: #FCEFDD !important;
  border-color: var(--violet) !important;
}
span.page-numbers.current {
  background: var(--violet) !important;
  color: #FCEFDD !important;
  border-color: var(--violet) !important;
  cursor: default !important;
}
span.page-numbers.dots {
  background: transparent !important;
  border: none !important;
  min-width: auto !important;
  width: auto !important;
  padding: 0 6px !important;
  color: var(--muted) !important;
}

/* Custom Text & Image Section */
.section-custom-content { padding: 80px 24px; max-width: 1180px; margin: 0 auto; }
.custom-content-container { width: 100%; }
.custom-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.custom-content-media .media-frame {
  box-shadow: 0 14px 34px rgba(58, 28, 16, 0.08);
}
.custom-content-media .media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.custom-content-body .entry-content p {
  margin-bottom: 16px;
}
.custom-content-body .entry-content p:last-child {
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .section-custom-content { padding: 56px 20px; }
  .custom-content-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* Gallery Page Layout (3 in row, Thumbnail Display) */
.gallery-section { padding: 64px 24px 88px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.gallery-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}
.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--violet);
  box-shadow: 0 12px 30px rgba(58, 28, 16, 0.1);
}
.gallery-thumb-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-2);
}
.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(.35) saturate(1.4) hue-rotate(-8deg) brightness(0.95);
  transition: transform .4s ease, filter .4s ease;
}
.gallery-card:hover .gallery-thumb {
  transform: scale(1.05);
  filter: sepia(.15) saturate(1.2) hue-rotate(-4deg) brightness(1);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(58, 28, 16, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-card:hover .gallery-overlay {
  opacity: 1;
}
.gallery-view-btn {
  background: var(--violet);
  color: #FCEFDD;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.gallery-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.gallery-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--violet);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.gallery-title {
  font-size: 17px;
  color: var(--text);
  margin: 2px 0 0;
  line-height: 1.35;
}
.gallery-caption {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
@media (max-width: 580px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Google Translate seamlessly hidden utility styles */
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-simple,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-te-spinner-pos {
  display: none !important;
  visibility: hidden !important;
}
body {
  top: 0 !important;
  position: static !important;
}
.goog-tooltip {
  display: none !important;
}
.goog-tooltip:hover {
  display: none !important;
}
.goog-text-highlight {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* =============================================================
   Book & Publications Affiliate Sales Page
   ============================================================= */
.book-sales-page {
  padding: 64px 24px 96px;
}
.book-section-card {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  align-items: start;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 48px;
  box-shadow: 0 16px 40px rgba(58, 28, 16, 0.06);
  margin-bottom: 56px;
}
.book-section-card.orientation-right {
  grid-template-columns: 1fr 360px;
}
.book-cover-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.book-3d-frame {
  width: 100%;
  max-width: 340px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: -8px 14px 34px rgba(58, 28, 16, 0.22), 0 2px 6px rgba(0,0,0,0.1);
  transition: transform .35s ease, box-shadow .35s ease;
}
.book-section-card:hover .book-3d-frame {
  transform: translateY(-6px) scale(1.02);
  box-shadow: -10px 20px 42px rgba(58, 28, 16, 0.28);
}
.book-cover-img {
  width: 100%;
  height: auto;
  display: block;
}
.book-price-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--violet);
  background: rgba(194, 74, 46, 0.08);
  border: 1px solid var(--line);
  padding: 6px 16px;
  border-radius: 20px;
  text-align: center;
}
.book-details-col {
  display: flex;
  flex-direction: column;
}
.book-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--violet);
  background: rgba(194, 74, 46, 0.1);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  align-self: flex-start;
}
.book-title {
  font-size: clamp(26px, 3.2vw, 36px);
  margin: 0 0 6px;
  line-height: 1.25;
}
.book-subhead {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.book-rating-row {
  margin-bottom: 20px;
}
.rating-stars {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-secondary);
}
.book-description {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 24px;
}
.book-description p {
  margin-bottom: 12px;
}
.book-features-box {
  background: rgba(252, 239, 221, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 28px;
}
.features-title {
  font-size: 16px;
  margin: 0 0 14px;
  color: var(--text);
}
.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.features-list .check-icon {
  color: var(--violet);
  font-weight: bold;
  font-size: 16px;
  line-height: 1.2;
}
.book-cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
}
.book-btn-buy {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(194, 74, 46, 0.25);
}
.book-btn-preview {
  padding: 13px 24px;
  font-size: 14px;
}
.book-quote-box {
  border-left: 3px solid var(--violet);
  padding: 12px 0 12px 20px;
  margin-top: 8px;
}
.quote-body {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 6px;
}
.quote-citation {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}
.book-separator {
  border: none;
  border-top: 1px solid var(--line);
  margin: 24px 0 56px;
}
.book-trust-banner {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
}
.trust-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--violet);
  color: #FCEFDD;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.trust-content h3 {
  font-size: 18px;
  margin: 0 0 6px;
}
.trust-content p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 960px) {
  .book-section-card,
  .book-section-card.orientation-right {
    grid-template-columns: 1fr;
    padding: 32px 24px;
    gap: 36px;
  }
  .book-cover-col {
    order: -1;
  }
}

/* =============================================================
   Affiliate Store (Thumbnail 6-Product Grid)
   ============================================================= */
.store-section {
  padding: 64px 24px 96px;
}
.store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 56px;
}
.store-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(58, 28, 16, 0.05);
  transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .3s ease, border-color .3s ease;
}
.store-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(58, 28, 16, 0.12);
  border-color: var(--violet);
}
.store-thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 65%; /* 16:10 thumbnail aspect ratio */
  overflow: hidden;
  background: #EEDAC0;
}
.store-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.store-card:hover .store-thumb {
  transform: scale(1.04);
}
.store-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--violet);
  color: #FCEFDD;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.store-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.store-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--violet);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.store-title {
  font-size: 19px;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.35;
}
.store-rating {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-secondary);
  margin-bottom: 12px;
}
.store-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px;
  flex: 1;
}
.store-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.store-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.store-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.store-orig-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}
.store-btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-sizing: border-box;
}
.store-disclosure-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.disc-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(194, 74, 46, 0.12);
  color: var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  flex-shrink: 0;
}
.disc-content h4 {
  font-size: 15px;
  margin: 0 0 4px;
}
.disc-content p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 1024px) {
  .store-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}
@media (max-width: 640px) {
  .store-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Blog Right Sidebar & Ads Management System Styles
   ========================================================================== */

.blog-section-wrapper {
  padding: 64px 0;
}

.blog-layout-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 44px;
  align-items: start;
}

.right-sidebar-layout {
  grid-template-columns: 1fr 320px;
}

.blog-main-content {
  min-width: 0;
}

.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-muted);
}

.read-more-link {
  color: var(--brand-primary);
  font-weight: 600;
  transition: transform 0.2s ease, color 0.2s ease;
}

.read-more-link:hover {
  color: var(--brand-secondary);
  transform: translateX(3px);
}

/* Right Sidebar Container */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-widget {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(58,28,16,0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sidebar-widget:hover {
  box-shadow: 0 8px 24px rgba(58,28,16,0.08);
}

.widget-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.widget-icon {
  font-size: 16px;
}

/* Recent Posts Widget */
.recent-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recent-post-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}

.recent-post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.recent-post-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.recent-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.recent-post-item:hover .recent-post-thumb img {
  transform: scale(1.08);
}

.recent-post-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.recent-post-date {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recent-post-title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-post-title a {
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.recent-post-title a:hover {
  color: var(--brand-primary);
}

/* Categories Widget */
.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(252,239,221,0.5);
  border: 1px solid var(--line);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.category-link:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #FCEFDD;
  transform: translateX(4px);
}

.category-link:hover .category-name,
.category-link:hover .category-count {
  color: #FCEFDD;
}

.category-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.category-count {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(194,74,46,0.12);
  color: var(--brand-primary);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* Square Ad Placement (Sidebar) */
.widget-ad-placement {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.ad-card-wrapper {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(58,28,16,0.05);
}

.ad-square-wrapper {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.ad-banner-link {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ad-banner-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(194,74,46,0.2);
}

.ad-square-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* Standard Horizontal AdSense Leaderboard Banner (End of Article - 728x90) */
.ad-horizontal-banner-wrapper {
  width: 100%;
  max-width: 728px;
  margin: 36px auto 0;
  background: transparent;
  border: none;
  padding: 0;
  text-align: center;
  overflow: hidden;
}

.ad-horizontal-img {
  width: 100%;
  max-width: 728px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(58,28,16,0.06);
}

.ad-code-container {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ad-responsive-code-container {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  margin: 0 auto;
}

/* Responsive Breakdown */
@media (max-width: 992px) {
  .blog-layout-container,
  .right-sidebar-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
/* See All Blogs Homepage Button */
.see-all-blogs-wrapper {
  margin-top: 44px;
  text-align: center;
}

.btn-see-all-blogs {
  display: inline-block;
  background: var(--brand-primary);
  color: #FCEFDD;
  padding: 12px 32px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
  border: 1px solid var(--brand-primary);
  box-shadow: 0 4px 14px rgba(194,74,46,0.15);
}

.btn-see-all-blogs:hover {
  background: var(--brand-secondary);
  border-color: var(--brand-secondary);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(194,74,46,0.25);
}




