/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation Styles */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 40px;
  width: 40px;
  border-radius: 8px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2563eb;
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #2563eb;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: #2563eb;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Language Selector */
.language-selector .dropdown {
  position: relative;
}

.dropdown-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  font-weight: 600;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.dropdown-btn:hover {
  background: #f3f4f6;
}

.flag-icon {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  min-width: 150px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 8px 0;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.dropdown:hover .dropdown-content {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.dropdown-content a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: #333;
  transition: background 0.3s ease;
}

.dropdown-content a:hover {
  background: #f3f4f6;
}

/* Sign In Button */
.signin-btn {
  background: #2563eb;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.signin-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  color: white;
}
/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.bar {
  width: 25px;
  height: 3px;
  background: #333;
  transition: 0.3s;
  border-radius: 3px;
}

/* Hero Section */
.hero {
  position: relative;
  margin-top: 70px;
  padding: 100px 0;
  overflow: hidden;
  background-color: (135deg, rgba(15,23,42,0.65), rgba(30,41,59,0.45));
}


.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  animation: fadeInLeft 1s ease-out;
}



.hero-title {
  font-size: 3rem;
  font-weight: 700;
  padding-top: 2rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
Color: white;
Text-shadow: 2px 2px 10px rgba(0,0,0,0.6);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  line-height: 1.6;
  Color: white;
Text-shadow: 1px 1px 8px rgba(0,0,0,0.7);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: #f59e0b;
  color: white;
}

.btn-primary:hover {
  background: #d97706;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: #667eea;
}

.hero-image {
  animation: fadeInRight 1s ease-out;
}

.hero-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* How It Works Section */
.how-it-works {
  padding: 100px 0;
  background: #f8fafc;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: #1e293b;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.step {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.step:hover {
  transform: translateY(-5px);
}

.step-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.step-icon i {
  font-size: 2rem;
  color: white;
}

.step h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1e293b;
}

.step p {
  color: #64748b;
  line-height: 1.6;
}

