html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --jims-primary: #2c3e50;
  --jims-primary-dark: #1a252f;
  --jims-secondary: #3498db;
  --jims-accent: #e74c3c;
  --jims-success: #27ae60;
  --jims-danger: #e74c3c;
  --jims-light-bg: #ecf0f1;
  --jims-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --jims-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --jims-shadow-lg: 0 8px 24px rgba(44, 62, 80, 0.2);
}

body {
  margin: 0 0 30px 0;
  font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--jims-light-bg);
  color: #2c3e50;
}

/* Professional Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.5px;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }

.display-4 { font-family: 'Montserrat', sans-serif; font-weight: 800; }
.display-5 { font-family: 'Montserrat', sans-serif; font-weight: 700; }

/* Navigation Bar Styling */
.navbar {
  background: linear-gradient(135deg, var(--jims-primary) 0%, var(--jims-primary-dark) 100%) !important;
  box-shadow: var(--jims-shadow-md);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-family: 'Montserrat', sans-serif;
  color: white !important;
  padding: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.brand-tagline {
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.9;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 2px;
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: white !important;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

@media (min-width: 576px) {
  .navbar .navbar-nav {
    flex-wrap: wrap;
  }
}

/* Footer Styling */
.footer {
  background: #1a1a1a;
  color: #ecf0f1;
  margin-top: 2rem;
}

.footer h5, .footer h6 {
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: white;
  text-decoration: underline;
}

.footer ul li {
  margin-bottom: 0.25rem;
}

.footer .container-md {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.footer .bg-white-50 {
  background-color: rgba(255, 255, 255, 0.2) !important;
}

.footer-compact {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  width: 50%;
  max-width: 640px;
  min-width: 320px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.footer-links {
  font-size: 0.75rem;
}

.footer-title {
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.footer-list {
  font-size: 0.72rem;
  line-height: 1.4;
}

.footer-brand {
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

.footer-muted {
  font-size: 0.7rem;
  opacity: 0.75;
}

.footer-tagline,
.footer-emergency,
.footer-link {
  font-size: 0.72rem;
}

.footer-bottom {
  font-size: 0.7rem;
}

.footer-badge {
  font-size: 0.6rem;
  padding: 0.15rem 0.35rem;
}

/* Hide Coming Soon modal block if Bootstrap modal styles are not applied
   so it does not appear as tall content at the top of the page. */
#comingSoonModal {
  display: none !important;
}

/* Collapsible Footer */
.footer-collapsible {
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}

.footer-collapsible.show {
  display: block;
  max-height: 200px;
  opacity: 1;
  transition: max-height 0.4s ease-in, opacity 0.3s ease-in;
}

#footerToggle {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  margin-bottom: 0.2rem;
}

#footerToggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

#footerToggleIcon {
  display: inline-block;
  transition: transform 0.3s ease;
}

#footerToggleIcon.collapsed {
  transform: rotate(180deg);
}

/* Main Container - wide but not edge-to-edge */
.container {
  max-width: 1400px;
  width: 95%;
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 2.5rem;
  border-bottom: 3px solid #088395;
  padding-bottom: 1rem;
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.65rem 1.5rem;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--jims-primary) 0%, var(--jims-primary-dark) 100%);
  border: none;
  box-shadow: var(--jims-shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--jims-primary-dark) 0%, var(--jims-primary) 100%);
  transform: translateY(-2px);
  box-shadow: var(--jims-shadow-md);
}

.btn-outline-primary {
  color: var(--jims-primary);
  border: 2px solid var(--jims-primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--jims-primary);
  border-color: var(--jims-primary);
  color: white;
  transform: translateY(-2px);
}

.btn-light {
  background: white;
  color: var(--jims-primary);
  border: none;
  font-weight: 700;
}

.btn-light:hover {
  background: var(--jims-light-bg);
  color: var(--jims-primary-dark);
}

.btn-outline-light {
  border: 2px solid white;
  color: white;
}

.btn-outline-light:hover {
  background: white;
  color: var(--jims-primary);
}

/* Cards */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--jims-shadow-sm);
  transition: all 0.3s ease;
  margin-bottom: 2rem;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--jims-shadow-md);
}

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--jims-primary);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Forms */
.form-control, .form-select {
  border-radius: 5px;
  border: 1px solid #dee2e6;
  padding: 0.75rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: #20b2aa;
  box-shadow: 0 0 0 0.2rem rgba(32, 178, 170, 0.25);
}

.form-label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
  border-radius: 5px;
  border: none;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}


/* Feature Cards */
.feature-card {
  text-align: center;
  padding: 2rem;
  border-radius: 12px;
  background-color: white;
  box-shadow: var(--jims-shadow-sm);
  transition: all 0.3s ease;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--jims-shadow-lg);
}

.feature-card h5 {
  color: var(--jims-primary);
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 1rem;
  font-weight: 700;
}

.feature-card p {
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #3498db 100%);
  color: white;
  padding: 2rem 1.5rem 2.25rem 1.5rem;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.hero-section h1 {
  margin-top: 0;
}

/* Animated Ocean Background */
.ocean-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  overflow: hidden;
}

.wave {
  position: absolute;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    180deg,
    rgba(52, 152, 219, 0.8) 0%,
    rgba(41, 128, 185, 0.6) 50%,
    rgba(52, 152, 219, 0.4) 100%
  );
  border-radius: 45%;
  animation: wave-animation 25s infinite linear;
}

.wave:nth-child(2) {
  animation-duration: 20s;
  animation-direction: reverse;
  opacity: 0.6;
}

