/* CSS Variables */
:root {
  /* Primary Colors */
  --primary-blue: #64b5f6;
  --primary-blue-dark: #42a5f5;
  --primary-blue-hover: #1e88e5;

  /* Background Colors */
  --bg-dark: #0a0e1a;
  --bg-navy: #1a237e;
  --bg-deep-blue: #0d47a1;
  --card-bg: rgba(26, 35, 60, 0.95);
  --card-bg-light: rgba(255, 255, 255, 0.15);

  /* Text Colors */
  --text-white: #ffffff;
  --text-light: rgba(255, 255, 255, 0.9);
  --text-medium: rgba(255, 255, 255, 0.7);
  --text-dim: rgba(255, 255, 255, 0.5);

  /* Border Colors */
  --border-blue: rgba(100, 181, 246, 0.2);
  --border-blue-light: rgba(100, 181, 246, 0.4);
  --border-white: rgba(255, 255, 255, 0.1);
  --border-white-medium: rgba(255, 255, 255, 0.15);

  /* Shadow Colors */
  --shadow-blue: rgba(100, 181, 246, 0.2);
  --shadow-dark: rgba(0, 0, 0, 0.3);

  /* Accent Colors */
  --accent-yellow: #ffc107;
  --accent-yellow-bg: rgba(255, 193, 7, 0.15);
  --accent-yellow-border: rgba(255, 193, 7, 0.3);

  /* Overlay Colors */
  --overlay-dark: rgba(10, 14, 26, 0.9);
  --overlay-darker: rgba(10, 14, 26, 0.95);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: white;
  overflow-x: hidden;
}

/* Animated ocean background */
.ocean-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
      #0a0e1a 0%,
      #1a237e 25%,
      #0d47a1 50%,
      #01579b 75%,
      #006064 100%);
  z-index: -2;
}

.waves {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V7.23C0,65.52,268.63,112.77,600,112.77S1200,65.52,1200,7.23V0Z' fill='%23ffffff0a'/%3E%3C/svg%3E") repeat-x;
  animation: wave 8s ease-in-out infinite;
  z-index: -1;
}

@keyframes wave {

  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(-50px);
  }
}

/* Navigation */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 0;
  backdrop-filter: blur(20px);
  background: var(--overlay-dark);
  border-bottom: 1px solid var(--border-white);
  z-index: 1000;
  transition: all 0.3s ease;
}

.site-header .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.3s ease;
  margin-left: 1rem;
  margin-right: 1rem;
}

.brand:hover {
  color: #4fc3f7;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.desktop-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.desktop-nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
}

.desktop-nav a:hover {
  color: white;
  background: var(--border-blue);
  backdrop-filter: blur(10px);
}

.desktop-nav a i {
  font-size: 0.8rem;
  opacity: 0.8;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: var(--border-white);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-white);
  flex-direction: column;
  padding: 1rem 0;
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s ease;
}

.cta-container .pro-cta-btn {
  margin-top: 0;
}

.pro-cta-hero {
  font-size: 1.1rem;
}

.pro-search-actions,
.pro-search-more {
  display: flex;
  justify-content: flex-end;
}

.pro-search-actions {
  margin: 0.5rem 0 1.25rem;
}

.pro-search-more {
  margin: 1.5rem 0 0;
}

.pro-search-more .pro-cta-btn {
  padding: 0.6rem 1.4rem;
}

.mobile-nav.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav a,
.mobile-nav button {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 1rem 2rem !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center;
  gap: 0.75rem !important;
  font-weight: 500;
  transition: all 0.3s ease;
  border-left: 3px solid transparent !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  box-sizing: border-box;
}

.mobile-nav a:hover,
.mobile-nav button:hover {
  color: white;
  background: rgba(100, 181, 246, 0.1);
  border-left-color: var(--primary-blue) !important;
}

.mobile-nav a i,
.mobile-nav button i {
  width: 20px;
  text-align: center;
}

/* Specific color overrides for special buttons */
.mobile-nav .mobile-alerts-btn {
  color: #facc15 !important;
  font-weight: 700;
}

.mobile-nav .mobile-alerts-btn:hover {
  color: #facc15 !important;
  border-left-color: #facc15 !important;
}

