/*
Theme Name: The Jahan Review
Theme URI: https://mdrakibjahan.com
Author: Md Rakib Jahan
Author URI: https://mdrakibjahan.com
Description: A distinguished editorial WordPress theme for international relations and strategic affairs writing. Features hero slideshows, news ticker, analysis sections, and a refined newspaper aesthetic.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jahan-review
Tags: blog, news, magazine, custom-colors, custom-header, custom-menu, featured-images, post-formats, sticky-post, threaded-comments
*/

/* =============================================
   ROOT VARIABLES
   ============================================= */
:root {
  --ink: #0d0d0d;
  --parchment: #f5f0e8;
  --cream: #faf7f2;
  --mid: #6b6560;
  --border: #c8bfb0;
  --accent: #8b1a1a;
  --accent2: #1a3a5c;
  --gold: #b8913a;
  --serif: 'Playfair Display', Georgia, serif;
  --body: 'Source Serif 4', Georgia, serif;
  --condensed: 'Barlow Condensed', sans-serif;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; background: var(--cream); }
body { color: var(--ink); font-family: var(--body); line-height: 1.7; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* =============================================
   NAVIGATION
   ============================================= */
.site-nav {
  background: var(--ink);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--accent);
}
.nav-logo {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  color: #fff;
  text-transform: uppercase;
  padding: 1rem 0;
}
.nav-logo span { color: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: all 0.3s;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-menu a {
  color: rgba(255,255,255,0.75);
  font-family: var(--condensed);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1.2rem 0;
  display: block;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a {
  color: #fff;
  border-bottom-color: var(--gold);
}

/* =============================================
   MASTHEAD
   ============================================= */
.site-masthead {
  background: var(--ink);
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.masthead-eyebrow {
  font-family: var(--condensed);
  font-weight: 300;
  letter-spacing: 0.35em;
  font-size: 0.7rem;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.masthead-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.masthead-title em { color: var(--gold); font-style: normal; }
.masthead-sub {
  font-family: var(--body);
  font-weight: 300;
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
}
.masthead-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem auto 0;
}

/* =============================================
   HERO SLIDESHOW
   ============================================= */
.hero-slideshow {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: #0a0a0a;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  display: flex;
  align-items: flex-end;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45) saturate(0.8);
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.4) 50%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 3rem;
  width: 100%;
  max-width: 860px;
}
.hero-label {
  font-family: var(--condensed);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(139,26,26,0.15);
  border: 1px solid var(--accent);
  display: inline-block;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1rem;
}
.hero-content h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  max-width: 680px;
}
.hero-content p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  font-style: italic;
  max-width: 560px;
}
.hero-dots {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  display: flex;
  gap: 8px;
  z-index: 10;
}
.hero-dot {
  width: 28px;
  height: 2px;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  padding: 0;
}
.hero-dot.active { background: var(--gold); width: 48px; }

/* =============================================
   NEWS TICKER
   ============================================= */
.ticker-bar {
  background: var(--accent);
  padding: 0.55rem 0;
  overflow: hidden;
  border-top: 1px solid rgba(0,0,0,0.2);
}
.ticker-inner {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}
.ticker-label {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.25);
  padding: 0.2rem 1rem;
  margin-right: 1.5rem;
  flex-shrink: 0;
}
.ticker-item {
  font-family: var(--condensed);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.9);
  padding-right: 3rem;
  flex-shrink: 0;
}
.ticker-sep {
  color: rgba(255,255,255,0.4);
  padding-right: 3rem;
  flex-shrink: 0;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =============================================
   LAYOUT
   ============================================= */
.container { max-width: 1160px; margin: 0 auto; padding: 0 2rem; }
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-rule { flex: 1; height: 1px; background: var(--border); }

/* =============================================
   MAIN CONTENT GRID
   ============================================= */
.main-section { padding: 3.5rem 0; }
.main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
}
.featured-grid { display: grid; gap: 1.5rem; }

/* =============================================
   ARTICLE CARDS
   ============================================= */
