/* common.css - جميع الأنماط من الصفحات الثلاث (نسخة نظيفة بدون تكرار) */

/* Custom color variables (matching original Tailwind config) */
:root {
  --primary: #a93700;
  --primary-container: #ff6d33f4;
  --secondary: #0300b5d1;
  --secondary-fixed: #e0e0ff;
  --surface: #fff8f6;
  --surface-container: #ffe9e3;
  --surface-container-low: #fff1ec;
  --on-surface: #261814;
  --on-surface-variant: #594139;
  --outline-variant: #e1bfb4;
  --background: #eeeeff;
  --primary-fixed-dim: #ffb59b;
  --primary-fixed: #ffdbcf;
  --on-primary-container: #5f1b00;
  --secondary-container: #5a63f5;
  --on-secondary: #ffffff;
  --on-primary: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--background);
  color: var(--on-surface);
  overflow-x: hidden;
}

/* -----------------------------------------
   CUSTOM FONTS
   ----------------------------------------- */
@font-face {
    font-family: 'headText';
    src: url('../fonts/Audiowide-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'paratex';
    src: url('../fonts/Manrope-VariableFont_wght.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body h1, body h2, body h3, body h4, body h5, body h6 {
    font-family: 'headText', sans-serif;
}
body p {
    font-family: 'paratex', sans-serif;
}

/* Bootstrap customization */
.bg-primary { background-color: var(--primary) !important; }
.bg-primary-container { background-color: var(--primary-container) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-secondary-fixed { background-color: var(--secondary-fixed) !important; }
.bg-surface { background-color: var(--surface) !important; }
.bg-surface-container { background-color: var(--surface-container) !important; }
.bg-surface-container-low { background-color: var(--surface-container-low) !important; }
.text-primary { color: var(--primary) !important; }
.text-primary-container { color: var(--primary-container) !important; }
.text-on-primary { color: var(--on-primary) !important; }
.text-on-primary-container { color: var(--on-primary-container) !important; }
.text-on-surface { color: var(--on-surface) !important; }
.text-on-surface-variant { color: var(--on-surface-variant) !important; }
.text-secondary-fixed { color: var(--secondary-fixed) !important; }
.border-outline-variant { border-color: var(--outline-variant) !important; }

.btn-primary-custom {
  background-color: var(--primary-container);
  color: var(--on-primary-container);
  border-radius: 0.75rem;
  font-weight: 700;
  padding: 0.75rem 2rem;
  transition: all 0.2s;
}
.btn-primary-custom:hover {
  filter: brightness(1.1);
  color: var(--on-primary-container);
  background-color: #e05a2a !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-outline-light-custom {
  border: 1px solid white;
  color: white;
  border-radius: 0.75rem;
  font-weight: 700;
  padding: 0.75rem 2rem;
  transition: all 0.2s;
}
.btn-outline-light-custom:hover {
  background-color: rgba(255,255,255,0.1);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Glass card */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(225, 191, 180, 0.3);
}

/* Hover effect cards */
.card-hover-effect {
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1), box-shadow 0.25s ease;
  cursor: pointer;
}
.card-hover-effect:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.2) !important;
}
.card-hover-effect:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* Scroll reveal animations */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1), transform 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-scale { opacity: 0; transform: scale(0.95); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-scale.active { opacity: 1; transform: scale(1); }
.reveal-left { opacity: 0; transform: translateX(-30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-left.active { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-right.active { opacity: 1; transform: translateX(0); }
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s;
  z-index: 100;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #20b859;
  color: white;
}
@media (max-width: 640px) {
  .whatsapp-float { width: 50px; height: 50px; font-size: 25px; bottom: 20px; left: 20px; }
}

/* Navbar & Links */
a { text-decoration: none; }
.navbar-nav .nav-link { color: var(--on-surface-variant); transition: color 0.2s; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--primary); font-weight: 600; transform: translateY(-1px); }
.navbar-brand { font-weight: 700; font-size: 1.5rem; color: var(--secondary); }
.navbar-toggler { border: none; background: transparent; }

/* Hero overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

/* Map wrapper */
.map-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.aspect-video { aspect-ratio: 16 / 9; }
.container-max { max-width: 1280px; margin-left: auto; margin-right: auto; }
@media (min-width: 1400px) { .container-max { max-width: 1280px; } }

/* Social icons */
.social-icon {
  transition: all 0.25s ease;
}
.social-icon:hover {
  background-color: var(--primary) !important;
  color: white !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* Language toggle button */
#langToggle:hover {
  filter: brightness(1.05);
  transform: scale(1.02);
  transition: all 0.2s ease;
}

/* Product Page Styles */
.product-card {
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 30px -12px rgba(0,0,0,0.2);
}
.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  margin-top: 8px;
}
.read-more-link:hover {
  gap: 8px;
}
.tab-btn.active {
  background-color: #a93700;
  color: white;
  border-color: transparent;
}
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.active {
  display: flex;
}
.modal-content {
  max-width: 550px;
  width: 90%;
  background: white;
  border-radius: 1.5rem;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}
.close-modal {
  position: sticky;
  top: 10px;
  right: 10px;
  float: right;
  background: rgba(0,0,0,0.5);
  color: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 8px;
  z-index: 20;
}
.close-modal:hover {
  background: rgba(0,0,0,0.8);
}
.search-container {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #8d7167;
  border-radius: 10px;
  padding: 2px 12px;
  outline: none;
}
.search-input {
  border: none;
  outline: none;
  padding: 6px 8px;
  font-size: 14px;
  width: 160px;
  background: transparent;
}
@media (max-width: 640px) {
  .search-input { width: 110px; }
}

/* Testimonials Page Styles */
.testimonial-card {
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1), box-shadow 0.25s ease;
  cursor: default;
}
.testimonial-card:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.15) !important;
}
.testimonial-card .card {
  border: 1px solid var(--outline-variant);
  border-radius: 1rem;
  background-color: white;
  transition: inherit;
}
.testimonial-card:hover .card {
  box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.15);
}
.avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}
.btn-back-home {
  background-color: var(--primary-container);
  color: var(--on-primary-container);
  border-radius: 2rem;
  font-weight: 700;
  padding: 0.75rem 2rem;
  transition: opacity 0.2s;
}
.btn-back-home:hover {
  opacity: 0.9;
  color: var(--on-primary-container);
}

