/*
  Theme Name: Cafe Shiraz Theme
  File: assets/css/main-style.css
  Description: Main stylesheet for the Cafe Shiraz Theme.
*/

/* === عمومی و Reset === */
:root {
  --primary-color: #a0522d; /* قهوه‌ای مایل به قرمز (Sienna) */
  --secondary-color: #f4a460; /* خاکی (Sandy Brown) */
  --dark-color: #333;
  --light-color: #f8f9fa; /* کمی روشن‌تر از f8f8f8 */
  --darker-color: #222;
  --text-color: #495057; /* رنگ متن کمی تیره‌تر و مدرن‌تر */
  --light-text: #f1f1f1; /* متن روشن کمی تیره‌تر برای کنتراست بهتر */
  --border-color: #dee2e6; /* رنگ بوردر ملایم */
  --font-fa: "Vazirmatn", "Tahoma", sans-serif; /* فال‌بک برای فونت فارسی */
  --font-en: "Roboto", "Arial", sans-serif; /* فال‌بک برای فونت انگلیسی */
  --font-ar: "Noto Naskh Arabic", "Tahoma", sans-serif; /* فونت عربی مناسب‌تر */
  --navbar-height: 70px;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 35px rgba(0, 0, 0, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px; /* پایه اندازه فونت برای استفاده از rem */
}

body {
  font-family: var(--font-fa);
  line-height: 1.7;
  color: var(--text-color);
  background-color: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased; /* برای رندر بهتر فونت */
  -moz-osx-font-smoothing: grayscale;
}

/* تعیین فونت بر اساس زبان */
html[lang="en"] body,
body[data-lang="en"] {
  font-family: var(--font-en);
}
html[lang="ar"] body,
body[data-lang="ar"] {
  font-family: var(--font-ar);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  color: var(--dark-color);
}

h1 {
  font-size: 2.6rem;
}
h2 {
  font-size: 2.1rem;
}
h3 {
  font-size: 1.7rem;
}
h4 {
  font-size: 1.3rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.2s ease-in-out;
}
a:hover {
  color: #7c3f20; /* کمی تیره‌تر از primary-color */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-style: none; /* حذف بوردر پیش‌فرض در برخی مرورگرها */
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1140px; /* عرض کانتینر کمی بیشتر */
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

.section-padding {
  padding-top: 80px;
  padding-bottom: 80px;
}

.section-title {
  text-align: center;
  margin-bottom: 50px; /* فاصله بیشتر */
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--dark-color);
  position: relative;
  padding-bottom: 20px;
}
.section-title::after {
  /* خط تزئینی برای تمام عناوین بخش‌ها */
  content: "";
  position: absolute;
  display: block;
  width: 70px;
  height: 3px;
  background: var(--primary-color);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.section-subtitle {
  text-align: center;
  margin-top: -30px; /* نزدیک‌تر به عنوان */
  margin-bottom: 50px;
  color: #777;
  font-size: 1.1rem;
  font-weight: 400;
}

.bg-light {
  background-color: var(--light-color) !important;
} /* اطمینان از اعمال */
.bg-dark {
  background-color: var(--dark-color) !important;
}
.bg-darker {
  background-color: var(--darker-color) !important;
}

.text-light {
  color: var(--light-text) !important;
}
.text-light h1,
.text-light h2,
.text-light h3,
.text-light h4 {
  color: var(--light-text) !important;
}
.text-light p {
  color: #ccc;
}
.text-light a {
  color: var(--secondary-color);
}
.text-light a:hover {
  color: #fff;
}
.text-light .section-title {
  color: var(--light-text) !important;
}
.text-light .section-title::after {
  background: var(--secondary-color);
}

/* === دکمه === */
.btn {
  display: inline-block;
  padding: 12px 35px; /* پدینگ کمی بیشتر */
  border: 2px solid transparent;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600; /* کمی ضخیم‌تر */
  text-align: center;
  text-transform: uppercase; /* حروف بزرگ (اختیاری) */
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}
.btn-primary:hover {
  background-color: #7c3f20;
  border-color: #7c3f20;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(160, 82, 45, 0.4);
}

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--dark-color);
}
.btn-secondary:hover {
  background-color: #d98c4b;
  border-color: #d98c4b;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(244, 164, 96, 0.4);
}