/* Benefits Section */
.benefits {
  padding: 100px 0;
  background: white;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.benefit-card {
  padding: 2rem;
  border-radius: 12px;
  background: #f8fafc;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  background: white;
}

.benefit-card i {
  font-size: 2.5rem;
  color: #2563eb;
  margin-bottom: 1rem;
}

.benefit-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.benefit-card p {
  color: #64748b;
  line-height: 1.6;
}

/* About Section */
.about {
  padding: 100px 0;
  background: #f8fafc;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #1e293b;
}

.about-text p {
  font-size: 1.1rem;
  color: #64748b;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
.contact {
  padding: 100px 0;
  background: white;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item i {
  font-size: 1.5rem;
  color: #2563eb;
  margin-top: 0.25rem;
}

.contact-item h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.contact-item p {
  color: #64748b;
}

/* Contact Form */
.contact-form {
  background: #f8fafc;
  padding: 2.5rem;
  border-radius: 12px;
}

.form-group {
  position: relative;
  margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group label {
  position: absolute;
  left: 15px;
  top: 15px;
  color: #64748b;
  transition: all 0.3s ease;
  pointer-events: none;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -10px;
  left: 10px;
  font-size: 0.875rem;
  background: white;
  padding: 0 5px;
  color: #2563eb;
}

/* Footer */
.footer {
  background: #1e293b;
  color: white;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: white;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}


.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #334155;
  color: #94a3b8;
}

/* Animations */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    gap: 1rem;
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
  }


  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .steps-container {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 2rem;
  }

  .container {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 60px 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  

  .section-title {
    font-size: 1.75rem;
  }

  .step,
  .benefit-card {
    padding: 1.5rem;
  }

  .contact-form {
    padding: 1.5rem;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #2563eb;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1d4ed8;
}

/* ============================================
   FIX 1: Z-INDEX HIERARCHY MANAGEMENT
   ============================================ */

/* Establish proper z-index hierarchy with CSS variables */
:root {
  --z-navbar: 1000;
  --z-dropdown: 1100;
  --z-modal-overlay: 9999;
  --z-modal-content: 10000;
  --z-notification: 10001; /* Notifications always on top */
  --z-loading: 10002;
}

/* Apply z-index hierarchy to navigation */
.navbar {
  z-index: var(--z-navbar) !important;
}

.dropdown-content,
.user-dropdown {
  z-index: var(--z-dropdown) !important;
}

/* Fix modal z-index issues */
#requestModal,
#accountTypeModal,
#successModal,
#detailsModal,
.modal-overlay {
  z-index: var(--z-modal-overlay) !important;
}

.modal-content,
.account-type-modal,
.success-modal {
  z-index: var(--z-modal-content) !important;
  position: relative !important;
}

/* Ensure notifications are always on top */
.notification {
  z-index: var(--z-notification) !important;
  position: fixed !important;
}

/* Loading overlays */
#loadingOverlay,
#signOutLoading,
.loading-overlay {
  z-index: var(--z-loading) !important;
}

/* ============================================
   FIX 2: MOBILE MENU ANIMATIONS
   ============================================ */

/* Smooth transitions for mobile menu */
@media (max-width: 768px) {
  .nav-menu {
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .nav-menu.active {
    left: 0 !important;
  }

  /* Closing animation */
  .nav-menu.closing {
    left: -100% !important;
  }

 /* ✅ CORRECTED: Minimal language selector styling */
 .language-selector {
    width: auto; /* ← Changed from 100% */
    margin: 0 auto; /* ← Center it */
  }

  .language-selector .dropdown {
    width: auto; /* ← Changed from 100% */
  }

  /* ✅ Button fits content only */
  .dropdown-btn {
    width: auto; /* ← Changed from 100% */
    justify-content: center;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 0;
    min-height: auto;
    font-size: 1rem;
    color: #333;
  }

  .dropdown-btn:hover {
    background: transparent;
  }

  /* ✅ Remove any borders/outlines */
  .dropdown-btn:focus {
    outline: none;
    box-shadow: none;
  }

  /* ✅ Dropdown styling */
  .dropdown-content {
    position: static;
    opacity: 0 !important;
    max-height: 0;
    visibility: hidden !important;
    transform: none;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 0;
    box-shadow: none;
    border: none; /* ← Remove border */
    background: transparent;
    width: auto; /* ← Fit content */
  }

  .dropdown.mobile-active .dropdown-content {
    opacity: 1 !important;
    max-height: 200px;
    visibility: visible !important;
    margin-top: 4px;
  }

  .dropdown-content a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 1rem;
    color: #333;
    background: transparent;
    border: none; /* ← Remove border */
  }

  .dropdown-content a:hover {
    background: #f3f4f6;
  }

  /* ✅ Remove the stripe/border below language selector */
  .language-selector::after,
  .dropdown-btn::after,
  .dropdown::after {
    display: none !important;
  }

  .nav-item.language-selector {
    border-bottom: none !important; /* ← Remove any nav-item border */
  }

  .flag-icon {
    width: 20px;
    height: 15px;
  }

  /* Remove desktop hover behavior */
  .dropdown:hover .dropdown-content {
    transform: none;
    opacity: 0;
    visibility: hidden;
  }
}

/* Improved hamburger animation */
.hamburger .bar {
  transition: all 0.3s ease;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   LANGUAGE SELECTOR 
   ============================================ */

/* Language selector visual feedback */
.language-selector .dropdown-btn {
  position: relative;
  transition: background 0.3s ease;
}

/* Visual feedback when language changes */
.language-selector .dropdown-btn.updating {
  background: rgba(37, 99, 235, 0.1);
}

.language-selector .dropdown-btn.updating::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: languagePulse 0.5s ease;
}

@keyframes languagePulse {
  0% {
    transform: translateY(-50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-50%) scale(1.5);
    opacity: 0;
  }
}

/* ============================================
   ENHANCED NOTIFICATION STYLES
   ============================================ */

/* Notification container styles */
.notification {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  max-width: 350px;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 10001 !important;
  animation: notificationSlideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Notification type styles */
.notification-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.notification-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.notification-info {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Notification animation */
@keyframes notificationSlideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Notification close button */
.notification button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  font-size: 1.25rem;
  opacity: 0.8;
  transition: opacity 0.2s;
  margin-left: auto;
}

.notification button:hover {
  opacity: 1;
}

/* ============================================
   MODAL OVERLAY IMPROVEMENTS
   ============================================ */

/* Ensure modals properly overlay everything except notifications */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.7) !important;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-modal-overlay) !important;
}

.modal-content {
  position: relative !important;
  z-index: var(--z-modal-content) !important;
  max-height: 90vh;
  overflow-y: auto;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden !important;
}

/* ============================================
   USER DROPDOWN MENU STYLES
   ============================================ */

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: var(--z-dropdown) !important;
  font-family: "Poppins", sans-serif;
  margin-top: 8px;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   LOADING STATES
   ============================================ */

#signOutLoading {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  z-index: var(--z-loading) !important;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */

/* Better mobile menu behavior */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    gap: 1rem;
    z-index: var(--z-navbar);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav-menu.active {
    left: 0;
  }

  /* Ensure dropdowns work in mobile menu */
  .language-selector .dropdown-content {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    margin-top: 10px;
    background: #f8fafc;
  }

  /* Mobile notification adjustments */
  .notification {
    right: 10px !important;
    left: 10px !important;
    max-width: calc(100% - 20px);
  }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
  .notification {
    max-width: 300px;
  }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus states for better keyboard navigation */
.nav-link:focus,
.dropdown-btn:focus,
.signin-btn:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Skip animation for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .notification {
    border: 2px solid currentColor;
  }

  .modal-content {
    border: 2px solid currentColor;
  }
}

