/*
Theme Name: ActuPress Theme
Theme URI: https://example.com/arnews
Author: ISMAIL ZBAIL
Author URI: https://example.com
Description: موضوع إخباري عربي متجاوب يدعم RTL مع سلايدر للأخبار المميزة وقوائم وودجتات متعددة.
Version: 1.0.0
Text Domain: arnews
Tags: news, magazine, rtl-language-support, responsive-layout, custom-logo, two-columns, grid-layout
*/

:root {
  --primary: #ff0037de;    /* rose-600 */
  --primary-700: #be123c;
  --bg: #f8fafc;
  --card: #ffffff;
  --mute: #64748b;
  --text: #00050f;
  --border: #e2e8f0;
  --shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
}

* { box-sizing: border-box; }

* {
  -webkit-tap-highlight-color: transparent;
}

a:focus,
a:active,
button:focus,
button:active {
  outline: none;
  box-shadow: none;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Tajawal", "Cairo", "Noto Kufi Arabic", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.8;
  font-size: 16px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-700); }

img { max-width: 100%; height: auto; display: block; }
.container {
  width: 100%;
  max-width: 1200px;
  padding-inline: 16px;
  margin-inline: auto;
}

.topbar {
  background: #0b1324;
  color: #fff;
  font-size: 14px;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}
.topbar__left, .topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar a { color: #cbd5e1; }
.topbar a:hover { color: #fff; }

.header {
  background: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.branding {
  display: flex;
  align-items: center;
  gap: 12px;
}
.branding .site-title {
  font-weight: 800;
  font-size: 22px;
  margin: 0;
}
.branding .site-desc {
  font-size: 12px;
  color: var(--mute);
  margin: 0;
}

.primary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.menu-toggle, .search-toggle {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  margin:10px;
}
.menu-toggle i, .search-toggle i { font-size: 16px; }

.primary-nav {
  background: #fff;
}
.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.primary-nav li a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text);
}
.primary-nav li a:hover,
.primary-nav li.current-menu-item > a {
  background: var(--primary);
  color: #fff;
}

@media (max-width: 992px) {
  .header__inner { flex-wrap: wrap; }
  .primary-nav { width: 100%; display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; }
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.search-overlay.active { display: flex; }
.search-box {
  background: #fff;
  width: min(700px, 100%);
  padding: 18px;
  border-radius: 12px;
  position: relative;
  box-shadow: var(--shadow);
}
.search-close {
  position: absolute;
  inset-inline-end: 10px;
  top: 10px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

.hero {
  margin-block: 18px;
}
.hero .swiper {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-slide {
  position: relative;
  min-height: 500px;
  display: grid;
  place-items: end start;
  padding: 24px;
  background-size: cover;
  background-position: center;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2,6,23,0.65) 0%, rgba(2,6,23,0.1) 70%);
}
.hero-slide > .hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 800px;
}
.hero-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  margin-block-end: 8px;
}
.hero-title {
  margin: 6px 0 10px 0;
  font-size: clamp(18px, 2.5vw, 28px);
  line-height: 1.4;
}
.hero-meta {
  font-size: 13px;
  color: #e2e8f0;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 992px) {
  .layout { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-media {
  aspect-ratio: 3 / 2;
  background: #e5e7eb;
  overflow: hidden;
  margin-bottom: 10px;
  margin-top:10px;

}




.card-sidebar { 

align-items: center;



}

.card-sidebar img { 

  align-items: right;


border-radius:20px;
margin: 10px;

width:20%;
height: 20%;


}

.card-media {
  aspect-ratio: 3 / 2;
 
  background: #e5e7eb;
  overflow: hidden;
  margin-bottom: 10px;
  margin-top:10px;

}

.card-media-home {
  aspect-ratio: 3 / 2;
  background: #e5e7eb;
  overflow: hidden;

}

.card-media img{

  width: 100%;
  height: 100%;
}
.card-body {
  padding: 14px;
}
.card-title {
  margin: 6px 0 8px 0;
  font-size: 18px;
}
.card-excerpt {
  color: var(--mute);
  font-size: 15px;
  margin: 0 0 10px 0;
}
.post-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--mute);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 680px) {
  .grid { grid-template-columns: 1fr; }
}