/* === Navbar === */
#header {
  background-color: rgba(255, 255, 255, 0.97); /* شفافیت کمتر */
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.07);
  position: fixed;
  top: 0;
  left: 0;
  right: 0; /* برای اطمینان از عرض کامل */
  width: 100%;
  z-index: 999; /* z-index بالاتر */
  height: var(--navbar-height);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
/* Navbar on scroll - (JS might be needed to add 'scrolled' class) */
/*
#header.scrolled {
  background-color: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
*/

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo img,
.custom-logo {
  max-height: 45px; /* تنظیم حداکثر ارتفاع لوگو */
  width: auto;
}
.default-logo-link .default-logo {
  /* برای لوگوی پیش‌فرض */
  max-height: 45px;
  width: auto;
}

/* منوی اصلی وردپرس */
.nav-menu {
  /* کلاس ul */
  display: flex;
  align-items: center;
  margin-bottom: 0; /* حذف مارجین پیش‌فرض ul */
}
.nav-menu li {
  /* آیتم‌های li */
  margin: 0 5px;
}
.nav-menu li a {
  /* لینک‌های داخل li */
  color: var(--text-color);
  padding: 10px 15px;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  letter-spacing: 0.3px;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item > a, /* کلاس آیتم فعال وردپرس */
.nav-menu li a.active {
  /* کلاس active از JS (برای اسکرول) */
  color: var(--primary-color);
}
.nav-menu li a::after {
  content: "";
  position: absolute;
  bottom: 0; /* چسبیده به پایین لینک */
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}
.nav-menu li a:hover::after,
.nav-menu li.current-menu-item > a::after,
.nav-menu li a.active::after {
  width: 60%; /* عرض خط زیرین */
}

/* === Language Switcher (Polylang) === */
.lang-switcher ul,
.mobile-lang-switcher .lang-switcher ul {
  /* استایل پایه برای لیست زبان Polylang */
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}
.lang-switcher ul li,
.mobile-lang-switcher .lang-switcher ul li {
  margin: 0 4px;
}
.lang-switcher ul li a,
.mobile-lang-switcher .lang-switcher ul li a {
  padding: 5px 8px;
  font-size: 0.85rem;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
  display: block;
}
.lang-switcher ul li a:hover,
.mobile-lang-switcher .lang-switcher ul li a:hover {
  background-color: var(--light-color);
  border-color: var(--primary-color);
  color: var(--primary-color);
}
.lang-switcher ul li.current-lang a, /* کلاس زبان فعلی Polylang */
.mobile-lang-switcher .lang-switcher ul li.current-lang a {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  font-weight: bold;
}
.lang-switcher-placeholder {
  /* حذف placeholder بعد از پیاده‌سازی */
  display: none !important;
}

/* === Hamburger Menu (Mobile) === */
.hamburger {
  display: none;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 8px;
  z-index: 1001; /* بالاتر از محتوای موبایل */
}
.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--dark-color);
  border-radius: 1px;
  transition: all 0.3s ease-in-out;
}
.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* === Mobile Nav Menu === */
.mobile-nav {
  position: fixed;
  top: var(--navbar-height);
  left: -100%; /* شروع از بیرون صفحه */
  width: 70%;
  max-width: 300px;
  height: calc(100vh - var(--navbar-height));
  background-color: #fff;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  z-index: 999;
  transition: left 0.4s ease-in-out;
  padding-top: 20px;
  overflow-y: auto;
}

html[dir="rtl"] .mobile-nav {
  left: auto;
  right: -100%; /* شروع از بیرون صفحه در حالت RTL */
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  transition: right 0.4s ease-in-out;
}

.mobile-nav.active {
  left: 0;
}
html[dir="rtl"] .mobile-nav.active {
  right: 0;
  left: auto;
}