.mobile-nav .mobile-logout-btn {
  color: #ff6b6b !important;
  font-weight: 700;
}

.mobile-nav .mobile-logout-btn:hover {
  color: #ff6b6b !important;
  border-left-color: #ff6b6b !important;
}

/* Content wrapper */
.content {
  position: relative;
  z-index: 1;
}

/* Floating particles */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: var(--border-blue-light);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }

  50% {
    opacity: 1;
    transform: translateY(-20px) rotate(180deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .site-header .inner {
    padding: 0 1rem;
  }

  /* Hide user icon on mobile - hamburger menu shows email/settings/logout */
  .user-area {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 1.3rem;
  }

  .brand-logo {
    width: 28px;
    height: 28px;
  }
}


/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 0 2rem;
  margin-top: 80px;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff, var(--primary-blue), #4fc3f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.cta-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}


.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  color: white;
  box-shadow: 0 8px 32px rgba(100, 181, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--border-blue-light);
}

.btn-secondary {
  background: var(--border-white);
  color: white;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Planning Cards */
.planning-section {
  padding: 8rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}


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

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-medium);
  max-width: 600px;
  margin: 0 auto;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 6rem;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-white);
  border-radius: 20px;
  padding: 2rem;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(100, 181, 246, 0.3);
  box-shadow: 0 20px 40px var(--border-blue);
}

.card-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  border: 3px solid var(--border-blue-light);
  box-shadow: 0 4px 12px var(--border-blue);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-description {
  color: var(--text-medium);
  line-height: 1.6;
}

/* Features Section */
.features-section {
  padding: 6rem 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-white);
}

.features-container {
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.feature {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: var(--border-blue);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  flex-shrink: 0;
}

.feature-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: white;
}

.feature-content p {
  color: var(--text-medium);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 0 1rem;
  }

  .cta-container {
    flex-direction: column;
    align-items: center;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}



/* Form Panel Styles */
.panel {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-white);
  border-radius: 20px;
  padding: 3rem;
  margin: 8rem auto 4rem;
  max-width: 800px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
}

.panel h2 {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: center;
  justify-content: center;
}

.panel h2 i {
  color: var(--primary-blue);
  font-size: 1.8rem;
}

/* Search Form Styles */
.search-form-container {
  max-width: 800px;
  margin: 4rem auto 2rem;
  padding: 2rem;
}

.search-form-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid var(--border-blue);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
}

.search-form-header {
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-white);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.search-form-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--border-blue-light);
  box-shadow: 0 4px 12px var(--border-blue);
}

.search-form-header h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  color: #ffffff;
  font-family: 'Playfair Display', serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.search-form-header p {
  color: var(--text-medium);
  line-height: 1.6;
  margin: 0;
  font-size: 1.05rem;
}

.search-form-section {
  margin-bottom: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-white);
}

form .search-form-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.search-form-section:last-of-type {
  margin-bottom: 2rem;
}

.search-form-section h3 {
  font-size: 1.3rem;
  color: var(--primary-blue);
  margin: 0 0 1rem 0;
  font-family: 'Playfair Display', serif;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .search-form-container {
    padding: 1rem;
  }

  .search-form-card {
    padding: 1.5rem;
  }

  .search-form-header h2 {
    font-size: 1.5rem;
  }
}

/* Builder Styles */
.builder-container {
  max-width: 1400px;
  margin: 4rem auto 2rem;
  padding: 2rem;
}

.builder-header {
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-white);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.builder-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--border-blue-light);
  box-shadow: 0 4px 12px var(--border-blue);
}

.builder-header h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  color: #ffffff;
  font-family: 'Playfair Display', serif;
}

.builder-header p {
  color: var(--text-medium);
  line-height: 1.6;
  margin: 0;
  font-size: 1.05rem;
}

.builder-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid var(--border-blue);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  margin-bottom: 2rem;
  position: relative;
}

/* First builder-card needs higher z-index so dropdown appears above subsequent cards */
.builder-card:first-of-type {
  z-index: 10;
}

.builder-card:not(:first-of-type) {
  z-index: 1;
}

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

.card-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary-blue);
  font-family: 'Playfair Display', serif;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-white);
  margin-bottom: 1.5rem;
}

