/*
Theme Name: قالب منصة أدباتية - ستايل شينخوا الإصدار 5 (الترتيب الدقيق للأبواب)
Theme URI: https://odbatya.com
Author: مبادرة أبناء مصر للتنمية الثقافية وحفظ التراث
Author URI: https://odbatya.com
Description: قالب إخباري وثقافي لمنصة أدباتية مع سلايدر رئيسي وسلايدرات ذكية لكافة الأبواب بالترتيب الدقيق المحدد من إدارة المنصة، بهوية وألوان شينخوا الرصينة.
Version: 5.1.0
Text Domain: odbatya-xinhua
*/

:root {
  --primary-blue: #004276;
  --secondary-blue: #005a9e;
  --accent-red: #c00000;
  --dark-red: #9e0000;
  --text-dark: #111111;
  --text-muted: #666666;
  --border-color: #e5e5e5;
  --bg-light: #f7f9fa;
  --font-family: 'Tajawal', 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: #fcfcfc;
  color: var(--text-dark);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--secondary-blue);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Top Bar */
.top-bar {
  background: #f4f6f8;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
  padding: 7px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-date {
  font-weight: 600;
  color: #333333;
}
.top-tagline {
  color: var(--text-muted);
  font-size: 12px;
}

/* Header & Logo */
.site-header {
  padding: 15px 0;
  background: #fff;
  border-bottom: 2px solid var(--primary-blue);
}
.header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 15px;
}
.site-logo {
  max-height: 70px;
  width: auto;
  object-fit: contain;
  display: block;
}
.site-slogan {
  border-right: 2px solid var(--accent-red);
  padding-right: 12px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
}

.search-box form {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}
.search-box input {
  border: none;
  padding: 8px 12px;
  font-family: inherit;
  outline: none;
  font-size: 14px;
  width: 220px;
}
.search-box button {
  background: var(--primary-blue);
  color: #fff;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
.search-box button:hover {
  background: var(--secondary-blue);
}

/* Navigation Bar */
.main-navigation {
  background: var(--primary-blue);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-menu {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
}
.nav-menu li a {
  display: block;
  color: #ffffff;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14.5px;
  border-left: 1px solid rgba(255,255,255,0.1);
}
.nav-menu li.active a,
.nav-menu li a:hover {
  background: var(--secondary-blue);
  color: #fff;
}
.nav-menu li:first-child a {
  background: var(--accent-red);
}
.nav-menu li:first-child a:hover {
  background: var(--dark-red);
}

/* Breaking / News Ticker */
.ticker-wrap {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
}
.ticker-title {
  background: var(--accent-red);
  color: #fff;
  padding: 3px 10px;
  font-weight: bold;
  font-size: 12px;
  border-radius: 2px;
  margin-left: 12px;
  white-space: nowrap;
}
.ticker-content {
  overflow: hidden;
  white-space: nowrap;
  color: var(--text-dark);
}

/* Main Content Wrapper */
.main-content {
  padding: 25px 0 50px;
}

/* Hero Main Slider */
.hero-slider-section {
  margin-bottom: 40px;
}
.main-hero-swiper {
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}
.main-hero-swiper .swiper-slide {
  position: relative;
  background-color: #0d1e2e;
}
.main-hero-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.main-hero-swiper .slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 50px 30px 25px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0,0,0,0.6) 65%, rgba(0, 0, 0, 0) 100%);
  color: #fff;
}
.main-hero-swiper .slide-badge {
  background: var(--accent-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 10px;
}
.main-hero-swiper .slide-title {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 8px;
}
.main-hero-swiper .slide-title a {
  color: #ffffff;
}
.main-hero-swiper .slide-title a:hover {
  color: #ffd200;
}
.main-hero-swiper .slide-excerpt {
  font-size: 14px;
  color: #e0e0e0;
  max-width: 800px;
  line-height: 1.6;
}

.swiper-button-next,
.swiper-button-prev {
  background: rgba(0, 66, 118, 0.85);
  color: #ffffff !important;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}
.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 18px !important;
  font-weight: bold;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: var(--accent-red);
}
.swiper-pagination-bullet {
  background: #ffffff !important;
  opacity: 0.7;
}
.swiper-pagination-bullet-active {
  background: var(--accent-red) !important;
  opacity: 1;
  width: 24px !important;
  border-radius: 4px !important;
}

/* Category Slider Block */
.category-slider-block {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 22px 20px;
  margin-bottom: 35px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.category-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--primary-blue);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.category-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}
.category-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-blue);
  position: relative;
}
.category-title::after {
  content: "";
  position: absolute;
  bottom: -12px;
  right: 0;
  width: 45px;
  height: 3px;
  background: var(--accent-red);
}
.category-slider-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.slider-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: #f0f4f8;
  border: 1px solid #d0dbe5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary-blue);
  font-weight: bold;
  user-select: none;
  transition: all 0.2s ease;
}
.slider-nav-btn:hover {
  background: var(--primary-blue);
  color: #fff;
}
.category-view-all {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 15px;
}
.category-view-all:hover {
  color: var(--accent-red);
}

.post-card {
  background: #fff;
  border: 1px solid #edf0f2;
  border-radius: 5px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}
.post-thumb-wrap {
  position: relative;
  width: 100%;
  height: 165px;
  background: #e9eef2;
  overflow: hidden;
}
.post-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-thumb-wrap img {
  transform: scale(1.05);
}
.post-card-content {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.post-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
  color: var(--text-dark);
  flex-grow: 1;
}
.post-card-title a:hover {
  color: var(--accent-red);
}
.post-card-meta {
  font-size: 12px;
  color: #888;
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
  margin-top: auto;
}

/* Related Sites Footer Styling */
.footer-related {
  background: #f0f4f8;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 24px 0;
  margin-top: 40px;
}
.related-header {
  font-size: 16px;
  font-weight: bold;
  color: var(--primary-blue);
  margin-bottom: 14px;
}
.related-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.related-links a {
  background: #fff;
  border: 1px solid #dcdcdc;
  padding: 8px 20px;
  font-size: 14px;
  color: #333;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.related-links a:hover {
  border-color: var(--primary-blue);
  background: var(--primary-blue);
  color: #fff;
}

/* Site Footer */
.site-footer {
  background: var(--primary-blue);
  color: #d1d5db;
  padding: 30px 0 20px;
  font-size: 14px;
  text-align: center;
}
.site-footer a {
  color: #fff;
}
.footer-copy {
  margin-top: 12px;
  font-size: 13px;
  color: #9ca3af;
}

@media (max-width: 900px) {
  .main-hero-swiper {
    height: 340px;
  }
  .main-hero-swiper .slide-title {
    font-size: 20px;
  }
  .header-wrap {
    flex-direction: column;
    gap: 15px;
  }
}
