/* Mobile-specific fixes */

/* Fix to ensure content stays above blue overlay */
.light-hero-content h1,
.light-hero-content p,
.light-hero-content .light-hero-badge,
.light-hero-content .light-hero-buttons,
.light-btn,
.light-hero-subtitle {
  position: relative;
  z-index: 50 !important;
}

/* Ensure blue filter stays above background but below content */
.light-hero-pattern {
  z-index: -1 !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* Light hero section should have proper stacking context */
.light-hero-section {
  margin-top: 0 !important;
  position: relative !important;
  z-index: 5 !important;
}

/* Ensure hero content is above everything */
.light-hero {
  position: relative !important;
  z-index: 25 !important;
}

.light-hero-content {
  position: relative !important;
  z-index: 40 !important;
}

/* Large Desktop (1440px and up) */
@media screen and (min-width: 1440px) {
  .w-\[90vw\] {
    max-width: 1320px !important;
  }

  .light-hero-content {
    max-width: 700px !important;
  }

  .light-hero h1 {
    font-size: 3.5rem !important;
  }
}

/* Desktop (1200px to 1439px) */
@media screen and (max-width: 1439px) {
  .w-\[90vw\] {
    max-width: 1140px !important;
  }

  .light-hero-content {
    max-width: 600px !important;
  }

  .hero-globe-container {
    width: 400px !important;
    height: 400px !important;
  }
}

/* Small Desktop/Laptop (992px to 1199px) */
@media screen and (max-width: 1199px) {
  .w-\[90vw\] {
    max-width: 960px !important;
  }

  .light-hero {
    gap: 2rem !important;
  }

  .light-hero h1 {
    font-size: 3rem !important;
  }

  .hero-globe-container {
    width: 350px !important;
    height: 350px !important;
  }

  .light-hero-stats {
    gap: 20px !important;
  }
}

/* Tablet (768px to 991px) */
@media screen and (max-width: 991px) {
  .w-\[90vw\] {
    width: 95% !important;
    max-width: 960px !important;
  }

  .light-hero {
    height: auto !important;
    min-height: 0 !important;
  }

  .light-hero-content {
    max-width: 100% !important;
  }

  .light-hero h1 {
    font-size: 2.5rem !important;
  }

  .light-hero-buttons {
    margin-top: 1.5rem !important;
  }

  .light-hero-stats {
    margin-top: 3rem !important;
  }

  #desktopNav,
  #desktopJoin {
    display: none !important;
  }

  .menu-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Navigation adjustments */
  #desktopNav,
  #desktopJoin {
    display: none !important;
  }

  .menu-toggle {
    display: block !important;
  }


  /* Active states for mobile */
  a:active,
  button:active {
    opacity: 0.7 !important;
    transform: scale(0.98) !important;
    transition: all 0.1s ease-in-out !important;
  }

  /* Prevent sticky hover states */
  a:hover,
  button:hover {
    transition-duration: 0s !important;
  }

  /* Better form inputs */
  input,
  textarea,
  select {
    font-size: 16px !important;
    /* Prevents iOS zoom */
    padding: 12px 16px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(4px) !important;
    transition: all 0.3s ease !important;
  }

  input:focus,
  textarea:focus,
  select:focus {
    border-color: #2c72c2 !important;
    box-shadow: 0 0 0 3px rgba(44, 114, 194, 0.2) !important;
    outline: none !important;
  }

  /* Improved scrolling */
  ::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
  }

  ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05) !important;
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15) !important;
    border-radius: 3px !important;
  }

  /* Improved modals and popups */
  .modal,
  .popup,
  .drawer {
    backdrop-filter: blur(8px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  /* Adjust logo size for tablet */
  .enhanced-logo-image {
    max-width: 250px !important;
    max-height: 250px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .logo-card {
    max-width: 250px !important;
    max-height: 250px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    overflow: hidden !important;
  }

  .enhanced-about-visual {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Mobile (576px to 767px) */
@media screen and (max-width: 767px) {
  .w-\[90vw\] {
    max-width: 540px !important;
    padding: 0 15px !important;
  }

  .light-hero-image {
    display: none !important;
  }

  .light-hero-content {
    text-align: center !important;
    margin: 0 auto !important;
  }

  .light-hero h1 {
    font-size: 2.25rem !important;
  }

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

  .light-hero-buttons {
    flex-direction: column !important;
    width: 100% !important;
    gap: 1rem !important;
  }

  .light-btn {
    width: 100% !important;
  }

  .light-hero-stats {
    flex-direction: row !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
    margin: 2rem auto !important;
    max-width: 100% !important;
  }

  .menu-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Navbar fixes for mobile */
  nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50 !important;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  body {
    padding-top: 0 !important;
  }

  /* Scrolled navbar effect */
  nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
  }

  /* Enhanced mobile menu styles */
  #menu {
    z-index: 40 !important;
    top: 90px !important;
    height: calc(100vh - 70px) !important;
  }

  #menu.active {
    opacity: 1;
  }

  /* Menu toggle button animation */
  .menu-toggle {
    cursor: pointer !important;
    z-index: 50 !important;
    transition: all 0.3s ease;
  }

  .menu-toggle .menu-bar {
    transition: all 0.3s ease;
    transform-origin: center;
  }

  /* Mobile menu container */
  .mobile-menu-container {
    overflow-y: auto;
    height: 100%;
    -webkit-overflow-scrolling: touch;
  }

  /* Better transitions for dropdowns */
  .mobile-dropdown {
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    max-height: 0;
  }

  .mobile-dropdown:not(.hidden) {
    max-height: 800px;
    /* Large enough to accommodate content */
  }

  /* Touch feedback for mobile elements */
  .mobile-nav-item:active,
  .mobile-dropdown-btn:active,
  .mobile-dropdown-item:active,
  .btn-primary:active,
  .btn-outline:active,
  .social-icon-mobile:active,
  .touch-active {
    transform: scale(0.98);
  }

  /* Hide scrollbar in webkit browsers but keep functionality */
  .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .no-scrollbar::-webkit-scrollbar {
    display: none;
  }

  /* Mobile times strip */
  .mobile-times-strip {
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* Active menu button */
  .mobile-dropdown-btn.active {
    background-color: #f0f7ff;
    color: #2c72c2;
    font-weight: 600;
  }

  /* Active navigation item */
  .mobile-nav-item.active {
    background-color: #f0f7ff;
    color: #2c72c2;
    font-weight: 600;
  }

  /* Mobile dropdown bullet animation */
  .mobile-dropdown-bullet {
    transition: background-color 0.3s ease;
  }

  .mobile-dropdown-item.active {
    color: #2c72c2;
    font-weight: 500;
    background-color: rgba(0, 122, 255, 0.1);
  }

  .mobile-dropdown-item.active .mobile-dropdown-bullet {
    background-color: #2c72c2;
  }

  /* Fix hero section on mobile */
  .light-hero-section {
    margin-top: 0 !important;
    position: relative !important;
    z-index: 5 !important;
  }

  .light-hero-pattern {
    z-index: -1 !important;
  }

  .light-hero {
    position: relative !important;
    z-index: 25 !important;
  }

  .light-hero-content {
    padding-top: 0 !important;
    position: relative !important;
    z-index: 40 !important;
  }

  /* Section spacing adjustments */
  section {
    padding: 60px 0 !important;
  }

  .section-title {
    font-size: 2rem !important;
  }

  /* Card layouts */
  .cooperation-cards,
  .resource-cards,
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Footer improvements */
  footer {
    padding: 3rem 0 2rem !important;
    overflow: hidden !important;
  }

  .footer-content {
    flex-direction: column !important;
    gap: 2.5rem !important;
    padding: 0 15px !important;
  }

  .footer-logo-section {
    text-align: center !important;
    margin-bottom: 1rem !important;
  }

  .footer-logo-section img {
    max-width: 200px !important;
    margin: 0 auto !important;
  }

  .footer-logo-section p {
    margin: 1rem 0 !important;
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
  }

  .social-icons {
    justify-content: center !important;
    gap: 1.5rem !important;
    margin-top: 1.5rem !important;
  }

  .social-icons a {
    font-size: 1.5rem !important;
    padding: 0.5rem !important;
    min-height: 36px !important;
    min-width: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .footer-title {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.5rem !important;
  }

  .footer-links ul {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .footer-links li {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .footer-links a {
    font-size: 0.9375rem !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
  }

  .footer-links i {
    font-size: 0.875rem !important;
    margin-right: 0.5rem !important;
  }

  /* Address & Contact section */
  .address-contact {
    text-align: left !important;
    margin-top: 1rem !important;
  }

  .address-contact p {
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
    margin-bottom: 0.75rem !important;
  }

  .address-contact i {
    margin-right: 0.75rem !important;
    width: 16px !important;
    text-align: center !important;
  }

  .address-contact a {
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  /* Copyright section */
  .copyright {
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    text-align: center !important;
    font-size: 0.875rem !important;
  }

  .copyright-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
  }

  img:not(.critical-image) {
    content-visibility: auto !important;
  }

  .scroll-content {
    will-change: transform !important;
    transform: translateZ(0) !important;
  }

  /* Reduce layout shifts with placeholders */
  .lazy-load-container {
    min-height: 200px !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }

  /* Smaller logo for mobile */
  .enhanced-logo-image {
    max-width: 180px !important;
    max-height: 180px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .logo-card {
    max-width: 180px !important;
    max-height: 180px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    overflow: hidden !important;
  }
}

/* Small Mobile (575px and below) */
@media screen and (max-width: 575px) {
  .w-\[90vw\] {
    padding: 0 12px !important;
  }

  .light-hero h1 {
    font-size: 1.875rem !important;
  }

  .light-hero-badge {
    font-size: 0.875rem !important;
    padding: 8px 16px !important;
  }

  .light-hero-subtitle {
    font-size: 0.9375rem !important;
  }

  .light-btn {
    padding: 12px 24px !important;
    font-size: 0.9375rem !important;
  }

  .light-hero-stat-number {
    font-size: 1.75rem !important;
  }

  .light-hero-stat-label {
    font-size: 0.8rem !important;
  }

  .light-hero-stats {
    gap: 1rem !important;
  }

  /* Adjust section spacing */
  section {
    padding: 80px 0 !important;
  }

  .section-title {
    font-size: 1.75rem !important;
  }

  .section-description {
    font-size: 0.9375rem !important;
  }

  /* Card and grid adjustments */
  .card-content {
    padding: 1.25rem !important;
  }

  .card-stats {
    flex-direction: column !important;
  }

  .card-stat {
    width: 100% !important;
  }

  /* Additional footer adjustments for smaller screens */
  footer {
    padding: 2.5rem 0 1.5rem !important;
  }

  .footer-content {
    gap: 2rem !important;
    padding: 0 12px !important;
  }

  .footer-logo-section img {
    max-width: 180px !important;
  }

  .social-icons {
    gap: 1.25rem !important;
  }

  .social-icons a {
    font-size: 1.25rem !important;
  }

  .footer-title {
    font-size: 1.125rem !important;
  }

  .footer-links a,
  .address-contact p {
    font-size: 0.875rem !important;
  }

  .copyright {
    font-size: 0.8125rem !important;
    margin-top: 1.5rem !important;
    padding-top: 1.25rem !important;
  }

  .copyright-row {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .last-updated {
    text-align: center !important;
    margin: 0 auto !important;
    width: fit-content !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 1.5rem !important;
    margin-bottom: 5px !important;
  }
}

/* Base styles */
html {
  scroll-behavior: auto !important;
  overflow-x: hidden !important;
}

body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
}

.container,
main,
section {
  width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

img {
  height: auto !important;
}

button,
a {
  min-height: 44px !important;
  min-width: 44px !important;
  padding: 8px;
  touch-action: manipulation !important;
}

/* Hide light-hero-image on mobile devices */
@media (max-width: 768px) {
  .light-hero-image {
    display: block !important;
  }

  .light-hero-content {
    max-width: 100% !important;
    text-align: center !important;
    margin: 0 auto !important;
  }

  .light-hero-stats {
    justify-content: center !important;
  }

  /* Navbar fixes for mobile */
  nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50 !important;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100vw !important;
    /* Ensure navbar doesn't overflow viewport */
    overflow-x: hidden;
    /* Prevent horizontal scrolling */
  }

  /* Make sure navbar child elements don't overflow */
  nav>div {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Fixed navbar class added via JavaScript */
  .fixed-navbar {
    position: fixed !important;
    top: 0;
    width: 100%;
    left: 0;
    right: 0;
  }

  /* Shadow effect when scrolled */
  .scroll-fixed {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  }

  /* Add padding to body to prevent content from hiding behind fixed navbar */
  body {
    padding-top: 0;
    overflow-x: hidden;
    /* Prevent horizontal scrolling on the entire body */
  }

  /* Style for the mobile menu when active */
  #menu.active {
    top: 90px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
    position: fixed;
    width: 100% !important;
    max-width: 100vw !important;
    background-color: white;
    left: 0;
    right: 0;
    z-index: 9998;
    box-sizing: border-box;
  }

  /* Make sure all mobile menu items stay within container */
  #menu>* {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Improve mobile menu item spacing */
  #menu a,
  #menu button {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
  }

  /* Style for dropdowns in mobile menu */
  .mobile-dropdown {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Fix mobile dropdown button width */
  .mobile-dropdown-btn {
    text-align: left !important;
    justify-content: space-between !important;
    width: 100% !important;
    display: flex !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Ensure dropdown icon stays at the extreme right */
  .mobile-dropdown-btn svg {
    margin-left: auto !important;
  }

  /* Make sure nav items in mobile menu are left-aligned */
  .mobile-nav-item {
    text-align: left !important;
    justify-content: flex-start !important;
    width: 100% !important;
  }

  /* Left-align dropdown items in mobile menu */
  .mobile-dropdown-item {
    text-align: left !important;
    justify-content: flex-start !important;
    width: 100% !important;
  }

  /* Properly adjust bullet margin */
  .mobile-dropdown-bullet {
    margin-right: 10px !important;
    margin-left: 0 !important;
  }

  /* Ensure "Join Us" button doesn't overflow */
  #menu a button {
    width: auto !important;
    max-width: 100% !important;
  }

  /* Dropdown icon rotation for visual feedback */
  .mobile-dropdown-btn svg.rotate-180 {
    transform: rotate(180deg);
  }

  /* Improve mobile menu toggle visibility */
  .menu-toggle {
    cursor: pointer !important;
  }

  /* Add transition for smoother dropdowns */
  .mobile-dropdown {
    transition: all 0.3s ease-in-out;
    overflow: hidden;
  }

  /* Fix cooperation section */
  .cooperation-section {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding: 2rem 0 !important;
  }

  .cooperation-section .w-\[90vw\] {
    width: 100% !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
  }

  .cooperation-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    width: 100% !important;
    margin-top: 2rem !important;
  }

  .cooperation-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .card-content {
    width: 100% !important;
    padding: 1.25rem !important;
  }

  .card-content h3 {
    font-size: 1.25rem !important;
    margin-bottom: 0.75rem !important;
  }

  .card-content p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1rem !important;
  }

  .card-stats {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    justify-content: space-between !important;
  }

  .card-stat {
    flex-basis: calc(50% - 0.5rem) !important;
    min-width: auto !important;
  }

  /* Yorker Holidays Nations Showcase section */
  .countries-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    padding: 0 !important;
  }

  .country-content {
    width: 100% !important;
    flex-direction: column !important;
    padding: 1.5rem 0 !important;
  }

  .country-info {
    width: 100% !important;
    padding: 0 15px 1.5rem 15px !important;
    order: 2 !important;
  }

  .country-map-container {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    padding: 0 15px !important;
    margin-bottom: 1.5rem !important;
    order: 1 !important;
  }

  .country-map {
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 1.5/1 !important;
  }

  .country-stats {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
  }

  .country-stat {
    flex-basis: calc(50% - 0.5rem) !important;
    min-width: auto !important;
    margin: 0 !important;
  }

  /* Navigation buttons for countries */
  .countries-nav {
    margin: 1.5rem 0 !important;
    padding: 0 15px !important;
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
  }

  .countries-nav-button {
    padding: 0.5rem 1rem !important;
    min-width: 120px !important;
    text-align: center !important;
  }

  /* Fix the enhanced about section */
  .enhanced-about-container {
    flex-direction: column !important;
    padding: 1rem 0 !important;
  }

  .enhanced-about-visual,
  .enhanced-about-content {
    width: 100% !important;
    padding: 0 15px !important;
  }

  .enhanced-about-visual {
    margin-bottom: 2rem !important;
  }

  .logo-card {
    max-width: 80% !important;
    margin: 0 auto !important;
  }

  .enhanced-stat-card {
    min-width: unset !important;
    flex-basis: calc(50% - 0.5rem) !important;
  }

  /* Fix gallery section */
  .gallery-container {
    padding: 0 15px !important;
  }

  .gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .gallery-item {
    height: auto !important;
    aspect-ratio: 4/3 !important;
  }

  /* Fix resource section */
  .resource-cards {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 0 15px !important;
  }

  .resource-card {
    max-width: 100% !important;
  }

  /* Fix stats section */
  .stats-section {
    padding: 3rem 0 !important;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
    padding: 0 15px !important;
  }

  .stat-card {
    min-height: unset !important;
    padding: 1.25rem !important;
  }

  /* Fix contact section */
  .contact-container {
    flex-direction: column !important;
    padding: 0 15px !important;
  }

  .contact-form,
  .contact-info {
    width: 100% !important;
    max-width: 100% !important;
  }

  .contact-info {
    margin-top: 2rem !important;
  }

  /* Fix footer */
  .footer-content {
    flex-direction: column !important;
    padding: 2rem 15px !important;
  }

  .footer-logo-section,
  .footer-links,
  .footer-contact {
    width: 100% !important;
    margin-bottom: 1.5rem !important;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Fix hero section on mobile */
  .light-hero-section {
    margin-top: 0 !important;
    position: relative !important;
    z-index: 5 !important;
  }

  .light-hero-pattern {
    z-index: -1 !important;
  }

  .light-hero {
    position: relative !important;
    z-index: 25 !important;
  }

  .light-hero-content {
    position: relative !important;
    z-index: 40 !important;
  }
}

/* Keep orbit animation running even when hovering logos/container */
.yorker-country-logo:hover {
  animation-play-state: running !important;
}

.yorker-circular-animation:hover .yorker-orbit {
  animation-play-state: running !important;
}

/* Enhanced Mobile Styles */
@media screen and (max-width: 767px) {

  .light-hero-content h1,
  .light-hero-content p,
  .light-hero-badge,
  .light-hero-subtitle,
  .light-hero-buttons,
  .light-btn,
  a.light-btn {
    position: relative !important;
    z-index: 50 !important;
  }

  .light-hero-content::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -1 !important;
  }

  .light-hero-stats {
    animation: fadeIn 0.6s ease 0.6s forwards !important;
    opacity: 0;
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    width: 100% !important;
    position: relative !important;
    z-index: 50 !important;
  }
}

/* Yorker Holidays Stats Row Styling */
.yorker-stats-row {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  gap: 1.5rem !important;
  margin: 2rem 0 !important;
  padding: 2rem !important;
  border-radius: 12px !important;
  background-color: rgba(44, 114, 194, 0.08) !important;
  position: relative !important;
  z-index: 5 !important;
}

.yorker-stat-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  flex: 0 1 auto !important;
  min-width: 100px !important;
}

.yorker-stat-number {
  font-size: 2.5rem !important;
  font-weight: 700 !important;
  color: white !important;
  line-height: 1.1 !important;
  margin-bottom: 0.5rem !important;
}

.yorker-stat-label {
  font-size: 1rem !important;
  color: black !important;
  font-weight: 500 !important;
  text-align: center !important;
  line-height: 1.3 !important;
}

@media screen and (max-width: 575px) {
  .yorker-stats-row {
    gap: 1.25rem !important;
    padding: 1.25rem 0.75rem !important;
  }

  .yorker-stat-item {
    min-width: 80px !important;
  }

  .yorker-stat-number {
    font-size: 2rem !important;
  }

  .yorker-stat-label {
    font-size: 0.875rem !important;
  }
}

/* Additional improvements to stat display on mobile */
@media screen and (max-width: 767px) {

  .stat-row,
  .stat-grid,
  .stats-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
    width: 100% !important;
  }

  .stat-item,
  .stat-card {
    flex: 0 0 calc(50% - 0.75rem) !important;
    min-width: 80px !important;
    text-align: center !important;
  }

  .stats-section .section-title {
    text-align: center !important;
    margin-bottom: 2rem !important;
  }

  .stat-number,
  .stat-value {
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.1 !important;
  }

  .stat-label,
  .stat-text {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
  }
}

/* Blue Stats Overlay (matching the image) */
.blue-stats-overlay {
  background: rgba(0, 75, 147, 0.8) !important;
  backdrop-filter: blur(8px) !important;
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 8px !important;
  padding: 1.5rem !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-around !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 2rem !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2) !important;
  position: relative !important;
  z-index: 5 !important;
}