.wave:nth-child(3) {
  animation-duration: 30s;
  opacity: 0.4;
}

@keyframes wave-animation {
  0% {
    transform: translateX(-50%) translateY(-75%) rotate(0deg);
  }
  100% {
    transform: translateX(-50%) translateY(-75%) rotate(360deg);
  }
}

/* Bubbles Animation */
.bubble {
  position: absolute;
  bottom: -100px;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
  border-radius: 50%;
  opacity: 0.5;
  animation: rise 15s infinite ease-in;
}

.bubble:nth-child(1) {
  left: 10%;
  width: 30px;
  height: 30px;
  animation-delay: 0s;
  animation-duration: 12s;
}

.bubble:nth-child(2) {
  left: 20%;
  width: 20px;
  height: 20px;
  animation-delay: 2s;
  animation-duration: 14s;
}

.bubble:nth-child(3) {
  left: 35%;
  width: 35px;
  height: 35px;
  animation-delay: 4s;
  animation-duration: 16s;
}

.bubble:nth-child(4) {
  left: 50%;
  width: 25px;
  height: 25px;
  animation-delay: 0s;
  animation-duration: 13s;
}

.bubble:nth-child(5) {
  left: 65%;
  width: 30px;
  height: 30px;
  animation-delay: 1s;
  animation-duration: 15s;
}

.bubble:nth-child(6) {
  left: 80%;
  width: 35px;
  height: 35px;
  animation-delay: 3s;
  animation-duration: 17s;
}

.bubble:nth-child(7) {
  left: 90%;
  width: 20px;
  height: 20px;
  animation-delay: 5s;
  animation-duration: 11s;
}

@keyframes rise {
  0% {
    bottom: -100px;
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    bottom: 110%;
    opacity: 0;
  }
}

/* Side Vessels SVG Decorations */
.vessel-left, .vessel-right {
  position: absolute;
  width: 200px;
  height: 300px;
  opacity: 0.1;
  z-index: 1;
}

.vessel-left {
  left: -50px;
  top: 30%;
  animation: sway-left 8s ease-in-out infinite;
}

.vessel-right {
  right: -50px;
  top: 20%;
  animation: sway-right 10s ease-in-out infinite;
}

@keyframes sway-left {
  0%, 100% { transform: translateY(0px) rotate(-2deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes sway-right {
  0%, 100% { transform: translateY(0px) rotate(2deg); }
  50% { transform: translateY(-15px) rotate(-2deg); }
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(45deg, rgba(52, 152, 219, 0.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(52, 152, 219, 0.1) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(52, 152, 219, 0.1) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(52, 152, 219, 0.1) 75%);
  background-size: 60px 60px;
  background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
  pointer-events: none;
  opacity: 0.3;
}

/* Animated Ocean Waves */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to top, rgba(52, 152, 219, 0.3), transparent);
  animation: wave 10s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% {
    clip-path: polygon(
      0% 80%,
      10% 75%,
      20% 80%,
      30% 75%,
      40% 80%,
      50% 75%,
      60% 80%,
      70% 75%,
      80% 80%,
      90% 75%,
      100% 80%,
      100% 100%,
      0% 100%
    );
  }
  50% {
    clip-path: polygon(
      0% 75%,
      10% 80%,
      20% 75%,
      30% 80%,
      40% 75%,
      50% 80%,
      60% 75%,
      70% 80%,
      80% 75%,
      90% 80%,
      100% 75%,
      100% 100%,
      0% 100%
    );
  }
}

/* Floating Vessel Icons */
.floating-vessel {
  position: absolute;
  font-size: 2rem;
  opacity: 0.2;
  animation: float 20s ease-in-out infinite;
}

.floating-vessel:nth-child(1) {
  left: 5%;
  top: 20%;
  animation-delay: 0s;
}

.floating-vessel:nth-child(2) {
  right: 8%;
  top: 30%;
  animation-delay: 4s;
  font-size: 2.5rem;
}

.floating-vessel:nth-child(3) {
  left: 15%;
  bottom: 25%;
  animation-delay: 8s;
  font-size: 1.8rem;
}

.floating-vessel:nth-child(4) {
  right: 15%;
  bottom: 30%;
  animation-delay: 12s;
  font-size: 2.2rem;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  25% {
    transform: translateY(-20px) translateX(10px);
  }
  50% {
    transform: translateY(-10px) translateX(-10px);
  }
  75% {
    transform: translateY(-25px) translateX(5px);
  }
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  color: white;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.hero-section .hero-title {
  line-height: 1.1;
  text-wrap: balance;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
}

.hero-section .lead {
  color: white;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-section p {
  font-size: 1.1rem;
  line-height: 1.9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.95);
}

.hero-section .btn {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Text Styles */
.text-center {
  text-align: center;
}

.lead {
  font-size: 1.15rem;
  font-weight: 500;
  color: #495057;
  line-height: 1.8;
}

/* Spacing Utilities */
.mt-5 {
  margin-top: 3rem !important;
}

.mb-3 {
  margin-bottom: 1.5rem !important;
}

/* Links */
a {
  color: #0077be;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #20b2aa;
  text-decoration: underline;
}

/* Image Styles */
.hero-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.feature-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.service-icon {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: block;
}

.home-hero-image-wrapper {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--jims-shadow-lg);
  background-color: rgba(0, 0, 0, 0.2);
}

.home-hero-image {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

.hero-hotline {
  background: rgba(255, 255, 255, 0.96) !important;
  border: none !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12);
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .hero-image {
    height: 250px;
  }
  
  .feature-image {
    height: 150px;
  }

  .home-hero-image {
    max-height: 220px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}