/*
Theme Name: AmNews Wamda Pro
Theme URI: https://wamdanews.com
Description: قالب إخباري احترافي بتصميم AmNews مع ألوان ومضة نيوز
Author: Wamda News
Version: 1.0
License: GPL v2 or later
Text Domain: amnews-wamda-pro
*/

:root {
  --primary-blue: #003DA5;
  --accent-yellow: #FFD700;
  --text-dark: #333333;
  --text-light: #666666;
  --light-bg: #ffffff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

html {
  font-size: 16px;
}

body {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  background: #f5f5f5;
  color: var(--text-dark);
  line-height: 1.6;
  direction: rtl;
}

body.dark-mode {
  background: #1a1a1a;
  color: #e0e0e0;
}

body.dark-mode .site-header,
body.dark-mode .category-block,
body.dark-mode .special-section,
body.dark-mode .hours-24-section,
body.dark-mode .video-section {
  background: #2a2a2a;
  border-color: #444;
}

body.dark-mode .category-item,
body.dark-mode .special-item {
  background: #2a2a2a;
  border-color: #444;
}

body.dark-mode .category-item:hover {
  background: #333;
}

body.dark-mode .category-title a,
body.dark-mode .special-title {
  color: #e0e0e0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Breaking News */
.breaking-news {
  background: linear-gradient(90deg, var(--accent-yellow) 0%, var(--primary-blue) 100%);
  padding: 10px 0;
  border-bottom: 3px solid var(--primary-blue);
}

.breaking-news .container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.breaking-badge {
  background: var(--primary-blue);
  color: var(--accent-yellow);
  padding: 5px 12px;
  border-radius: 3px;
  font-weight: bold;
  font-size: 12px;
  white-space: nowrap;
}

.breaking-content {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breaking-content:hover {
  color: var(--primary-blue);
}

/* Header */
.site-header {
  background: var(--light-bg);
  border-bottom: 2px solid var(--primary-blue);
  padding: 15px 0;
  box-shadow: var(--shadow);
  margin-bottom: 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.site-logo {
  flex-shrink: 0;
}

.site-logo a,
.site-logo img {
  display: block;
  height: 50px;
  text-decoration: none;
  color: var(--primary-blue);
  font-weight: bold;
  font-size: 18px;
}

/* Navigation */
.site-navigation {
  flex: 1;
}

.site-navigation a {
  display: inline-block;
  color: var(--text-dark);
  text-decoration: none;
  padding: 8px 15px;
  margin: 0 5px;
  border-radius: 3px;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: 500;
}

.site-navigation a:hover {
  background: var(--primary-blue);
  color: white;
}

/* Header Controls */
.header-controls {
  display: flex;
  gap: 10px;
}

.search-btn,
.theme-toggle {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 3px;
  transition: all 0.3s;
}

.search-btn:hover,
.theme-toggle:hover {
  background: var(--primary-blue);
  color: white;
}

/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  gap: 15px;
  margin: 15px 0;
}

.left-column {
  order: 3;
}

.middle-column {
  order: 2;
}

.right-column {
  order: 1;
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 400px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  color: white;
  z-index: 2;
}

.hero-category {
  background: var(--accent-yellow);
  color: var(--primary-blue);
  padding: 5px 12px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 10px;
}

.hero-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.hero-title a {
  color: white;
  text-decoration: none;
}

.hero-title a:hover {
  text-decoration: underline;
}

.hero-meta {
  display: flex;
  gap: 20px;
  font-size: 12px;
  opacity: 0.9;
}

/* Section Header */
.section-header {
  background: linear-gradient(90deg, var(--primary-blue) 0%, #002080 100%);
  color: var(--accent-yellow);
  padding: 12px 15px;
  font-weight: bold;
  font-size: 16px;
  border-bottom: 3px solid var(--accent-yellow);
  margin: 0 0 0 0;
}

/* Category Block */
.category-block {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 15px;
}

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

.category-item {
  border-right: 1px solid var(--border-color);
  padding: 15px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  background: var(--light-bg);
}

.category-item:last-child {
  border-right: none;
}

.category-item:hover {
  background: #f9f9f9;
  transform: translateY(-2px);
  box-shadow: inset 0 0 10px rgba(0, 61, 165, 0.1);
}

.category-image-wrapper {
  width: 100%;
  height: 120px;
  margin-bottom: 10px;
  border-radius: 3px;
  overflow: hidden;
}

.category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-blue) 0%, #002080 100%);
}

.category-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
  color: var(--text-dark);
}

.category-title a {
  color: var(--text-dark);
  text-decoration: none;
}

.category-title a:hover {
  color: var(--primary-blue);
}

.category-excerpt {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-light);
  margin-top: auto;
}