.blue-stats-overlay .yorker-stat-number {
  font-size: 3rem !important;
  font-weight: 800 !important;
  color: white !important;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

.blue-stats-overlay .yorker-stat-label {
  font-size: 1.1rem !important;
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
  font-weight: 500 !important;
}

@media screen and (max-width: 768px) {
  .blue-stats-overlay {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 1.5rem !important;
    padding: 1.25rem !important;
  }

  .blue-stats-overlay .yorker-stat-number {
    font-size: 2.5rem !important;
  }

  .blue-stats-overlay .yorker-stat-label {
    font-size: 1rem !important;
  }
}

@media screen and (max-width: 575px) {
  .blue-stats-overlay {
    padding: 1rem !important;
    gap: 1.25rem !important;
  }

  .blue-stats-overlay .yorker-stat-number {
    font-size: 2rem !important;
  }

  .blue-stats-overlay .yorker-stat-label {
    font-size: 0.875rem !important;
  }
}

/* Professional Navbar Styling */
.navbar {
  transition: all 0.3s ease !important;
  background-color: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
  max-width: 1500px !important;
  overflow: visible !important;
  padding-left: 50px !important;
  padding-right: 50px !important;
}

.navbar a {
  color: #333 !important;
  font-weight: 500 !important;
  position: relative !important;
}

.navbar a:hover {
  color: #2c72c2 !important;
}

.navbar .dropdown-content {
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
  background-color: white !important;
  padding: 1rem 0 !important;
  min-width: 200px !important;
}

.navbar .dropdown-content a {
  padding: 0.75rem 1.5rem !important;
  display: block !important;
  transition: all 0.2s ease !important;
}

.navbar .dropdown-content a:hover {
  background-color: rgba(44, 114, 194, 0.05) !important;
}

/* Adding the hover-lift class to navbar logo */
.navbar a.hover-lift img {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.navbar a.hover-lift:hover img {
  transform: translateY(-3px) !important;
}

/* Responsive navbar adjustments */
@media screen and (max-width: 1100px) {
  .navbar {
    padding-left: 0px !important;
    padding-right: 0px !important;
  }


  #desktopNav a {
    font-size: 0.9375rem !important;
  }
}

@media screen and (max-width: 991px) {
  .navbar {
    padding: 0.75rem 1rem !important;
  }

  .navbar img {
    width: 150px !important;
  }

  /* Show mobile menu toggle */
  .menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Fixed at top */
  .navbar.fixed-top {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1030 !important;
  }
}

@media screen and (max-width: 1067px) {
  .navbar {
    padding: 0.625rem 0.875rem !important;
  }

  .navbar img {
    width: 150px !important;
  }

  /* Mobile menu */
  #menu {
    overflow-y: auto !important;
    background-color: white !important;
    padding: 1rem 0 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
  }

  #menu a,
  #menu button {
    font-size: 1rem !important;
    padding: 0.875rem 1.25rem !important;
    display: flex !important;
    width: 100% !important;
    text-align: left !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  }

  #menu a:last-child,
  #menu button:last-child {
    border-bottom: none !important;
  }
}

