/*
Theme Name: Tdoor Theme
Theme URI: https://tdoorsa.com/
Author: TDoor Team
Author URI: https://tdoorsa.com/
Description: Arabic RTL Starter Theme for TDoor with Alexandria font, warm canvas background, Hero section, and About Us section.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tdoor-theme
*/

/* ==========================================================================
   RTL Global Base & Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family:
    "Alexandria",
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.6;
  background-color: #fcf7ef;
  color: #1a1a1a;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

a:focus,
button:focus,
.hero-btn:focus,
.discover-menu-btn:focus {
  outline: none !important;
}

/* Overall Site Max-Width Wrapper */
.site-main,
.page-wrapper {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* ==========================================================================
   RTL Header & Navigation System (1280px Max-Width)
   ========================================================================== */
.site-header {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  background-color: #fcf7ef;
  padding-top: 43px;
  padding-bottom: 20px;
  padding-left: 0;
  padding-right: 0;
}

.header-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header-offcanvas {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #000;
  border-radius: 3px;
}

.mobile-menu-close {
  display: none;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  position: absolute;
  top: 15px;
  left: 20px;
  color: #000;
}

.offcanvas-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.offcanvas-overlay.is-open {
  display: block;
  opacity: 1;
}

/* Logo (Far Right in RTL) */
.site-logo .logo-img {
  height: 65px;
  width: auto;
  display: block;
}

.offcanvas-logo {
  display: none;
}

/* Navigation Menu (Center in RTL) */
.main-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.nav-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  font-family: "Alexandria", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 100%;
  letter-spacing: 0%;
  color: #000000;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
  font-family: "Alexandria", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 18px;
  line-height: 100%;
  letter-spacing: 0%;
  color: #000000;
  text-decoration: underline;
  text-decoration-style: solid;
  text-underline-offset: 6px;
}

/* Discover Menu Button in Header */
.discover-menu-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 232px;
  height: 57px;
  padding: 14px 30px;
  background: #191919;
  color: #ffeac9;
  font-family: "Alexandria", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 0%;
  white-space: nowrap;
  text-decoration: none;
  border-top-right-radius: 25px;
  border-bottom-left-radius: 25px;
  border-top-left-radius: 0;
  border-bottom-right-radius: 0;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

.discover-menu-btn:hover {
  opacity: 0.9;
}

.btn-arrow-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex-shrink: 0;
}

/* ==========================================================================
   Hero Section Styling (1280px Max-Width)
   ========================================================================== */
.hero-section {
  width: 100%;
  max-width: 1280px;
  margin: 20px auto 50px auto;
  padding: 0;
}

.hero-container {
  width: 100%;
  max-width: 1280px;
  min-height: 536px;
  margin: 0 auto;
  background: #f5ece3;
  border-radius: 20px;
  padding: 50px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  opacity: 1;
}

/* Right Content Column */
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-title {
  font-family: "Alexandria", sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: 40px;
  line-height: 75px;
  letter-spacing: 0%;
  text-align: right;
  color: #000000;
  margin-bottom: 18px;
}

.hero-description {
  font-family: "Alexandria", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 35px;
  letter-spacing: 0%;
  text-align: right;
  color: #2d2d2d;
  margin-bottom: 35px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
}

/* Button 1: اكتشف المنيو */
.btn-discover-menu {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 195px;
  height: 49px;
  padding: 14px 20px;
  background: #191919;
  color: #ffeac9;
  font-family: "Alexandria", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 100%;
  text-decoration: none;
  border-top-right-radius: 25px;
  border-bottom-left-radius: 25px;
  border-top-left-radius: 0;
  border-bottom-right-radius: 0;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

.btn-discover-menu:hover {
  opacity: 0.9;
}

/* Button 2: اكتشف الفروع */
.btn-discover-branches {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 195px;
  height: 49px;
  padding: 14px 20px;
  background: transparent;
  color: #191919;
  border: 1px solid #987c52;
  font-family: "Alexandria", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 100%;
  text-decoration: none;
  border-top-left-radius: 25px;
  border-bottom-right-radius: 25px;
  border-top-right-radius: 0;
  border-bottom-left-radius: 0;
  white-space: nowrap;
  opacity: 1;
  transition: background 0.2s ease-in-out;
}

.btn-discover-branches:hover {
  background: rgba(152, 124, 82, 0.1);
}

/* Left Image Column */
.hero-image-wrap {
  width: 596px;
  height: 447px;
  flex-shrink: 0;
  border-radius: 20px;
  overflow: hidden;
  opacity: 1;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

/* ==========================================================================
   About Us Section Styling (1280px Max-Width - RTL Enforced)
   ========================================================================== */
.about-section {
  width: 100%;
  max-width: 1280px;
  margin: 60px auto;
  padding: 0;
  direction: rtl;
  text-align: right;
}

.about-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  direction: rtl;
}

/* Right Text Column */
.about-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  direction: rtl;
}