.section-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--primary-blue);
  font-family: 'Playfair Display', serif;
}

.available-sailings-section {
  margin-bottom: 1.5rem;
}

.chain-section {
  /* No additional styling needed */
}

/* Override table font sizes for Available Sailings and Your Chain */
#available-sailings-table th,
#available-sailings-table td,
#chain-table th,
#chain-table td {
  font-size: 1.0em;
}

#available-sailings-table .meta-text,
#chain-table .meta-text {
  font-size: 0.9em;
}

#chain-total .total-stats {
  font-size: 1.0em;
}

/* Port names with dates below */
#available-sailings-table td,
#chain-table td {
  vertical-align: top;
  padding: 0.75rem 1rem;
}

#available-sailings-table td > div,
#chain-table td > div {
  line-height: 1.4;
}

#available-sailings-table .meta-text,
#chain-table .meta-text {
  margin-top: 0.25rem;
  color: var(--text-medium);
}

/* Layover styling for chain table - match search results */
.layover-row .layover-cell {
  padding: 0.5rem 0;
  text-align: center;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.layover-row .layover-segment {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0;
}

.layover-row .layover-info {
  background: var(--accent-yellow-bg);
  border: 1px solid var(--accent-yellow-border);
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.layover-row .layover-info i {
  color: var(--accent-yellow);
}

/* Layover control styling for all screen sizes */
.layover-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  background: none;
  padding: 0;
  border-radius: 0;
  border: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.layover-control .layover-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.layover-control input {
  width: 70px;
  padding: 0.4rem;
  text-align: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Section header layout for all screens */
.available-sailings-section .section-header,
.chain-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Builder mobile styles */
@media (max-width: 768px) {
  .builder-container {
    padding: 1rem;
    margin: 2rem auto 2rem;
  }

  .builder-header {
    padding: 1.5rem;
  }

  .builder-header h2 {
    font-size: 1.5rem;
  }

  .builder-card {
    padding: 1.5rem;
  }

  .available-sailings-section {
    margin-bottom: 1rem;
  }

  .available-sailings-section .section-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Form Styles */
.form-narrow {
  max-width: 100%;
}

.grid-single {
  display: grid;
  gap: 1.5rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-light);
  font-size: 0.95rem;
}

select,
input[type="number"],
input[type="email"],
input[type="date"] {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

select:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="date"]:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px var(--border-blue);
}

select:hover,
input[type="number"]:hover,
input[type="email"]:hover,
input[type="date"]:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

select option {
  background: #1a237e;
  color: white;
  padding: 0.5rem;
}

/* Checkbox styling */
.checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 0.75rem !important;
  cursor: pointer;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-white);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.checkbox:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary-blue);
}

.checkbox span {
  margin: 0;
  font-size: 0.95rem;
}

/* Button styling */
.btn-center {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.btn {
  padding: 1.2rem 3rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(100, 181, 246, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--border-blue-light);
  background: linear-gradient(135deg, var(--primary-blue-dark), #2196f3);
}

.btn:active {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .panel {
    margin: 6rem 0 2rem;
    padding: 1.5rem 1rem;
  }

  .panel h2 {
    font-size: 1.6rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .login-container {
    padding: 1rem 0.75rem;
  }
}

/* Loading state */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: 0 8px 32px rgba(100, 181, 246, 0.3);
}

/* Form validation styling */
select:invalid,
input:invalid {
  border-color: rgba(244, 67, 54, 0.5);
}

select:valid,
input:valid {
  border-color: rgba(76, 175, 80, 0.3);
}

/* Enhanced Form Design */
.form-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-section {
  margin-bottom: 2rem;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-blue);
}

.form-section-header i {
  color: var(--primary-blue);
  font-size: 1.2rem;
}

.form-section-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

.form-field-icon {
  position: relative;
}

.form-field-icon > i.fa-anchor,
.form-field-icon > i.fa-flag-checkered,
.form-field-icon > i.fa-calendar-alt,
.form-field-icon > i.fa-calendar-check,
.form-field-icon > i.fa-clock,
.form-field-icon > i.fa-ship {
  position: absolute;
  left: 1rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 10;
}

/* Default position for icons (works with regular inputs and selects) */
.form-field-icon > i.fa-anchor,
.form-field-icon > i.fa-flag-checkered,
.form-field-icon > i.fa-calendar-alt,
.form-field-icon > i.fa-calendar-check,
.form-field-icon > i.fa-clock,
.form-field-icon > i.fa-ship {
  top: 2.65rem;
}

.form-field-icon select,
.form-field-icon input,
.form-field-icon .choices__inner {
  padding-left: 2.75rem !important;
}

.field-hint {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.field-hint i {
  font-size: 0.75rem;
  color: var(--primary-blue);
}

.form-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 181, 246, 0.3), transparent);
  margin: 2rem 0;
}