/* ============================================
   LANGUAGE SWITCHER ACTIVE STATE
   ============================================ */

.dropdown-content a[data-lang].active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

.dropdown-content a[data-lang].active::before {
  content: "✓";
  position: absolute;
  left: 10px;
  color: #2563eb;
}

/* ============================================
   ADDITIONAL FIXES FOR SPECIFIC PAGES
   ============================================ */

/* Fix for senders.html modal */
#requestModal.active {
  display: flex !important;
  z-index: var(--z-modal-overlay) !important;
}

/* Fix for travelers.html form */
.journey-form .notification {
  position: fixed !important;
  z-index: var(--z-notification) !important;
}

/* Fix for signin.html modals */
#accountTypeModal.active,
#successModal.active {
  display: flex !important;
  z-index: var(--z-modal-overlay) !important;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Use GPU acceleration for animations */
.nav-menu,
.notification,
.modal-overlay,
.dropdown-content {
  will-change: transform, opacity;
}

/* Optimize hamburger menu animation */
.hamburger .bar {
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* ============================================
   DARK MODE SUPPORT (OPTIONAL)
   ============================================ */

@media (prefers-color-scheme: dark) {
  /* Add dark mode styles here if needed */
  .notification {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .notification,
  .modal-overlay,
  .hamburger,
  .user-dropdown {
    display: none !important;
  }
}

/* Mobile user dropdown improvements */
@media (max-width: 768px) {
  .user-dropdown {
    position: fixed !important;
    top: 70px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    z-index: 1100 !important;
    animation: mobileDropdownSlide 0.3s ease;
    /* Prevent iOS Safari from closing on scroll */
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
  }

  @keyframes mobileDropdownSlide {
    from {
      transform: translateY(-20px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* Larger touch targets for mobile */
  .user-dropdown button {
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Prevent dropdown from closing when scrolling */
  .user-dropdown {
    pointer-events: auto;
  }
}

/* Ensure sign-in button is accessible on mobile */
@media (max-width: 768px) {
  .signin-btn {
    position: relative;
    z-index: 1001;
    touch-action: manipulation;
  }
}

/* Language change transitions */
.traveler-card [data-en][data-ti],
.traveler-card .verified-text,
.traveler-card .weight-text,
.traveler-card .request-btn-text {
  transition: opacity 0.2s ease;
}

/* ============================================
   GUIDELINES MODAL STYLES
   ============================================ */

/* Guidelines Modal Styles */
.guidelines-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.guidelines-modal.active {
  opacity: 1;
}

.guidelines-modal-content {
  background: white;
  border-radius: 20px;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  transform: translateY(30px);
  transition: transform 0.3s ease;
}

.guidelines-modal.active .guidelines-modal-content {
  transform: translateY(0);
}

.guidelines-modal-header {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  padding: 2rem;
  border-top-left-radius: 20px;
  position: relative;
}

.guidelines-modal-header h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.guidelines-modal-header .icon {
  font-size: 2rem;
}

.guidelines-modal-header p {
  margin: 0.75rem 0 0 0;
  opacity: 0.9;
  font-size: 1rem;
  line-height: 1.5;
}

.guidelines-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.3s ease;
}

.guidelines-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.guidelines-modal-body {
  padding: 2rem;
}

.guidelines-section {
  margin-bottom: 2rem;
}

.guidelines-section:last-child {
  margin-bottom: 0;
}

.guidelines-section h3 {
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.guidelines-section h3 i {
  color: #2563eb;
  font-size: 1.1rem;
}

.guidelines-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guidelines-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 4px solid #2563eb;
}

.guidelines-list li:last-child {
  margin-bottom: 0;
}

.guidelines-list li i {
  color: #2563eb;
  font-size: 1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.guidelines-list li .content {
  flex: 1;
}

.guidelines-list li .title {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.guidelines-list li .description {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.4;
}

.prohibited-items {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1rem;
}

.prohibited-items h4 {
  color: #dc2626;
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prohibited-items ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #7f1d1d;
}

.prohibited-items li {
  margin-bottom: 0.25rem;
}

.emergency-contact {
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1rem;
  text-align: center;
}

.emergency-contact h4 {
  color: #1e40af;
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.emergency-contact p {
  color: #1e3a8a;
  margin: 0;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .guidelines-modal-content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .guidelines-modal-header {
    border-radius: 0;
    padding: 1.5rem 1rem;
  }
  
  .guidelines-modal-header h2 {
    font-size: 1.5rem;
  }
  
  .guidelines-modal-body {
    padding: 1.5rem 1rem;
  }
  
  .guidelines-close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* Language Support */
[data-lang="ti"] .guidelines-list li {
  text-align: right;
  direction: rtl;
}

[data-lang="ti"] .guidelines-list li i {
  margin-left: 0.75rem;
  margin-right: 0;
}

/* Animation for modal items */
.guidelines-modal.active .guidelines-section {
  animation: slideInUp 0.6s ease forwards;
}

.guidelines-section:nth-child(1) { animation-delay: 0.1s; }
.guidelines-section:nth-child(2) { animation-delay: 0.2s; }
.guidelines-section:nth-child(3) { animation-delay: 0.3s; }
.guidelines-section:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   LEGAL MODALS STYLES
   ============================================ */

/* Legal Modal Styles */
.legal-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.legal-modal.active {
  opacity: 1;
}

.legal-modal-content {
  background: white;
  border-radius: 20px;
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  transform: translateY(30px);
  transition: transform 0.3s ease;
}

.legal-modal.active .legal-modal-content {
  transform: translateY(0);
}

.legal-modal-header {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: white;
  padding: 2rem;
  border-top-left-radius: 20px;
  position: relative;
  text-align: center;
}

.legal-modal-header h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.legal-modal-header .icon {
  font-size: 2.2rem;
}

.legal-modal-header p {
  margin: 0.75rem 0 0 0;
  opacity: 0.9;
  font-size: 1rem;
  line-height: 1.5;
}

.legal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.3s ease;
}

.legal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.legal-modal-body {
  padding: 2rem;
}

.legal-section {
  margin-bottom: 2rem;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h3 {
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.legal-section h3 i {
  color: #2563eb;
  font-size: 1.1rem;
}

.legal-section h4 {
  color: #374151;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
}

.legal-section p {
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.legal-section ul, .legal-section ol {
  color: #4b5563;
  line-height: 1.7;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
}

.legal-highlight {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.legal-highlight h4 {
  color: #92400e;
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-contact {
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 2rem;
  text-align: center;
}

.legal-contact h4 {
  color: #1e40af;
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.legal-contact p {
  color: #1e3a8a;
  margin: 0;
  font-size: 0.9rem;
}

.last-updated {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .legal-modal-content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .legal-modal-header {
    border-radius: 0;
    padding: 1.5rem 1rem;
  }
  
  .legal-modal-header h2 {
    font-size: 1.5rem;
  }
  
  .legal-modal-body {
    padding: 1.5rem 1rem;
  }
  
  .legal-close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* Custom error message styles */
.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  min-height: 1.25rem;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
  padding-left: 15px;
}

.error-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* Input error state */
.form-group.error input,
.form-group.error textarea {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group.error label {
  color: #dc2626 !important;
}

/* Success state */
.form-group.success input,
.form-group.success textarea {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Ensure form validation doesn't interfere */
.contact-form form {
  position: relative;
}

.form-group {
  position: relative;
  margin-bottom: 2rem;
  overflow: visible; /* Ensure error messages are visible */
}

/* Remove any browser validation styling */
input:invalid,
textarea:invalid {
  box-shadow: none !important;
}

input:focus:invalid,
textarea:focus:invalid {
  box-shadow: none !important;
}

/* ============================================
   GLASSMORPHISM HERO CARDS
   ============================================ */

.role-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  max-width: 700px;
}

.role-card {
  position: relative;
  text-decoration: none;
  color: #ffffff;
  border-radius: 20px;
  padding: 2.5rem 1rem;
  overflow: hidden;
  
  /* 🪟 GLASSMORPHISM EFFECT */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  
  /* Border with gradient */
  border: 1px solid rgba(255, 255, 255, 0.3);
  
  /* Subtle shadow */
  box-shadow: 
    0 8px 32px 0 rgba(0, 0, 0, 0.15),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.4);
  
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effect */
.role-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 
    0 12px 40px 0 rgba(0, 0, 0, 0.25),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
}

/* Gradient overlay specific to each card */
.etraveler-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.2) 0%,
    rgba(217, 119, 6, 0.1) 100%
  );
  opacity: 0.6;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.sender-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.2) 0%,
    rgba(29, 78, 216, 0.1) 100%
  );
  opacity: 0.6;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.role-card:hover::before {
  opacity: 0.8;
}

/* Icon styling */
.role-icon {
  position: relative;
  z-index: 2;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  
  /* Glass icon container */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  
  transition: all 0.4s ease;
}

.role-card:hover .role-icon {
  transform: scale(1.1) rotate(-5deg);
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.etraveler-card .role-icon {
  color: #fbbf24; /* Golden yellow */
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.sender-card .role-icon {
  color: #60a5fa; /* Light blue */
  text-shadow: 0 0 20px rgba(96, 165, 250, 0.5);
}

/* Text styling */
.role-card h3 {
  position: relative;
  z-index: 2;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #ffffff;
  text-align: center;
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(255, 255, 255, 0.1);
}


/* CTA Button */
.role-cta {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 10px 10px;
  
  /* Glass button */
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50px;
  
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  
  transition: all 0.3s ease;
  cursor: pointer;
}

.role-card:hover .role-cta {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

/* Arrow animation */
.role-arrow {
  transition: transform 0.3s ease;
}

.role-card:hover .role-arrow {
  transform: translateX(5px);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .role-selector {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .role-card {
    padding: 2rem 1.5rem;
  }
  
  .role-icon {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
  
  .role-card h3 {
    font-size: 1.5rem;
  }
  
  .role-card p {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .role-card {
    padding: 1.75rem 1.25rem;
    border-radius: 16px;
  }
  
  .role-icon {
    width: 60px;
    height: 60px;
    font-size: 1.75rem;
  }
  
  .role-card h3 {
    font-size: 1.35rem;
  }
}

/* ============================================
   BROWSER COMPATIBILITY
   ============================================ */

/* Firefox fallback */
@-moz-document url-prefix() {
  .role-card {
    background: rgba(255, 255, 255, 0.12);
  }
}

/* Safari optimization */
@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) {
  .role-card {
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(20px)) {
  .role-card {
    background: rgba(255, 255, 255, 0.25);
  }
  
  .role-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(20px);
    z-index: -1;
  }
}