.mobile-nav-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}


.mobile-nav-menu li a {
  display: block;
  width: 100%;
  text-align: center;
  padding: 15px 20px;
  font-size: 1.1rem;
  color: var(--dark-color);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s, color 0.2s;
}

.mobile-nav-menu li:last-child a {
  border-bottom: none;
}
.mobile-nav-menu li a:hover,
.mobile-nav-menu li.current-menu-item > a {
  color: var(--primary-color);
}
.mobile-lang-switcher {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}
.mobile-lang-switcher .lang-switcher ul {
  justify-content: center; /* مرکز کردن دکمه‌های زبان */
}

/* === Hero Section === */
.hero-section {
  height: 100vh;
  min-height: 600px; /* حداقل ارتفاع برای صفحات کوچک */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.7) 100%
  ); /* گرادیانت ملایم */
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 20px;
}
.hero-title {
  font-size: 3.2rem; /* کمی کوچکتر برای خوانایی بهتر */
  margin-bottom: 1rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  color: #fff; /* اطمینان از رنگ سفید */
  letter-spacing: 1px;
}
.hero-tagline {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  font-weight: 300;
  max-width: 700px; /* محدود کردن عرض برای خوانایی */
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  color: #f0f0f0; /* کمی روشن‌تر از سفید خالص */
}

/* === About Section === */
.about-content {
  display: flex;
  gap: 40px;
  align-items: center;
}
.about-text {
  flex: 1;
}
.about-text h3 {
  /* عنوان داخل متن درباره ما */
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}
.about-image {
  flex-basis: 450px; /* عرض تصویر */
  max-width: 100%;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.about-image img {
  transition: transform 0.4s ease;
}
.about-image:hover img {
  transform: scale(1.05);
}

/* === Modern Menu Section (کدهای جدید منو اینجا هستند) === */
.menu-section .menu-category {
  margin-bottom: 60px;
}
.menu-section .category-title {
  font-size: 2.2rem;
  color: var(--dark-color);
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 15px;
  position: relative;
  letter-spacing: 1px;
}
.menu-section .category-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.menu-section .menu-items.modern-ui {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.menu-section .modern-ui .menu-item {
  background-color: #fff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
  border: 1px solid var(--border-color);
}
.menu-section .modern-ui .menu-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.menu-item-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}
.menu-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.menu-section .modern-ui .menu-item:hover .menu-item-image img {
  transform: scale(1.1);
}

.menu-item-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.menu-item-content .item-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark-color);
  line-height: 1.3;
  margin-right: 10px;
}
html[dir="rtl"] .menu-item-content .item-name {
  margin-right: 0;
  margin-left: 10px;
}
.menu-item-content .item-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  white-space: nowrap;
  line-height: 1.3;
}
.menu-item-content .item-description {
  font-size: 0.9rem;
  color: #6c757d; /* رنگ توضیحات کمی تیره‌تر */
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 0;
}

/* === Gallery Section === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(280px, 1fr)
  ); /* اندازه آیتم‌ها کمی بزرگتر */
  gap: 20px; /* فاصله بیشتر */
}
.gallery-item {
  overflow: hidden;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  position: relative; /* برای افکت overlay (اختیاری) */
  transition: box-shadow 0.3s ease;
}
.gallery-item img {
  transition: transform 0.4s ease;
}
.gallery-item:hover {
  box-shadow: var(--shadow-md);
}
.gallery-item:hover img {
  transform: scale(1.08); /* زوم بیشتر */
}
/* Optional: Overlay effect for gallery items */
/*
.gallery-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}
.gallery-item:hover::before {
  opacity: 1;
}
.gallery-item a { display: block; }
*/

