/*
Theme Name: NewsWave
Theme URI: https://newswave.theme
Author: NewsWave Team
Author URI: https://newswave.theme
Description: A powerful News, Magazine, and Blog WordPress theme inspired by modern journalism. Features breaking news ticker, tabbed sections, multiple layouts, dark/light mode, Elementor support, and full WordPress Customizer control.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newswave
Tags: news, magazine, blog, grid, responsive, dark-mode, elementor, rtl-language-support
*/

/* ============================================
   CSS VARIABLES & ROOT
============================================ */
:root {
  --primary: #c0392b;
  --primary-rgb: 192, 57, 43;
  --primary-dark: #a93226;
  --secondary: #1d3557;
  --accent: #e74c3c;
  --dark: #0d0d0d;
  --dark-2: #1a1a1a;
  --dark-3: #252525;
  --gray-1: #f8f9fa;
  --gray-2: #e9ecef;
  --gray-3: #adb5bd;
  --gray-4: #6c757d;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-light: #444444;
  --border: #f0f0f0;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Helvetica Neue', sans-serif;
  --font-ui: 'Barlow Condensed', Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.16);
  --radius: 6px;
  --transition: all 0.25s ease;
  --container: 1200px;
  --sidebar: 320px;
}

body.dark-mode {
  --gray-1: #1a1a1a;
  --gray-2: #252525;
  --border: #333;
  --text: #e9ecef;
  --text-light: #adb5bd;
  --white: #141414;
  --dark: #f8f9fa;
}

/* ============================================
   RESET & BASE
============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--text);
  font-weight: 700;
}

h1 { font-size: 2.4rem; line-height: 1.2; }
h2 { font-size: 1.4rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
h3 { font-size: 1.1rem; line-height: 1.4; }

.entry-title a:hover { color: var(--primary); }

/* ============================================
   LAYOUT
============================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Breadcrumbs */
.breadcrumbs {
  font-family: var(--font-ui);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { opacity: 0.5; }

.site-content {
  display: grid;
  grid-template-columns: 1fr var(--sidebar);
  gap: 40px;
  padding: 30px 0;
}

.site-content.full-width {
  grid-template-columns: 1fr;
}

/* ============================================
   NEW HEADER TICKER (BN)
============================================ */
.breaking-news-bar {
  display: flex !important;
  align-items: center;
  background: #111;
  padding: 6px 20px;
  overflow: hidden;
  height: 36px;
}
.bn-label {
  background: #e74c3c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 3px;
  white-space: nowrap;
  margin-right: 16px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.bn-ticker-wrap {
  flex: 1;
  overflow: hidden;
}
.bn-ticker {
  display: inline-block;
  white-space: nowrap;
  color: #ddd;
  font-size: 13px;
  animation: ticker-scroll 30s linear infinite;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================
   LAYOUT WIDTH FIX (1280px)
============================================ */
.container, .site-container, .wrapper,
.content-area, .site-content, #content,
.td-container, .tdc-content {
  max-width: 1280px !important;
  width: 100% !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero-slider, .slider-wrapper, .featured-slider,
.home-slider, #hero, .td-home-slider {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ============================================
   FOOTER REDESIGN (4 COLUMNS)
============================================ */
.site-footer, footer#colophon, #footer {
  background: #0d0d0d !important;
  color: #bbb !important;
  padding: 50px 0 20px !important;
}
.footer-widgets, .footer-widget-area,
.footer-columns, .td-footer-wrapper, .footer-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid !important;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  gap: 40px;
}
.footer-widget h3, .widget-title, .footer-widget-title {
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  margin-bottom: 24px !important;
  padding-bottom: 8px !important;
  border-bottom: 2px solid #c0392b !important;
  display: inline-block;
}
.footer-widget a, .widget a {
  color: #999 !important;
  font-size: 13px !important;
  line-height: 2.2 !important;
  display: block;
  transition: color .2s;
}
.footer-widget a:hover { color: #fff !important; }

.copyright-bar {
  text-align: center;
  border-top: 1px solid #222;
  margin-top: 40px;
  padding-top: 20px;
  font-size: 12px;
  color: #555;
}

@media (max-width: 992px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ============================================
   NEW HOMEPAGE SECTIONS
============================================ */
.editors-pick-section,
.world-news-section {
  max-width: 1280px;
  margin: 60px auto;
  padding: 0 16px;
}
.section-heading-new {
  font-size: 20px;
  font-weight: 800;
  color: #111;
  border-left: 5px solid #c0392b;
  padding-left: 15px;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.editors-pick-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
}
.world-news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.news-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s;
}
.news-card:hover img { transform: scale(1.03); }

.news-card .cat-badge {
  background: #c0392b;
  color: #fff;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 3px;
  text-transform: uppercase;
  display: inline-block;
  margin: 12px 0 6px;
  font-weight: 700;
}
.news-card h3 { font-size: 16px; line-height: 1.4; margin-bottom: 8px; }
.news-card .author-date { font-size: 11px; color: #777; }

@media (max-width: 768px) {
  .editors-pick-grid { grid-template-columns: 1fr; }
  .world-news-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   WHITESPACE FIX
============================================ */
.newsletter-section, .subscribe-section,
.td-block-title-wrap + .mc4wp-form,
section.newsletter, .home-newsletter-section { margin-top: 24px !important; padding-top: 0 !important; }

.h-row-1-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.h-social-icons a {
    color: #fff;
    font-size: 14px;
    transition: var(--transition);
}

.h-social-icons a:hover { color: var(--primary); }

/* Row 2: Branding */
.h-row-2 {
    background: #fff;
    padding: 16px 0;
}

.h-row-2 .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.h-logo img {
    max-height: 70px;
}

.h-ad-placeholder {
    width: 728px;
    height: 90px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    letter-spacing: 1px;
    border-radius: 4px;
}

/* Row 3: Navigation */
.h-row-3 {
    background: #111111;
    height: 50px;
    color: #fff;
}

.h-row-3 .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.h-nav-wrap {
    display: flex;
    align-items: center;
    height: 100%;
}

.h-home-tab {
    background: #2196F3;
    color: #fff;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-weight: 700;
    font-size: 14px;
}

.h-main-menu ul {
    display: flex;
    height: 100%;
}

.h-main-menu ul li a {
    color: #fff;
    padding: 0 15px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    height: 50px;
    display: flex;
    align-items: center;
}

.h-main-menu ul li a:hover { color: #2196F3; }

.h-row-3-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.h-weather { font-size: 13px; display: flex; align-items: center; gap: 8px; }
.h-utils { display: flex; gap: 15px; font-size: 16px; }

.h-search-bar {
    display: flex;
    align-items: center;
    background: #222;
    padding: 5px 10px;
    border-radius: 20px;
}

.h-search-bar input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 12px;
    padding: 2px 5px;
    width: 100px;
}

@media (max-width: 992px) {
    .h-ad-placeholder { display: none; }
}

@media (max-width: 768px) {
    .h-weather, .h-ticker-wrap, .h-social-icons { display: none; }
    .h-row-2 .container { justify-content: center; }
}


/* ============================================
   HEADER LOGO & AD AREA
============================================ */

/* ============================================
   HEADER
============================================ */
.site-header .author-box-modern {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    display: flex;
    gap: 25px;
    margin: 40px 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .related-grid { grid-template-columns: 1fr; }
    .author-box-modern { flex-direction: column; text-align: center; }
}

.post-card-grid, .post-card-large, .magazine-item, .related-card {
    transition: var(--transition);
}

.post-card-grid:hover, .post-card-large:hover, .related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.post-thumb img {
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.4s ease;
}

.post-card-grid:hover .post-thumb img, .post-card-large:hover .post-thumb img, .related-card:hover .post-thumb img {
    transform: scale(1.03);
}
.site-header {
  background: #e1e1e4;
  padding: 30px 0;
  border-bottom: 3px solid var(--primary);
  position: relative; /* Removed sticky for better control of Template 2 */
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.header-main-socials {
  display: flex;
  gap: 12px;
  flex: 1;
}

.header-main-socials a {
  width: 38px;
  height: 38px;
  background: white;
  color: var(--text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.header-main-socials a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.site-branding { flex-shrink: 0; }

.site-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
}

.site-title span { color: var(--primary); }

.site-description {
  font-size: 11px;
  color: var(--gray-4);
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 3px;
}

.header-ad { flex: 1; text-align: center; }
.header-ad img { max-height: 90px; margin: 0 auto; }

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-search-toggle,
.dark-mode-toggle,
.mobile-menu-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--gray-1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text);
  transition: var(--transition);
}

.header-search-toggle:hover,
.dark-mode-toggle:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ============================================
   NAVIGATION
============================================ */
.main-navigation {
  background: #1a1a1a;
  color: white;
  position: relative;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.primary-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu > li {
  position: relative;
}

.primary-menu > li > a {
  display: block;
  padding: 13px 16px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.88);
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.primary-menu > li:hover > a,
.primary-menu > li.current-menu-item > a {
  color: white;
  border-bottom-color: var(--primary);
}

/* Dropdown */
.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--dark-2);
  min-width: 210px;
  border-top: 2px solid var(--primary);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition);
  z-index: 999;
}

.primary-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu .sub-menu li a {
  display: block;
  padding: 10px 18px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.75);
  border-left: 3px solid transparent;
  transition: var(--transition);
}

.primary-menu .sub-menu li a:hover {
  color: white;
  border-left-color: var(--primary);
  background: rgba(255,255,255,0.05);
  padding-left: 22px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================
   CATEGORY BADGE
============================================ */
.cat-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 9px;
  background: var(--primary);
  color: white;
  border-radius: 2px;
  margin-bottom: 8px;
}

.cat-badge.cat-sports { background: #2d6a4f; }
.cat-badge.cat-tech { background: #1d3557; }
.cat-badge.cat-world { background: #7b2d8b; }
.cat-badge.cat-lifestyle { background: #e76f51; }

/* ============================================
   SECTION TITLE
============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary);
}

.section-title {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
}

.section-title span { color: var(--primary); }

.section-more {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 4px 12px;
  border-radius: 2px;
  transition: var(--transition);
}
.section-more:hover { background: var(--primary); color: white; }

/* ============================================
   HERO / FEATURED POSTS
============================================ */
.hero-section { margin-bottom: 30px; }

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 3px;
  background: var(--border);
}

.hero-main {
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
}

.hero-secondary { position: relative; overflow: hidden; }

.hero-post {
  position: relative;
  overflow: hidden;
  display: block;
}

.hero-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-main { height: 480px; }
.hero-secondary { height: 237px; }

.hero-post:hover img { transform: scale(1.04); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 22px;
}

.hero-main .hero-content { padding: 28px 30px; }

.hero-content .cat-badge { margin-bottom: 8px; }

.hero-title {
  font-family: var(--font-display);
  color: white;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.hero-main .hero-title { font-size: 28px; }
.hero-secondary .hero-title { font-size: 17px; }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-meta .views::before { content: '👁 '; }
.hero-meta .comments::before { content: '💬 '; }

/* ============================================
   POST CARDS
============================================ */
/* Large Card */
.post-card-large {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.post-card-large:last-child { border-bottom: none; }

.post-card-large .post-thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  height: 175px;
}

.post-card-large .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card-large:hover .post-thumb img { transform: scale(1.05); }

.post-card-large .post-body { display: flex; flex-direction: column; justify-content: center; }

.post-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}

.post-title:hover, .post-title a:hover { color: var(--primary); }

.post-excerpt {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--gray-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-wrap: wrap;
}

.post-meta .author a { color: var(--secondary); font-weight: 600; }
.post-meta .author a:hover { color: var(--primary); }
.post-meta .sep { color: var(--border); }

/* Small Card */
.post-card-small {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.post-card-small:last-child { border-bottom: none; }

.post-card-small .post-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: var(--radius);
  overflow: hidden;
}

.post-card-small .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card-small:hover .post-thumb img { transform: scale(1.07); }

.post-card-small .post-info { flex: 1; }

.post-card-small .post-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 5px;
}

.post-card-small .post-date {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--gray-4);
  text-transform: uppercase;
}

/* Grid Card */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post-card-grid {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  transition: var(--transition);
}

.post-card-grid:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.post-card-grid .post-thumb {
  position: relative;
  height: 190px;
  overflow: hidden;
}

.post-card-grid .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card-grid:hover .post-thumb img { transform: scale(1.06); }

.post-card-grid .post-body { padding: 16px; }

.post-card-grid .post-title {
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.post-card-grid .post-excerpt {
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 3;
}

/* Read more */
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
  margin-top: 8px;
}

.read-more::after {
  content: '→';
  transition: transform 0.2s;
}
.read-more:hover::after { transform: translateX(3px); }

/* ============================================
   TABBED NEWS SECTION
============================================ */
.tabbed-section { margin-bottom: 30px; }

.tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 18px;
  flex-wrap: wrap;
  position: relative;
}

.tabs-nav::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s ease;
}

.tab-btn {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 9px 16px;
  color: var(--gray-4);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition);
  background: none;
}