.about-badge {
  font-family: "Alexandria", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #987c52;
  margin-bottom: 6px;
  text-align: right;
}

.about-title {
  font-family: "Alexandria", sans-serif;
  font-size: 38px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 18px;
  text-align: right;
}

.about-description {
  font-family: "Alexandria", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  color: #1a1a1a;
  margin-bottom: 35px;
  max-width: 620px;
  text-align: right;
}

/* 4 Feature Badges Grid (RTL Row) */
.about-features {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 25px;
  width: 100%;
  padding-top: 10px;
  direction: rtl;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 110px;
}

.feature-icon {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.feature-label {
  font-family: "Alexandria", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #000000;
  line-height: 1.35;
}

.feature-divider {
  width: 1px;
  height: 55px;
  background-color: rgba(152, 124, 82, 0.3);
  flex-shrink: 0;
}

/* Left Image Column */
.about-image-wrap {
  width: 538px;
  height: 331px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
}

.about-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.about-bottom-line {
  width: 611px;
  max-width: 100%;
  height: 1px;
  margin: 60px auto 0 auto;
  background: linear-gradient(90deg, #987c52 0%, #ffffff 50.48%, #202020 100%);
  border: none;
  opacity: 1;
}

/* Responsive Layout */
@media (max-width: 1320px) {
  .site-header,
  .hero-section,
  .about-section,
  .overview-section {
    padding-right: 20px;
    padding-left: 20px;
  }
}

/* ==========================================================================
   Overview Section Styling (3rd Section - 1280px Max-Width - RTL)
   ========================================================================== */
.overview-section {
  width: 100%;
  max-width: 1280px;
  margin: 70px auto;
  padding: 0;
  direction: rtl;
  text-align: right;
}

.overview-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  direction: rtl;
}

/* Right Content Column */
.overview-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  direction: rtl;
}

.overview-title {
  font-family: "Alexandria", sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 24px;
  line-height: 1.4;
  text-align: right;
}

.overview-description {
  font-family: "Alexandria", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 2.1;
  color: #1a1a1a;
  margin-bottom: 18px;
  text-align: right;
  max-width: 680px;
}

/* Framed Image (493px x 373px with #926C33 1px border & specific padding) */
.overview-image-frame {
  width: 493px;
  height: 373px;
  flex-shrink: 0;
  border-width: 1px;
  border: 1px solid #926c33;
  border-radius: 20px;
  padding-top: 6px;
  padding-right: 5px;
  padding-bottom: 6px;
  padding-left: 6px;
  gap: 10px;
  opacity: 1;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.overview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  display: block;
}

@media (max-width: 1100px) {
  .hero-container,
  .about-container,
  .overview-container {
    flex-direction: column;
    min-height: auto;
    padding: 30px;
  }
  .hero-image-wrap,
  .about-image-wrap {
    width: 100%;
    height: auto;
    max-height: 380px;
  }
  .overview-image-frame {
    width: 100%;
    max-width: 493px;
    height: auto;
    max-height: 373px;
  }
  .hero-title,
  .about-title,
  .overview-title {
    font-size: 28px;
  }
  .about-features {
    flex-wrap: wrap;
    justify-content: center;
  }
  .feature-divider {
    display: none;
  }
}

/* ==========================================================================
   Menu Slider Section Styling (4-Row Layout)
   ========================================================================== */
.menu-slider-section {
  width: 100%;
  padding: 80px 0;
  background-color: #fcf7ef;
  direction: rtl;
}

.menu-header {
  text-align: center;
  margin-bottom: 60px;
}

.menu-badge {
  font-family: "Alexandria", sans-serif;
  font-size: 18px;
  color: #987c52;
  margin-bottom: 10px;
}

.menu-main-title {
  font-family: "Alexandria", sans-serif;
  font-size: 32px;
  color: #000;
  font-weight: 700;
}

