/*
Theme Name: maaz
Theme URI: https://example.com/maaz
Author: معاذ هزاع
Author URI: mailto:moathhaza@gmail.com
Description: مطور القالب: معاذ هزاع | رقم التواصل: 0533364118 | البريد الإلكتروني: moathhaza@gmail.com
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: maaz
Tags: custom-logo, custom-menu, rtl
*/

/* Fonts and icons are enqueued in functions.php */
:root {
  --primary-red: #e31e24;
  --primary-green: #1a9c4a;
  --primary-dark: #1a1a1a;
  --primary-light: #f4f5f7;
  --white: #ffffff;
  --text-dark: #333333;
  --text-light: #777777;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
}

/* Dark Mode Overrides */
html.dark-mode {
  --white: var(--bg-dark-primary, #121212);
  --text-dark: var(--text-dark-primary, #e0e0e0);
  --primary-light: #1e1e1e;
  --primary-dark: #000000;
  --glass-bg: rgba(18, 18, 18, 0.85);
}

/* Optional inverted colors in dark mode for specific structural sections */
html.dark-mode .hero-content h1,
html.dark-mode .hero-content p,
html.dark-mode .section-title h2,
html.dark-mode .features-card h3,
html.dark-mode .service-card h3,
html.dark-mode .service-card p,
html.dark-mode .product-card h3,
html.dark-mode .product-card p {
  color: var(--text-dark);
}
html.dark-mode .features-card,
html.dark-mode .service-card,
html.dark-mode .product-card {
  background-color: var(--primary-light);
  border-color: #333;
}
html.dark-mode header {
  background-color: var(--white);
  border-bottom: 1px solid #333;
}
html.dark-mode .nav-links a.active {
  color: var(--primary-red);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
}

html,
body {
  height: 100%;
}

body {
  background-color: var(--white);
  color: var(--text-dark);
  line-height: 1.6;
}

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

/* الشريط العلوي */
.top-bar {
  background-color: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 12px 0;
  font-size: 13.5px;
  direction: ltr;
  border-bottom: 2px solid var(--primary-red);
}

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

.top-bar-contact {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 30px;
}

.top-contact-item {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.top-contact-item i {
  font-size: 16px;
  color: var(--primary-red);
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  color: var(--white);
  transition: color 0.3s;
}

.social-icons a:hover {
  color: var(--primary-red);
}

/* Dark Mode Toggle Switch */
.dark-mode-switch {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

[dir="ltr"] .dark-mode-switch {
  margin-right: 0;
  margin-left: 20px;
}

.dark-toggle-checkbox {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.dark-toggle-label {
  background-color: var(--primary-dark);
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  position: relative;
  height: 26px;
  width: 50px;
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) inset;
}

.dark-toggle-label .fa-moon {
  color: #f1c40f;
  font-size: 12px;
}

.dark-toggle-label .fa-sun {
  color: #f39c12;
  font-size: 12px;
}

.dark-toggle-label .ball {
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  height: 22px;
  width: 22px;
  transform: translateX(0px);
  transition: transform 0.2s linear;
}

.dark-toggle-checkbox:checked + .dark-toggle-label .ball {
  transform: translateX(24px);
}

html.dark-mode .dark-toggle-label {
  background-color: #333;
}

/* Preloader */
.maaz-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition:
    opacity 0.5s ease-out,
    visibility 0.5s ease-out;
}

.maaz-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.maaz-preloader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.preloader-logo {
  max-width: 150px;
  height: auto;
  animation: pulse 2s infinite ease-in-out;
}

.loader-pulse {
  width: 40px;
  height: 40px;
  background-color: var(--primary-red);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* شريط التنقل */
header {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: relative;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.4s ease-in-out, box-shadow 0.4s ease-in-out, transform 0.4s ease-in-out;
}

header.header-transparent {
  background-color: transparent !important;
  box-shadow: none !important;
  position: absolute;
}

header.header-transparent .nav-links a,
header.header-transparent .logo-text {
  color: var(--white) !important;
}

header.header-transparent .hamburger i {
  color: var(--white) !important;
}

header.header-scrolled {
  position: fixed;
  top: 0;
  background-color: var(--glass-bg) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1) !important;
  animation: slideDown 0.4s forwards;
}

header.header-scrolled .nav-links a,
header.header-scrolled .logo-text {
  color: var(--text-dark) !important;
}

header.header-scrolled .hamburger i {
  color: var(--text-dark) !important;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-image {
  height: 70px;
  margin-left: 10px;
}

.logo-text {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1.5rem;
}

.logo-text span {
  color: var(--primary-red);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin: 0 5px;
}

.nav-links a {
  color: var(--text-dark);
  text-decoration: none;
  padding: 8px 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background-color: var(--primary-red);
  transition: width 0.3s ease;
  border-radius: 3px;
}

.nav-links a:hover::after,
.nav-links a.active::after,
.nav-links .current-menu-item > a::after {
  width: 80%;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links .current-menu-item > a {
  color: var(--primary-red);
  background-color: rgba(227, 30, 36, 0.05);
}

.hamburger {
  display: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--primary-dark);
}

/* قسم الهيرو */
.hero {
  position: relative;
  background:
    linear-gradient(
      135deg,
      rgba(26, 26, 26, 0.85) 0%,
      rgba(26, 156, 74, 0.75) 100%
    ),
    url("https://images.unsplash.com/photo-1541882823616-f2b7f3b890a8?ixlib=rb-4.0.3&auto=format&fit=crop&w=1500&q=80");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--white);
  padding: 180px 0 140px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--primary-light), transparent);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
  animation: fadeInUp 1.5s ease;
}

.btn {
  display: inline-block;
  background-color: var(--primary-red);
  color: var(--white);
  padding: 12px 30px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s;
  animation: fadeInUp 2s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--primary-green);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(26, 156, 74, 0.4);
}