.form-col-span {
  grid-column: 1 / -1;
}

.form-highlight {
  background: rgba(100, 181, 246, 0.08);
  border: 1px solid rgba(100, 181, 246, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-highlight-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form-highlight-header i {
  color: var(--primary-blue);
  font-size: 1.4rem;
}

.form-highlight-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

.form-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  padding: 0 0.25rem;
}

@media (max-width: 768px) {
  .form-grid-2col {
    grid-template-columns: 1fr;
  }

  .form-col-span {
    grid-column: 1;
  }
}

/* Results Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

/* Results Header */
.results-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid var(--border-blue);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
}

.results-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-white);
}

.results-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--border-blue-light);
  box-shadow: 0 4px 12px var(--border-blue);
  object-fit: contain;
}

.results-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.note {
  background: rgba(100, 181, 246, 0.15);
  border: 1px solid rgba(100, 181, 246, 0.3);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  color: var(--text-light);
  font-size: 0.95rem;
  margin-top: 1rem;
  backdrop-filter: blur(10px);
}

/* Results Grid */
.results-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Result Card */
.result-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-blue);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.result-card:hover {
  background: rgba(26, 35, 60, 0.98);
  border-color: rgba(100, 181, 246, 0.3);
  box-shadow: 0 25px 80px var(--border-blue);
  transform: translateY(-5px);
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
}

/* Result Number Badge - Inline with title */
.result-number-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 36px;
  padding: 0 0.65rem;
  margin-right: 0.75rem;
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.9), rgba(66, 165, 245, 0.9));
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.result-card:hover .result-number-inline {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(100, 181, 246, 0.5);
}

/* Card Header */

.rank-badge {
  position: absolute;
  top: -1rem;
  right: -1rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 20px var(--border-blue-light);
}

.route-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.route-arrow {
  color: #4caf50;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  margin: 0 0.5rem;
}

.meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.meta-badge {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-white);
  border-radius: 25px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.meta-badge i {
  color: var(--primary-blue);
  font-size: 0.8rem;
}

.meta-badge.total {
  background: var(--border-blue);
  border-color: rgba(100, 181, 246, 0.3);
  color: #e5bf0c;
  font-weight: 600;
}

/* Segments */
.segments-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.segment {
  position: relative;
}

.leg-segment {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto auto auto auto;
  gap: 1rem;
  align-items: center;
  transition: all 0.3s ease;
}

.leg-segment:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.port-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.port-name {
  font-weight: 600;
  color: white;
  font-size: 0.95rem;
}

.port-date {
  font-size: 0.8rem;
  color: var(--text-medium);
}

.route-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.5rem;
}

.route-arrow-icon {
  color: #4caf50;
  font-size: 1.2rem;
}

.duration-badge {
  background: var(--border-blue);
  color: var(--primary-blue);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.cruise-line {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.price {
  font-size: 1rem;
  font-weight: 700;
  color: #4caf50;
  white-space: nowrap;
}

.view-btn {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.view-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(100, 181, 246, 0.3);
  background: linear-gradient(135deg, var(--primary-blue-dark), #2196f3);
}

/* Layover */
.layover-segment {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0;
}

.layover-info {
  background: var(--accent-yellow-bg);
  border: 1px solid var(--accent-yellow-border);
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.layover-info i {
  color: var(--accent-yellow);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(255, 255, 255, 0.6);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.3);
}

.empty-state div {
  font-size: 1.2rem;
  font-weight: 500;
}

/* Animations */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 0.6s ease forwards;
}

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

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 4rem 1rem 2rem;
  }

  .results-title h2 {
    font-size: 2rem;
  }

  .route-title {
    font-size: 1.3rem;
    text-align: center;
    justify-content: center;
  }

  .meta-info {
    justify-content: center;
  }

  .leg-segment {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }

  .route-visual {
    margin: 0;
  }

  .port-info {
    align-items: center;
  }

  .rank-badge {
    position: static;
    margin: 0 auto 1rem;
  }
}

