/*------------- QPN Project -------------- 
     BYekan Font Face  */
@font-face {
  font-family: "BYekan";
  src: url("../fonts/BYekan.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* Basic Resets */
html,
body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "BYekan", sans-serif;
  background-color: #f4f4f4;
  color: #333;
  line-height: 1.6;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  direction: rtl;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Breaking News Header */
.breaking-news-header {
  background-color: #e00;
  color: #fff;
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 1001;
  overflow: hidden;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.breaking-news-header .container {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  flex-wrap: nowrap;
}
.breaking-news-label {
  background-color: #c00;
  padding: 5px 15px;
  font-weight: bold;
  flex-shrink: 0;
  margin-right: 15px;
}
.breaking-news-marquee-container {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
  height: 25px;
  direction: ltr;
  text-align: left;
}
.breaking-news-content {
  white-space: nowrap;
  display: inline-block;
  position: absolute;
  animation: marquee-rtl 20s linear infinite;
  right: 100%;
  left: unset;
  line-height: 1.3;
  font-size: 0.9em;
  text-align: right;
  direction: rtl;
}
@keyframes marquee-rtl {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(120vw);
  }
}
.social-icons {
  display: flex;
  gap: 10px;
  margin-left: 15px;
  flex-shrink: 0;
}
.social-icons a {
  display: block;
}
.social-icons i {
  font-size: 20px;
  color: #fff;
  transition: transform 0.2s;
}
.social-icons i:hover {
  transform: scale(1.1);
}

/* Navbar */
.navbar {
  background-color: #333;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: sticky;
  top: 41px;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
}
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  transition: max-height 0.3s;
}
.nav-links li {
  margin: 0 12px;
}
.nav-links a {
  color: #fff;
  text-decoration: none;
  padding: 8px 0;
  display: block;
  transition: color 0.3s, border-bottom 0.3s;
  font-size: 0.95em;
}
.nav-links a:hover {
  color: #e00;
  border-bottom: 2px solid #e00;
}
.weather-widget {
  color: #fff;
  margin-left: 20px;
  white-space: nowrap;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.hamburger {
  display: none;
  width: 30px;
  height: 22px;
  position: relative;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  margin-right: 15px;
  z-index: 1002;
}
.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* Main Content */
.main-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.news-section {
  flex: 3;
  min-width: 300px;
}
.sidebar {
  flex: 1;
  min-width: 250px;
}

/* Slideshow */
.slideshow-container {
  max-width: 100%;
  position: relative;
  margin: auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  background-color: #fff;
  color: #222; /* رنگ مشکی ملایم برای متن‌ها */
}

/* اگر می‌خواهی مطمئن باشی تیترها و توضیحات هم قطعاً مشکی باشند */
.slideshow-container h3,
.slideshow-container p,
.slideshow-container .slide-caption {
  color: #222 !important;
  text-shadow: none !important; /* اگر قبلاً سایه گذاشتی حذف کن */
}
.mySlides {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #fff;
  padding: 0 0 40px 0;
  min-height: 120px;
  position: relative;
}
.mySlides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: 0 auto 8px;
  max-width: 100%;
  max-height: 50%;
}
.slide-caption {
  width: 100%;
  padding: 0 10px;
  text-align: center;
}
.slide-caption h3 {
  font-size: 1.2em;
  margin: 10px 0 0 0;
  color: #111;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  display: inline-block;
  padding: 2px 8px;
  font-weight: bold;
}

@media (max-width: 600px) {
  .mySlides img {
    height: 120px;
    max-height: 140px;
  }
  .slide-caption h3 {
    font-size: 1em;
    padding: 2px 3px;
  }
  .mySlides {
    padding: 0 0 34px 0;
    min-height: 80px;
  }
}
.dot-container {
  text-align: center;
  padding: 7px 0;
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: 5;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 5;
}
.next {
  right : 0;
  border-radius: 3px 0 0 3px;
}
.prev {
  left: 0;
  border-radius: 0 3px 3px 0;
}
.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}
.dot-container {
  text-align: center;
  padding: 10px;
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 5;
}
.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s;
}
.active-dot,
.dot:hover {
  background-color: #f1f1f1;
}
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}
@keyframes fade {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

/* News Cards */
.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.news-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.news-card-content {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.news-card-content h4 {
  margin-top: 0;
  font-size: 1.3em;
  line-height: 1.4;
  color: #e00;
}
.news-card-content p {
  font-size: 0.95em;
  color: #555;
  line-height: 1.5;
  margin-bottom: 10px;
}
.news-card-date {
  font-size: 0.8em;
  color: #999;
  text-align: left;
}

/* Advertisements */
.advertisement-block {
  background-color: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  text-align: center;
  overflow: hidden;
}
.advertisement-block img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 10px;
  display: block;
}
.advertisement-block h5 {
  margin-top: 0;
  color: #e00;
  font-size: 1.1em;
  margin-bottom: 5px;
}
.advertisement-block p {
  font-size: 0.85em;
  color: #777;
}
.extra-ads-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* دسکتاپ پیشفرض */
  gap: 20px;
  margin-top: 40px;
  margin-bottom: 0;
}
@media (max-width: 1024px) {
  .extra-ads-grid {
    grid-template-columns: repeat(2, 1fr); /* تبلت */
  }
}
@media (max-width: 600px) {
  .extra-ads-grid {
    grid-template-columns: 1fr; /* موبایل */
    gap: 16px;
  }
}
.news-cards-grid,
.main-content,
.slideshow-container {
  margin-bottom: 40px !important;
}
.extra-ads-grid {
  margin-top: 0;
}

