/* خط سلمى المحلي */
@import url("/css/fonts.css");

/* ===================================
   منصة حِميَر الإعلامية - CSS Styles
   =================================== */

/* CSS Variables */
:root {
  --primary-color: #608f90; /* Shammar Dark */
  --primary-dark: #608f90;
  --accent-gold: #608f90; /* Shammar Teal (formerly Gold) */
  --accent-gold-light: #8fafb6; /* Shammar Light */
  --accent-gold-dark: #4a7071;
  --secondary-color: #ffffff;
  --background-light: #ffffff;
  --background-dark: #121212;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-light: #888888;
  --border-color: #e8e8e8;
  --gold-gradient: linear-gradient(135deg, #608f90 0%, #4a7071 100%);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
html {
  overflow-x: hidden;
  max-width: 100%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  max-width: 100%;
}

body {
  font-family: "Salma", sans-serif;
  direction: rtl;
  text-align: right;
  background-color: var(--background-light);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Salma", sans-serif;
  font-weight: 700;
  color: var(--text-primary);
}

p {
  font-family: "Salma", sans-serif;
  color: var(--text-secondary);
  font-weight: 400;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 0;
  border-top: 4px solid var(--accent-gold);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
}

.logo span {
  font-size: 0.65em;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 5px;
}

.logo h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.header-icons {
  display: flex;
  gap: 25px;
  align-items: center;
}

/* أيقونات الهيدر المحسّنة */
.search-icon,
.menu-icon {
  font-size: 22px;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
  padding: 10px;
  border-radius: 50%;
  background: var(--background-light);
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.search-icon:hover,
.menu-icon:hover {
  color: var(--accent-gold-dark);
  background: var(--accent-gold-light);
  transform: translateY(-3px) scale(1.05);
  border-color: var(--accent-gold);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.search-icon:active,
.menu-icon:active {
  transform: translateY(-1px) scale(0.98);
}

/* تحسين أزرار التفاعل */
button.search-icon,
button.menu-icon {
  border: 2px solid transparent;
  outline: none;
}

button.search-icon:focus,
button.menu-icon:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* Sidebar Menu */
.sidebar {
  position: fixed;
  top: 0;
  right: -380px;
  width: 380px;
  height: 100vh;
  background: var(--secondary-color);
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2000;
  overflow-y: auto;
  border-left: 1px solid var(--accent-gold-light);
}

.sidebar.active {
  right: 0;
}

.sidebar-header {
  padding: 30px 25px;
  border-bottom: 2px solid var(--background-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h2 {
  font-size: 22px;
  color: var(--primary-color);
  position: relative;
}

.sidebar-header h2::after {
  content: "";
  position: absolute;
  bottom: -5px;
  right: 0;
  width: 30px;
  height: 3px;
  background: var(--accent-gold);
}

.close-menu {
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.close-menu:hover {
  color: var(--primary-color);
  transform: rotate(90deg);
}

.sidebar-nav {
  padding: 15px 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 30px;
  color: var(--text-primary);
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  transition: var(--transition);
}

.sidebar-nav a i {
  color: var(--accent-gold-dark);
  font-size: 18px;
  width: 25px;
  text-align: center;
}

.sidebar-nav a:hover {
  background: var(--background-light);
  color: var(--primary-color);
  padding-right: 40px;
}

.sidebar-buttons {
  padding: 30px 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.btn {
  padding: 14px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--primary-color);
  color: var(--secondary-color);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-2px);
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  display: none;
}

.overlay.active {
  display: block;
}

/* Hero Slider */
.hero-slider {
  position: relative;
  height: 500px;
  overflow: hidden;
  margin-bottom: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  background-color: #1a1a2e;
}

.slider-container {
  position: relative;
  height: 100%;
  width: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  position: absolute;
  pointer-events: auto;
}

.slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.slide-content {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.5) 60%,
    transparent 100%
  );
  padding: 30px 30px 20px;
  color: var(--secondary-color);
  z-index: 2;
}

.slide-category {
  display: inline-block;
  background: var(--accent-gold);
  color: var(--background-dark);
  padding: 6px 18px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.slide-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.4;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.slide-date {
  font-size: 15px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.slide-date i {
  color: var(--accent-gold);
}

/* Slider Navigation */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--primary-color);
  transition: var(--transition);
  z-index: 10;
}

.slider-nav:hover {
  background: var(--secondary-color);
}

.slider-prev {
  right: 20px;
}

.slider-next {
  left: 20px;
}

/* إخفاء أزرار السلايدر على الجوال */
@media (max-width: 768px) {
  .slider-nav {
    display: none;
  }
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: var(--secondary-color);
}

/* Featured News Cards */
.featured-news {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

/* بطاقات الأخبار المحسّنة */
.news-card {
  background: var(--secondary-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border-color);
  position: relative;
}

/* تأثير تدرج ذهبي عند التمرير */
.news-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.news-card:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.news-card:hover {
  box-shadow:
    0 12px 40px rgba(139, 21, 56, 0.12),
    0 8px 20px rgba(212, 175, 55, 0.08);
  transform: translateY(-10px);
  border-color: var(--accent-gold);
}

/* تأثير نبض خفيف */
.news-card:hover .news-card-image {
  animation: cardPulse 2s ease-in-out infinite;
}

@keyframes cardPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.news-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: var(--transition);
}

.news-card:hover .news-card-image img {
  transform: scale(1.1);
}

.news-card-content {
  padding: 25px;
}

.news-category {
  display: inline-block;
  background: var(--background-light);
  color: var(--primary-color);
  padding: 5px 15px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  border: 1px solid var(--accent-gold-light);
}

.news-card:hover .news-category {
  background: var(--primary-color);
  color: #fff;
}

.news-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.5;
  color: var(--text-primary);
  transition: var(--transition);
}

.news-card:hover .news-title {
  color: var(--primary-color);
}

.news-date {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.news-date i {
  color: var(--accent-gold-dark);
}

/* Breaking News Ticker */
.breaking-news {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: var(--secondary-color);
  padding: 0;
  margin: 40px 0;
  overflow: hidden;
  border-top: 3px solid var(--accent-gold);
  border-bottom: 3px solid var(--accent-gold);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  position: relative;
}

.breaking-news::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--accent-gold);
  box-shadow:
    0 0 20px var(--accent-gold),
    0 0 40px var(--accent-gold);
  animation: glow 2s ease-in-out infinite;
}

.breaking-news-container {
  display: flex;
  align-items: stretch;
  height: 60px;
}

.breaking-label {
  background: linear-gradient(
    135deg,
    var(--accent-gold) 0%,
    var(--accent-gold-dark) 100%
  );
  color: var(--background-dark);
  padding: 0 30px;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  box-shadow: 8px 0 20px rgba(0, 0, 0, 0.3);
  min-width: 120px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* إخفاء أي أيقونات في breaking-label */
.breaking-label i,
.breaking-label::before,
.breaking-label::after {
  display: none !important;
}

.breaking-label span {
  position: relative;
}

.breaking-content-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: linear-gradient(
    90deg,
    rgba(26, 26, 46, 1) 0%,
    rgba(26, 26, 46, 0) 50px,
    rgba(26, 26, 46, 0) calc(100% - 50px),
    rgba(26, 26, 46, 1) 100%
  );
}

.breaking-content {
  display: flex;
  padding: 0;
  animation: scrollNews 40s linear infinite;
  will-change: transform;
}

.breaking-content:hover {
  animation-play-state: paused;
}

.breaking-item {
  padding: 0 60px;
  white-space: nowrap;
  border-left: 2px solid rgba(212, 175, 55, 0.2);
  font-weight: 600;
  font-size: 16px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s var(--transition);
  text-decoration: none;
  height: 60px;
}

.breaking-item i {
  font-size: 8px;
  color: var(--accent-gold);
  animation: pulse 2s ease-in-out infinite;
}

.breaking-item:hover {
  color: var(--accent-gold);
  transform: scale(1.05);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

@keyframes scrollNews {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
  padding-right: 15px;
}

.section-title::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 25px;
  background: var(--accent-gold);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -14px;
  right: 0;
  width: 80px;
  height: 4px;
  background: var(--gold-gradient);
  border-radius: 2px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab {
  padding: 10px 20px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

.tab:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.tab.active {
  background: var(--primary-color);
  color: var(--secondary-color);
  border-color: var(--primary-color);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Section */
.section {
  background: var(--secondary-color);
  padding: 40px 0;
  margin-bottom: 30px;
}

/* Ad Banner */
.ad-banner {
  background: var(--border-color);
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
  border-radius: 8px;
  color: var(--text-light);
  font-size: 18px;
}

/* Footer */
.footer {
  background: var(--background-dark);
  color: var(--secondary-color);
  padding: 80px 0 30px;
  border-top: 5px solid var(--accent-gold);
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 50px;
  margin-bottom: 60px;
}

.footer-section h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 30px;
  color: var(--accent-gold);
  position: relative;
  display: inline-block;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 0;
  width: 40px;
  height: 2px;
  background: var(--accent-gold);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.footer-section ul li a {
  color: #bbbbbb;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-section ul li a::before {
  content: "\f105";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--accent-gold);
  font-size: 14px;
}

.footer-section ul li a:hover {
  color: var(--accent-gold-light);
  padding-right: 5px;
}

.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.social-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--secondary-color);
}

.social-icon:hover {
  background: var(--gold-gradient);
  color: var(--background-dark);
  transform: translateY(-5px);
  border-color: transparent;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 25px;
}

.newsletter-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
}

.newsletter-btn {
  padding: 14px 25px;
  background: var(--gold-gradient);
  color: var(--background-dark);
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.newsletter-btn:hover {
  background: var(--accent-gold-light);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #888;
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 25px;
}

.footer-links a {
  color: #888;
}

.footer-links a:hover {
  color: var(--accent-gold);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 55px;
  height: 55px;
  background: var(--gold-gradient);
  color: var(--background-dark);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 999;
  box-shadow: var(--shadow-lg);
}

.back-to-top.show {
  display: flex;
  animation: slideInUp 0.3s ease-out;
}

.back-to-top:hover {
  background: var(--accent-gold-light);
  transform: translateY(-5px);
}

@keyframes slideInUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--secondary-color);
  padding: 40px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-primary);
}

