html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.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%;
}

body {
  margin-bottom: 60px;
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(231, 241, 249, 0.65), transparent 55%),
    linear-gradient(180deg, #f6f8fb 0%, #f8fafc 55%, #f4f7fa 100%);
  color: #1b2a3a;
}

h1, h2, h3, .navbar-brand {
  font-family: "Cormorant Garamond", Georgia, serif;
}

h1, h2, h3 {
  letter-spacing: 0.01em;
}

p {
  line-height: 1.6;
}

:root {
  --brand-blue: #0a3b66;
  --brand-blue-2: #0f5a91;
  --brand-gold: #c7a76a;
  --brand-sand: #f2ede4;
  --brand-ink: #0c2033;
  --brand-mist: #e9f1f7;
  --brand-ocean: #0a4b7a;
  --brand-sky: #3aa3d4;
  --surface: #ffffff;
  --surface-muted: #f4f7fb;
  --text-muted: rgba(27, 42, 58, 0.7);
  --shadow-soft: 0 12px 28px rgba(9, 33, 58, 0.12);
  --shadow-strong: 0 24px 48px rgba(7, 26, 45, 0.2);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

.bg-brand {
  background: linear-gradient(110deg, var(--brand-ocean), #0f5a91 55%, var(--brand-sky));
}

.navbar {
  box-shadow: 0 10px 22px rgba(5, 25, 40, 0.2);
  backdrop-filter: blur(12px);
}

.navbar .nav-link {
  font-weight: 500;
  letter-spacing: 0.01em;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #fff;
  opacity: 0.9;
}

.navbar-brand .brand-logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.hero {
  background: linear-gradient(135deg, rgba(10, 59, 102, 0.94), rgba(15, 90, 145, 0.9));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  box-shadow: var(--shadow-strong);
}

.hero.hero--image {
  background:
    linear-gradient(135deg, rgba(10, 59, 102, 0.88), rgba(15, 90, 145, 0.82)),
    url("/assets/branding/bluesea-hero.jpg");
  background-size: cover;
  background-position: center;
}

.hero .btn-primary {
  background-color: var(--brand-gold);
  border-color: var(--brand-gold);
  color: #0a2a45;
  font-weight: 600;
}

.card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 90, 145, 0.12);
  background: var(--surface);
}

.card-img-top {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  object-fit: cover;
  height: 180px;
}

.btn-primary {
  background-color: var(--brand-blue-2);
  border-color: var(--brand-blue-2);
}

.btn {
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.2rem;
  font-weight: 600;
}

.btn-sm {
  padding: 0.3rem 0.85rem;
}

.btn-outline-primary {
  border-color: rgba(15, 90, 145, 0.6);
  color: var(--brand-blue-2);
}

.btn-outline-primary:hover {
  background: var(--brand-blue-2);
  border-color: var(--brand-blue-2);
}

.badge {
  border-radius: var(--radius-pill);
  letter-spacing: 0.03em;
}

.subevent-thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(10, 59, 102, 0.2);
}

.page-hero {
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, #f0f6fb, #ffffff);
  border: 1px solid rgba(15, 90, 145, 0.12);
  margin-bottom: 24px;
}

.page-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: rgba(15, 90, 145, 0.75);
  font-weight: 600;
}

.event-card .card-body {
  min-height: 160px;
}

.event-card .card-title {
  font-weight: 600;
}

.event-card .card-text {
  color: var(--text-muted);
}

.event-card__meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.event-card__meta span {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--brand-mist);
  color: rgba(10, 59, 102, 0.85);
  font-size: 0.75rem;
}

.event-hero {
  border-radius: 22px;
  padding: 48px 40px;
  color: #fff;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-strong);
  margin-bottom: 32px;
}

.event-hero--no-image {
  background: linear-gradient(135deg, #0a3b66, #0f5a91);
}

.event-hero__content {
  max-width: 640px;
}

.event-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  opacity: 0.85;
  margin-bottom: 12px;
}

.event-hero__meta {
  display: flex;
  gap: 16px;
  font-size: 0.95rem;
  opacity: 0.9;
  flex-wrap: wrap;
}

.event-hero__meta span {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
}

.subevent-grid {
  display: grid;
  gap: 20px;
}

.subevent-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(15, 90, 145, 0.12);
  box-shadow: 0 10px 20px rgba(9, 33, 58, 0.08);
}

.subevent-card__media {
  position: relative;
  background: #e3edf6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-right: 1px solid rgba(15, 90, 145, 0.12);
}

.subevent-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.subevent-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #cfe0ee, #e7eff6);
}

.subevent-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(12, 32, 51, 0.05), rgba(12, 32, 51, 0.18));
  pointer-events: none;
}

.subevent-card__type {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(10, 59, 102, 0.85);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.subevent-card__body {
  padding: 20px 22px;
  display: grid;
  gap: 12px;
}

.subevent-card__title {
  font-weight: 600;
  font-size: 1.05rem;
}

.subevent-card__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.subevent-card__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(27, 42, 58, 0.7);
}

