/* Global Styles for Cafeteria Management System */

:root {
  --primary-brown: #8B4513;
  --secondary-brown: #A0522D;
  --cream: #FFF8DC;
  --soft-orange: #FFA07A;
  --dark-brown: #654321;
  --light-cream: #FFFEF0;
  --text-dark: #2D2D2D;
  --text-light: #757575;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-cream);
  color: var(--text-dark);
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar Styles */
.navbar {
  background: linear-gradient(135deg, var(--primary-brown), var(--secondary-brown));
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.logo:hover {
  transform: scale(1.05);
  color: var(--soft-orange);
}

/* Dropdown Styles */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  color: rgb(255, 255, 255);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgb(116, 64, 64);
  min-width: 220px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  overflow: hidden;
  z-index: 1001;
  margin-top: 0.5rem;
  animation: dropdownSlideIn 0.3s ease;
}

[dir="rtl"] .dropdown-menu {
  left: auto;
  right: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.3s ease;
  background: transparent;
}

.dropdown-menu a:hover {
  background: var(--cream);
  color: var(--primary-brown);
  padding-left: 1.5rem;
}

[dir="rtl"] .dropdown-menu a:hover {
  padding-left: 1.25rem;
  padding-right: 1.5rem;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links .btn {
  margin: 0;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Tablet navbar alignment */
@media (max-width: 1100px) and (min-width: 769px) {
  .navbar-content {
    gap: 0.75rem;
  }

  .logo {
    font-size: 1.55rem;
  }

  .nav-links {
    gap: 0.7rem;
  }

  .nav-links a,
  .dropdown-toggle {
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .lang-toggle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* Active Page Highlighting */
.nav-links a.active,
.nav-links .dropdown-toggle.active {
  background-color: var(--soft-orange);
  color: white;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 160, 122, 0.4);
}

.nav-links a.active:hover,
.nav-links .dropdown-toggle.active:hover {
  background-color: var(--soft-orange);
  transform: translateY(-2px);
}

/* Globe Toggle Button */
.lang-toggle {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(15deg);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url('https://images.unsplash.com/photo-1554118811-1e0d58224f24?w=1920&h=1080&fit=crop');
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 2rem;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInDown 1s ease;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease;
}

/* Buttons */
.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  margin: 0.5rem;
}

.btn-primary {
  background-color: var(--soft-orange);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-brown);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background-color: white;
  color: var(--primary-brown);
  transform: translateY(-3px);
}

/* Cards */
.card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

/* Menu cards: keep content and CTA aligned across rows */
.menu-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.menu-card .card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.menu-card .card-content > .flex:last-child {
  margin-top: auto;
}

.card-title {
  font-size: 1.3rem;
  color: var(--primary-brown);
  margin-bottom: 0.5rem;
}

.card-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--soft-orange);
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--primary-brown);
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-brown), var(--soft-orange));
  border-radius: 2px;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--dark-brown), var(--primary-brown));
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--soft-orange);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--soft-orange);
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: var(--soft-orange);
  color: white;
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-brown);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--soft-orange);
  box-shadow: 0 0 10px rgba(255, 160, 122, 0.3);
}

/* RTL Support */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

[dir="rtl"] .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    background: var(--primary-brown);
    flex-direction: column;
    padding: 2rem;
    transition: left 0.3s ease;
  }

  .nav-links.active {
    left: 0;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Loading Spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--soft-orange);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 2rem;
  border-radius: 15px;
  max-width: 500px;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--primary-brown);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-brown);
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 3000;
  animation: slideInRight 0.3s ease;
}

[dir="rtl"] .toast {
  right: auto;
  left: 20px;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Order Tracking Timeline Styles */
.timeline-container {
  position: relative;
  padding-left: 60px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #e5e7eb 0%, #d1d5db 100%);
  border-radius: 2px;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  position: relative;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

.step-marker {
  position: absolute;
  left: -60px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border: 3px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  color: #6b7280;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-step.active .step-marker {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #059669;
  color: white;
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
  transform: scale(1.1);
}

.checkmark {
  font-size: 18px;
  line-height: 1;
}

.step-content {
  flex: 1;
  padding: 1.25rem;
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  border-radius: 12px;
  border-left: 4px solid #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.timeline-step.active .step-content {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-left-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
  transform: translateX(8px);
}

.step-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.timeline-step.active .step-title {
  color: #065f46;
}

.step-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.timeline-step.active .step-description {
  color: #059669;
}

.step-time {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: #e5e7eb;
  color: #6b7280;
}

.timeline-step.active .step-time {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

/* Responsive Timeline */
@media (max-width: 768px) {
  .timeline-container {
    padding-left: 50px;
  }
  
  .step-marker {
    left: -50px;
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .step-content {
    padding: 1rem;
  }
  
  .step-title {
    font-size: 1rem;
  }
  
  .step-description {
    font-size: 0.8rem;
  }
}
