/* Compatibility for existing front pages that still use Bootstrap-like utilities. */

.row {
  display: flex;
  flex-wrap: wrap;
  margin-inline: -0.75rem;
}

.row > [class*="col-"] {
  padding: 0.75rem;
  box-sizing: border-box;
  width: 100%;
}

@media (min-width: 48rem) {
  .col-md-6 { width: 50%; }
  .col-sm-6 { width: 50%; }
}

@media (min-width: 64rem) {
  .col-lg-4 { width: 33.333%; }
  .col-lg-5 { width: 41.666%; }
  .col-lg-6 { width: 50%; }
  .col-lg-7 { width: 58.333%; }
  .col-lg-8 { width: 66.666%; }
  .col-lg-12 { width: 100%; }
}

.d-flex { display: flex; }
.d-none { display: none; }
.d-block { display: block; }
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.img-fluid { max-width: 100%; height: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.p-3 { padding: 1rem; }
.gap-1 { gap: 0.25rem; }
.shadow-sm { box-shadow: var(--shadow-soft, 0 8px 24px rgba(0, 0, 0, 0.08)); }

.alert {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.alert-success { background: #e8f6ee; color: #146c43; }
.alert-danger { background: #fdecec; color: #9b1c1c; }

.form-control,
.input-field {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border, #d7dce5);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
}

.btn-outline-primary,
.btn-success,
.btn-sm {
  background: var(--color-primary, #254183);
  color: #fff;
}

.card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}

.legacy-page {
  padding-block: 5rem 3rem;
}

.legacy-page .back {
  margin-bottom: 1rem;
}

.legacy-page .back a {
  color: inherit;
  text-decoration: none;
}

.language-switcher__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.language-switcher__option.is-active {
  background: var(--color-background);
  color: var(--color-marine-navy);
}

.booking-grid > .booking-card,
.booking-grid > article {
  min-inline-size: 0;
  height: 100%;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.form-field {
  margin-bottom: 1rem;
}

.flex-wrap { flex-wrap: wrap; }
.mb-0 { margin-bottom: 0; }
.me-2 { margin-inline-end: 0.5rem; }
.text-muted { color: var(--color-text-secondary, #667085); }
.text-success { color: #146c43; }
.text-danger { color: #9b1c1c; }
.text-white { color: #fff; }
.w-100 { width: 100%; }

.btn-outline-success,
#time_slots label.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  margin: 0.25rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--color-primary, #254183);
  border-radius: 999px;
  background: #fff;
  color: var(--color-primary, #254183);
  cursor: pointer;
}

#time_slots label.btn-success,
.btn-success.text-white {
  background: var(--color-primary, #254183);
  color: #fff;
}

.yacht-booking-card,
.service-booking .booking-card,
.legacy-booking-card {
  padding: 0;
  border: 1px solid var(--color-border, #d7dce5);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: var(--shadow-sm, 0 8px 24px rgba(0, 0, 0, 0.06));
}

.trips-notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border, #d7dce5);
  border-radius: 1rem;
  background: #f7f9fc;
}

.yacht-gallery__grid,
.service-gallery__grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: clamp(9rem, 32vw, 12rem);
}

.yacht-gallery__item,
.service-gallery__item {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  min-inline-size: 0;
  min-block-size: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.yacht-gallery__item img,
.service-gallery__item img,
.yacht-gallery__item iframe,
.service-gallery__item iframe {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 1rem;
}

.yacht-gallery__item--main,
.service-gallery__item--main {
  grid-column: 1 / -1;
}

@media (min-width: 64rem) {
  .yacht-gallery__item--main,
  .service-gallery__item--main {
    grid-column: auto;
  }
}

.payment-result-page,
.legal-page,
.contact-page,
.about-page,
.category-listing-page,
.yacht-detail-page,
.mina-link-page {
  min-block-size: 50vh;
}

.table {
  width: 100%;
  max-inline-size: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  text-align: start;
  overflow-wrap: anywhere;
}

.table-responsive {
  width: 100%;
  max-inline-size: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

main:not(:has(.home-hero, .category-listing-page, .yacht-detail-page, .mina-link-page, .about-page, .contact-page, .legal-page, .yacht-result-page, .yacht-summary-page)) {
  padding-block: 1.5rem 3rem;
}

#login-form,
#register-form,
#forgotpassword-form,
form[id$="-form"] {
  max-width: 32rem;
  margin-inline: auto;
}

#loginHero,
#loginSecond,
section[id*="login"],
section[id*="register"] {
  padding-inline: 1.25rem;
}

#loginHero > img,
#loginSecond img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 1.25rem;
  margin-bottom: 1.5rem;
}

#login-form h2,
#loginSecond h2 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  margin-bottom: 0.75rem;
}

#login-form .input-field,
#login-form input[type="email"],
#login-form input[type="password"],
#login-form input[type="text"] {
  width: 100%;
  min-height: 2.75rem;
  margin-bottom: 0.85rem;
}

#login-form button,
#login-form .button,
#loginSecond button[type="submit"] {
  width: 100%;
}