.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: rgba(15, 90, 145, 0.7);
  margin-bottom: 4px;
}

.subevent-card__action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.subevent-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.subevent-form .form-control-sm {
  min-width: 180px;
}

.subevent-card.is-past {
  opacity: 0.65;
  filter: grayscale(0.1);
}

.subevent-days {
  display: grid;
  gap: 16px;
}

.subevent-days__tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.subevent-days__tab {
  border: 1px solid rgba(15, 90, 145, 0.2);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  background: #fff;
  color: var(--brand-blue);
  font-weight: 600;
}

.subevent-days__tab.is-active {
  background: var(--brand-blue-2);
  color: #fff;
  border-color: var(--brand-blue-2);
}

.event-sidebar {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid rgba(15, 90, 145, 0.12);
  box-shadow: 0 10px 24px rgba(9, 33, 58, 0.08);
}

.event-sidebar__title {
  font-weight: 600;
  margin-bottom: 12px;
}

.event-sidebar__item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 90, 145, 0.1);
  font-size: 0.9rem;
}

.event-sidebar__item:last-child {
  border-bottom: none;
}

.stack-table {
  width: 100%;
}

.stack-table td,
.stack-table th {
  vertical-align: middle;
}

.form-control,
.form-select {
  border-radius: var(--radius-md);
  border-color: rgba(15, 90, 145, 0.2);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(15, 90, 145, 0.6);
  box-shadow: 0 0 0 0.15rem rgba(15, 90, 145, 0.2);
}

.footer {
  background: #ffffff;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  height: 24px;
  filter: brightness(0) saturate(100%) invert(13%) sepia(35%) saturate(1264%) hue-rotate(182deg) brightness(93%) contrast(96%);
}

.footer-brand span {
  font-weight: 600;
  color: rgba(12, 32, 51, 0.75);
}

.modal-brand {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(15, 90, 145, 0.2);
  box-shadow: 0 20px 40px rgba(8, 28, 48, 0.2);
}

.modal-brand .modal-header {
  border-bottom: none;
  padding: 18px 22px;
}

.modal-brand .modal-body {
  font-size: 1rem;
  padding: 20px 22px;
  color: #0c2033;
}

.modal-brand .modal-footer {
  border-top: 1px solid rgba(15, 90, 145, 0.12);
  padding: 14px 22px 20px;
}

.modal-brand__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65rem;
  opacity: 0.85;
  margin-bottom: 4px;
}

.modal-title-wrap {
  display: grid;
  gap: 4px;
}

.modal-status {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.modal-status__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  background: rgba(12, 32, 51, 0.1);
  color: #0c2033;
}

.modal-status__title {
  font-weight: 600;
  margin-bottom: 4px;
}

.modal-status__text {
  color: rgba(12, 32, 51, 0.75);
}

@media (max-width: 991px) {
  .subevent-card {
    grid-template-columns: 1fr;
  }

  .subevent-card__media {
    height: 180px;
  }

  .subevent-card__meta {
    grid-template-columns: 1fr;
  }

  .event-hero {
    padding: 32px 24px;
  }
}

@media (max-width: 767px) {
  .page-hero {
    border-radius: var(--radius-md);
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .navbar-collapse {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(10, 59, 102, 0.98);
    box-shadow: 0 12px 24px rgba(8, 28, 48, 0.3);
  }

  .navbar .navbar-nav {
    gap: 6px;
  }

  .navbar .nav-link {
    display: block;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
  }

  .navbar .nav-link:hover,
  .navbar .nav-link:focus {
    background: rgba(255, 255, 255, 0.18);
  }

  .navbar-brand .brand-logo {
    height: 30px;
  }

  .hero {
    padding: 32px 22px;
  }

  .page-hero {
    padding: 20px 18px;
  }

  .card-img-top {
    height: 150px;
  }

  .event-hero__meta span {
    display: inline-flex;
  }

  .event-card .card-body {
    min-height: auto;
  }

  .event-sidebar {
    margin-top: 16px;
  }

  .table {
    font-size: 0.85rem;
  }

  .stack-table thead {
    display: none;
  }

  .stack-table tbody tr {
    display: block;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid rgba(15, 90, 145, 0.15);
    box-shadow: 0 8px 16px rgba(9, 33, 58, 0.08);
  }

  .stack-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border: none;
  }

  .stack-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: rgba(15, 90, 145, 0.8);
    margin-right: 12px;
  }

  .stack-table tbody td.text-end {
    justify-content: flex-start;
  }

  .subevent-form {
    justify-content: flex-start;
  }

  .subevent-form .form-control-sm {
    min-width: 100%;
  }

  .subevent-days__tab {
    width: 100%;
    text-align: left;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 575px) {
  .hero {
    padding: 24px 18px;
    border-radius: 14px;
  }

  .event-hero {
    padding: 28px 20px;
    border-radius: 16px;
  }

  .event-hero__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .subevent-form {
    gap: 10px;
  }

  .subevent-form .btn,
  .subevent-form .form-control-sm {
    width: 100%;
  }
}