/* ==== FOOTER MAIN STYLE ==== */
.footer {
  background-color: #e00;
  color: #fff;
  padding: 30px 0 0;
  margin-top: 40px;
  font-family: BYekan, IRANSans, Tahoma, sans-serif;
  font-size: 13px;
  letter-spacing: 0.2px;
  line-height: 1.9;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.footer-column {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 320px;
  padding: 0 12px 20px;
  text-align: right;
}

.footer-column h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-column p,
.footer-column li,
.footer-column a,
.footer-column address {
  color: #fefefe;
  font-size: 13px;
  margin: 0 0 6px;
  font-weight: 400;
  text-align: right;
}

.footer-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links-list li {
  margin-bottom: 5px;
}

.footer-links-list a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links-list a:hover {
  color: #ffd;
  text-decoration: underline;
}

.social-icons-footer {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.social-icons-footer a {
  font-size: 16px;
  color: #fff;
  transition: transform 0.25s ease;
}

.social-icons-footer a:hover {
  color: #ffe;
  transform: scale(1.2);
}

/* ==== FOOTER BOTTOM ==== */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 20px;
  padding: 14px 0 12px;
  background: #d00;
  font-size: 12px;
  text-align: center;
  color: #fff;
}

.footer-bottom .copyright {
  margin-bottom: 6px;
}

.footer-bottom .developed-by {
  font-size: 11.5px;
  opacity: 0.75;
  direction: ltr;
  line-height: 1.6;
}

.footer-bottom .developed-by a {
  color: #fff;
  font-weight: bold;
  text-decoration: underline;
}

/* ==== RESPONSIVE (TABLET & MOBILE) ==== */
@media (max-width: 768px) {
  .footer {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
    text-align: center !important;
  }

  .footer-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
  }

  .footer-column {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: none !important;
    box-sizing: border-box !important;
  }

  .footer-column h4 {
    font-size: 15.5px !important;
    font-weight: bold !important;
    margin: 0 !important;
    padding: 6px 0 4px !important;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }

  .footer-column p,
  .footer-column li,
  .footer-column a {
    font-size: 14px !important;
    margin: 2px 0 !important;
    padding: 0 !important;
    line-height: 1.9;
    text-align: center !important;
  }

  .footer-links-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .footer-links-list li {
    margin: 0 !important;
    padding: 0 !important;
  }

  .social-icons-footer {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 8px !important;
  }

  .social-icons-footer a {
    font-size: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .footer-bottom {
    font-size: 13px !important;
    padding: 12px 0 !important;
    margin: 0 !important;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: #d00;
  }

  .footer-bottom .developed-by {
    font-size: 12px !important;
    margin: 4px 0 0 !important;
    direction: ltr !important;
    opacity: 1;
  }
}


/* footer end */

.news-details-article h1.news-title {
  font-weight: bold;
  color: #222;
  line-height: 1.3;
  text-shadow: 0 2px 8px #fafafa44;
}
.news-content {
  background: #fcfcfc;
  font-size: 1.18rem;
}
.news-tags .badge {
  border-radius: 22px !important;
  font-size: 1rem;
  padding: 0.53em 1.3em;
  box-shadow: 0 1px 6px #eee;
  transition: background 0.18s;
}
.news-tags .badge:hover {
  background: #ffde7a !important;
  color: #222 !important;
  cursor: pointer;
  text-decoration: underline;
}
@media (max-width: 700px) {
  .news-details-article {
    padding: 0 2vw;
  }
  .news-content {
    font-size: 1.05rem;
  }
  .news-title {
    font-size: 1.35rem;
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  .nav-links li {
    margin: 0 8px;
  }
  .nav-links a {
    font-size: 0.9em;
  }
  .weather-widget {
    margin-left: 10px;
    font-size: 0.85em;
  }
  .mySlides {
    height: 300px;
  }
  .mySlides h3 {
    font-size: 1.8em;
  }
  .mySlides p {
    font-size: 1.1em;
  }
  .multimedia-section {
    min-width: unset;
    width: 100%;
  }
  .multimedia-item {
    width: 220px;
  }
}
@media (max-width: 768px) {
  .navbar {
    top: 36px;
  }
  .breaking-news-header {
    padding: 5px 0;
  }
  .breaking-news-header .container {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .breaking-news-label {
    order: 1;
    margin-right: 0;
    padding: 3px 10px;
    font-size: 0.85em;
  }
  .social-icons {
    order: 2;
    margin-left: 0;
    margin-right: auto;
    margin-top: 5px;
    justify-content: flex-start;
    width: 100%;
  }
  .breaking-news-marquee-container {
    width: 100%;
    height: 25px;
    order: 3;
    margin-top: 5px;
    direction: ltr;
    text-align: left;
  }
  .navbar .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-right: 15px;
  }
  .hamburger {
    display: flex;
    order: 1;
    margin-right: 0;
    margin-left: 15px;
  }
  .weather-widget {
    order: 2;
    margin-left: 0;
    margin-right: auto;
    justify-content: flex-start;
  }
  .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 10px;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    order: 3;
  }
  .nav-links.active {
    max-height: 300px;
    overflow-y: auto;
    padding-bottom: 10px;
  }
  .nav-links li {
    margin: 5px 0;
    width: 100%;
    text-align: center;
  }
  .nav-links a {
    padding: 10px 0;
  }
  .main-content {
    flex-direction: column;
  }
  .news-section,
  .sidebar {
    width: 100%;
    min-width: unset;
  }
  .mySlides {
    height: 250px;
    padding: 15px;
  }
  .mySlides h3 {
    font-size: 1.5em;
  }
  .mySlides p {
    font-size: 1em;
  }
  .news-cards-grid {
    grid-template-columns: 1fr;
  }
  .multimedia-items-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    overflow-x: unset;
    padding-bottom: 0;
  }
  .multimedia-item {
    width: 100%;
    flex-shrink: unset;
    padding-bottom: 0;
  }
  .multimedia-item img {
    height: 180px;
  }
  .footer-content {
    flex-direction: column;
    align-items: center;
  }
  .footer-column {
    min-width: unset;
    max-width: 90%;
    width: 100%;
    text-align: center;
  }
  .footer-column:last-child {
    text-align: center;
    align-items: center;
    margin-left: 0;
    margin-right: 0;
  }
  .footer-links-list {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .social-icons-footer {
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .breaking-news-label {
    font-size: 0.8em;
    padding: 2px 8px;
  }
  .social-icons {
    margin-top: 2px;
  }
  .social-icons i {
    font-size: 16px;
  }
  .navbar {
    padding: 8px 10px;
  }
  .nav-links a {
    font-size: 0.85em;
    padding: 8px 0;
  }
  .weather-widget {
    font-size: 0.8em;
  }
  .mySlides {
    height: 200px;
    padding: 10px;
  }
  .mySlides h3 {
    font-size: 1.3em;
  }
  .mySlides p {
    font-size: 0.9em;
  }
  .news-card-content h4 {
    font-size: 1.1em;
  }
  .news-card-content p {
    font-size: 0.8em;
  }
  .news-card-date {
    font-size: 0.7em;
  }
  .advertisement-block img {
    margin-bottom: 5px;
  }
  .advertisement-block h5 {
    font-size: 1em;
  }
  .advertisement-block p {
    font-size: 0.8em;
  }
  .multimedia-item img {
    height: 150px;
  }
  .footer {
    padding: 20px 0;
  }
  .footer-links li {
    margin: 0 8px;
  }
}
@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    align-items: stretch;
  }

  /* Add a wrapper for actions (menu + weather) */
  .navbar-actions-row {
    display: flex;
    flex-direction: row-reverse; /* hamburger right, weather left (rtl) */
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
  }

  .nav-search {
    width: 100%;
    margin: 8px 0 0 0;
    border-radius: 16px;
    height: 32px;
    order: 0;
  }

  .hamburger {
    display: flex;
    margin-right: 0;
    margin-left: 10px;
    order: 1;
  }
  .weather-widget {
    order: 2;
    margin: 0;
    justify-content: flex-start;
  }
}