.menu-sliders-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* Right Side Text Block */
.menu-row-info {
  flex: 0 0 250px; /* Fixed width for the text side */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.menu-category-title {
  font-family: "Alexandria", sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 35px;
  color: #000000;
  margin-bottom: 8px;
  text-align: center;
}

.menu-category-subtitle {
  font-family: "Alexandria", sans-serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 35px;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.menu-slider-nav {
  display: flex;
  width: 132px;
  height: 38px;
  justify-content: space-between;
}

/* Override Swiper hiding buttons when there are not enough slides */
.menu-slider-nav .swiper-button-lock {
  display: flex !important;
  opacity: 0.5;
  pointer-events: none;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  width: 100%;
  padding: 60px 20px;
  background-color: #fcf7ef;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.footer-card {
  height: 266px;
  background: #f8f3ed;
  border: 1px solid #f2e2cf;
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.footer-branches {
  flex: 1 1 235px;
}

.footer-socials {
  flex: 1 1 305px;
  justify-content: center;
}

.footer-journey {
  flex: 1 1 708px;
  align-items: center;
  text-align: center;
}

.footer-card-title {
  font-family: "Alexandria", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #000;
  margin-bottom: 20px;
  text-align: right;
  border-bottom: 2px solid #e8d9c5;
  padding-bottom: 10px;
  display: inline-block;
  align-self: flex-start;
}

.footer-journey-title {
  border-bottom: none;
  align-self: center;
}

.footer-branch-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-branch-list li {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 10px;
  font-family: "Alexandria", sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #000;
}

.footer-social-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-social-list li {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  font-family: "Alexandria", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #000;
}

.social-icon {
  width: 27px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.journey-image-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.journey-image-wrapper img {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}

@media (max-width: 1280px) {
  .footer-container {
    justify-content: center;
  }
  .footer-journey {
    flex: 1 1 100%;
  }
}

.slider-btn:hover circle {
  fill: #987c52;
}

.slider-btn:hover path {
  fill: #fbf7ef;
}

/* Left Side Slider Container */
.menu-row-slider {
  flex: 1;
  min-width: 0; /* Important for Swiper inside flexbox */
}

/* The swiper instance inside the row */
.menu-row-slider .swiper {
  width: 100%;
  padding: 10px 0; /* small padding for box-shadows if any */
}

.item-card {
  width: 100%;
  max-width: 227px;
  height: 127px;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 auto;
}

.item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

/* ==========================================================================
   Responsive Design for Tablet and Mobile (992px, 768px, 480px)
   ========================================================================== */

@media (max-width: 992px) {
  .site-logo .logo-img {
    height: 45px;
  }
  .offcanvas-logo {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 40px;
  }
  .offcanvas-logo .logo-img {
    height: 45px;
    width: auto;
  }

  .hero-title {
    font-size: 32px;
    line-height: 1.4;
  }
  .about-title {
    font-size: 30px;
  }
  .overview-title {
    font-size: 26px;
  }
  .hero-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }
  .header-container {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .header-offcanvas {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: #fcf7ef;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 60px 30px;
    box-shadow: none;
    visibility: hidden;
    z-index: 999;
    transition:
      right 0.3s ease,
      box-shadow 0.3s ease,
      visibility 0.3s ease;
  }
  .header-offcanvas.is-open {
    right: 0;
    visibility: visible;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  }
  .mobile-menu-close {
    display: block;
  }
  .nav-menu {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    width: 100%;
    margin-bottom: 30px;
  }
  .header-btn-wrap {
    width: 100%;
  }
  .discover-menu-btn {
    width: 100%;
    justify-content: center;
  }
  .footer-container {
    flex-wrap: wrap;
  }
  .footer-card {
    height: auto;
  }
}

@media (max-width: 768px) {
  .hero-container,
  .about-container,
  .overview-container {
    padding: 20px;
  }

  .hero-title {
    font-size: 28px;
    line-height: 1.4;
    text-align: center;
  }

  .hero-description {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-content {
    align-items: center;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 15px;
  }

  .btn-discover-menu,
  .btn-discover-branches {
    width: 100%;
    max-width: 300px;
    border-radius: 25px; /* ensure full pill shape on mobile */
  }

  .about-title,
  .about-badge,
  .about-description {
    text-align: center;
  }

  .about-content {
    align-items: center;
  }

  .about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .feature-item {
    min-width: unset;
  }

  .overview-title,
  .overview-description {
    text-align: center;
  }

  .overview-content {
    align-items: center;
  }

  .overview-container {
    display: flex;
    flex-direction: column;
  }

  .overview-image-frame {
    order: -1;
    margin-bottom: 20px;
  }

  .menu-row {
    flex-direction: column;
    gap: 20px;
  }
  .menu-row-info {
    display: contents;
  }
  .menu-row-slider {
    order: -1;
    width: 100%;
  }
  .menu-category-title {
    order: 1;
    margin-top: 15px;
  }
  .menu-category-subtitle {
    order: 2;
  }
  .menu-slider-nav {
    order: 3;
    margin-top: 10px;
  }

  .footer-container {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .footer-card {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 24px;
  }

  .hero-description {
    font-size: 14px;
    line-height: 1.8;
  }

  .about-title {
    font-size: 24px;
  }

  .about-description {
    font-size: 14px;
  }

  .overview-title {
    font-size: 22px;
  }

  .overview-description {
    font-size: 14px;
  }

  .about-features {
    grid-template-columns: 1fr 1fr;
  }

  .hero-image-wrap,
  .about-image-wrap {
    border-radius: 12px;
  }

  .overview-image-frame {
    border-radius: 12px;
  }
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
  will-change: opacity, transform;
}
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}
