/* Main Custom Styles for Pearl Wings (ELEGANT FLY) */

:root {
  /* Colors - will be updated once client provides final palette */
  --primary-color: #1e40af;
  --secondary-color: #f59e0b;
  --accent-color: #10b981;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --white: #ffffff;
  --border-color: #e5e7eb;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Header Styles */
.header-top {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.navbar {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.slogan {
  font-size: 0.75rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero/dubai-skyline.jpg');
  background-size: cover;
  background-position: center;
  min-height: 600px;
  display: flex;
  align-items: center;
  color: white;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Buttons */
.btn-primary {
  background: var(--primary-color);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #1e3a8a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: #6b7280;
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #4b5563;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Feature Cards */
.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Tour Cards */
.tour-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.tour-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.tour-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.tour-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 10;
}

.tour-badge {
  background: rgba(255, 255, 255, 0.95);
  color: #059669;
  padding: 0.35rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tour-badge i {
  font-size: 0.85rem;
}

.tour-location {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  display: inline-block;
  margin-top: -1.5rem;
  position: relative;
  z-index: 10;
}

.tour-price {
  color: var(--secondary-color);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Visa Cards */
.visa-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  text-align: center;
}

.visa-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  border: 2px solid var(--primary-color);
}

.visa-card-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.visa-flag {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

/* Testimonials */
.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
}

.rating-stars {
  color: var(--secondary-color);
  font-size: 1.25rem;
}

/* Footer */
footer {
  background: #1f2937;
  color: white;
  padding: 3rem 0 1rem;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.footer-link {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-link:hover {
  color: white;
}

.social-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 650px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Button Grid Layout for Tour/Visa Cards */
.tour-card .grid button,
.visa-card .grid button {
  width: 100%;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   Desktop layouts (1024px+) remain unchanged
   ============================================ */

/* ===== EXTRA SMALL DEVICES (320px - 374px) ===== */
@media (max-width: 374px) {
  /* Typography - smallest phones */
  .hero-title {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 0.875rem;
  }

  /* Buttons - ensure minimum touch target */
  .btn-primary,
  .btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    min-height: 44px;
    min-width: 120px;
  }

  /* Footer social icons - slightly smaller */
  .social-icon {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }

  /* Modal content - more padding reduction */
  .modal-content {
    padding: 1.25rem;
    width: 95%;
  }
}

/* ===== SMALL DEVICES (375px - 639px) - Phones ===== */
@media (max-width: 639px) {
  /* Hero Section */
  .hero {
    min-height: 400px;
    padding: 2rem 0;
  }

  .hero-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  /* Navigation */
  .navbar {
    padding: 0.5rem 0;
  }

  /* Mobile menu button - ensure touch-friendly */
  #mobileMenuBtn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Logo size on mobile */
  .navbar img {
    max-height: 60px;
  }

  /* Header top bar */
  .header-top {
    font-size: 0.75rem;
    padding: 0.75rem 0;
  }

  .header-top .flex {
    gap: 0.5rem;
  }

  /* Cards - Tour, Visa, Attraction */
  .tour-card,
  .visa-card,
  .attraction-card {
    margin-bottom: 1rem;
  }

  .tour-image,
  .visa-card-image {
    height: 180px;
  }

  .tour-card .grid,
  .visa-card .grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .tour-card .grid button,
  .visa-card .grid button {
    width: 100%;
    padding: 0.75rem;
    min-height: 44px;
  }

  /* Feature Cards */
  .feature-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }

  .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
  }

  /* Visa Country Cards */
  .visa-country-card {
    padding: 16px;
    margin-bottom: 0.75rem;
  }

  /* Forms */
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.875rem;
    font-size: 16px; /* Prevent iOS zoom */
    min-height: 44px;
  }

  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }

  /* Modal */
  .modal-content {
    padding: 1.5rem;
    width: 95%;
    max-height: 85vh;
  }

  .modal-content h3 {
    font-size: 1.25rem;
  }

  /* Footer */
  footer {
    padding: 2rem 0 1rem;
    font-size: 0.875rem;
  }

  .footer-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .social-icon {
    width: 38px;
    height: 38px;
    margin: 0 0.25rem;
  }

  /* Payment icons in footer */
  footer .flex.gap-4 {
    gap: 0.5rem;
  }

  footer i.text-3xl {
    font-size: 1.75rem !important;
  }

  /* Tables - horizontal scroll */
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }

  table {
    font-size: 0.875rem;
  }

  table th,
  table td {
    padding: 0.5rem !important;
    white-space: nowrap;
  }
}

/* ===== MEDIUM DEVICES (640px - 767px) - Large Phones / Small Tablets ===== */
@media (min-width: 640px) and (max-width: 767px) {
  .hero {
    min-height: 450px;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  /* Cards can be 2 columns on larger phones */
  .tour-image,
  .visa-card-image {
    height: 200px;
  }

  .visa-country-card {
    padding: 20px;
  }
}

/* ===== TABLET DEVICES (768px - 1023px) ===== */
@media (max-width: 1023px) {
  /* Hero adjustments for tablets */
  .hero {
    min-height: 500px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  /* Navigation - still show mobile menu */
  .navbar {
    padding: 0.75rem 0;
  }

  /* Cards maintain good sizing */
  .tour-card,
  .visa-card,
  .attraction-card {
    transition: transform 0.3s ease;
  }

  /* Forms - better spacing on tablet */
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.875rem;
  }

  /* Modals - slightly larger on tablets */
  .modal-content {
    max-width: 600px;
    width: 85%;
  }

  /* Footer optimization */
  footer {
    padding: 2.5rem 0 1rem;
  }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS (All Mobile/Tablet) ===== */
@media (max-width: 1023px) {
  /* Ensure all interactive elements are touch-friendly */
  a,
  button,
  input[type="submit"],
  input[type="button"],
  .clickable {
    min-height: 44px;
    min-width: 44px;
  }

  /* Remove hover effects on touch devices */
  .tour-card:hover,
  .visa-card:hover,
  .attraction-card:hover,
  .feature-card:hover {
    transform: none;
  }

  /* Tap highlight color */
  * {
    -webkit-tap-highlight-color: rgba(30, 64, 175, 0.1);
  }

  /* Smooth scrolling */
  html {
    -webkit-overflow-scrolling: touch;
  }

  /* Form select - ensure native appearance on mobile */
  select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23666' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
  }
}

/* ===== LANDSCAPE ORIENTATION FIXES ===== */
@media (max-height: 500px) and (orientation: landscape) {
  /* Reduce hero height in landscape mode */
  .hero {
    min-height: 300px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  /* Modal adjustments for landscape */
  .modal-content {
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* ===== DESKTOP - NO CHANGES (1024px+) ===== */
/* Desktop styles remain as originally defined above */
/* All existing desktop layouts are preserved */

/* Responsive adjustments for visa country cards */
@media (max-width: 640px) {
  .visa-country-card {
    padding: 20px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-in;
}

/* Loading Spinner */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Line Clamp Utility Classes */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tour Card Enhancements */
.tour-card {
  display: flex;
  flex-direction: column;
}

.tour-card>div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tour-card .tour-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
}

.tour-location {
  color: var(--text-light);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tour-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tour-badge {
  background: rgba(255, 255, 255, 0.95);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tour-badge.bg-yellow-500 {
  background: #fbbf24;
  color: white;
}

/* Attraction Cards - Mirror tour card styles for symmetry */
.attraction-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.attraction-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.attraction-card>div {
  flex: 1;
  display: flex;
  flex-direction: column;
}


/* Premium Visa Country Cards */
.visa-country-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #F0F0F0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.visa-country-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  border-color: #E0E7FF;
}