.article-card {
  display: grid;
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
}
.article-card.primary { grid-template-rows: auto auto; }
.article-card.secondary {
  grid-template-columns: 200px 1fr;
  align-items: start;
}
.card-img-wrap {
  overflow: hidden;
  background: #1a1a2e;
  position: relative;
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  filter: saturate(0.85);
}
.article-card:hover .card-img-wrap img { transform: scale(1.04); }
.card-img-primary { height: 260px; }
.card-img-secondary { height: 140px; }
.card-body { padding: 1.25rem; }
.card-category {
  font-family: var(--condensed);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.card-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.article-card.secondary .card-title { font-size: 1rem; line-height: 1.3; }
.card-meta {
  font-family: var(--condensed);
  font-size: 0.72rem;
  color: var(--mid);
  letter-spacing: 0.05em;
}
.card-excerpt {
  font-size: 0.88rem;
  color: var(--mid);
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar-box {
  background: #fff;
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.sidebar-box h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}
.sidebar-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-num {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  width: 2rem;
}
.sidebar-text {
  font-family: var(--serif);
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 600;
}
.sidebar-meta {
  font-family: var(--condensed);
  font-size: 0.68rem;
  color: var(--mid);
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
}
.sidebar-box.dark { background: var(--ink); border-color: #333; }
.sidebar-box.dark h3 { color: #fff; border-bottom-color: var(--gold); }
.sidebar-box.dark p { font-size: 0.85rem; color: rgba(255,255,255,0.6); line-height: 1.7; font-family: var(--body); }
.sidebar-box.dark .sidebar-author {
  font-family: var(--condensed);
  font-size: 0.72rem;
  color: var(--gold);
  margin-top: 1rem;
  letter-spacing: 0.1em;
}

/* =============================================
   MID BANNER SLIDESHOW
   ============================================= */
.mid-banner {
  position: relative;
  height: 360px;
  overflow: hidden;
  background: #0a0a0a;
  margin: 2rem 0;
}
.mid-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.mid-slide.active { opacity: 1; }
.mid-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) saturate(0.7);
}
.mid-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,10,10,0.92) 0%, rgba(26,58,92,0.4) 100%);
}
.mid-content {
  position: relative;
  z-index: 2;
  padding: 3rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 620px;
}
.mid-eyebrow {
  font-family: var(--condensed);
  font-weight: 600;
  letter-spacing: 0.3em;
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.mid-quote {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: #fff;
  font-weight: 700;
  font-style: italic;
  line-height: 1.25;
  margin-bottom: 1rem;
}
.mid-attribution {
  font-family: var(--condensed);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.1em;
}
.mid-dots {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  display: flex;
  gap: 6px;
  z-index: 10;
}
.mid-dot {
  width: 24px;
  height: 2px;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  padding: 0;
}
.mid-dot.active { background: var(--gold); width: 36px; }

/* =============================================
   ANALYSIS SECTION
   ============================================= */
.analysis-section {
  background: var(--parchment);
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}
.analysis-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 1.5rem;
  position: relative;
}
.analysis-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent2);
}
.analysis-number {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  color: rgba(26,58,92,0.12);
  margin-bottom: 0.5rem;
}
.analysis-cat {
  font-family: var(--condensed);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.5rem;
}
.analysis-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.analysis-text { font-size: 0.85rem; color: var(--mid); line-height: 1.6; }
.read-more {
  font-family: var(--condensed);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
}
.read-more::after { content: '→'; }

/* =============================================
   BOTTOM BANNER SLIDESHOW
   ============================================= */
.bottom-banner {
  position: relative;
  height: 420px;
  overflow: hidden;
  background: #0a0a0a;
}
.bottom-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
}
.bottom-slide.active { opacity: 1; }
.bottom-img-half { overflow: hidden; }
.bottom-img-half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4) saturate(0.8);
  display: block;
}
.bottom-text-half {
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
}
.bottom-category {
  font-family: var(--condensed);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.bottom-title {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.bottom-body {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  font-style: italic;
}
.bottom-dots {
  position: absolute;
  bottom: 1.5rem;
  right: 50%;
  transform: translateX(50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}
.bottom-dot {
  width: 24px;
  height: 2px;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  padding: 0;
}
.bottom-dot.active { background: var(--gold); width: 36px; }

/* =============================================
   SINGLE POST
   ============================================= */
.post-hero {
  height: 420px;
  overflow: hidden;
  position: relative;
  background: #0a0a0a;
}
.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5) saturate(0.8);
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.8) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 3rem;
}
.post-hero-content { max-width: 760px; }
.post-category-badge {
  font-family: var(--condensed);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.25rem 0.6rem;
  display: inline-block;
  margin-bottom: 0.75rem;
}
.post-hero-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.15;
}
.single-post-body { max-width: 760px; margin: 0 auto; padding: 3rem 2rem; }
.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  font-family: var(--condensed);
  font-size: 0.78rem;
  color: var(--mid);
  letter-spacing: 0.05em;
}
.post-author { color: var(--ink); font-weight: 600; }
.post-content { font-size: 1.05rem; line-height: 1.85; }
.post-content h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--ink);
}
.post-content h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: var(--ink);
}
.post-content p { margin-bottom: 1.25rem; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--parchment);
  font-style: italic;
  font-family: var(--serif);
  font-size: 1.1rem;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.6);
  padding: 3rem 2rem 2rem;
  font-family: var(--condensed);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-align: center;
}
.site-footer h4 {
  font-family: var(--serif);
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.footer-sub {
  color: var(--gold);
  letter-spacing: 0.15em;
  font-size: 0.68rem;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }
.footer-copyright {
  color: rgba(255,255,255,0.3);
  font-size: 0.68rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  margin-top: 1rem;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .analysis-grid { grid-template-columns: 1fr 1fr; }
  .bottom-slide { grid-template-columns: 1fr; }
  .bottom-img-half { height: 200px; }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink);
    flex-direction: column;
    gap: 0;
    padding: 1rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
  .hero-content { padding: 1.5rem; }
  .analysis-grid { grid-template-columns: 1fr; }
  .article-card.secondary { grid-template-columns: 1fr; }
  .mid-content { padding: 1.5rem; }
  .bottom-text-half { padding: 1.5rem; }
  .hero-slideshow { height: 420px; }
}