@media screen and (max-width: 575px) {
  .navbar {
    padding: 0.5rem 0.75rem !important;
  }

  .navbar img {
    width: 150px !important;
  }

  #menu a,
  #menu button {
    font-size: 0.9375rem !important;
    padding: 0.75rem 1rem !important;
  }
}


/* Making the logo transition-enabled and clickable */
.navbar a:focus-visible {
  outline: 2px solid #2c72c2 !important;
  outline-offset: 4px !important;
  border-radius: 4px !important;
}

/* Mobile time panel responsive improvement */
.times-panel {
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  padding: 0.5rem 0.75rem !important;
}

@media screen and (max-width: 767px) {
  .times-panel {
    display: none !important;
  }
}

/* Fix z-index stacking for navbar and dropdowns */
.navbar {
  z-index: 1030 !important;
}

.navbar .dropdown-content {
  z-index: 1031 !important;
}

#menu.active {
  z-index: 1029 !important;
}

/* Device-specific fixes */
/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
  .ios-fix {
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  .fixed-bottom {
    bottom: env(safe-area-inset-bottom) !important;
  }

  /* Fix 100vh issue on iOS */
  .full-height {
    height: -webkit-fill-available !important;
  }
}

/* Apply animations only when requested */
@media (prefers-reduced-motion: no-preference) {
  .scroll-fade {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .scroll-fade.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

/* Print styles for professional document printing */
@media print {

  /* Hide elements that don't make sense in print */
  nav,
  .menu-toggle,
  #menu,
  button:not(.print-visible),
  .no-print,
  .social-icons,
  .footer-links,
  video,
  .contact-form,
  .join-section {
    display: none !important;
  }

  /* Reset all colors to be print-friendly */
  * {
    background-color: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-color: #ddd !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Ensure all text is visible */
  body {
    font-size: 12pt !important;
    line-height: 1.5 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Improve headings */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    page-break-after: avoid !important;
    orphans: 3 !important;
    widows: 3 !important;
  }

  h1 {
    font-size: 22pt !important;
  }

  h2 {
    font-size: 18pt !important;
  }

  h3 {
    font-size: 16pt !important;
  }

  /* Display URLs after links */
  a[href^="http"]:after {
    content: " (" attr(href) ")" !important;
    font-size: 90% !important;
    font-style: italic !important;
  }

  /* Local links don't need the URL */
  a[href^="#"]:after,
  a[href^="/"]:after {
    content: "" !important;
  }

  /* Improve layouts */
  .container,
  .section,
  .w-\[90vw\] {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Force page breaks */
  .page-break-before {
    page-break-before: always !important;
  }

  .page-break-after {
    page-break-after: always !important;
  }

  /* Avoid breaking images */
  img {
    max-width: 100% !important;
    page-break-inside: avoid !important;
  }

  /* Tables */
  table {
    border-collapse: collapse !important;
  }

  table td,
  table th {
    border: 1px solid #ddd !important;
    padding: 8px !important;
  }

  /* Logo in print */
  .logo-print {
    display: block !important;
    max-width: 200px !important;
    margin: 20px auto !important;
  }

  /* Simplify footer for print */
  footer {
    border-top: 1px solid #ddd !important;
    margin-top: 2cm !important;
    font-size: 10pt !important;
    text-align: center !important;
  }

  .footer-logo-section {
    text-align: center !important;
  }

  .footer-logo-section img {
    max-width: 150px !important;
    margin: 0 auto !important;
  }

  .footer-print-info {
    display: block !important;
    text-align: center !important;
    font-size: 9pt !important;
    margin-top: 10px !important;
  }

  .copyright {
    font-size: 8pt !important;
    text-align: center !important;
    margin-top: 10px !important;
  }
}


@media screen and (max-width: 1023px) {
  #desktopNav {
    gap: 1rem !important;
  }
}

/* Optimize topbar timestamps loading */
.topbar__flag {
  will-change: transform;
  contain: layout style;
  transform: translateZ(0);
}

/* Prevent layout shift during timestamp loading */
.topbar__flag .group-hover\:block {
  content-visibility: auto;
  contain-intrinsic-size: auto 40px;
  transition: opacity 0.2s ease;
}

/* Pre-reserve space for timestamps to prevent layout shifts */
#time-brazil,
#time-russia,
#time-india,
#time-china,
#time-southafrica,
#time-egypt,
#time-ethiopia,
#time-iran,
#time-uae,
#time-saudi,
#time-indonesia {
  display: inline-block;
  min-width: 5ch;
  text-align: center;
}

/* Flag optimizations for better performance */
.topbar__flags img {
  aspect-ratio: attr(width) / attr(height);
  loading: lazy;
  decoding: async;
}

/* Make all country flags the same size in Yorker Holidays Countries section */
.flag-container img {
  width: 180px !important;
  height: 120px !important;
  aspect-ratio: 3/2 !important;
}

@media (max-width: 768px) {
  .flag-container img {
    width: 160px !important;
    height: 100px !important;
  }
}

@media (max-width: 480px) {
  .flag-container img {
    width: 140px !important;
    height: 90px !important;
  }
}

/* Make all mini flags in the about section uniform size */
.mini-flag {
  width: 60px !important;
  height: 60px !important;
  overflow: hidden !important;
  border-radius: 50% !important;
  margin: 0 10px !important;
}

.mini-flag img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

@media (max-width: 768px) {
  .mini-flag {
    width: 50px !important;
    height: 50px !important;
  }
}

@media (max-width: 480px) {
  .mini-flag {
    width: 40px !important;
    height: 40px !important;
    margin: 0 5px !important;
  }
}

/* Improve flag rows layout in the about section */
.flags-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 15px !important;
  margin-bottom: 15px !important;
}

.country-flags {
  margin: 20px auto !important;
}

.flag-title {
  margin-bottom: 20px !important;
  font-weight: 600 !important;
  color: #162f6a !important;
  font-size: 1.1rem !important;
  text-align: center !important;
}

@media (max-width: 768px) {
  .flags-row {
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .flags-row {
    gap: 8px !important;
  }
}

/* Enhanced Topbar Styling */
.top-bar {
  background: rgb(44, 114, 194) !important;
  position: relative !important;
  overflow: hidden !important;
}

.top-bar::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgb(44, 114, 194) !important;
  opacity: 0.3 !important;
  z-index: 0 !important;
}

.top-bar>div {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 10px !important;
  transition: all 0.3s ease !important;
}


.top-bar img {
  width: 24px !important;
  height: 14px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.3s ease !important;
  object-fit: cover !important;

}

.top-bar>div:hover img {
  transform: scale(1.1) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

.top-bar span {
  font-family: 'Poppins', sans-serif;
  font-size: 14px !important;
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  font-weight: 500 !important;
  letter-spacing: 2px !important;
}

.top-bar>div:hover span {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

@media (min-width: 1200px) {
  .top-bar {
    padding: 5px 16px !important;
  }

  .top-bar>div {
    margin: 0 14px !important;
  }
}

@media (max-width: 1199px) {
  .top-bar {
    padding: 8px 12px !important;
  }

  .top-bar>div {
    margin: 0 8px !important;
  }

  .top-bar span {
    font-size: 13px !important;
  }
}

/* Add a responsive mobile version of the topbar */
@media (max-width: 992px) {
  .mobile-topbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    padding: 10px 0 !important;
    background: linear-gradient(90deg, #00295a, #0057a3, #004b8d) !important;
  }

  .mobile-topbar::-webkit-scrollbar {
    display: none !important;
  }

  .mobile-topbar>div {
    flex: 0 0 auto !important;
    margin: 0 8px !important;
  }

  .mobile-topbar img {
    width: 20px !important;
    height: 13px !important;
  }

  .mobile-topbar span {
    font-size: 12px !important;
  }
}

/* Specific topbar element styling */
.topbar-flag {
  width: 24px !important;
  height: 16px !important;
  border-radius: 3px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.3s ease !important;
  object-fit: cover !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.topbar-time {
  font-family: 'Poppins', sans-serif !important;
  font-size: 14px !important;
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px !important;
  min-width: 5ch !important;
  display: inline-block !important;
}

.topbar-item {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 10px !important;
  transition: all 0.3s ease !important;
  border-radius: 4px !important;
}


/* Additional improvements to achievements strip on mobile */
@media screen and (max-width: 767px) {
  .achievements-strip.yorker-stats-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 1.5rem !important;
    background-color: white !important;
    margin: 2rem 0 !important;
  }

  .achievement-item {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    gap: 1rem !important;
  }

  .achievement-icon {
    min-width: 2.5rem !important;
    height: 2.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .achievement-text {
    text-align: left !important;
    font-size: 0.95rem !important;
    width: auto !important;
    flex: 1 !important;
    display: block !important;
    white-space: normal !important;
    line-height: 1.4 !important;
  }
}

@media screen and (max-width: 480px) {
  .achievements-strip {
    padding: 1.25rem !important;
  }

  .achievement-item {
    gap: 0.75rem !important;
  }

  .achievement-icon {
    min-width: 2.25rem !important;
    height: 2.25rem !important;
  }

  .achievement-text {
    font-size: 0.9rem !important;
  }
}

/* Mobile-specific fixes for last updated date */
@media screen and (max-width: 767px) {
  .mobile-centered {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 15px auto !important;
    width: fit-content !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-left: 3px solid #007dc5 !important;
  }

  #refresh-icon {
    display: inline-block !important;
  }

  .last-updated {
    text-align: center !important;
    margin: 0 auto !important;
    width: fit-content !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 1.5rem !important;
    margin-bottom: 5px !important;
  }
}

/* Hero ring placement and compact sizing on mobile */
@media screen and (max-width: 767px) {
  .light-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 18px !important;
  }

  .light-hero-content {
    order: 1 !important;
    width: 100% !important;
  }

  .light-hero-image {
    order: 2 !important;
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    margin-top: 6px !important;
    margin-bottom: 0 !important;
  }

  .hero-globe-container {
    width: 300px !important;
    height: 300px !important;
  }

  .yorker-circular-animation {
    transform: translate(-50%, -50%) scale(0.72) !important;
    transform-origin: center center !important;
  }

  /* Show center logo closer/larger on mobile */
  .yorker-center-logo {
    width: 220px !important;
    height: 220px !important;
  }

  .yorker-center-logo img {
    width: 175px !important;
  }
}