.modal-title {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-slider {
    height: 350px;
  }

  .slide-title {
    font-size: 22px;
  }

  .featured-news,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-title {
    font-size: 20px;
  }

  .sidebar {
    width: 280px;
    right: -280px;
  }
}

@media (max-width: 480px) {
  .hero-slider {
    height: 280px;
  }

  .slide-content {
    padding: 20px;
  }

  .slide-title {
    font-size: 18px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .breaking-label {
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* تحسينات تنسيق محتوى المقال - Article Content Styling & Typography */
.article-content {
  font-size: 20px;
  line-height: 1.8;
  color: var(--text-primary);
  text-align: justify;
  margin-bottom: 40px;
}

.article-content p {
  margin-bottom: 24px;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.4;
}

.article-content h2 {
  font-size: 28px;
  border-right: 4px solid var(--accent-gold);
  padding-right: 15px;
}
.article-content h3 {
  font-size: 24px;
}
.article-content h4 {
  font-size: 20px;
}

.article-content ul,
.article-content ol {
  margin-bottom: 24px;
  padding-right: 20px;
}

.article-content li {
  margin-bottom: 10px;
  position: relative;
}

.article-content blockquote {
  background: var(--background-light);
  border-right: 5px solid var(--accent-gold);
  padding: 20px 25px;
  margin: 30px 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--primary-dark);
  font-style: italic;
  border-radius: 8px 0 0 8px;
  position: relative;
}

.article-content blockquote::before {
  content: "\f10e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 30px;
  color: rgba(96, 143, 144, 0.1); /* Shammar Teal with opacity */
}

.article-content img {
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin: 30px 0;
  max-width: 100%;
}

.article-content a {
  color: var(--accent-gold);
  text-decoration: underline;
  font-weight: 600;
}

.article-content a:hover {
  color: var(--primary-color);
}