/* Navbar Search Field */
.nav-search {
  display: flex;
  align-items: center;
  margin-right: 20px;
  background: #fff;
  border-radius: 25px;
  padding: 0 8px;
  border: 1px solid #eee;
  transition: box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(220, 0, 0, 0.04);
  height: 38px;
  min-width: 180px;
}
.nav-search input[type="text"] {
  border: none;
  outline: none;
  padding: 7px 10px;
  font-size: 1em;
  border-radius: 25px;
  background: transparent;
  font-family: "BYekan", sans-serif;
  width: 110px;
  transition: width 0.3s;
}
.nav-search button {
  background: none;
  border: none;
  outline: none;
  color: #e00;
  font-size: 1.2em;
  margin-right: 2px;
  cursor: pointer;
  transition: color 0.2s;
}
.nav-search button:hover {
  color: #333;
}
@media (max-width: 992px) {
  .nav-search {
    min-width: 120px;
    margin-right: 10px;
    height: 34px;
    padding: 0 5px;
  }
  .nav-search input[type="text"] {
    width: 60px;
    font-size: 0.93em;
    padding: 6px 7px;
  }
}
@media (max-width: 768px) {
  .navbar .container {
    flex-wrap: wrap;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-search {
    width: 100%;
    margin: 8px 0 0 0;
    order: 0;
    justify-content: flex-end;
    min-width: unset;
    border-radius: 16px;
    height: 32px;
  }
  .nav-search input[type="text"] {
    width: 100%;
    min-width: 0;
    font-size: 0.97em;
  }
}
@media (max-width: 480px) {
  .nav-search {
    height: 28px;
    padding: 0 2px;
    border-radius: 14px;
  }
  .nav-search input[type="text"] {
    font-size: 0.9em;
    padding: 3px 5px;
  }
}
.navbar .container {
  width: 100%;
  padding: 0;
}

.nav-row {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 10px;
  justify-content: flex-start;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 34px;
  height: 34px;
  cursor: pointer;
  margin-left: 8px;
}
.hamburger span {
  display: block;
  height: 4px;
  width: 100%;
  margin: 3px 0;
  background: #fff;
  border-radius: 3px;
  transition: all 0.2s;
}

/* Desktop nav */
.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  list-style: none;
  margin: 0 10px 0 0;
  padding: 0;
  flex: 1 1 auto;
}
.nav-links li {
  margin: 0 10px;
}
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 1em;
  padding: 0 8px;
  transition: color 0.15s;
}
.nav-links a:hover {
  color: #e00;
}

