/* Contemporary Arabic Modernism Design System */
:root {
  --primary: #c67c4e;
  --primary-light: #d4a574;
  --accent: #1b5e7e;
  --accent-light: #5ba3c7;
  --background: #faf8f3;
  --foreground: #3a2f2a;
  --card: #ffffff;
  --muted: #f5f5f0;
  --muted-foreground: #8b7d77;
  --border: #e8e4df;
  --success: #48bb78;
  --error: #f56565;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Cairo', 'Poppins', sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.8;
  font-size: 18px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  text-decoration: none;
  transition: transform 0.5s ease-in-out;
}

.logo:hover {
  transform: scale(1.05);
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.4s ease-in-out;
}

nav a:hover {
  color: var(--primary);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(30deg, transparent 48%, rgba(255,255,255,0.03) 48%, rgba(255,255,255,0.03) 52%, transparent 52%),
                    linear-gradient(150deg, transparent 48%, rgba(255,255,255,0.03) 48%, rgba(255,255,255,0.03) 52%, transparent 52%);
  background-size: 80px 80px;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 10;
  color: white;
  padding: 5rem 0;
}

.hero h1 {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero-accent {
  color: var(--accent-light);
  display: block;
  margin-top: 0.5rem;
}

.hero p {
  font-size: 1.5rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.value-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.2);
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.value-item {
  text-align: center;
}

.value-number {
  font-size: 2rem;
  font-weight: 900;
}

.value-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Search Box */
.search-section {
  margin-top: -5rem;
  padding-bottom: 5rem;
  position: relative;
  z-index: 20;
}

.search-box {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  border: 2px solid var(--border);
  transition: box-shadow 0.5s ease;
}

.search-box:hover {
  box-shadow: 0 30px 80px rgba(0,0,0,0.2);
}

.search-box h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group select,
.form-group input {
  padding: 0.9rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s;
  background: white;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(198, 124, 78, 0.1);
}

.error-message {
  background: #fee;
  border-left: 4px solid var(--error);
  padding: 1rem;
  border-radius: 8px;
  color: #c00;
  margin-bottom: 1rem;
  display: none;
}

.error-message.show {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideDown 0.3s ease-out;
}

.search-btn {
  grid-column: 1 / -1;
  padding: 1.2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.5s;
  font-family: 'Cairo', sans-serif;
  margin-top: 1rem;
}

.search-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(198, 124, 78, 0.3);
}

.search-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Results */
.results {
  margin-top: 2rem;
  display: none;
}

.results.show {
  display: block;
  animation: fadeInUp 0.8s ease-out;
}

.results-header {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
  border: 2px solid var(--border);
}

.results-header h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.results-info {
  color: var(--muted-foreground);
}

.no-results {
  background: white;
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 2px solid var(--border);
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

/* Flight Card */
.flight-card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-left: 4px solid var(--border);
  transition: all 0.5s;
  animation: fadeInUp 0.8s ease-out;
}

.flight-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.flight-card.best-price {
  border-left-color: var(--success);
  background: linear-gradient(to right, rgba(72, 187, 120, 0.05), transparent);
}

.flight-card-content {
  display: grid;
  grid-template-columns: 1.5fr 2fr 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.airline-info .airline-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.flight-type {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.best-badge {
  color: var(--success);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.route-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.city-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.route-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  position: relative;
}

.plane-icon {
  font-size: 1.5rem;
}

.price-section {
  text-align: center;
}

.price {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
}

.currency {
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

.savings-badge {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: inline-block;
}

.flight-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  border: none;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s;
  display: inline-block;
}

.btn-book {
  background: var(--success);
  color: white;
}

.btn-book:hover {
  background: #38a169;
  transform: translateY(-2px);
}

.btn-alert {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-alert:hover {
  background: var(--primary);
  color: white;
}

/* Features */
.features {
  padding: 5rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 2px solid var(--border);
  transition: all 0.5s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform 0.5s;
}

.feature-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  border-color: var(--primary);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: rgba(198, 124, 78, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  transition: all 0.5s;
}

.feature-card:hover .feature-icon {
  background: var(--primary);
  transform: rotate(10deg);
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.7rem;
}

.feature-card p {
  color: var(--muted-foreground);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.show {
  display: flex;
  animation: fadeIn 0.3s;
}

.modal-content {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: scaleIn 0.3s;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.modal-header h3 {
  font-size: 1.8rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: color 0.3s;
  line-height: 1;
}

.close-btn:hover {
  color: var(--foreground);
}

.modal-route {
  background: var(--muted);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-form-group {
  margin-bottom: 1.2rem;
}

.modal-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.modal-form-group input {
  width: 100%;
  padding: 0.9rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s;
}

.modal-form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(198, 124, 78, 0.1);
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 4rem 0 2rem;
  margin-top: 5rem;
  clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
  padding-top: 8rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-section p,
.footer-section a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  line-height: 2;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero h1 { font-size: 3rem; }
  .search-form { grid-template-columns: 1fr; }
  .flight-card-content { grid-template-columns: 1fr; text-align: center; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 2.5rem; }
  .price { font-size: 2rem; }
  .value-banner { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  nav { display: none; }
  .menu-toggle { 
    display: block;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
   }
  .mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    transform: translateY(-100%);
    transition: transform 0.3s;
    display: flex;
  }
  
  .mobile-menu.open {
    transform: translateY(0);
  }
}

/* New Price Advice Styles */
.price-advice {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid transparent;
    animation: fadeIn 0.5s ease-out;
}

.price-advice.up {
    background: #fff5f5;
    border-color: #feb2b2;
    color: #c53030;
}

.price-advice.down {
    background: #f0fff4;
    border-color: #9ae6b4;
    color: #276749;
}

.advice-icon {
    font-size: 2.5rem;
}

.advice-text h4 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
    font-weight: 900;
}

.advice-text p {
    font-size: 1rem;
    opacity: 0.9;
}

.advice-badge {
    margin-right: auto;
    background: rgba(0,0,0,0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Skeleton Loading */
.loading-state {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skeleton-card {
    height: 150px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Modal Enhancements */
.modal-route-details {
    text-align: center;
    line-height: 2;
}

.modal-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    margin-top: 1rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 2rem;
    border-radius: 50px;
    color: white;
    font-weight: 700;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-success { background: var(--success); }
.toast-error { background: var(--error); }