@media (max-width: 480px) {
  .result-card {
    padding: 1.5rem;
  }

  .result-number-inline {
    min-width: 42px;
    height: 32px;
    padding: 0 0.55rem;
    margin-right: 0.5rem;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  .results-title {
    flex-direction: column;
    gap: 0.5rem;
  }

  .results-icon {
    width: 50px;
    height: 50px;
  }

  .results-title h2 {
    font-size: 1.8rem;
  }

  .meta-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Loading shimmer effect */
.result-card.loading {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.05) 25%,
      var(--border-white) 50%,
      rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

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

  100% {
    background-position: 200% 0;
  }
}

/* Pulse effect for new results */
.result-card.new {
  animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--border-blue-light);
  }

  70% {
    box-shadow: 0 0 0 20px rgba(100, 181, 246, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(100, 181, 246, 0);
  }
}

.reset-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 40px;
  padding: 0 1.5rem;
}

.reset-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.form-field label {
  font-weight: 500;
  color: var(--text-light);
  font-size: 0.9rem;
}

.form-field select,
.form-field input {
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  width: 100%;
}

.form-field select:focus,
.form-field input:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px var(--border-blue);
}

.form-field select option {
  background: #1a237e;
  color: white;
}

.field-error {
  border-color: #f87171 !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.35) !important;
  animation: field-error-intro 0.3s ease-out;
}

/* Enhanced error styling for Choices.js dropdowns */
.choices__inner.field-error {
  border-color: #f87171 !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.35) !important;
  background: rgba(248, 113, 113, 0.05) !important;
}

/* Pulse animation when user tries to submit with errors */
.field-error-pulse {
  animation: field-pulse 0.6s ease-in-out;
}

@keyframes field-pulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(248, 113, 113, 0.6);
  }
}

@keyframes field-error-intro {
  0% {
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.35);
  }
}

/* Inline error message below fields */
.field-error-message {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #f87171;
  font-size: 0.85rem;
  margin-top: 0.35rem;
  margin-bottom: -0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(248, 113, 113, 0.1);
  border-left: 3px solid #f87171;
  border-radius: 6px;
  animation: slide-down 0.3s ease-out;
}

.field-error-message i {
  font-size: 0.9rem;
}

/* Reduce space between choices dropdown and error message */
.form-field-icon .choices {
  margin-bottom: 0 !important;
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Shake animation for disabled button clicks */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.5s;
}

.layover-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  white-space: nowrap;
}

.layover-control label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.layover-control input,
.layover-control select {
  padding: 0.6rem;
  width: 120px;
  text-align: center;
}

/* NO TRUNCATION TABLES */
.table-section {
  height: 300px;
  overflow: auto;
  /* Both x and y scroll */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.no-truncate-table {
  width: auto;
  /* Let table grow to content */
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.no-truncate-table thead {
  background: rgba(26, 35, 60, 0.98);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.no-truncate-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--primary-blue);
  font-weight: 600;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border-white);
  white-space: nowrap;
}

.no-truncate-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  font-size: 0.75rem;
  white-space: nowrap;
  /* Don't break words, let table scroll */
}

.no-truncate-table tbody tr {
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Only show default cursor for non-clickable rows in chain table */
#chain-table tbody tr {
  cursor: default;
}

/* Show pointer cursor for clickable chain rows with CruiseDirect links */
#chain-table tbody tr.clickable {
  cursor: pointer;
}

.no-truncate-table tbody tr:hover {
  background: rgba(100, 181, 246, 0.1);
}



.price-cell {
  color: #4caf50;
  font-weight: 700;
}

.meta-text {
  color: var(--text-medium);
  font-size: 0.7rem;
}