/* Desktop search */
.nav-search {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 18px;
  padding: 0 12px;
  border: 1px solid #eee;
  box-shadow: 0 1px 4px rgba(220, 0, 0, 0.04);
  height: 32px;
  min-width: 110px;
  margin-left: 10px;
}
.nav-search input[type="text"] {
  border: none;
  outline: none;
  padding: 7px 10px;
  font-size: 1em;
  border-radius: 15px;
  background: transparent;
  font-family: "BYekan", sans-serif;
  width: 100px;
  transition: width 0.3s;
}
.nav-search button {
  background: none;
  border: none;
  color: #e00;
  font-size: 1.2em;
  margin-right: 2px;
  cursor: pointer;
}

/* === Container اصلی برای یکنواخت‌سازی عرض (مانند تبلیغات) === */
.container {
  max-width: 1100px; /* دقیقاً هم‌عرض تبلیغات */
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
}

/* === سکشن مالتی مدیا === */
.multimedia-section {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.09);
  padding: 24px 20px;
  margin-bottom: 34px; /* فاصله از تبلیغ پایین */
  width: 100%;
  box-sizing: border-box;
}

.bottom-sections {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* === هدر مالتی مدیا (عنوان و دکمه) === */
.multimedia-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 14px;
  width: 100%;
  gap: 0;
}
.multimedia-title {
  margin: 0;
  font-size: 1.32rem;
  color: #e00;
  font-weight: bold;
  flex: 0 0 auto;
}
.show-all-btn {
  margin-right: auto;
  font-size: 1em;
  color: #e00;
  background: #fff;
  border: 1px solid #e00;
  border-radius: 22px;
  padding: 5px 22px;
  text-decoration: none;
  transition: background 0.25s, color 0.25s;
  box-shadow: 0 1px 3px rgba(200, 0, 0, 0.04);
  font-family: inherit;
}
.show-all-btn:hover {
  background: #e00;
  color: #fff;
}

