/* ===================================================
   GOOGLE FONTS - Optimized Loading
=================================================== */
@import url('https://fonts.googleapis.com/css2?family=Oi&family=Marhey&family=Vazirmatn&display=swap');

/* ===================================================
   RESET & BASE STYLES - Mobile First
=================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, 
body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background-color: #363432;
  direction: rtl;
  text-align: center;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  font-size: 14px; /* Mobile-first base size */
}

/* ===================================================
   HEADER & LOGO - Mobile First Design
=================================================== */
.header {
  position: relative;
  width: 100%;
  background-color: #bfd833;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Mobile-first: space-between */
  padding: 0.5rem 1rem; /* Mobile-first padding */
  min-height: 80px; /* Mobile-first height */
}

.logo-svg {
  position: absolute;
  top: -2.4rem; /* Mobile-first positioning */
  right: -2.7rem;
  height: 140px; /* Mobile-first size */
  width: auto;
  object-fit: contain;
}

.bread-icon {
  position: absolute;
  top: 1.3rem;
  left: 0.5rem;
  height: 80px; /* Mobile-first size */
  width: auto;
}

.logo-text {
  position: absolute;
  top: 1rem; /* Mobile-first positioning */
  right: 1rem;
  font-family: 'Oi', serif !important;
  font-size: 1.6rem; /* Mobile-first size */
  color: #363432;
  display: none; /* Hidden on mobile by default */
}

.slogan-text {
  font-family: 'Marhey', cursive;
  font-size: 1.2rem; /* Mobile-first size */
  color: #363432;
  text-align: right; /* Mobile-first alignment */
  width: 100%;
  margin-top: 1rem;
  padding: 0 5.2rem; /* Mobile-first padding */
}

/* ===================================================
   HERO/MAIN LAYOUT - Mobile First
=================================================== */
.landing-hero, 
.main {
  display: flex;
  flex-direction: column;
  align-items: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100vw !important;
  width: 100vw !important;
  position: relative;
}

.main-content-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem; /* Mobile-first smaller gap */
  width: 100vw;
  max-width: 100vw;
  padding: 5px;
  flex-direction: column; /* Mobile-first: column layout */
  direction: ltr !important;
}

.image-wrapper, 
.hero-image {
  width: 100vw;
  max-width: 100vw;
  min-width: 100vw;
  height: auto;
  display: block;
  margin: 0 auto;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.main-image {
  width: 90vw; /* Mobile-first width */
  max-width: 98vw; /* Mobile-first max-width */
  min-width: unset; /* Mobile-first: remove min-width constraint */
  height: auto;
  display: block;
  border: none;
}

.hero-title-actions {
  display: flex;
  flex-direction: column;
  align-items: center; /* Mobile-first: center alignment */
  justify-content: center;
  width: 90vw; /* Mobile-first width */
  max-width: 98vw; /* Mobile-first max-width */
  min-width: 20px;
  gap: 4rem;
  margin-left: 0;
}

.hero-title, 
.landing-title {
  color: #fff;
  font-size: 1.2rem; /* Mobile-first size */
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-weight: bold;
  line-height: 1.4;
  text-align: center;
  margin: 1rem 0; /* Mobile-first margin */
  letter-spacing: 1px;
  direction: rtl;
  width: 80%;
}

/* ===================================================
   BUTTONS - Mobile First & Touch-Friendly
=================================================== */
.button-row, 
.landing-buttons {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
  justify-content: center; /* Mobile-first: center alignment */
  width: 100%;
}

.order-button, 
.track-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 3px;
  border: none;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  transition: background 0.2s ease, color 0.2s ease, filter 0.2s ease;
  min-width: 90px;
  height: 48px; /* Touch-friendly minimum height */
  padding: 0.8rem 1.5rem; /* Mobile-first padding */
  width: 100%; /* Mobile-first: full width */
  cursor: pointer;
}

.order-button {
  flex: 1 1 0;
  background-color: #BFD833;
  color: #363432;
}