.layover-row {
  background: rgba(255, 193, 7, 0.08);
  font-style: italic;
}

.layover-row td {
  color: rgba(255, 255, 255, 0.8);
  border-left: 3px solid var(--accent-yellow);
}

.back-btn-container {
  display: none;
  justify-content: center;
  margin-top: 1rem;
}

.back-btn-container.show {
  display: flex;
}

.back-btn {
  background: var(--border-white);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 40px;
  padding: 0 2rem;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.chain-total {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(100, 181, 246, 0.1);
  border: 1px solid var(--border-blue);
  border-radius: 12px;
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.85rem;
  text-align: center;
}

.total-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.loading-cell {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  padding: 2rem;
}

.map-container {
  height: 40vh;
  width: 100vw;
  border-top: 1px solid var(--border-white);
}

/* Desktop improvements */
@media (min-width: 768px) {
  .builder-container {
    padding: 6rem 2rem 2rem;
  }

  .builder-card {
    padding: 2rem;
  }

  .card-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .card-header h2 {
    font-size: 2rem;
    justify-content: flex-start;
  }

  .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .section-header {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .section-header h3 {
    font-size: 1.3rem;
  }

  .table-section {
    height: 350px;
  }

  .no-truncate-table {
    font-size: 0.85rem;
  }

  .no-truncate-table th {
    font-size: 0.8rem;
    padding: 1rem 0.75rem;
  }

  .no-truncate-table td {
    font-size: 0.8rem;
    padding: 1rem 0.75rem;
  }

  .chain-total {
    font-size: 0.9rem;
  }

  .total-stats {
    flex-direction: row;
    justify-content: space-between;
  }

  .map-container {
    height: 60vh;
    margin-left: -2rem;
    margin-right: -2rem;
  }
}

.table-section::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.table-section::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.table-section::-webkit-scrollbar-thumb {
  background: rgba(100, 181, 246, 0.5);
  border-radius: 3px;
}


/* Use Cases Section */
.use-cases-section {
  padding: 6rem 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-white);
}

.use-cases-container {
  max-width: 1200px;
  margin: 0 auto;
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.use-case {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-white);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.use-case:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(100, 181, 246, 0.3);
  box-shadow: 0 20px 40px rgba(100, 181, 246, 0.15);
}

.use-case::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
}

.question-mark {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
}

.use-case-question {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.use-case-answer {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.use-case-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.use-case-link:hover {
  color: #4fc3f7;
  transform: translateX(3px);
}

.use-case-link i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.use-case-link:hover i {
  transform: translateX(3px);
}

.use-cases-cta {
  text-align: center;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-white);
}

.use-cases-cta p {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .use-cases-section {
    padding: 4rem 1rem;
  }

  .use-cases-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .use-case {
    padding: 1.5rem;
  }

  .use-case-question {
    font-size: 1rem;
  }

  .use-cases-cta p {
    font-size: 1.1rem;
  }
}



/* Footer Styles - Add these to your header */
.site-footer {
  background: linear-gradient(135deg,
      rgba(10, 14, 26, 0.95) 0%,
      rgba(26, 35, 126, 0.9) 50%,
      rgba(13, 71, 161, 0.85) 100%);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-white);
  position: relative;
  overflow: hidden;
  margin-top: 4rem;
  animation: fadeInUp 0.8s ease-out;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  position: relative;
  z-index: 2;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand {
  max-width: 350px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.footer-brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
}

.footer-tagline {
  font-size: 1.1rem;
  font-weight: 600;
  color: #4fc3f7;
  margin-bottom: 0.75rem;
}

.footer-description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  font-size: 0.95rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.footer-section h4 {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  padding: 0.25rem 0;
}

.footer-section a:hover {
  color: var(--primary-blue);
  transform: translateX(3px);
}

.footer-section a i {
  font-size: 0.8rem;
  width: 16px;
  opacity: 0.8;
}

.footer-toggle {
  display: none;
  background: var(--border-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 auto 2rem;
  backdrop-filter: blur(10px);
  align-items: center;
  gap: 0.5rem;
}

.footer-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.footer-toggle i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-white);
}