/* === لیست آیتم‌های مالتی مدیا (افقی) === */
.multimedia-items-wrapper {
  display: flex;
  flex-direction: row;
  gap: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #e00 #f1f1f1;
}
.multimedia-items-wrapper::-webkit-scrollbar {
  height: 8px;
}
.multimedia-items-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.multimedia-items-wrapper::-webkit-scrollbar-thumb {
  background: #e00;
  border-radius: 10px;
}
.multimedia-items-wrapper::-webkit-scrollbar-thumb:hover {
  background: #c00;
}

/* === استایل کارت مالتی‌مدیا === */
.multimedia-item {
  flex-shrink: 0;
  width: 260px;
  background: #fafafa;
  border-radius: 10px;
  box-shadow: 0 1.5px 6px rgba(200, 0, 0, 0.07);
  padding: 12px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  transition: box-shadow 0.18s;
  border: 1px solid #f3f3f3;
  box-sizing: border-box;
}
.multimedia-item:hover {
  box-shadow: 0 3.5px 18px rgba(200, 0, 0, 0.14);
  border-color: #eee;
}

.multimedia-item iframe,
.multimedia-item video,
.multimedia-item audio {
  border-radius: 6px;
  width: 100%;
  max-width: 100%;
  background: #ddd;
  min-height: 58px;
}

.multimedia-item p {
  margin: 0;
  font-size: 1em;
  line-height: 1.5;
  color: #444;
  text-align: right;
  width: 100%;
  font-weight: 500;
}

.multimedia-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}
.multimedia-item a:hover p {
  color: #e00;
}

.loading-multimedia {
  color: #bbb;
  font-size: 1em;
  padding: 32px 0;
  text-align: center;
  width: 100%;
}

/* === تبلیغات پایین مالتی‌مدیا === */
.ad-below-multimedia {
  margin-top: 36px;
  margin-bottom: 22px;
}

/* --- Tablet --- */
@media (max-width: 1024px) {
  .container {
    max-width: 98vw;
  }
  .multimedia-section {
    padding: 15px 7px;
  }
  .multimedia-item {
    width: 200px;
  }
}

/* --- Mobile landscape & small tablets --- */
@media (max-width: 800px) {
  .container {
    max-width: 99vw;
  }
  .multimedia-section {
    padding: 8px 2px;
  }
  .multimedia-items-wrapper {
    gap: 10px;
  }
  .multimedia-item {
    width: 155px;
    font-size: 0.93em;
  }
  .show-all-btn {
    font-size: 0.95em;
    padding: 4px 13px;
  }
  .multimedia-header {
    margin-bottom: 7px;
  }
}

/* --- Mobile portrait (vertical) --- */
@media (max-width: 600px) {
  .container {
    max-width: 100vw;
    padding: 0 2px;
  }
  .multimedia-items-wrapper {
    flex-direction: column;
    gap: 13px;
    overflow-x: unset;
    overflow-y: unset;
    scrollbar-width: none;
  }
  .multimedia-item {
    width: 100%;
    min-width: 0;
    margin: 0 auto;
    font-size: 1em;
  }
  .show-all-btn {
    width: max-content;
    font-size: 0.99em;
  }
  .multimedia-section {
    padding: 4px 0 6px 0;
    border-radius: 0;
    box-shadow: none;
  }
}

/* برای کوچک‌ترین موبایل‌ها */
@media (max-width: 410px) {
  .multimedia-section {
    padding: 2px 0 4px 0;
  }
  .multimedia-title {
    font-size: 1.02rem;
  }
  .show-all-btn {
    font-size: 0.9em;
    padding: 2px 7px;
  }
}

/* Weather */
.weather-widget {
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 0.95em;
  gap: 5px;
  white-space: nowrap;
  margin-right: 0;
  margin-left: 10px;
}