/* Special Sections */
.special-section {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 15px;
}

.special-content {
  padding: 15px;
}

.special-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.special-item:last-child {
  border-bottom: none;
}

.special-title {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 5px;
  transition: color 0.3s;
  text-decoration: none;
}

.special-title:hover {
  color: var(--primary-blue);
}

.special-meta {
  font-size: 10px;
  color: var(--accent-yellow);
  font-weight: 600;
}

/* Video Section */
.video-section {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 15px;
}

.video-content {
  padding: 15px;
}

/* Hours 24 Section */
.hours-24-section {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 15px;
}

.hours-content {
  padding: 15px;
  max-height: 800px;
  overflow-y: auto;
}

.hours-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  align-items: flex-start;
}

.hours-item:last-child {
  border-bottom: none;
}

.hours-time {
  background: var(--primary-blue);
  color: var(--accent-yellow);
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  white-space: nowrap;
  margin-top: 2px;
}

.hours-title {
  font-size: 11px;
  color: var(--text-dark);
  text-decoration: none;
  line-height: 1.3;
  flex: 1;
}

.hours-title:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background: var(--primary-blue);
  color: white;
  padding: 40px 0 20px;
  margin-top: 40px;
  border-top: 3px solid var(--accent-yellow);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.footer-widget h3 {
  color: var(--accent-yellow);
  margin-bottom: 15px;
  font-size: 16px;
}

.footer-widget a {
  display: block;
  color: white;
  text-decoration: none;
  margin-bottom: 8px;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-widget a:hover {
  color: var(--accent-yellow);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 1200px) {
  .main-layout {
    grid-template-columns: 180px 1fr 250px;
    gap: 12px;
  }

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .left-column,
  .middle-column,
  .right-column {
    order: unset;
  }

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

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

@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    gap: 15px;
  }

  .site-navigation a {
    padding: 6px 10px;
    margin: 0 3px;
    font-size: 12px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    height: 250px;
  }

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

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

  .breaking-news .container {
    flex-direction: column;
    gap: 10px;
  }
}

/* Utilities */
a {
  color: var(--primary-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
}

/* Search Modal */
.search-modal {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.search-modal.active {
  display: flex !important;
}

.search-modal form {
  background: white;
  padding: 30px;
  border-radius: 4px;
  max-width: 500px;
  width: 90%;
}

.search-modal input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: 14px;
  margin-bottom: 15px;
}

.search-modal button {
  background: var(--primary-blue);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
}

.search-modal button:hover {
  background: #002080;
}
/* تصغير الصور داخل المقالات وتوسيطها */
.entry-content img, 
.post-content img, 
.wp-block-image img {
    max-width: 80%; /* يمكنك تغيير هذه النسبة (مثلاً 70% لتصغيرها أكثر) */
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px; /* اختياري: لإضافة زوايا منحنية للصور */
}

/* لضمان توافق الصور مع الهواتف */
@media (max-width: 768px) {
    .entry-content img, .post-content img, .wp-block-image img {
        max-width: 100%;
    }
}