.footer-copyright {
  color: var(--text-medium);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-sep {
  color: rgba(255, 255, 255, 0.4);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--border-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
  background: var(--border-blue);
  color: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(100, 181, 246, 0.3);
}

.footer-waves {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  overflow: hidden;
  line-height: 0;
}

.footer-waves svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
  transform: rotateY(180deg);
}

/* User area container */
.user-area {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* Searches remaining badge */
.searches-remaining {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: rgba(100, 181, 246, 0.1);
  border: 1px solid rgba(100, 181, 246, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64b5f6;
  cursor: help;
  transition: all 0.2s;
}

.searches-remaining:hover {
  background: rgba(100, 181, 246, 0.15);
  border-color: rgba(100, 181, 246, 0.5);
}

.searches-remaining i {
  font-size: 0.75rem;
}

.searches-remaining span {
  white-space: nowrap;
}

/* Topbar button (now a user icon, not the identicon) */
.avatar-btn {
  color: beige;
  border: 1px solid rgba(245, 245, 220, 0.521);
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
}

.topbar-user-icon {
  font-size: 18px;
  opacity: .95;
}

/* Dropdown */
.user-menu {
  position: absolute;
  top: 44px;
  right: 0;
  background: rgba(10, 14, 26, .98);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  min-width: 240px;
  padding: .5rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  display: none;
  z-index: 1000;
}

.user-menu.open {
  display: block;
}

/* Header row inside dropdown: JDenticon + email */
.menu-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.menu-identicon {
  border-radius: 9999px;
  overflow: hidden;
  flex: 0 0 auto;
}

.user-email {
  font-size: .92rem;
  opacity: .92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Desktop nav sign-in styling */
.desktop-nav .nav-signin {
  margin-left: auto;
  /* Push to the right if desired */
  background: var(--primary-color, #007bff);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.desktop-nav .nav-signin:hover {
  background: var(--primary-dark, #0056b3);
  color: white;
}

/* Mobile nav sign-in styling */
.mobile-nav .mobile-signin {
  background: var(--primary-color, #007bff);
  color: white;
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  display: block;
  transition: background-color 0.2s ease;
  margin-left: 1rem;
  margin-right: 1rem;
}

.mobile-nav .mobile-signin:hover {
  background: var(--primary-dark, #0056b3);
  color: white;
}

/* Mobile user info styling */
.mobile-user-info {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 0;
  margin-top: 0;
}

.mobile-user-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  margin-bottom: 0;
  background: rgba(255, 255, 255, .03);
  border-left: 3px solid transparent;
}

.mobile-user-email {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.mobile-logout-form {
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.mobile-identicon {
  border-radius: 50%;
}

/* Menu items */
.dropdown-item {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: .75rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, .06);
}

.dropdown-item.danger {
  color: #ff6b6b;
}

/* Divider before logout */
.user-menu form {
  border-top: 1px solid rgba(255, 255, 255, .08);
}

/* (Optional) visually-hidden utility for the button's accessible text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 1px, 1px);
  white-space: nowrap;
  border: 0;
}


/* Mobile responsiveness with collapse */
@media (max-width: 768px) {
  .footer-content {
    padding: 2rem 1rem 1.5rem;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 1rem;
    text-align: center;
  }

  .footer-brand {
    max-width: none;
    margin-bottom: 1rem;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-toggle {
    display: flex;
  }

  .footer-links {
    display: none;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  .footer-links.expanded {
    display: grid;
    opacity: 1;
    transform: translateY(0);
  }

  .footer-section a {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-copyright {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer-copyright {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-sep {
    display: none;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

/* Floating logo animation */
.hero-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 2rem;
  animation: floatOnWater 4s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(100, 181, 246, 0.3));
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes floatOnWater {
  0% {
    transform: translateY(0px) rotate(-2deg);
  }

  25% {
    transform: translateY(-8px) rotate(10deg);
  }

  50% {
    transform: translateY(-4px) rotate(-1deg);
  }

  75% {
    transform: translateY(-12px) rotate(1.5deg);
  }

  100% {
    transform: translateY(0px) rotate(-2deg);
  }
}

/* Responsive logo sizing */
@media (max-width: 768px) {
  .hero-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
  }
}

/* Mobile responsive styles for search result cards */
@media (max-width: 768px) {
  .result-card .card-header {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }

  .result-card .route-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .result-card .route-port {
    display: block;
    width: 100%;
  }

  .result-card .route-arrow {
    display: block;
    width: 100%;
    text-align: center;
    margin: 0.5rem 0;
    font-size: 1.5rem;
  }

  .result-card .meta-info {
    margin-top: 0;
    width: 100%;
  }
}

/* ===== Choices.js Custom Styling ===== */
/* Override Choices.js default styles to match our form inputs */

.choices {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.25;
}

/* Ensure dropdown is closed by default */
.choices__list--dropdown {
  display: none;
}

.choices.is-open .choices__list--dropdown {
  display: block;
}

.choices__inner {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px !important;
  padding: 1rem !important;
  min-height: 0 !important;
  font-size: 1rem !important;
  color: white !important;
  transition: all 0.3s ease;
  display: flex !important;
  align-items: center !important;
}

/* Match build page input styling */
.form-field .choices {
  width: 100%;
  position: relative;
  z-index: 1000;
}

.form-field .choices__inner {
  padding: 0.8rem !important;
  font-size: 0.9rem !important;
  /* Don't override display/align-items - inherit from base .choices__inner */
}

.choices__inner:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
  border-color: var(--primary-blue) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 0 0 3px var(--border-blue) !important;
}

.choices__list--single {
  padding: 0 !important;
}

.choices__placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
  opacity: 1 !important;
}

.choices[data-type*="select-one"] .choices__input {
  background: transparent !important;
  border: none !important;
  color: white !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

.choices__list--single .choices__item {
  color: white !important;
  line-height: 1.25 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
}

/* Dropdown menu */
.choices__list--dropdown {
  background: rgba(26, 35, 126, 0.98) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(20px);
  margin-top: 0.5rem !important;
  z-index: 1001 !important;
}

.choices__list--dropdown .choices__item {
  color: rgba(255, 255, 255, 0.9) !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.95rem !important;
  transition: all 0.2s ease;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
  background: rgba(100, 181, 246, 0.2) !important;
  color: white !important;
}

.choices__list--dropdown .choices__item--selectable:hover {
  background: rgba(100, 181, 246, 0.15) !important;
}

/* Search input inside dropdown */
.choices__input--cloned {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px !important;
  color: white !important;
  padding: 0.5rem 0.75rem !important;
  margin: 0.5rem !important;
  font-size: 0.95rem !important;
}

.choices__input--cloned::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

.choices__input--cloned:focus {
  border-color: var(--primary-blue) !important;
  outline: none !important;
}

/* Remove default button styling */
.choices__button {
  background: transparent !important;
  border: none !important;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  margin-left: 0.5rem !important;
}

.choices__button:hover {
  opacity: 1;
}

/* "No results found" message */
.choices__item--choice.has-no-results {
  color: rgba(255, 255, 255, 0.6) !important;
  font-style: italic;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .choices__list--dropdown {
    max-height: 250px !important;
  }

  .choices__list--dropdown .choices__item {
    padding: 1rem !important;
  }
}

/* ===== Tippy.js Custom Tooltip Theme ===== */
.tippy-box[data-theme~='cruise-hopper'] {
  background-color: rgba(26, 35, 126, 0.98);
  border: 1px solid rgba(100, 181, 246, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 0.5rem 0.75rem;
}

.tippy-box[data-theme~='cruise-hopper'][data-placement^='top'] > .tippy-arrow::before {
  border-top-color: rgba(26, 35, 126, 0.98);
}

.tippy-box[data-theme~='cruise-hopper'][data-placement^='bottom'] > .tippy-arrow::before {
  border-bottom-color: rgba(26, 35, 126, 0.98);
}

.tippy-box[data-theme~='cruise-hopper'][data-placement^='left'] > .tippy-arrow::before {
  border-left-color: rgba(26, 35, 126, 0.98);
}

.tippy-box[data-theme~='cruise-hopper'][data-placement^='right'] > .tippy-arrow::before {
  border-right-color: rgba(26, 35, 126, 0.98);
}

.tippy-box[data-theme~='cruise-hopper'] > .tippy-content {
  color: rgba(255, 255, 255, 0.95);
}