/* موبایل */
@media (max-width: 991px) {
  .nav-row {
    justify-content: space-between;
    padding: 0 10px;
  }
  .hamburger {
    display: flex;
  }
  .nav-links {
    display: none !important;
  }
  .nav-search {
    display: none;
  }
  .weather-widget {
    margin-right: 0;
    margin-left: 0;
    order: 2;
  }
  .mobile-search {
    display: flex !important;
    width: 100%;
    max-width: none;
    margin: 0;
    background: #fff;
    border-radius: 18px;
    padding: 0 10px;
    border: 1px solid #eee;
    box-shadow: 0 1px 4px rgba(220, 0, 0, 0.04);
    height: 34px;
    align-items: center;
    margin-bottom: 6px;
  }
  .mobile-search input[type="text"] {
    width: 100%;
    font-size: 1em;
    border-radius: 14px;
    background: transparent;
    border: none;
    outline: none;
    padding: 7px 10px;
    font-family: "BYekan", sans-serif;
  }
  .mobile-search button {
    background: none;
    border: none;
    color: #e00;
    font-size: 1.2em;
    cursor: pointer;
  }
  .mobile-menu {
    display: none;
    flex-direction: column;
    background: #222;
    border-radius: 0 0 10px 10px;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .mobile-menu.open {
    display: flex !important;
  }
  .mobile-menu li {
    text-align: center;
    padding: 14px 0;
    border-bottom: 1px solid #333;
  }
  .mobile-menu li:last-child {
    border-bottom: none;
  }
  .mobile-menu a {
    color: #fff;
    font-size: 1em;
  }
}

/* دسکتاپ */
@media (min-width: 992px) {
  .hamburger,
  .mobile-search,
  .mobile-menu {
    display: none !important;
  }
  .nav-row {
    flex-direction: row;
  }
  .nav-links {
    display: flex !important;
  }
  .nav-search {
    display: flex !important;
  }
  .weather-widget {
    display: flex !important;
  }
}
/* دسکتاپ: فقط nav-links، بقیه پنهان */
@media (min-width: 992px) {
  .nav-links {
    display: flex !important;
  }
  .mobile-menu,
  .hamburger,
  .mobile-search {
    display: none !important;
  }
}

/* موبایل: فقط hamburger, mobile-menu, mobile-search */
@media (max-width: 991px) {
  .nav-links {
    display: none !important;
  }
  .hamburger {
    display: flex !important;
  }
  .mobile-search {
    display: flex !important;
    margin: 12px 10px 6px 10px;
  }
  .mobile-menu {
    display: none;
  }
  .mobile-menu.open {
    display: flex !important;
  }
}
@media (max-width: 991px) {
  .mobile-search {
    margin-left: 14px;
    margin-right: 14px;
    border-radius: 18px;
    width: auto;
  }
}
@media (max-width: 480px) {
  .mobile-search {
    margin-left: 6px;
    margin-right: 6px;
    height: 32px;
    border-radius: 14px;
  }
}
.header-news-link {
  display: inline-block;
  font-weight: 900;
  color: #ffffff !important;
  text-decoration: none !important;
  margin: 0 24px;
  line-height: 2;
  letter-spacing: 0.1px;
  transition: color 0.2s;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .header-news-link {
    margin: 0 10px;
    line-height: 1.4;
  }
}

.breaking-news-link {
  display: block;
  text-align: center;
  font-size: 1.42rem;
  font-weight: 900;
  color: #1749b4 !important;
  text-decoration: none !important;
  margin: 13px 0 6px 0;
  line-height: 2;
  letter-spacing: 0.1px;
  transition: color 0.2s;
  word-break: break-word;
  white-space: normal;
}

/* Slide caption container - responsive padding & width */
.slide-caption {
  padding: 0 10px 10px 10px;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
}

@media (max-width: 700px) {
  .breaking-news-link {
    font-size: 1.1rem;
    margin: 9px 0 5px 0;
    font-weight: 800;
    line-height: 1.8;
  }
  .slide-caption {
    padding: 0 4px 6px 4px;
  }
}
@media (max-width: 500px) {
  .breaking-news-link {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 7px 0 3px 0;
  }
  .slide-caption {
    padding: 0 2px 3px 2px;
  }
}

/* تاریخ و آیکون همیشه خوانا و ریسپانسیو */
.slide-caption span[style*="align-items:center"] {
  font-size: 14px !important;
  min-width: 80px;
  padding-top: 3px;
  justify-content: flex-end;
}
.slide-media-embed iframe,
.slide-media-embed video,
.slide-media-embed audio {
  max-width: 100%;
  width: 100% !important;
  height: auto;
  border-radius: 7px;
}
@media (max-width: 600px) {
  .slide-media-embed iframe {
    min-height: 160px !important;
  }
}

/* Weather widget card container */
/* ==== COMPACT WEATHER WIDGET - CLEAN & RESPONSIVE ==== */
.weather-widget-card {
  max-width: 320px;
  margin: 10px auto;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  font-family: BYekan, IRANSans, sans-serif;
  font-size: 14px;
  direction: rtl;
  overflow: hidden;
}

.weather-header {
  background: linear-gradient(90deg, #f0f7ff 0%, #d6e7ff 100%);
  color: #2b4c90;
  font-weight: bold;
  font-size: 16px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #e3e3e3;
  justify-content: flex-start;
  flex-direction: row-reverse;
}

.weather-header i {
  font-size: 18px;
  color: #2096ff;
  margin: 0 0 0 3px;
}

.weather-main-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 6px 10px 4px;
  font-size: 17px;
}

.weather-temp {
  font-size: 32px;
  font-weight: bold;
  color: #ff8a1c;
  min-width: 48px;
  line-height: 1;
}

.weather-summary {
  font-size: 14px;
  color: #1899d6;
  font-weight: 700;
  margin: 0;
}

.weather-details {
  padding: 0 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.weather-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.label {
  color: #3d3d3d;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 80px;
  justify-content: flex-end;
}

.value {
  font-weight: bold;
  color: #232323;
  font-family: BYekan, IRANSans, sans-serif;
  text-align: left;
  direction: ltr;
  min-width: 40px;
  font-size: 13px;
}

.desc {
  color: #666;
  font-size: 12px;
  margin-top: 5px;
  padding-top: 4px;
  border-top: 1px dashed #ddd;
  text-align: right;
}

/* === Responsive (Mobile) === */
@media (max-width: 480px) {
  .weather-widget-card {
    max-width: 100%;
    margin: 10px 12px;
    font-size: 13px;
  }

  .weather-header {
    font-size: 15px;
    padding: 7px 9px;
  }

  .weather-header i {
    font-size: 16px;
  }

  .weather-temp {
    font-size: 28px;
  }

  .weather-summary {
    font-size: 13px;
  }

  .weather-row {
    font-size: 12.5px;
  }

  .value {
    font-size: 12.5px;
  }

  .desc {
    font-size: 11.5px;
  }
}

/* ==== CURRENCY (QAR) WIDGET بهینه و جمع‌وجور ==== */
.currency-widget {
  max-width: 340px;
  margin: 0 auto 15px auto;
  padding: 10px 10px 7px 10px;
  background: #fff;
  border: 1.5px solid #e6e8ed;
  border-radius: 13px;
  box-shadow: 0 4px 18px 0 rgba(0, 0, 0, 0.07);
  font-family: BYekan, IRANSans, sans-serif;
  direction: rtl;
  transition: box-shadow 0.3s;
}
.currency-widget:hover {
  box-shadow: 0 6px 22px 0 rgba(55, 93, 177, 0.13);
}
.currency-widget .widget-header {
  font-size: 19px;
  font-weight: bold;
  margin-bottom: 6px;
  text-align: center;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.currency-widget .widget-header i {
  color: #36c;
  font-size: 18px;
  margin-left: 2px;
}
.currency-widget .widget-body .price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1px;
  font-size: 16px;
  line-height: 1.12;
}
.currency-widget .widget-body .label {
  color: #444;
  font-size: 15px;
  min-width: 80px;
  margin-left: 2px;
}
.currency-widget .widget-body .value {
  font-weight: bold;
  color: #232323;
  font-size: 16px;
  letter-spacing: 0.5px;
}
.currency-widget .widget-body .qar-currency {
  font-size: 11px;
  color: #7682a2;
  margin-right: 2px;
}
.currency-widget .widget-body .value.price-up {
  color: #1baf47;
}
.currency-widget .widget-body .value.price-down {
  color: #c92828;
}

/* --- موبایل و عرض کم --- */
@media (max-width: 700px) {
  .weather-widget-card,
  .currency-widget {
    max-width: 99vw;
    font-size: 17px;
    margin-bottom: 10px;
    border-radius: 10px;
    padding-left: 2vw;
    padding-right: 2vw;
  }
  .weather-header {
    font-size: 17px;
    padding: 7px 5px 4px 4px;
  }
  .weather-main-info {
    font-size: 17px;
    gap: 5px;
    padding: 6px 4px 0 1px;
  }
  .weather-temp {
    font-size: 29px;
  }
  .weather-summary {
    font-size: 13px;
  }
  .weather-details {
    padding: 0 5px 3px 2px;
  }
  .label,
  .value {
    font-size: 14px;
  }
  .currency-widget .widget-header {
    font-size: 15px;
  }
  .currency-widget .widget-body .price-row {
    font-size: 14px;
  }
  .currency-widget .widget-body .label {
    font-size: 13px;
  }
  .currency-widget .widget-body .value {
    font-size: 13.5px;
  }
}
@media (max-width: 400px) {
  .weather-header {
    font-size: 15px;
  }
  .weather-temp {
    font-size: 20px;
  }
  .currency-widget .widget-header {
    font-size: 12px;
  }
}

.news-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 7px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
  overflow: hidden;
  transition: box-shadow 0.2s;
  padding-bottom: 8px;
  position: relative;
  min-height: 180px;
}

.news-card:not(:last-child) {
  margin-bottom: 24px !important;
}

.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 14px 14px 0 0;
}