.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.widget-title {
  font-size: 16px;
  margin: 0 0 12px 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.entry {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.entry-header {
  padding: 18px 18px 0 18px;
}
.entry-content {
  padding: 0 18px 18px 18px;
   
}


.entry-content p{
 font-size: 19px;
}

.entry-footer {
  padding: 12px 18px 18px 18px;
  color: var(--mute);
  border-top: 1px solid var(--border);
}
.entry-content p {
  margin: 0 0 1em 0;
}
.tags a {
  display: inline-block;
  padding: 4px 10px;
  margin: 4px 6px 0 0;
  background: #f1f5f9;
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
}

.pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.pagination .page-numbers {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.site-footer {
  background: #222222;
  color: #fff;
  margin-top: 24px;
}
.footer-widgets {
  padding: 24px 0 6px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.footer-widgets .widget { background: transparent; border-color: rgba(255,255,255,0.12); color: #e2e8f0; box-shadow: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 12px 0;
  font-size: 14px;
  color: #cbd5e1;
}
@media (max-width: 780px) {
  .footer-widgets { grid-template-columns: 1fr; }
}

/* Utility */
.muted { color: var(--mute); }
.hidden { display: none !important; }

/* Comments Area */
.comments-area {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: var(--shadow);
    direction: rtl;
}

/* Comments Title */
.comments-area .widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

/* Comment List */
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list li {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.comment-list li .comment-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.comment-list li .comment-body {
    flex: 1;
}

.comment-list li .comment-meta {
    font-size: 13px;
    color: var(--mute);
    margin-bottom: 6px;
}

.comment-list li .comment-content {
    font-size: 15px;
    color: var(--text);
}

/* Nested Replies */
.comment-list li ul.children {
    margin-top: 12px;
    margin-right: 60px;
    border-right: 2px solid var(--border);
    padding-right: 12px;
}

/* Pagination */
.comments-area .pagination {
    margin-top: 20px;
}

.comments-area .page-numbers {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
}

.comments-area .page-numbers.current,
.comments-area .page-numbers:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Comment Form */
#comments form {
    margin-top: 30px;
}

#comments form input[type="text"],
#comments form input[type="email"],
#comments form textarea {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
}

#comments form textarea {
    min-height: 120px;
    resize: vertical;
}

#comments form input[type="submit"] {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 25px;
    font-size: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}

#comments form input[type="submit"]:hover {
    background-color: var(--primary-700);
}

/* No comments message */
.no-comments {
    font-style: italic;
    color: var(--mute);
    padding: 10px 0;
}


/* Breaking News Banner */
#breaking-news-banner {
    background-color: #e74c3c; /* Red */
    color: #ffffff; /* White */
    font-weight: bold;
    padding: 10px 15px;
    text-align: center;
    direction: rtl;
    overflow: hidden;
    position: relative;
}

/* Wrapper for news items */
.breaking-news-wrapper {
    display: flex;
    flex-direction: column;
}

/* Individual news item */
.breaking-news-item {
    display: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* truncate long text */
}

/* Header styling */
.br-header {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #breaking-news-banner {
        padding: 8px 10px;
        font-size: 14px; /* smaller font for mobile */
    }

    .br-header {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .breaking-news-item {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #breaking-news-banner {
        padding: 6px 8px;
        font-size: 18px;
    }

    .br-header {
        font-size: 18px;
        margin-bottom: 3px;
    }

    .breaking-news-item {
         font-size: 18px;
    }
}


/* -------------------------
   Mobile Menu Toggle Button
-------------------------- */
.mobile-menu-toggle {
  display: none;
}

.mobile-menu-toggle button {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 20px;
  transition: 0.3s;
  margin:10px;
}

.mobile-menu-toggle button:hover {
  background: var(--primary);
  color: #fff;
   margin:10px;
}

/* -------------------------
   Mobile Menu Overlay & Menu
-------------------------- */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.5); /* semi-transparent overlay */
  z-index: 998;
  display: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
}

#mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background: var(--card);
  box-shadow: 4px 0 20px rgba(0,0,0,0.2);
  z-index: 999; /* above overlay */
  transition: left 0.3s ease;
  padding: 20px;
  display: flex;
  flex-direction: column;
  direction: rtl; /* RTL support */
}

#mobile-menu.active {
  left: 0;
}

/* Close Button */
#mobile-menu-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text);
  cursor: pointer;
  align-self: flex-start;
  margin-bottom: 20px;
  transition: 0.3s;
}

#mobile-menu-close:hover {
  color: var(--primary);
}

/* Menu Items */
.mobile-menu-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-menu-items li a {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  transition: 0.3s;
}

.mobile-menu-items li a:hover,
.mobile-menu-items li.current-menu-item > a {
  background: var(--primary);
  color: #fff;
}

/* Submenu collapse support (if you add collapsible later) */
.mobile-menu-items li ul {
  display: none;
  flex-direction: column;
  margin-top: 6px;
  margin-right: 12px;
}

.mobile-menu-items li.active ul {
  display: flex;
}

/* -------------------------
   Responsive: show toggle
-------------------------- */
@media screen and (max-width: 992px) {
  .primary-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}


/* رأي حر Section */
.rayh-section {
    background: #f9f9f9;
    padding: 20px;
    margin-top: 30px;
    direction: rtl;
    text-align: right;
    border-right: 5px solid #e74c3c;
}

.rayh-section h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #e74c3c;
}

.rayh-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rayh-post {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.writer-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-left: 10px; /* RTL spacing */
}

.rayh-post-info {
    display: flex;
    flex-direction: column;
}

.writer-name {
    font-weight: bold;
    margin: 0 0 5px 0;
}

.rayh-post-title {
    text-decoration: none;
    color: #333;
}

.rayh-post-title:hover {
    color: #e74c3c;
}