.tab-btn.active,
.tab-btn:hover { color: var(--primary); border-bottom-color: var(--primary); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.tabs-posts-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

.tabs-featured-post {
  position: relative;
  height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
}

.tabs-featured-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tabs-featured-post:hover img { transform: scale(1.04); }

.tabs-featured-post .hero-overlay,
.tabs-featured-post .hero-content { border-radius: var(--radius); }

.tabs-posts-list { display: flex; flex-direction: column; justify-content: space-between; }

/* ============================================
   TAG & CATEGORY BRANDING
============================================ */
.cat-badge.cat-technology, .cat-badge.cat-تكنولوجيا { background-color: #1a73e8 !important; }
.cat-badge.cat-world-news, .cat-badge.cat-عالم { background-color: #34A853 !important; }
.cat-badge.cat-featured { background-color: #EA4335 !important; }

/* ============================================
   READ MORE BUTTONS
============================================ */
.read-more, .btn-read-more {
  display: inline-block !important;
  background: #4285F4 !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  transition: background 0.2s !important;
}
.read-more:hover, .btn-read-more:hover { background: #3367d6 !important; text-decoration: none !important; }
.read-more::after { display: none !important; }

/* ============================================
   HOMEPAGE 3-COLUMN LAYOUT
============================================ */
.home-main-layout {
  display: grid;
  grid-template-columns: 250px 1fr 300px;
  gap: 30px;
  margin-top: 30px;
  align-items: start;
}
@media (max-width: 1200px) {
  .home-main-layout { grid-template-columns: 1fr 300px; }
  .home-left-sidebar { display: none; }
}
@media (max-width: 992px) {
  .home-main-layout { grid-template-columns: 1fr; }
  .home-right-sidebar { display: none; }
}

.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sticky-sidebar {
  position: sticky;
  top: 20px;
}

/* Sidebar Widgets */
.sidebar-widget { margin-bottom: 24px; }
.sidebar-widget h3 {
  font-size: 16px;
  text-transform: uppercase;
  border-bottom: 2px solid #eee;
  padding-bottom: 8px;
  margin-bottom: 15px;
}
.ad-spacer {
  background: #f1f3f4;
  border: 1px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 14px;
  text-align: center;
}
.tag-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pills a {
  background: #e8f0fe;
  color: #1a56c4;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ============================================
   OPINION & ANALYSIS SECTION
============================================ */
.opinion-section {
  background: #f8f4ff;
  padding: 40px 20px;
  margin: 40px 0;
  border-radius: 8px;
}
.opinion-header {
  border-left: 4px solid #9C27B0;
  padding-left: 15px;
  margin-bottom: 30px;
}
.opinion-header h2 { font-size: 22px; color: #111; }
.opinion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.opinion-card .cat-badge { background: #9C27B0 !important; }

/* ============================================
   PODCAST & VIDEO SECTION
============================================ */
.podcast-video-section {
  background: #1a1a2e;
  color: #fff;
  padding: 60px 20px;
  margin-top: 60px;
}
.pv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.pv-header h2 { color: #fff; font-size: 24px; }
.pv-tabs { display: flex; gap: 20px; }
.pv-tab-btn {
  color: #aaa;
  font-weight: 700;
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.pv-tab-btn.active { color: #4285F4; border-bottom-color: #4285F4; }

.podcast-list { display: grid; gap: 20px; }
.podcast-card {
  display: flex;
  gap: 15px;
  background: rgba(255,255,255,0.05);
  padding: 15px;
  border-radius: 8px;
  align-items: center;
}
.podcast-card img { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; }
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

/* ============================================
   MODER SIDE-FEED HERO LAYOUT
============================================ */
.hero-side-feed {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}
.hero-main-area { position: relative; height: 420px; border-radius: 8px; overflow: hidden; }
.hero-side-area { display: flex; flex-direction: column; gap: 20px; }
.hero-side-item { position: relative; height: 200px; border-radius: 8px; overflow: hidden; }

.hero-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.hero-card:hover img { transform: scale(1.05); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}
.hero-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  color: #fff;
}
.hero-side-item .hero-info { padding: 20px; }
.hero-info h2 { font-size: 26px; margin-bottom: 10px; line-height: 1.2; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.hero-side-item h3 { font-size: 16px; line-height: 1.3; margin-bottom: 5px; }

.hero-bottom-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 40px;
}

/* ============================================
   GLOBAL MOBILE RESPONSIVENESS
============================================ */
@media (max-width: 768px) {
  /* Layout Stacking */
  .home-main-layout { grid-template-columns: 1fr !important; }
  .home-left-sidebar, .home-right-sidebar { display: none !important; }
  
  /* Hero Section */
  .hero-side-feed { grid-template-columns: 1fr !important; }
  .hero-main-area { height: 350px !important; }
  .hero-bottom-grid { grid-template-columns: 1fr 1fr !important; }
  .hero-info h2 { font-size: 20px !important; }
  
  /* Sections */
  .opinion-grid { grid-template-columns: 1fr !important; }
  .video-grid { grid-template-columns: 1fr !important; }
  .podcast-card { flex-direction: column; text-align: center; }
  .podcast-card img { width: 100% !important; height: 200px !important; }
  
  /* Magazine Category Block */
  .magazine-grid { grid-template-columns: 1fr !important; }
  .post-card-large { grid-template-columns: 1fr !important; }
  .post-card-large .post-thumb { height: 220px !important; }
  
  /* World News */
  .world-news-grid { grid-template-columns: 1fr !important; }
}

/* ============================================
   AD AREA STYLING
============================================ */
.side-content-promo {
  background: #f8f9fa;
  border: 1px dashed #ccc;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #888;
  font-family: var(--font-ui);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  overflow: hidden;
}

/* ============================================
   HIDE EVENT CATEGORIES
============================================ */
.section-event-categories { display: none !important; }

/* ============================================
   SIDEBAR
============================================ */
.widget {
  background: var(--gray-1);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.widget-title {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  padding-bottom: 12px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--primary);
}

/* Popular Posts Widget */
.widget-popular .post-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.widget-popular .post-item:last-child { border-bottom: none; }

.widget-popular .post-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
}

.widget-popular .post-item:first-child .post-num { color: var(--primary); }

.widget-popular .post-item-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.widget-popular .post-item-title a:hover { color: var(--primary); }

.widget-popular .post-item-meta {
  font-family: var(--font-ui);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* Categories Widget */
.widget-categories li {
  border-bottom: 1px solid var(--border);
}

.widget-categories li:last-child { border-bottom: none; }

.widget-categories li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
  transition: var(--transition);
}

.widget-categories li a:hover { color: var(--primary); padding-left: 5px; }

.widget-categories .count {
  background: var(--gray-2);
  color: var(--gray-4);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
}

/* Social Widget */
.social-counters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-radius: var(--radius);
  color: white;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.social-item:hover { transform: translateY(-2px); filter: brightness(1.1); }

.social-item.facebook { background: #1877f2; }
.social-item.twitter { background: #1da1f2; }
.social-item.youtube { background: #ff0000; }
.social-item.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-item.tiktok { background: #010101; }
.social-item.linkedin { background: #0077b5; }

.social-item .count {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.social-item .platform {
  font-family: var(--font-ui);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
  opacity: 0.9;
}

.social-item .action {
  font-size: 10px;
  margin-top: 5px;
  opacity: 0.8;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 2px 8px;
  border-radius: 10px;
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Newsletter Widget */
.widget-newsletter { background: var(--secondary); color: white; border-color: var(--secondary); }
.widget-newsletter .widget-title { color: white; border-color: var(--primary); }
.widget-newsletter p { font-size: 13px; color: rgba(255,255,255,0.8); margin-bottom: 14px; line-height: 1.5; }

.newsletter-form { display: flex; flex-direction: column; gap: 8px; }

.newsletter-form input {
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form input:focus { border-color: var(--primary); background: rgba(255,255,255,0.15); }

.newsletter-form button {
  padding: 10px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
}

.newsletter-form button:hover { background: var(--primary-dark); }

/* Tags Widget */
.widget-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag-item {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-light);
  transition: var(--transition);
}
.tag-item:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ============================================
   FOOTER
============================================ */
.site-footer {
  background: var(--dark-2);
  color: rgba(255,255,255,0.75);
  padding: 50px 0 0;
  margin-top: 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 35px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .site-title { font-size: 26px; }
.footer-brand .site-description { color: rgba(255,255,255,0.4); }

.footer-brand-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 14px;
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.footer-social a {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.footer-social a:hover { background: var(--primary); color: white; }

.footer-widget-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-links li {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.footer-links li a {
  display: block;
  padding: 7px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.footer-links li a:hover { color: var(--primary); padding-left: 5px; }

.footer-recent-post {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-recent-post:last-child { border-bottom: none; }

.footer-recent-post .thumb {
  flex-shrink: 0;
  width: 60px;
  height: 50px;
  border-radius: 2px;
  overflow: hidden;
}

.footer-recent-post .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-recent-post .post-title {
  font-family: var(--font-display);
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
  margin-bottom: 4px;
  font-weight: 600;
}

.footer-recent-post .post-title:hover { color: var(--primary); }

.footer-recent-post .post-date {
  font-family: var(--font-ui);
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-family: var(--font-ui);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--primary); }

.footer-bottom-links { display: flex; gap: 20px; }

/* ============================================
   SEARCH OVERLAY
============================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.search-overlay.open { opacity: 1; visibility: visible; }

.search-form-inner {
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
}

.search-form-inner input {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  padding: 14px 0;
  font-family: var(--font-display);
  font-size: 28px;
  color: white;
  outline: none;
  transition: var(--transition);
}

.search-form-inner input:focus { border-color: var(--primary); }
.search-form-inner input::placeholder { color: rgba(255,255,255,0.35); }

.search-form-inner p {
  font-family: var(--font-ui);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 10px;
}

.search-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 30px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  line-height: 1;
}
.search-close:hover { color: var(--primary); }

/* ============================================
   SINGLE POST
============================================ */
.single-post { max-width: 100%; margin: 0; }

.article-modern-container {
  background: var(--white);
  padding: 0;
}

.article-body-wrap {
  display: flex;
  gap: 30px;
  position: relative;
  margin-top: 30px;
}

.post-featured-image {
  width: 100%;
  height: 420px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 32px;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sticky-share-side {
  position: sticky;
  top: 100px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 60px;
  flex-shrink: 0;
  z-index: 10;
}

.share-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray-4);
  text-align: center;
  margin-bottom: 5px;
}

.sticky-share-side .share-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--gray-4);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  text-decoration: none;
  transition: var(--transition);
}

.sticky-share-side .share-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.article-content-inner {
  flex: 1;
  min-width: 0;
  max-width: 780px;
  margin: 0 auto;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #1a1a1a;
}

.post-content p {
  margin-bottom: 1.5em;
}

.post-content p:first-of-type::first-letter {
  float: left;
  font-size: 3.5rem;
  line-height: 1;
  font-weight: 700;
  margin: 4px 12px 0 0;
  color: var(--primary);
  font-family: var(--font-display);
}

.post-header {
  margin-bottom: 30px;
  text-align: left;
  padding: 0;
  border: none;
}

.post-header h1.entry-title {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 10px;
  margin-bottom: 25px;
  color: var(--secondary);
}

.post-meta-wrapper {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--gray-4);
  text-transform: uppercase;
}

.post-meta-wrapper .post-meta {
    background: var(--gray-1);
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: var(--primary);
  z-index: 9999;
  transition: width 0.1s ease;
}

.post-featured-image {
  margin-bottom: 30px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.featured-caption {
    font-size: 13px;
    color: var(--gray-4);
    font-family: var(--font-ui);
    text-align: center;
    padding: 10px 0;
    background: var(--gray-1);
    margin-top: -5px;
    border-radius: 0 0 var(--radius) var(--radius);
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content {
  font-size: 19px;
  line-height: 1.9;
  color: var(--text);
  letter-spacing: -0.01em;
  font-weight: 400;
}

.post-content p { margin-bottom: 28px; }

/* Images in content */
.post-content img {
    border-radius: var(--radius);
    margin: 30px auto;
    box-shadow: var(--shadow-sm);
}

.post-content h2 {
  font-size: 24px;
  margin: 30px 0 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.post-content h3 {
  font-size: 20px;
  margin: 25px 0 12px;
}

.post-content blockquote {
  border-left: 5px solid var(--primary);
  padding: 30px 40px;
  margin: 40px 0;
  background: var(--gray-1);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--secondary);
  line-height: 1.6;
  position: relative;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content blockquote::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 60px;
  color: var(--primary);
  opacity: 0.15;
  font-family: serif;
}

body.rtl .post-content blockquote {
  border-left: none;
  border-right: 5px solid var(--primary);
  border-radius: var(--radius) 0 0 var(--radius);
}

body.rtl .post-content blockquote::before {
  left: auto;
  right: 15px;
}

/* First Paragraph Dropcap */
.post-content > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 75px;
  font-weight: 900;
  float: left;
  line-height: 60px;
  padding-right: 15px;
  padding-top: 5px;
  color: var(--primary);
}

body.rtl .post-content > p:first-of-type::first-letter {
  float: right;
  padding-right: 0;
  padding-left: 15px;
}

.post-content ul, .post-content ol {
  margin: 0 0 20px 20px;
  list-style: disc;
}

.post-content ol { list-style: decimal; }

.post-content li { margin-bottom: 6px; }

.post-content a { color: var(--primary); text-decoration: underline; }
.post-content a:hover { color: var(--primary-dark); }

/* Post Tags */
.post-tags .tag-item {
    display: inline-block;
    background: #f2f2f2;
    color: var(--text-light);
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 10px;
}

.post-tags .tag-item:hover {
    background: var(--primary);
    color: #fff;
}

/* Author Box Modern */
.author-box-modern {
  display: flex;
  gap: 30px;
  padding: 40px;
  background: var(--gray-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 50px 0;
  align-items: center;
}

.author-avatar-wrap {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 5px var(--white), 0 0 0 8px var(--primary);
}

.author-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }

body.rtl .article-body-wrap { flex-direction: row-reverse; }
body.rtl .sticky-share-side .share-btn { box-shadow: -2px 2px 5px rgba(0,0,0,0.05); }

.author-label {
  font-family: var(--font-ui);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 5px;
  display: block;
}

.author-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
}

.author-bio {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
}

/* Related Posts Modern */
.related-posts-modern { margin: 50px 0; }
.related-posts-modern .section-header {
  border-bottom: 2px solid var(--border);
  margin-bottom: 30px;
}
.related-posts-modern .section-title span {
  border-bottom: 2px solid var(--primary);
  display: inline-block;
  padding-bottom: 10px;
  margin-bottom: -2px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.related-card .related-thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 15px;
}

.related-card .related-thumb .cat-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 10px;
  font-size: 10px;
}

.related-card .related-title {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  margin-bottom: 8px;
}

.related-meta {
  font-size: 11px;
  color: var(--gray-4);
  font-family: var(--font-ui);
  text-transform: uppercase;
}

.related-meta i { margin-right: 5px; color: var(--primary); }

@media (max-width: 992px) {
  .article-body-wrap { flex-direction: column; }
  .sticky-share-side {
    position: static;
    flex-direction: row;
    width: 100%;
    justify-content: center;
    margin-bottom: 20px;
  }
  .sticky-share-side .share-label { display: none; }
  .post-header h1.entry-title { font-size: 32px; }
}

/* ============================================
   PAGINATION
============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 30px 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: var(--transition);
}

.pagination .current,
.pagination a:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ============================================
   BACK TO TOP
============================================ */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  cursor: pointer;
}

.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ============================================
   DARK MODE TOGGLE ANIMATION
============================================ */
.dark-mode-toggle { position: relative; }

/* ============================================
   MOBILE MENU
============================================ */
.mobile-menu-toggle { display: none; }

.mobile-nav {
  display: none;
  background: var(--dark-2);
  padding: 15px 0;
}

.mobile-nav a {
  display: block;
  padding: 10px 20px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mobile-nav a:hover { color: var(--primary); background: rgba(255,255,255,0.03); }

/* ============================================
   CUSTOMIZER LIVE PREVIEW HELPERS
============================================ */
body.customize-preview .site-header,
body.customize-preview .main-navigation {
  position: relative !important;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
  .site-content {
    grid-template-columns: 1fr 280px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .site-content {
    grid-template-columns: 1fr;
  }
  .sidebar { display: none; }
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .hero-main { grid-row: auto; height: 280px; }
  .hero-secondary { height: 200px; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card-large { grid-template-columns: 1fr; }
  .tabs-posts-layout { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .main-navigation .primary-menu { display: none; }
  .mobile-menu-toggle { display: flex; }
  .header-ad { display: none; }
  .top-bar-right { display: none; }
}

@media (max-width: 480px) {
  .site-title { font-size: 24px; }
  .hero-main .hero-title { font-size: 20px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

/* ============================================
   HOME SLIDER
============================================ */
.home-slider-wrap {
  margin-bottom: 30px;
  position: relative;
}

.main-slider {
  position: relative;
  height: 500px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--dark-2);
}

.slider-track {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s;
  z-index: 1;
}

.slide-item.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.slide-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s linear;
}

.slide-item.active .slide-image {
  transform: scale(1.1);
}

.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  z-index: 5;
  color: white;
}

.slide-cat {
  margin-bottom: 15px;
}

.slide-meta {
  margin-bottom: 10px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 15px;
}

.slide-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  max-width: 80%;
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.8s ease;
  transform: translateY(20px);
  opacity: 0;
}

.slide-item.active .slide-title {
  transform: translateY(0);
  opacity: 1;
}

.slide-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
}

/* Slider Nav */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 10;
  transition: var(--transition);
}

.slider-nav:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.slider-nav.prev { left: 20px; }
.slider-nav.next { right: 20px; }

/* Slider Dots */
.slider-dots {
  position: absolute;
  bottom: 25px;
  right: 40px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  width: 25px;
  background: var(--primary);
}

@media (max-width: 768px) {
  .main-slider { height: 400px; }
  .slide-title { font-size: 24px; max-width: 100%; }
  .slide-content { padding: 25px; }
  .slider-nav { display: none; }
}

/* Branding & Logo */
.custom-logo-link img {
    max-height: 80px;
    width: auto;
    display: block;
}

.site-branding {
    max-width: 300px;
}

/* Header Tools & Language Switcher */
.header-lang-switcher {
    display: flex;
    gap: 8px;
    margin: 0 10px;
}

.lang-item {
    font-size: 11px;
    font-weight: 700;
    color: var(--dark-navy);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    background: transparent;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.lang-item:hover, .lang-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

body.dark-mode .lang-item {
    color: var(--white);
    border-color: rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
    .nav-right .language-switcher-wrap {
        display: none;
    }
}

/* ====== MAGAZINE SECTION ====== */
.magazine-layout {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.magazine-main {
    flex: 3;
    background: #f1f9f9;
    padding: 30px;
    border-radius: 8px;
}

.magazine-sidebar {
    flex: 1;
}

/* Main Header */
.magazine-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #00c2cb;
    margin-bottom: 30px;
}

.magazine-section .section-title span {
    background: transparent;
    color: #4ebbb7;
    font-size: 28px;
    padding: 0;
}

.section-tabs {
    display: flex;
    gap: 15px;
}

.section-tabs span {
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--dark-navy);
}

.section-tabs span.active {
    color: #4ebbb7;
}

/* Magazine Grid */
.magazine-grid {
    display: flex;
    gap: 30px;
}

.magazine-featured {
    flex: 6;
}

.magazine-list {
    flex: 4;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Featured Post */
.magazine-featured .post-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.magazine-featured .post-cat-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
}

.magazine-featured .post-cat-badge .cat-badge {
    background: #00c2cb;
    color: white;
}

.magazine-featured .post-icon {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff5e5e;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.magazine-featured .post-meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.magazine-featured .post-meta-top i {
    color: #00c2cb;
}

.magazine-featured .post-title {
    font-size: 26px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.magazine-featured .post-excerpt {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-read-more {
    display: inline-block;
    background: #00c2cb;
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

/* Magazine Item */
.magazine-item {
    display: flex;
    gap: 15px;
    background: transparent;
}

.magazine-item .post-thumb {
    width: 100px;
    height: 70px;
    flex-shrink: 0;
}

.magazine-item .post-thumb img {
    border-radius: 5px;
}

.magazine-item .post-meta {
    font-size: 11px;
    color: #888;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-icon.small {
    color: #ff5e5e;
}

.magazine-item .post-title {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
}

/* Sidebar Styles */
.magazine-sidebar .section-header {
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.magazine-sidebar .section-title span {
    font-size: 18px;
    color: #333;
}

.most-viewed-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.most-viewed-item {
    display: flex;
    gap: 15px;
    position: relative;
}

.most-viewed-item .rank-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    background: #007bff;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    border: 3px solid white;
    z-index: 2;
}

.most-viewed-item .post-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
}

.most-viewed-item .post-thumb img {
    border-radius: 5px;
}

.most-viewed-item .post-title {
    font-size: 14px;
    margin-bottom: 5px;
}

.rating-stars {
    color: #007bff;
    font-size: 10px;
    margin-bottom: 5px;
}

.most-viewed-item .post-date {
    font-size: 11px;
    color: #aaa;
}

.magazine-pagination {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

.magazine-pagination button {
    background: #ebf5f5;
    border: 1px solid #dceaea;
    color: #888;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.sidebar-ad {
    margin-top: 40px;
}

.sidebar-ad .ad-label {
    font-size: 10px;
    color: #bbb;
    text-align: center;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* RTL Support */
body.rtl .magazine-layout { direction: rtl; }
body.rtl .magazine-main { text-align: right; }
body.rtl .magazine-featured .post-cat-badge { left: 15px; right: auto; }
body.rtl .magazine-featured .post-icon { right: 15px; left: auto; }
body.rtl .most-viewed-item .rank-badge { right: -10px; left: auto; }

@media (max-width: 992px) {
    .magazine-layout { flex-direction: column; }
    .magazine-grid { flex-direction: column; }
}

/* Magazine Category Grid */
.magazine-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 30px;
}

.mag-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mag-list .post-card-small {
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 15px;
  display: flex;
  gap: 15px;
}

.mag-list .post-card-small .post-thumb {
  width: 100px;
  flex-shrink: 0;
}

.mag-list .post-card-small:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

@media (max-width: 991px) {
  .magazine-grid { grid-template-columns: 1fr; }
}

/* RTL Adjustments for Magazine */
body.rtl .magazine-grid { direction: rtl; }
body.rtl .mag-list { text-align: right; }


/* ============================================
   HOME COMPLEX GRID
============================================ */
.home-complex-grid {
    margin-bottom: 50px;
    padding-top: 20px;
}

.grid-layout-5 {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    grid-template-rows: 250px 250px;
    gap: 4px;
    background: #fff;
    border: 1px solid #eee;
}

.grid-main-post {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.left-stack { grid-column: 1; display: flex; flex-direction: column; gap: 4px; }
.right-stack { grid-column: 3; display: flex; flex-direction: column; gap: 4px; }

.grid-item {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.mini-card { height: 250px; }
.featured-card { height: 504px; }

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.grid-item:hover img { transform: scale(1.05); }

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.item-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    color: #fff;
    pointer-events: none;
}

.item-date {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-family: var(--font-ui);
}

.mini-card .item-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.featured-card .item-title {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 12px;
}

.featured-card .item-excerpt {
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}

/* Bottom Row */
.grid-bottom-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.bottom-thumb {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 140px;
    margin-bottom: 12px;
}

.bottom-thumb img { width: 100%; height: 100%; object-fit: cover; }

.bottom-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: var(--text);
}

.bottom-date { font-size: 11px; color: var(--gray-4); display: block; margin-bottom: 5px; }

/* ============================================
   VIDEO SECTION
============================================ */
.home-video-section {
    background: #000;
    color: #fff;
    padding: 60px 30px;
    margin: 50px -15px;
    border-radius: 4px;
}

.home-video-section .section-title span { color: #fff; border-color: var(--primary); }

.video-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 40px;
}

.video-card { position: relative; overflow: hidden; border-radius: 10px; }
.video-link { display: block; color: inherit; position: relative; }

.video-card img {
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
    filter: brightness(0.7);
}

.video-card:hover img { transform: scale(1.03); filter: brightness(1); }

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transition: var(--transition);
}

.video-card:hover .play-btn { transform: translate(-50%, -50%) scale(1.1); background: #fff; color: var(--primary); }

.video-featured .video-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
}

.video-featured .video-title { font-size: 28px; font-weight: 900; margin: 12px 0; }

.video-list { display: flex; flex-direction: column; gap: 20px; }

.video-card.small { 
    display: flex; 
    gap: 15px; 
    background: rgba(255,255,255,0.04); 
    padding: 12px; 
    border-radius: 8px;
    transition: background 0.3s ease;
}

.video-card.small:hover { background: rgba(255,255,255,0.08); }

.video-thumb { position: relative; width: 160px; flex-shrink: 0; border-radius: 6px; overflow: hidden; }

.play-btn-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.video-info .video-title { font-size: 16px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
.video-info .video-date { font-size: 11px; color: rgba(255,255,255,0.4); }

@media (max-width: 1024px) {
    .grid-layout-5 { grid-template-columns: 1fr 1fr; }
    .right-stack { display: none; }
    .video-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .grid-layout-5 { grid-template-columns: 1fr; }
    .left-stack { display: none; }
    .grid-bottom-row { grid-template-columns: 1fr 1fr; }
    .home-video-section { margin: 40px -15px; padding: 40px 15px; }
}

/* RTL for Grid */
body.rtl .home-complex-grid .item-content,
body.rtl .home-complex-grid .bottom-content { text-align: right; }
body.rtl .video-card.small { flex-direction: row; }
/* ============================================
   CATEGORY SLIDER
============================================ */
.home-category-slider-wrap {
    margin: 40px 0;
    position: relative;
}

.category-slider-container {
    position: relative;
    padding: 0 40px;
}

.category-slider-inner {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: none; /* Firefox */
}

.category-slider-inner::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.cat-slide-item {
    flex: 0 0 160px;
    border-radius: 12px;
    overflow: hidden;
    height: 160px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.cat-slide-item:hover { transform: translateY(-5px); }

.cat-card-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.cat-slide-item:hover .cat-card-img { transform: scale(1.1); }

.cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.cat-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    color: #fff;
    text-align: center;
}

.cat-name {
    display: block;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.cat-count {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    font-family: var(--font-ui);
}

/* Slider Nav Buttons */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.slider-nav:hover { background: var(--primary); color: #fff; transform: translateY(-50%) scale(1.1); }
.slider-nav.prev { left: 0; }
.slider-nav.next { right: 0; }

/* ============================================
   INTERACTIVE ANIMATIONS
============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delay for children reveal */
.reveal-items > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-items.active > * {
    opacity: 1;
    transform: translateY(0);
}

.reveal-items.active > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-items.active > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-items.active > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-items.active > *:nth-child(4) { transition-delay: 0.4s; }
.reveal-items.active > *:nth-child(5) { transition-delay: 0.5s; }
.reveal-items.active > *:nth-child(6) { transition-delay: 0.6s; }

/* Magnify hover effect for premium cards */
.premium-card-zoom { overflow: hidden; }
.premium-card-zoom img { transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1); }
.premium-card-zoom:hover img { transform: scale(1.08); }

/* Fade-in for images */
img.reveal-img { opacity: 0; transition: opacity 1s ease; }
img.reveal-img.loaded { opacity: 1; }

/* ============================================
   MASONRY GRID (Template 2)
============================================ */
.masonry-grid {
    column-count: 3;
    column-gap: 30px;
    margin-top: 40px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 30px;
    display: inline-block;
    width: 100%;
}

.template-header {
    text-align: center;
    padding: 60px 0;
    background: white;
    margin: 20px 0 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.template-header h1 { font-size: 42px; font-weight: 900; margin-bottom: 10px; }
.template-desc { color: var(--gray-4); font-size: 16px; }

/* ============================================
   RESPONSIVE OPTIMIZATIONS (GLOBAL)
============================================ */
@media (max-width: 1200px) {
    .container { max-width: 95%; }
    .header-inner { gap: 20px; }
    .grid-layout-5 { grid-template-columns: 240px 1fr 240px; }
    .masonry-grid { column-count: 2; }
}

@media (max-width: 992px) {
    /* Header */
    .header-main-socials, .header-ad { display: none; } 
    .site-branding, .site-branding-v2 { display: none !important; }
    .header-inner { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; justify-content: flex-end; align-items: center; padding: 15px 0; }
    .site-branding img, .site-branding img.custom-logo { max-width: 150px !important; height: auto !important; }
    .mobile-only-tools { flex: 0 0 auto; display: block; }
    
    /* Grid */
    .grid-layout-5 { 
        grid-template-columns: 1fr 1fr; 
        grid-template-rows: auto;
    }
    .right-stack { display: none; }
    .grid-main-post { grid-column: 1 / span 2; }
    .featured-card { height: 400px; }
    
    /* Video */
    .video-grid { grid-template-columns: 1fr; }
    
    /* Magazine */
    .magazine-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    body, html { overflow-x: hidden; width: 100vw; }
    .container { max-width: 100%; padding-left: 10px; padding-right: 10px; }
    /* Header */
    .site-title { font-size: 26px; }
    .site-header { padding: 15px 0; }
    .site-branding, .site-branding-v2 { display: none !important; }
    
    /* Section Headers */
    .section-header, .premium-header { flex-wrap: wrap !important; }
    .magazine-main .section-header { flex-direction: column !important; align-items: flex-start !important; gap: 10px; }
    .section-tabs { display: flex; flex-wrap: wrap !important; gap: 10px; }
    .section-tabs span { white-space: normal !important; flex: 1 1 auto; padding: 5px; text-align: center; }
    
    /* Slider */
    .category-slider-container { padding: 0 10px; }
    .slider-nav { display: none; }
    
    /* Grid */
    .grid-layout-5 { grid-template-columns: 1fr; }
    .left-stack { display: none; }
    .grid-bottom-row { grid-template-columns: 1fr 1fr; }
    .masonry-grid { column-count: 1; }
}

@media (max-width: 480px) {
    .grid-bottom-row { grid-template-columns: 1fr; }
    .video-card.small { flex-direction: column; }
}

/* ============================================
   NEWSLETTER SECTION
============================================ */
.home-newsletter-section {
    padding: 40px 0;
    background: #fdfdfd;
}

.home-magazine-section {
    margin: 80px 0;
}

/* Ensure section headers match theme exactly */
.magazine-block .section-header {
    margin-bottom: 35px;
}

/* Better mobile spacing */
@media (max-width: 768px) {
    .home-magazine-section { margin: 50px 0; }
    .home-newsletter-section { padding: 60px 0; }
}

.newsletter-card {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 50px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}



.newsletter-icon {
    width: 90px;
    height: 90px;
    background: #f8f9fa;
    color: #cbd5e0; /* Gray/Neutral from image */
    border-radius: 50%;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
}

.newsletter-subtitle {
    display: block;
    font-size: 14px;
    color: var(--gray-4);
    margin-bottom: 10px;
    font-weight: 500;
}

.newsletter-title {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--text);
}

.newsletter-desc {
    font-size: 16px;
    color: var(--gray-4);
    margin-bottom: 35px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form .input-group {
    position: relative;
}

.newsletter-form .input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e0;
    font-size: 18px;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border: 1px solid #e1e8ef;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 15px;
    transition: var(--transition);
}

.newsletter-form input[type="email"]:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0,123,255,0.1);
}

.btn-subscribe {
    width: 100%;
    padding: 18px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-subscribe:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

/* ============================================
   JANNAH STYLE MAGAZINE BLOCKS
============================================ */
.premium-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap; /* Fix overflow on mobile */
}

@media (max-width: 768px) {
    .newsletter-card {
        padding: 30px 20px;
        margin: 0 10px;
    }
    .newsletter-title {
        font-size: 24px;
    }
    .newsletter-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin: 0 auto 20px;
    }
    .newsletter-desc {
        font-size: 14px;
        margin-bottom: 20px;
    }
    .newsletter-form input[type="email"] {
        padding: 15px 15px 15px 45px;
    }
    .btn-subscribe {
        padding: 15px;
    }
}

.premium-header .section-title {
    margin-bottom: 0;
    white-space: nowrap;
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
}

.premium-header .section-title span { color: white; }

.premium-header .header-line {
    height: 3px;
    background: var(--primary);
    flex: 1;
    opacity: 0.15;
}

/* Base Card Styles */
.jannah-card-standard, .jannah-large-card, .jannah-small-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: var(--transition);
    border: 1px solid #f2f2f2;
}

.jannah-card-standard:hover, .jannah-large-card:hover, .jannah-small-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.post-meta-v2 {
    font-size: 12px;
    color: var(--gray-4);
    display: flex;
    font-weight: 500;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap; /* Fix metadata overflow */
}

.post-meta-v2 i { color: var(--primary); margin-right: 5px; }

.thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.5));
    opacity: 0;
    transition: var(--transition);
}

/* Jannah Grid Layout (2 Cols) */
.jannah-block-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.jannah-card-standard .post-thumb {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.jannah-card-standard .post-content {
    padding: 20px;
}

.jannah-card-standard .post-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 12px;
}

.jannah-card-standard .post-title a:hover { color: var(--primary); }

.jannah-card-standard .post-excerpt {
    color: var(--gray-4);
    line-height: 1.6;
    font-size: 14px;
}

.jannah-card-standard:hover .thumb-overlay { opacity: 1; }

/* Jannah List Layout (1 Large + 4 Small) */
.jannah-block-list {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 30px;
}

.jannah-large-card .post-thumb {
    height: 400px;
    position: relative;
    overflow: hidden;
}

.jannah-large-card .post-content {
    padding: 25px;
}

.jannah-large-card .post-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 15px;
}

.jannah-large-card .post-title a:hover { color: var(--primary); }

.jannah-large-card .post-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 15px;
}

.jannah-large-card:hover .thumb-overlay { opacity: 1; }

.jannah-list-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.jannah-small-card {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 20px;
}

.jannah-small-card .post-thumb {
    width: 120px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.jannah-small-card .post-content {
    flex: 1;
    padding: 0;
}

.jannah-small-card .post-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.jannah-small-card .post-title a:hover { color: var(--primary); }

.jannah-small-card .post-meta-v2 { margin-bottom: 0; }

@media (max-width: 992px) {
    .jannah-block-list, .jannah-block-grid { grid-template-columns: 1fr; }
    .jannah-large-card .post-thumb { height: 300px; }
}

@media (max-width: 768px) {
    .jannah-large-card .post-content { padding: 15px; }
    .jannah-large-card .post-title { font-size: 20px; margin-bottom: 10px; }
    .jannah-card-standard .post-title { font-size: 18px; }
    .premium-header .section-title { white-space: normal; font-size: 16px; }
}

@media (max-width: 580px) {
    .jannah-small-card { flex-direction: column; align-items: flex-start; }
    .jannah-small-card .post-thumb { width: 100%; height: 200px; }
}

/* ============================================
   HEADER V2 (GLOBAL NEWS) & PROMO SLOTS (BYPASS)
   ============================================ */

.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }

.top-promo-flex {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 10px 0;
    flex-wrap: wrap;
}

.promo-item-box {
    max-width: 100%;
    overflow: hidden;
    text-align: center;
}

.promo-item-box img, 
.feature-spot-v2 img, 
.side-content-promo img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

#masthead-v2 {
    background: #fff;
    border-bottom: 1px solid var(--border, #eee);
}

.header-v2-main {
    padding: 25px 0;
}

.header-v2-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-v2-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    gap: 30px;
}

.feature-spot-v2 {
    flex: 1;
    min-width: 300px;
    max-width: 468px;
    min-height: 60px;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 11px;
    text-transform: uppercase;
}

.feature-spot-v2:empty::before {
    content: 'مساحة إعلانية (468x60)';
}

.site-branding-v2 {
    flex-shrink: 0;
    padding: 0 40px;
}

.main-navigation-v2 {
    background: #111;
    color: #fff;
    height: 50px;
}

.nav-v2-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-v2-primary ul {
    display: flex;
    list-style: none;
    height: 100%;
    margin: 0;
    padding: 0;
}

.nav-v2-primary ul li a {
    color: #fff;
    padding: 0 18px;
    height: 50px;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
}

.nav-v2-tools {
    display: flex;
    gap: 15px;
}

.v2-tool {
    color: #fff;
    font-size: 16px;
    background: none;
    border: none;
    cursor: pointer;
}

.v2-breaking {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

body.dark-mode .feature-spot-v2,
body.dark-mode .sidebar-widget.side-content-promo {
    background: #1a1a1a;
    border-color: #333;
    color: #666;
}

.sp-placeholder {
    font-size: 12px;
    color: #999;
    font-weight: bold;
}

/* ============================================
   HEADER V2 (GLOBAL NEWS PORTAL)
============================================ */
.site-header-v2 {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.header-v2-main {
    padding: 30px 0;
    border-bottom: 1px solid #f0f0f0;
}

.site-branding-v2 .site-description {
    color: var(--gray-4);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* Thick Categorized Navbar */
.main-navigation-v2 {
    background: var(--dark-2);
}

.nav-v2-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.primary-menu-v2 {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu-v2 > li > a {
    display: block;
    padding: 20px 18px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.primary-menu-v2 > li:hover > a {
    background: rgba(255,255,255,0.05);
    border-bottom-color: var(--primary);
}

.nav-v2-tools {
    display: flex;
    gap: 10px;
}

.v2-tool {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.v2-tool:hover {
    background: var(--primary);
}

/* ============================================
   HOME 3 GLOBAL MOSAIC HERO
============================================ */
.home-v3-hero {
    margin-bottom: 40px;
}

.mosaic-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 250px 250px;
    gap: 15px;
}

.mosaic-main {
    grid-column: 1;
    grid-row: 1 / 3;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.mosaic-sub {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.mosaic-main img, .mosaic-sub img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mosaic-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.mosaic-content {
    position: absolute;
    bottom: 0; left: 0;
    padding: 30px;
    z-index: 2;
    width: 100%;
}

.mosaic-sub .mosaic-content { padding: 20px; }

.mosaic-title {
    font-size: 36px;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.mosaic-title a { color: #fff; }
.mosaic-title a:hover { color: var(--primary); }

.mosaic-title-small {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 10px;
}

.mosaic-title-small a { color: #fff; }
.mosaic-title-small a:hover { color: var(--primary); }

.meta-light { color: rgba(255,255,255,0.8); }

/* ============================================
   DARK THEME SECTION (TEMPLATE 3)
============================================ */
.theme-dark-section {
    background: var(--dark-2);
    padding: 60px 0;
    color: #fff;
    margin: 60px 0;
}

.header-dark .section-title {
    background: var(--dark);
    color: #fff;
}

.theme-dark-section .jannah-card-standard {
    background: var(--dark-3);
    border-color: #333;
    color: #fff;
}

.theme-dark-section .jannah-card-standard .post-title a { color: #fff; }
.theme-dark-section .jannah-card-standard .post-title a:hover { color: var(--primary); }

/* Responsive Adjustments */
@media (max-width: 992px) {
    .mosaic-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .mosaic-main {
        grid-column: 1 / 3;
        grid-row: 1;
        height: 400px;
    }
    .mosaic-sub { height: 250px; }
}

/* ============================================
   COMMENTS AREA
============================================ */
.comments-area {
    margin-top: 60px;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.comments-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 30px;
    text-transform: uppercase;
    font-family: var(--font-ui);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.comment-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.comment-list .comment {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--gray-2);
}

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-body {
    display: flex;
    gap: 20px;
    position: relative;
    padding: 25px;
    background: #fdfdfd;
    border-radius: 8px;
    border: 1px solid var(--gray-2);
}

.comment-author.vcard {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.comment-author.vcard img.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 8px;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.comment-author.vcard .fn {
    font-style: normal;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.comment-content {
    flex: 1;
}

.comment-metadata {
    margin-bottom: 10px;
    font-size: 11px;
    text-transform: uppercase;
    font-family: var(--font-ui);
    color: var(--gray-4);
}

.comment-content p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 15px;
}

.reply {
    position: absolute;
    top: 25px;
    right: 25px;
}

.comment-reply-link {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-ui);
    text-transform: uppercase;
    color: var(--primary);
    padding: 4px 12px;
    border: 1px solid var(--primary);
    border-radius: 20px;
    transition: var(--transition);
}

.reply-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 30px;
    text-transform: uppercase;
    font-family: var(--font-ui);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* Form Styles */
.comment-respond {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px dashed var(--border);
}

#commentform label {
    display: block;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--text);
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fdfdfd;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    margin-bottom: 20px;
}

#commentform textarea {
    min-height: 150px;
}

#commentform input:focus,
#commentform textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.1);
}

#submit {
    background: var(--primary);
    color: #fff;
    padding: 12px 35px;
    border-radius: 30px;
    font-family: var(--font-ui);
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.3);
}

#submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.4);
}

.read-more, .btn-read-more {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    margin-top: 15px;
}

.read-more:hover, .btn-read-more:hover {
    color: var(--primary-dark);
}

/* Sidebar Styling */
.sidebar .widget {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.sidebar .widget-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: table;
}

.sidebar .wp-block-search__button {
    background: var(--primary);
    color: #fff;
    border-radius: 0 4px 4px 0;
}

/* Dark Mode Overrides */
body.dark-mode .comments-area {
    background: var(--dark-2);
    border-color: #333;
}

body.dark-mode .comment-list .comment {
    border-bottom-color: #333;
}

body.dark-mode .comment-author-name { color: #fff; }
body.dark-mode .comment-content { color: var(--gray-3); }

body.dark-mode #commentform input,
body.dark-mode #commentform textarea {
    background: #252525;
    border-color: #444;
    color: #eee;
}

@media (max-width: 768px) {
    .comments-area { padding: 25px; }
    .comment-body { flex-direction: column; gap: 15px; }
    .comment-author-vcard img.avatar { width: 50px; height: 50px; }
}

/* ============================================
   USER REQUESTED CUSTOM CSS
============================================ */

/* Category Colors */
.cat-badge[href*="technology"], .cat-badge.cat-technology, .cat-badge.cat-tech,
.jeg_post_category a[href*="technology"], .jeg_post_category a[href*="tech"] {
  background-color: #1a73e8 !important;
  color: #ffffff !important;
}

.cat-badge[href*="world"], .cat-badge.cat-world, .cat-badge.cat-news, .cat-badge[href*="news"],
.jeg_post_category a[href*="world"], .jeg_post_category a[href*="news"] {
  background-color: #34A853 !important;
  color: #ffffff !important;
}

.cat-badge[href*="featured"], .cat-badge.cat-featured,
.jeg_post_category a[href*="featured"] {
  background-color: #EA4335 !important;
  color: #ffffff !important;
}

.cat-badge[href*="opinion"], .cat-badge.cat-opinion, .cat-badge[href*="analysis"], .cat-badge.cat-analysis,
.jeg_post_category a[href*="opinion"], .jeg_post_category a[href*="analysis"] {
  background-color: #9C27B0 !important;
  color: #ffffff !important;
}

/* Hide Events */
.jeg_block_heading .jeg_block_title {
  display: block;
}

/* Note: :has() + text matching not supported in standard CSS — removed invalid :-moz-any() selectors */
.jeg_block_heading .jeg_block_title-events {
  display: none !important;
}

.widget_categories ul li a[href*="event"],
.footer-cat-list li a[href*="event"] {
  display: none !important;
}

/* Read More Button Styling */
.jeg_readmore, a.jeg_readmore, .jeg_post_body .jeg_readmore,
.btn-read-more, .read-more {
  background: #4285F4 !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  padding: 8px 18px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border: none !important;
  display: inline-block !important;
  text-decoration: none !important;
  transition: opacity 0.2s !important;
}

.jeg_readmore:hover, a.jeg_readmore:hover, .btn-read-more:hover, .read-more:hover {
  opacity: 0.85 !important;
  color: #ffffff !important;
}

/* Container Spacing */
.container, .jeg_container, .jeg_main_content, .jeg_content, [class*="container-fluid"],
.home-main-layout {
  max-width: 100% !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.jeg_section > .container {
  padding-left: 16px !important;
  padding-right: 16px !important;
}

/* ============================================
   TASK 1: RTL + خطوط العربية
============================================ */
html, body {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* نظام الخطوط الموحد — BASE TYPOGRAPHY SYSTEM */
body,
p, li, td, span, blockquote,
.post-excerpt, .post-content p,
.entry-content p,
.widget p, .comment-content p {
  font-family:  var(--font-body-ar, Georgia, 'Times New Roman', serif);
  font-weight:  var(--fw-body, 400);
  font-size:    var(--fz-body, 16px);
  line-height:  var(--lh-body, 1.8);
  color:        var(--text-primary, #1a1a1a);
}

/* العناوين */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.post-title, .entry-title,
.widget-title, .section-title,
.v3-section-title, .hero-title,
.card-title,
.post-card-grid .post-title,
.post-card-large .post-title,
.post-card-small .post-title,
.tabs-featured-post .hero-title,
.site-title {
  font-family:  var(--font-heading, 'DG Agnadeen', 'Cairo', serif) !important;
  font-weight:  var(--fw-heading, 600) !important;
  line-height:  var(--lh-heading, 1.3);
}

h1, .h1 { font-size: var(--fz-h1, 40px); }
h2, .h2 { font-size: var(--fz-h2, 32px); }
h3, .h3 { font-size: var(--fz-h3, 26px); }
h4, .h4 { font-size: var(--fz-h4, 22px); }
h5, .h5 { font-size: var(--fz-h5, 18px); }
h6, .h6 { font-size: var(--fz-h6, 16px); }

.post-card-grid .post-title  { font-size: var(--fz-h4, 22px); }
.post-card-large .post-title { font-size: var(--fz-h3, 26px); }
.post-card-small .post-title { font-size: var(--fz-h5, 18px); }
.hero-title                  { font-size: var(--fz-h2, 32px); }
.hero-main .hero-title       { font-size: var(--fz-h1, 40px); }
.widget-title                { font-size: var(--fz-h5, 18px); }
.section-title               { font-size: var(--fz-h4, 22px); }

.post-excerpt, .entry-excerpt, .v3-card-excerpt {
  font-family: var(--font-body-ar, Georgia, serif);
  font-size:   var(--fz-small, 14px);
  line-height: var(--lh-body, 1.8);
}

/* روابط + قوائم + عناصر UI بـ Cairo */
a { font-family: inherit; }

.primary-menu > li > a,
.primary-menu .sub-menu li a,
.mobile-nav a, .footer-links a,
.cat-badge, .v3-cat-badge,
.tab-btn, .v3-tab-btn,
.section-more, .read-more,
.breaking-label, .top-bar,
.post-meta, .post-date,
.bn-label {
  font-family: 'Cairo', var(--font-body-ar, serif);
  font-weight: 600;
}

/* RTL — Flexbox إصلاح */
.primary-menu,
.h-nav-wrap,
.footer-top,
.breaking-news-inner,
.top-bar-inner {
  direction: rtl;
}

/* RTL — Dropdowns تفتح من اليمين */
.primary-menu .sub-menu {
  right: 0;
  left: auto;
}

.primary-menu .sub-menu li a {
  border-right: 3px solid transparent;
  border-left: none;
}

.primary-menu .sub-menu li a:hover {
  border-right-color: var(--primary);
  border-left: none;
  padding-right: 22px;
  padding-left: 18px;
}

/* تصحيح هامش الـ Breaking Label */
.bn-label {
  margin-left: 16px;
  margin-right: 0;
}

/* Responsive font sizes */
@media (max-width: 768px) {
  :root {
    --fz-h1:   28px;
    --fz-h2:   24px;
    --fz-h3:   20px;
    --fz-h4:   18px;
    --fz-h5:   16px;
    --fz-h6:   14px;
    --fz-body: 15px;
  }
}

@media (max-width: 480px) {
  :root {
    --fz-h1:   24px;
    --fz-h2:   20px;
    --fz-h3:   18px;
    --fz-h4:   16px;
    --fz-body: 14px;
  }
}

/* ============================================
   TASK 2: Dark Mode — إصلاح كامل
============================================ */
body.dark-mode {
  background:  #0D0D0D;
  color:       #F0EEE9;
  font-family: 'Cairo', 'Tajawal', Georgia, serif;
}

body.dark-mode .flash-header,
body.dark-mode .site-header,
body.dark-mode .site-header-v2 { background: #161616; }

body.dark-mode .main-navigation,
body.dark-mode .h-row-3         { background: #0D1520; }

body.dark-mode .h-row-2         { background: #1a1a1a; }

body.dark-mode .post-card-grid,
body.dark-mode .widget {
  background:  #161616;
  border-color: #2A2A2A;
}

body.dark-mode .post-title,
body.dark-mode .entry-title,
body.dark-mode h1, body.dark-mode h2,
body.dark-mode h3, body.dark-mode h4,
body.dark-mode h5, body.dark-mode h6 {
  color: var(--text-white, #F0EEE9);
}

body.dark-mode .post-excerpt,
body.dark-mode .entry-content p,
body.dark-mode p {
  color: #B0ADA8;
}

body.dark-mode .section-title { color: #F0EEE9; }

body.dark-mode .sidebar .widget {
  background:   #161616;
  border-color: #2A2A2A;
}

/* ============================================
   TASK 3: Header Redesign — إعلانات + RTL
============================================ */
/* صف اللوجو + الإعلانات */
.h-row-2 .container {
  display:         flex;
  align-items:     center;
  justify-content: flex-start;
  flex-direction:  row;
  gap:             20px;
  direction:       rtl;
}

/* منطقة الإعلانات الثنائية */
.header-ads-wrap {
  display:         flex;
  gap:             10px;
  flex:            1;
  justify-content: center;
  align-items:     center;
}

.header-ad-single {
  flex:       1;
  max-width:  468px;
  text-align: center;
}

.header-ad-single img { max-width: 100%; height: auto; }

/* navbar RTL */
.h-row-3 .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse; /* Reverses order: Nav Right, Tools Left */
}

.h-nav-wrap {
    display: flex;
    align-items: center;
    gap: 15px; /* Added gap between HOME and Menu */
}

.h-home-tab {
    font-family: 'DG Agnadeen', sans-serif !important;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    padding: 0 20px;
    height: 50px;
    line-height: 50px;
    display: inline-block;
    border-radius: 4px 4px 0 0;
}

.h-row-3-left {
    display: flex;
    align-items: center;
    gap: 20px;
}


/* ============================================
   TASK 4: التاريخ العربي
============================================ */
.v3-current-date {
  font-family: 'Cairo', sans-serif;
  font-size:   12px;
  color:       rgba(255,255,255,0.85);
  white-space: nowrap;
  display:     flex;
  align-items: center;
  gap:         5px;
}

/* ============================================
   TASK 5: FEATURED GRID — عنوان أبيض
============================================ */
.v3-featured-grid .hero-title,
.v3-featured-grid .post-title,
.v3-featured-grid .entry-title,
.v3-card-title,
.v3-card .v3-card-title {
  color: #FFFFFF !important;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.v3-featured-grid .hero-content .post-title a,
.v3-card .v3-card-title,
.v3-card-info .v3-card-title {
  color: #FFFFFF !important;
}

/* Gradient Overlay للـ Featured */
.v3-featured-grid .hero-overlay,
.v3-card-overlay {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.90) 0%,
    rgba(0,0,0,0.40) 50%,
    transparent 100%
  );
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* ============================================
   TASK 6: TRENDING TABS — ثبات اللاوت
============================================ */
.v3-tab-content {
  display: none;
}

.v3-tab-content.active {
  display:               grid;
  grid-template-columns: 1.4fr 1fr;
  gap:                   20px;
  align-items:           start;
}

.v3-featured-tab-post,
.v3-tab-featured {
  position:     relative;
  height:       380px;
  overflow:     hidden;
  border-radius: 4px;
}

.v3-tab-small-list {
  display:        flex;
  flex-direction: column;
  gap:            0;
}

.v3-tab-small-list article {
  display:      flex;
  gap:          12px;
  padding:      12px 0;
  border-bottom: 1px solid var(--border, #f0f0f0);
  align-items:  center;
}

.v3-tab-small-list .thumb {
  flex-shrink:   0;
  width:         85px;
  height:        65px;
  border-radius: 4px;
  overflow:      hidden;
}

/* عنوان التريندينج أبيض */
.v3-trending .tabs-featured-post .hero-title,
.v3-trending .tabs-featured-post .post-title,
.v3-featured-tab-post .v3-card-title,
.v3-card-info h3, .v3-card-info h4 {
  color: #FFFFFF !important;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

/* Trending Tabs RTL */
.v3-tabs-nav {
  display:    flex;
  gap:        8px;
  direction:  rtl;
  flex-wrap:  wrap;
  margin-bottom: 20px;
}

.v3-tab-btn {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size:   13px;
  padding:     8px 18px;
  border:      2px solid var(--border, #f0f0f0);
  border-radius: 4px;
  background:  transparent;
  cursor:      pointer;
  transition:  all 0.2s;
}

.v3-tab-btn.active {
  background:  var(--primary, #c0392b);
  color:       #fff;
  border-color: var(--primary, #c0392b);
}

/* ============================================
   RTL: Footer Quick Links
============================================ */
.footer-quick-links {
  display:        flex;
  flex-direction: column;
  gap:            8px;
  direction:      rtl;
}

.footer-quick-links a {
  padding-right: 0;
}

/* ============================================
   Mobile RTL
============================================ */
@media (max-width: 768px) {
  .h-row-2 .container { flex-direction: column; align-items: center; }
  .header-ads-wrap    { flex-direction: column; }
  .v3-tab-content.active { grid-template-columns: 1fr; }
  .v3-featured-tab-post  { height: 260px; }
  
  /* Mobile Hero Slider Fixes */
  .hero-slider-wrap { height: auto !important; }
  .hero-slider .swiper-slide { height: 350px !important; }
  .hero-slider .post-title { font-size: 20px !important; }
}

/* ============================================
   FINAL POLISHING REFINEMENTS
   ============================================ */

/* 1. News Ticker RTL Animation */
body.rtl .bn-ticker {
    animation: ticker-rtl 40s linear infinite !important;
    display: inline-block;
    white-space: nowrap;
    padding-right: 100%;
}

@keyframes ticker-rtl {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 2. Footer Description Visibility */
.site-footer .footer-description,
.site-footer .footer-about p {
    color: #FFFFFF !important;
    font-family: 'DG Agnadeen', sans-serif !important;
    font-size: 15px;
    line-height: 1.8;
    opacity: 1;
}

/* 3. Dark Mode & Search Refinement */
#darkModeToggle i, #darkModeToggleNav i {
    color: #FFFFFF !important;
}

.h-search-bar input {
    border: 1px solid #FFFFFF !important;
    color: #FFFFFF !important;
    background: rgba(255,255,255,0.1) !important;
}
.h-search-bar input::placeholder { color: rgba(255,255,255,0.7) !important; }

/* 4. Slider Navigation RTL Reversal (Image 3) */
body.rtl .slider-nav.prev {
    right: 20px !important;
    left: auto !important;
}
body.rtl .slider-nav.next {
    left: 20px !important;
    right: auto !important;
    display: flex !important; /* Force visibility */
}

body.rtl .slider-nav i {
    transform: rotate(180deg);
}

/* 3. Hero Slider Title Truncation (Image 5) */
.hero-slider .post-title,
.hero-main .hero-title {
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines instead of single-line 20 chars for better look */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}

/* 4. Hero Slider Overlap Prevention (Image 4) */
.hero-slider-content {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 60px 40px 40px !important;
    bottom: 0 !important;
    width: 100%;
}

.hero-slider .hero-item {
    margin-bottom: 0; /* Prevents overlap with below section */
}


/* ============================================
   FINAL REFINEMENTS (POLISHING)
   ============================================ */

/* 1. Section & Footer Title Underlines */
.section-title, 
.footer-widget-title {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.dark-mode .section-title,
.dark-mode .footer-widget-title {
    border-bottom-color: rgba(255,255,255,0.05);
}

.section-title::after, 
.footer-widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 70px;
    height: 3px;
    background: var(--primary);
}

/* 2. Navbar Slider & Font */
.primary-menu-v2, 
.primary-menu-v2 li a {
    font-family: 'DG Agnadeen', 'Cairo', sans-serif !important;
    font-weight: 600;
}

.nav-v2-primary {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px 0;
}
.nav-v2-primary::-webkit-scrollbar {
    display: none;
}

.primary-menu-v2 {
    display: flex !important;
    flex-wrap: nowrap !important;
    margin: 0;
    padding: 0;
    list-style: none;
}

.primary-menu-v2 > li {
    flex: 0 0 auto;
}

/* 3. Newsletter Font Fix */
.newsletter-box h3,
.newsletter-box p, 
.newsletter-form button, 
.newsletter-form input {
    font-family: 'DG Agnadeen', 'Cairo', sans-serif !important;
}

/* 4. Header V2 Ads Alignment */
.header-v2-ads-wrapper {
    gap: 30px;
}
.header-ad-spot {
    width: 468px;
    height: 60px;
    background: rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
}
.dark-mode .header-ad-spot {
    background: rgba(255,255,255,0.02);
}
.header-ad-spot img {
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 1200px) {
    .header-v2-ads-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    .header-ad-spot {
        width: 100%;
        max-width: 468px;
    }
}