.news-card-body {
  padding: 16px 20px 8px 20px;
  font-size: 16px;
}
.news-card-footer {
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #666;
  font-size: 13px;
}
@media (max-width: 900px) {
  .news-card img {
    height: 160px;
  }
  .news-card-body {
    font-size: 15px;
    padding: 12px 12px 6px 12px;
  }
}
@media (max-width: 600px) {
  .news-card {
    border-radius: 8px;
    margin-bottom: 14px !important;
    min-height: 120px;
  }
  .news-card img {
    height: 120px;
    border-radius: 8px 8px 0 0;
  }
  .news-card-body,
  .news-card-footer {
    padding: 10px 8px 6px 8px;
    font-size: 13px;
  }
}
.news-list-container {
  padding: 20px 0 30px 0;
}

@media (max-width: 900px) {
  .news-list-container {
    padding: 10px 0 16px 0;
  }
}
@media (max-width: 600px) {
  .news-list-container {
    padding: 4px 0 8px 0;
  }
}
.news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  margin: 22px 0 12px 0;
}
.news-pagination button {
  background: #fff;
  border: 1px solid #d0d0d0;
  padding: 4px 12px;
  border-radius: 7px;
  font-size: 14px;
  cursor: pointer;
  margin: 0 2px;
  transition: background 0.15s;
}
.news-pagination button.active,
.news-pagination button:active {
  background: #d32f2f;
  color: #fff;
  border-color: #b71c1c;
}
.news-pagination button:disabled {
  background: #f3f3f3;
  color: #999;
  border-color: #eee;
  cursor: not-allowed;
}
.news-pagination span {
  display: inline-block;
  padding: 0 4px;
  font-size: 16px;
  color: #c33;
}