.order-button:hover,
.order-button:focus {
  background-color: #c2e9c3;
  filter: brightness(0.97);
  outline: 2px solid #fff; /* Accessibility: focus outline */
}

.track-button {
  flex: 1 1 0;
  background-color: #fff;
  color: #363432;
  border: 2px solid #bfd833;
}

.track-button:hover,
.track-button:focus {
  background-color: #f0f0f0;
  filter: brightness(0.97);
  outline: 2px solid #bfd833; /* Accessibility: focus outline */
}

.icon {
  margin-left: 0.5rem;
}

.complete-button {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

/* ===================================================
   TRUST SECTION - Mobile First
=================================================== */
.trust-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem; /* Mobile-first smaller gap */
  padding: 1.5rem 1rem; /* Mobile-first padding */
  max-width: 100%; /* Mobile-first: full width */
  margin: 2rem auto; /* Mobile-first margin */
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  direction: ltr;
  flex-direction: column; /* Mobile-first: stack vertically */
}

.trust-left {
  flex: 1;
  text-align: center;
  direction: rtl;
  margin-bottom: 1rem; /* Mobile-first spacing */
}

.trust-left-title {
  font-size: 1.4rem; /* Mobile-first size */
  color: #fff;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.trust-left-text {
  font-size: 1rem; /* Mobile-first size */
  color: #ddd;
  line-height: 1.6;
  max-width: 100%; /* Mobile-first: full width */
  margin: 0 auto;
}

.trust-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* Mobile-first: allow wrapping */
  gap: 0.5rem;
  max-width: 100%; /* Mobile-first width */
  margin: 0 auto;
  flex: 1;
  text-align: center;
  direction: rtl;
}

.trust-items {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Mobile-first: allow wrapping */
  gap: 1rem;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: auto;
  text-align: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  cursor: default;
  min-width: 60px; /* Touch-friendly minimum size */
}

.trust-item:hover,
.trust-item:focus {
  transform: translateY(-5px);
  opacity: 0.9;
}

.trust-icon {
  font-size: 2rem; /* Mobile-first size */
  margin-bottom: 0.25rem;
}

.trust-text {
  font-size: 0.8rem; /* Mobile-first size */
  color: #f0f0f0;
  font-weight: bold;
}

.trust-title {
  font-size: 1.6rem; /* Mobile-first size */
  color: #fff;
  margin-bottom: 0.3rem;
  font-weight: bold;
}

/* ===================================================
   FLOATING IMAGE - Mobile First (Hidden by default)
=================================================== */
.right-floating-image {
  display: none; /* Hidden on mobile by default */
  position: absolute;
  right: 100px;
  top: 118%;
  transform: translateY(-50%);
  width: 220px;
  opacity: 0.7;
  pointer-events: none;
}

/* ===================================================
   FOOTER - Mobile First
=================================================== */
.site-footer {
  background: rgba(255, 255, 255, 0.05);
  color: #ccc;
  font-size: 0.8rem; /* Mobile-first size */
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  line-height: 2;
}

.site-footer a {
  color: #ffd700;
  text-decoration: none;
  margin: 0 0.5rem; /* Mobile-first spacing */
  padding: 0.25rem; /* Touch-friendly padding */
}

.site-footer a:hover,
.site-footer a:focus {
  text-decoration: underline;
  outline: 1px solid #ffd700; /* Accessibility: focus outline */
}

/* ===================================================
   MODAL - Mobile First & Accessible
=================================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: #444;
  color: #fff;
  margin: 5% auto; /* Mobile-first: less top margin */
  padding: 1.5rem; /* Mobile-first padding */
  border-radius: 8px;
  width: 95%; /* Mobile-first: nearly full width */
  max-width: 500px;
  text-align: right;
  font-family: 'Vazirmatn', sans-serif;
  animation: slideUp 0.4s ease;
}