/* === Contact Section === */
.contact-content {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.contact-info,
.contact-map {
  flex: 1;
  min-width: 300px;
}
.contact-info h3,
.contact-map h3 {
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  font-size: 1.6rem; /* عنوان‌های داخلی بزرگتر */
}
.contact-info p {
  margin-bottom: 1rem; /* فاصله منظم‌تر */
  line-height: 1.8;
  font-size: 1rem;
}
.contact-info p strong {
  color: var(--light-text);
}

.social-links {
  margin-top: 2rem;
}
.social-links a {
  margin: 0 10px; /* فاصله بیشتر */
  display: inline-block;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
html[dir="rtl"] .social-links a:first-child {
  margin-right: 0;
}
html[dir="ltr"] .social-links a:first-child {
  margin-left: 0;
}

.social-links img {
  width: 28px; /* آیکون‌ها کمی کوچکتر */
  height: 28px;
  filter: grayscale(100%) brightness(2); /* روشن‌تر و سازگارتر با پس‌زمینه تیره */
}
.social-links a:hover {
  opacity: 1;
  transform: translateY(-3px);
}
.social-links a:hover img {
  filter: none;
}

.contact-map iframe {
  border-radius: var(--border-radius-md);
  border: 0; /* حذف بوردر قبلی */
  box-shadow: var(--shadow-sm);
  height: 350px; /* ارتفاع بیشتر برای نقشه */
}

/* === Footer === */
.footer-section {
  padding: 40px 0; /* پدینگ بیشتر */
  text-align: center;
  font-size: 0.9rem;
}
.footer-section p {
  margin-bottom: 0;
  color: #aaa; /* رنگ متن فوتر */
}
.footer-section a {
  color: var(--secondary-color);
}
.footer-section a:hover {
  color: #fff;
}

/* === Responsiveness (Media Queries) === */
@media (max-width: 992px) {
  h1 {
    font-size: 2.4rem;
  }
  h2 {
    font-size: 2rem;
  }
  .section-title {
    font-size: 2.2rem;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .hero-tagline {
    font-size: 1.2rem;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }
  .about-image {
    flex-basis: auto;
    width: 80%;
    max-width: 400px;
    margin: 30px auto 0;
  }
  html[dir="rtl"] .about-image {
    margin: 30px auto 0;
  }
  .about-text {
    text-align: justify;
  }
  html[dir="rtl"] .about-text {
    text-align: justify;
  }
}

@media (max-width: 768px) {
  .section-padding {
    padding: 60px 0;
  }
  .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    padding-bottom: 15px;
  }
  .section-title::after {
    width: 60px;
  }
  .section-subtitle {
    margin-top: -25px;
    margin-bottom: 40px;
    font-size: 1rem;
  }

  .nav-menu,
  .lang-switcher {
    display: none;
  }
  .navbar .lang-switcher {
    display: none;
  } /* اطمینان از مخفی شدن */
  .hamburger {
    display: block;
  }
  html[dir="rtl"] .hamburger {
    margin-left: 15px;
    margin-right: 0;
  }
  html[dir="ltr"] .hamburger {
    margin-right: 15px;
    margin-left: 0;
  }

  .hero-title {
    font-size: 2.4rem;
  }
  .hero-tagline {
    font-size: 1.1rem;
  }

  .menu-section .menu-items.modern-ui {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
  .menu-item-image {
    height: 180px;
  }
  .menu-item-content {
    padding: 20px;
  }
  .menu-item-content .item-name {
    font-size: 1.25rem;
  }
  .menu-item-content .item-price {
    font-size: 1.2rem;
  }

  .contact-content {
    flex-direction: column;
  }
  .contact-map {
    margin-top: 30px;
  }
  .contact-map iframe {
    height: 300px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 15px;
  } /* کمی کوچکتر کردن فونت پایه برای موبایل */
  .section-title {
    font-size: 1.8rem;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-tagline {
    font-size: 1rem;
  }
  .btn {
    padding: 10px 25px;
    font-size: 0.9rem;
  }

  .about-image {
    width: 90%;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  } /* تک ستونه در موبایل خیلی کوچک */

  .menu-section .menu-items.modern-ui {
    grid-template-columns: 1fr; /* تک ستونه برای منو */
  }
  .menu-item-image {
    height: 200px;
  } /* ارتفاع تصویر در تک ستونه */
}