/* ==== DATE & TIME WIDGET ==== */
.datetime-widget-card {
  max-width: 340px;
  margin: 0 auto 15px auto;
  background: #fff;
  border: 1.3px solid #e3e7ef;
  border-radius: 13px;
  box-shadow: 0 4px 18px 0 rgba(0, 0, 0, 0.09);
  font-family: BYekan, IRANSans, sans-serif;
  direction: rtl;
  padding: 0;
  overflow: hidden;
}

.datetime-header {
  background: linear-gradient(90deg, #f0f7ff 0%, #e0ecff 100%);
  color: #2b4c90;
  font-size: 20px;
  font-weight: bold;
  padding: 10px 10px 4px 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #e7eaf6;
  justify-content: flex-start;
  flex-direction: row-reverse;
}

.datetime-header i {
  font-size: 23px;
  color: #2096ff;
  margin-right: 3px;
}

.datetime-main-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  font-size: 17px;
  padding: 9px 14px 10px 14px;
  direction: rtl;
  text-align: right;
  color: #2d2d2d;
}

.datetime-main-info div {
  padding: 3px 0;
  border-bottom: 1px dashed #ddd;
  font-weight: 600;
  white-space: nowrap;
}
.datetime-main-info div:last-child {
  border-bottom: none;
  font-weight: bold;
  font-size: 18px;
  color: #e00;
}

/* ==== MOBILE VIEW ==== */
@media (max-width: 700px) {
  .datetime-widget-card {
    max-width: 99vw;
    font-size: 16px;
    margin-bottom: 10px;
    border-radius: 10px;
    padding-left: 2vw;
    padding-right: 2vw;
  }
  .datetime-header {
    font-size: 17px;
    padding: 8px 6px 5px 6px;
  }
  .datetime-header i {
    font-size: 20px;
  }
  .datetime-main-info {
    font-size: 15px;
    padding: 8px 10px;
  }
  .datetime-main-info div {
    font-size: 15px;
    padding: 4px 0;
  }
  .datetime-main-info div:last-child {
    font-size: 17px;
  }
}