/* الأقسام العامة */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary-dark);
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary-red);
}

/* قسم من نحن */
.about-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 60px;
}

.value-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.value-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-red), var(--primary-green));
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.value-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.value-card:hover::before {
  transform: scaleX(1);
}

.value-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 25px;
  background: rgba(26, 156, 74, 0.1);
  color: var(--primary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: all 0.3s ease;
}

.value-card:hover .value-icon {
  background: var(--primary-green);
  color: var(--white);
  transform: rotateY(180deg);
}

.value-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-dark);
}

.value-card p {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
}

.about-image img {
  width: 100%;
  height: auto;
}

/* قسم المميزات */
.features {
  background-color: var(--primary-light);
  position: relative;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
.feature-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.03);
}
.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
}
.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(
    135deg,
    var(--primary-green),
    var(--primary-dark)
  );
  color: var(--white);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  transform: rotate(45deg);
  transition: all 0.4s ease;
}
.feature-icon i {
  transform: rotate(-45deg);
}
.feature-card:hover .feature-icon {
  transform: rotate(0deg);
  border-radius: 50%;
}
.feature-card h3 {
  color: var(--primary-dark);
  margin-bottom: 15px;
  font-size: 1.4rem;
}
.feature-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* قسم الخدمات */
.services {
  background-color: var(--white);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
}
.service-card {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.service-image {
  height: 300px;
  overflow: hidden;
  position: relative;
}
.service-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0) 80%
  );
  z-index: 1;
}
.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.service-card:hover .service-image img {
  transform: scale(1.1);
}
.service-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  color: var(--white);
  z-index: 2;
}
.service-content h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.service-content p {
  font-size: 1rem;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* قسم شركاؤنا */
.partners-slider {
  margin-top: 40px;
  padding: 20px 40px; /* space for arrows */
  position: relative;
  overflow: hidden; /* Swiper handles this, but good to set if customized */
}

/* Swiper navigation arrows */
.partners-next,
.partners-prev {
  color: var(--primary-dark);
  background: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.partners-next:after,
.partners-prev:after {
  font-size: 18px;
  font-weight: bold;
}

.partners-next:hover,
.partners-prev:hover {
  background: var(--primary-red);
  color: var(--white);
}

.partner-card {
  padding: 10px;
  text-align: center;
  height: 100%;
}

.partner-card .partner-logo {
  background-color: var(--white);
  border-radius: 50%;
  width: 150px;
  height: 150px;
  margin: 10px auto;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.partner-card:hover .partner-logo {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-red);
}

.partner-card .partner-logo img {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: all 0.3s ease;
}

.partner-card:hover .partner-logo img {
  filter: grayscale(0%);
}

/* قسم الأخبار */
.news {
  background-color: var(--primary-light);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.news-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.news-image {
  height: 200px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-info {
  padding: 20px;
}

.news-date {
  color: var(--primary-red);
  font-size: 14px;
  margin-bottom: 10px;
}

.news-info h3 {
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.read-more {
  color: var(--primary-dark);
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  margin-top: 15px;
  transition: color 0.3s;
}

.read-more:hover {
  color: var(--primary-red);
}

/* قسم التواصل */
.contact-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

/* المنتجات (Products) */
.products {
  padding: 80px 0;
  background-color: var(--primary-light);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-info {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin-bottom: 15px;
  font-weight: 700;
}

.product-info p {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-red), var(--primary-green));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.product-card:hover::before {
  opacity: 1;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-map {
  margin-top: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  height: 300px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .logo-image {
    height: 60px;
  }
  .hero {
    padding: 90px 0;
  }
  .hero h1 {
    font-size: 2.6rem;
  }
  .hero p {
    font-size: 1.05rem;
  }
  .about-content {
    gap: 24px;
  }
  .products-grid {
    gap: 20px;
  }
  .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: block;
  }
  .hero {
    padding: 70px 0;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
    max-width: 90%;
  }
  .about-content {
    flex-direction: column;
  }
  .about-image {
    order: -1;
  }
  .product-image {
    height: 180px;
  }
  .news-image {
    height: 160px;
  }
  .partner-card {
    flex: 0 0 45%;
    padding: 15px;
  }
  .partner-card .partner-logo {
    height: 100px;
    padding: 15px;
    margin-bottom: 10px;
  }
  .container {
    padding: 0 12px;
  }
}

@media (max-width: 480px) {
  .logo-image {
    height: 50px;
  }
  .logo-text {
    font-size: 1.1rem;
  }
  .hero {
    padding: 50px 0;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  .hero p {
    font-size: 0.95rem;
  }
  .btn {
    padding: 10px 18px;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .partner-card {
    flex: 0 0 48%;
    padding: 15px;
  }
  .partner-card .partner-logo {
    height: 140px;
    padding: 10px;
    margin-bottom: 8px;
  }
  .top-bar {
    font-size: 13px;
  }
  .about-image img {
    object-fit: cover;
  }
}

/* Ensure images are fluid */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Footer and widgets responsiveness */
.footer-widget {
  margin-bottom: 20px;
}
.widget-products .widget-product {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.widget-products .wp-thumb img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
}

.widget-partners {
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.contact-icon {
  background-color: var(--primary-red);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-form {
  background-color: var(--primary-light);
  padding: 30px;
  border-radius: 8px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-control:focus {
  border-color: var(--primary-dark);
  outline: none;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* الفوتر */
footer {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.footer-logo img {
  height: 60px;
  margin-left: 10px;
}

.footer-logo-text {
  color: var(--white);
  font-weight: 700;
  font-size: 1.5rem;
}

.footer-logo-text span {
  color: var(--primary-red);
}

.footer-links h4 {
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-red);
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--primary-red);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* زر الواتساب */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  left: 40px;
  background-color: #25d366;
  color: var(--white);
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: translateY(-5px);
}

/* التجاوبية */
@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: var(--primary-dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.5s;
    z-index: 1000;
  }

  /* Make sure background is solid when scrolled to ensure visibility */
  header.header-scrolled .nav-links {
    background-color: var(--primary-dark);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    margin: 15px 0;
  }

  .nav-links a {
    color: var(--white);
    font-size: 18px;
  }

  .hamburger {
    display: block;
    z-index: 1001;
  }
  
  /* Make hamburger visible on transparent header over dark hero */
  header.header-transparent .hamburger i {
    color: var(--white) !important;
  }
  
  /* Ensure it has dark color when scrolled and glassmorphism is active */
  header.header-scrolled .hamburger i {
     color: var(--text-dark) !important;
  }
  
  html.dark-mode header.header-scrolled .hamburger i {
     color: var(--white) !important;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .top-bar-content {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .top-bar-contact {
    gap: 10px;
    font-size: 12px;
  }

  .social-icons {
    gap: 10px;
  }

  .hero {
    padding: 80px 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fuel Prices Ticker (Creative Glassmorphism Redesign) */
.fuel-ticker-wrapper {
  display: flex;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  margin: -20px auto 30px; /* Reduced overlap slightly to match thinness */
  padding: 0 !important; /* Override global section padding */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px; /* Reduced from 50px for thinner bar */
  position: relative;
  overflow: hidden;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.08),
    inset 0 0 10px rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.ticker-label {
  background: linear-gradient(135deg, var(--primary-red), #ff4d4d);
  color: var(--white);
  padding: 8px 20px; /* Reduced padding for half height */
  font-weight: 700; /* Slightly reduced weight */
  font-size: 14px; /* Slightly reduced size */
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
  position: relative;
  border-radius: 30px 0 0 30px; /* Matched wrapper border-radius */
  box-shadow: -5px 0 20px rgba(228, 0, 43, 0.4);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

[dir="rtl"] .ticker-label {
  border-radius: 0 30px 30px 0;
  box-shadow: 5px 0 20px rgba(228, 0, 43, 0.4);
}

.ticker-container {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.ticker-marquee {
  display: flex;
  width: max-content;
  animation: scroll-marquee-gapless 30s linear infinite;
}

.ticker-content-block {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ticker-marquee:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: baseline;
  padding: 0 45px;
  position: relative;
}

.ticker-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 60%;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
}

[dir="rtl"] .ticker-item::after {
  left: auto;
  right: 0;
}

.ticker-title {
  font-weight: 600;
  margin-left: 10px; /* RTL margin */
  color: var(--primary-dark);
  font-size: 14px; /* Reduced */
  text-transform: uppercase;
}

.ticker-price {
  font-weight: 800;
  color: var(--primary-green);
  font-size: 16px; /* Reduced from 22px */
  text-shadow: 0 0 8px rgba(0, 166, 81, 0.2);
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 10px; /* Reduced padding */
  border-radius: 15px; /* Reduced */
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ticker-price small {
  font-size: 11px; /* Reduced */
  font-weight: 600;
  color: var(--primary-dark);
  margin-right: 3px;
}

/* Gapless RTL Marquee Animation */
@keyframes scroll-marquee-gapless {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

/* Responsive for ticker */
@media (max-width: 991px) {
  .fuel-ticker-wrapper {
    width: 95%;
    border-radius: 12px;
    margin-top: -15px;
  }
  .ticker-label {
    border-radius: 12px;
    padding: 8px 15px;
  }
  [dir="rtl"] .ticker-label {
    border-radius: 12px;
  }
}

@media (max-width: 768px) {
  .fuel-ticker-wrapper {
    flex-direction: column;
    width: 90%;
    align-items: stretch;
    margin-top: -10px;
  }
  .ticker-label {
    justify-content: center;
    border-radius: 10px 10px 0 0;
  }
  [dir="rtl"] .ticker-label {
    border-radius: 10px 10px 0 0;
    box-shadow: 0 3px 10px rgba(228, 0, 43, 0.2);
    z-index: 5;
  }
  .ticker-container {
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0 0 10px 10px;
  }
  .ticker-item {
    padding: 0 20px;
  }
  .ticker-price {
    font-size: 15px;
    padding: 2px 8px;
  }
}

/* ==========================================================================
   Inner Pages (Pages, Posts, Archives) Unified Styles
   ========================================================================== */

.inner-page-main {
  padding: 80px 15px;
  background-color: var(--primary-light);
}

.inner-page-card,
.archive-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 40px;
  margin: 0 auto 40px;
  max-width: 900px;
  border: 1px solid rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

.archive-card {
  padding: 0; /* content padding handled inside */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: none;
}

.archive-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.single-post-card {
  max-width: 1000px;
}

/* Titles and Headers */
.entry-header {
  margin-bottom: 25px;
  text-align: center;
}
.inner-page-card .entry-header {
  margin-bottom: 35px;
}

.entry-title {
  font-size: 2.2rem;
  color: var(--primary-dark);
  line-height: 1.4;
  margin-bottom: 15px;
  position: relative;
}

.archive-card .entry-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
  text-align: right;
}

.entry-title a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.3s;
}

.entry-title a:hover {
  color: var(--primary-red);
}

.title-separator {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-red), var(--primary-green));
  margin: 15px auto 0;
  border-radius: 2px;
}

/* Meta Info */
.entry-meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.archive-card .entry-meta {
  justify-content: flex-start;
  margin-bottom: 0;
  color: var(--primary-red);
}

.entry-meta i {
  color: var(--primary-red);
  margin-left: 5px;
}

/* Featured Images */
.page-thumbnail {
  margin-bottom: 40px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.page-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.archive-thumbnail {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.archive-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.archive-card:hover .archive-thumbnail img {
  transform: scale(1.05);
}

.fallback-thumbnail {
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary-green) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.fallback-thumbnail img {
  width: 50%;
  height: auto;
  object-fit: contain;
  opacity: 0.5;
  filter: brightness(0) invert(1);
}

/* Content */
.entry-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.archive-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.entry-summary {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Layouts */
.archive-header {
  text-align: center;
  margin-bottom: 50px;
}

.archive-description {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 15px auto 0;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.posts-list {
  max-width: 900px;
  margin: 0 auto;
}

/* Buttons inside inner pages */
.read-more-btn {
  display: inline-flex;
  align-items: center;
  color: var(--primary-red);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.read-more-btn i {
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.read-more-btn:hover {
  color: var(--primary-dark);
}

.read-more-btn:hover i {
  transform: translateX(-5px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .inner-page-main {
    padding: 50px 15px;
  }
  .inner-page-card {
    padding: 25px;
  }
  .entry-title {
    font-size: 1.8rem;
  }
}

/* -------------------------------------
   Scroll to Top Button
-------------------------------------- */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 45px;
  height: 45px;
  background-color: var(--primary-red);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 998;
  box-shadow: 0 4px 15px rgba(227, 30, 36, 0.3);
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* -------------------------------------
   Float Positions Config
-------------------------------------- */
.whatsapp-pos-right {
  right: 30px !important;
  left: auto !important;
}

.whatsapp-pos-left {
  left: 30px !important;
  right: auto !important;
}

/* -------------------------------------
   Cookie Consent Banner
-------------------------------------- */
.cookie-consent-banner {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 150%); /* Start hidden below screen */
  width: 90%;
  max-width: 600px;
  background-color: var(--white);
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  padding: 25px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

html.dark-mode .cookie-consent-banner {
  background-color: var(--primary-light);
  border-color: #333;
}

.cookie-consent-banner.show {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.cookie-content {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.cookie-icon {
  font-size: 30px;
  color: #d4a373; /* Cookie color */
  flex-shrink: 0;
}

.cookie-text strong {
  display: block;
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.cookie-text p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.cookie-buttons {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.cookie-buttons .btn {
  padding: 8px 20px;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
}

.btn-accept {
  background-color: var(--primary-green);
  color: var(--white);
}

.btn-accept:hover {
  background-color: #14823d;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(26, 156, 74, 0.3);
}

.btn-decline {
  background-color: #f1f3f5;
  color: var(--text-dark);
}

html.dark-mode .btn-decline {
  background-color: #333;
  color: var(--white);
}

.btn-decline:hover {
  background-color: #e9ecef;
  transform: translateY(-2px);
}

html.dark-mode .btn-decline:hover {
  background-color: #444;
}

@media (max-width: 576px) {
  .cookie-consent-banner {
    bottom: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 20px;
  }
  .cookie-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .cookie-buttons .btn {
    width: 100%;
  }
}