/* Swiper overrides (for home & product) */
.testimonialsPlainSwiper .swiper-button-prev,
.testimonialsPlainSwiper .swiper-button-next {
  background-color: rgba(255,255,255,0.8);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  backdrop-filter: blur(4px);
  color: #a93700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.testimonialsPlainSwiper .swiper-button-prev:after,
.testimonialsPlainSwiper .swiper-button-next:after {
  font-size: 18px;
  font-weight: bold;
}
.testimonialsPlainSwiper .swiper-pagination-bullet-active {
  background-color: #a93700;
}
@media (max-width: 640px) {
  .testimonialsPlainSwiper .swiper-button-prev,
  .testimonialsPlainSwiper .swiper-button-next {
    display: none;
  }
}

/* ========== OFF-CANVAS MENU (SLIDE FROM LEFT) ========== */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}
.offcanvas-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background-color: var(--surface);
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
  z-index: 1051;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}
.offcanvas-menu.open {
  left: 0;
}
.close-menu {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--on-surface);
  margin-bottom: 1.5rem;
  line-height: 1;
}
.offcanvas-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.offcanvas-menu ul li {
  margin-bottom: 1rem;
}
.offcanvas-menu ul li a {
  color: var(--on-surface);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 500;
  display: block;
  padding: 0.5rem 0;
}
.offcanvas-menu .menu-buttons {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.offcanvas-menu .menu-buttons button {
  width: 100%;
  justify-content: center;
}

/* لون أيقونة الهامبرغر */
.navbar-toggler .material-symbols-outlined {
  color: var(--secondary);
  transition: color 0.2s;
}
html.dark .navbar-toggler .material-symbols-outlined {
  color: var(--primary);
}

/* على سطح المكتب نخفي الأوف كانفاس ونعرض الـ collapse العادي */
@media (min-width: 992px) {
  .menu-overlay, .offcanvas-menu {
    display: none;
  }
  .navbar-toggler {
    display: none !important;
  }
}

/* ---------- Dark Mode Styles (applied when <html class="dark">) ---------- */
html.dark {
  --primary: #ff6d33;
  --primary-container: #ff6d33;
  --secondary: #0400B5;
  --secondary-fixed: #e0e0ff;
  --surface: #1A1A1C;
  --surface-container: #252528;
  --surface-container-low: #0F0F11;
  --on-surface: #ffffff;
  --on-surface-variant: #B0B0B0;
  --outline-variant: #2D2D30;
  --background: #0B0B0C;
  --primary-fixed-dim: #ff6d33;
  --primary-fixed: #ff6d33;
  --on-primary-container: #ffffff;
  --secondary-container: #0400B5;
  --on-secondary: #ffffff;
  --on-primary: #ffffff;
}

/* Override specific background classes for dark mode */
html.dark .bg-white {
  background-color: var(--surface) !important;
}
html.dark .bg-surface {
  background-color: var(--surface) !important;
}
html.dark .bg-surface-container-low {
  background-color: var(--surface-container-low) !important;
}
html.dark .bg-secondary {
  background-color: var(--secondary) !important;
}
html.dark .bg-primary-container {
  background-color: var(--primary-container) !important;
}
html.dark .text-on-surface-variant {
  color: var(--on-surface-variant) !important;
}
html.dark .border-outline-variant {
  border-color: var(--outline-variant) !important;
}
html.dark .card {
  background-color: var(--surface) !important;
  border-color: var(--outline-variant) !important;
}
html.dark .glass-card {
  background: rgba(26, 26, 28, 0.8);
  backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.1);
}
html.dark .whatsapp-float {
  background-color: #25D366;
}
html.dark .text-white {
  color: #ffffff !important;
}
html.dark .text-white-50 {
  color: rgba(255, 255, 255, 0.7) !important;
}
html.dark .btn-primary-custom {
  background-color: var(--primary-container);
  color: var(--on-primary-container);
}
html.dark .btn-outline-light-custom {
  border-color: white;
  color: white;
}
html.dark .navbar-nav .nav-link {
  color: var(--on-surface-variant);
}
html.dark .navbar-nav .nav-link:hover,
html.dark .navbar-nav .nav-link.active {
  color: var(--primary);
}
html.dark footer {
  background-color: var(--secondary) !important;
}
html.dark footer .text-secondary-fixed {
  color: #e0e0ff !important;
}
html.dark #home {
    background: rgba(10, 47, 31, 0.4);
    background: linear-gradient(145deg, rgba(202, 201, 201, 0.961) 0%, rgba(8, 8, 19, 0.747) 50%, rgba(255, 112, 16, 0.901) 100%) !important;}