.close {
  color: #fff;
  float: left;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0.25rem; /* Touch-friendly padding */
  min-width: 44px; /* Touch-friendly minimum size */
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close:hover,
.close:focus {
  color: #ffd700;
  outline: 2px solid #ffd700; /* Accessibility: focus outline */
}

/* ===================================================
   ANIMATIONS - Optimized Performance
=================================================== */
@keyframes fadeIn {
  from { 
    opacity: 0; 
  }
  to { 
    opacity: 1; 
  }
}

@keyframes slideUp {
  from { 
    transform: translateY(30px); 
    opacity: 0; 
  }
  to { 
    transform: translateY(0); 
    opacity: 1; 
  }
}

/* ===================================================
   RESPONSIVE BREAKPOINTS - Progressive Enhancement
=================================================== */

/* Small tablets and large phones: 480px and up */
@media (min-width: 480px) {
  html, body {
    font-size: 15px;
  }
  
  .trust-left-text {
    font-size: 1.05rem;
  }
  
  .trust-icon {
    font-size: 2.1rem;
  }
  
  .trust-text {
    font-size: 0.85rem;
  }
  
  .modal-content {
    margin: 8% auto;
    padding: 1.75rem;
    width: 90%;
  }
}

/* Tablets: 768px and up */
@media (min-width: 768px) {
  html, body {
    font-size: 16px;
  }
  
  .bread-icon {
    height: 150px;
  }
  
  .logo-text {
    display: block; /* Show logo text on larger screens */
  }
  
  .slogan-text {
    font-size: 2.6rem;
    text-align: center;
    padding: 0;
  }
  
  .order-button, 
  .track-button {
    width: auto;
    padding: 0 1rem;
  }
  
  .hero-title, 
  .landing-title {
    font-size: 1.4rem;
  }
  
  .trust-section {
    flex-direction: row;
    gap: 2rem;
    padding: 2rem;
    max-width: 1100px;
    margin: 4rem auto;
  }
  
  .trust-left {
    margin-bottom: 0;
  }
  
  .trust-left-title {
    font-size: 1.6rem;
  }
  
  .trust-left-text {
    font-size: 1.1rem;
    max-width: 300px;
  }
  
  .trust-items {
    flex-wrap: nowrap;
  }
  
  .trust-badges {
    flex-wrap: nowrap;
    max-width: 900px;
  }
  
  .trust-icon {
    font-size: 2.2rem;
    margin-bottom: 0;
  }
  
  .trust-text {
    font-size: 0.9rem;
  }
  
  .trust-title {
    font-size: 1.8rem;
  }
  
  .site-footer {
    font-size: 0.9rem;
  }
  
  .site-footer a {
    margin: 0 0.7rem;
  }
  
  .modal-content {
    margin: 10% auto;
    padding: 2rem;
    width: 80%;
  }
}

/* Large tablets and small desktops: 900px and up */
@media (min-width: 900px) {
  .header {
    padding: 0.6rem 1.2rem;
    min-height: 140px;
    justify-content: flex-end;
  }
  
  .logo-svg {
    top: -3.8rem;
    right: -1.8rem;
    height: 250px;
  }
  
  .logo-text {
    font-size: 2.7rem;
    top: 3rem;
    right: 3.9rem;
  }
  
  .main-content-row {
    flex-direction: row;
    gap: 2vw;
  }
  
  .main-image {
    width: 60vw;
    max-width: none;
    min-width: 300px;
  }
  
  .hero-title-actions {
    width: 60vw;
    max-width: 550px;
    align-items: flex-start;
  }
  
  .hero-title, 
  .landing-title {
    font-size: 1.8rem;
    margin: 0 0 5rem 3rem;
  }
  
  .button-row, 
  .landing-buttons {
    justify-content: flex-start;
  }
  
  .right-floating-image {
    display: block; /* Show floating image on larger screens */
  }
}

/* Large desktops: 1200px and up */
@media (min-width: 1200px) {
  .trust-section {
    max-width: 1200px;
  }
}

/* ====================== END ======================= */