html.dark .navbar,
html.dark .navbar.bg-surface {
background: linear-gradient(145deg, #ffffff 0%, #13131f 50%, #0b120a 100%) !important;
  border-bottom-color: var(--outline-variant) !important;
}

/* ============================================ */
/* RESPONSIVE STYLES FOR MOBILE (ALL PAGES) */
/* ============================================ */
@media (max-width: 768px) {
    .navbar-brand img {
        width: 100px !important;
        height: auto;
    }
    .navbar-nav .btn {
        padding: 0.25rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
    .navbar-nav .btn .material-symbols-outlined {
        font-size: 1rem !important;
    }
    .navbar-collapse {
        background-color: var(--surface);
        padding: 1rem;
        border-radius: 1rem;
        margin-top: 1rem;
        max-height: 80vh;
        overflow-y: auto;
    }
    .navbar-nav {
        gap: 0.5rem !important;
    }
    .nav-link {
        padding: 0.5rem 1rem !important;
        font-size: 1rem;
        text-align: center;
    }
    .navbar-nav .btn {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        border: none;
    }
    .navbar-toggler .material-symbols-outlined {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand img {
        width: 75px !important;
    }
    .navbar-nav .btn {
        font-size: 0.7rem !important;
    }
}

/* Brand Slider (خاص بصفحة المنتجات) */
@media (max-width: 768px) {
    .brand-track img {
        height: 35px !important;
        width: auto;
    }
    .brand-track {
        gap: 1.5rem !important;
    }
    .brand-item {
        font-size: 1.2rem !important;
    }
}
@media (max-width: 480px) {
    .brand-track img {
        height: 28px !important;
    }
    .brand-track {
        gap: 1rem !important;
    }
    .brand-item {
        font-size: 1rem !important;
    }
}