/* ========================================
   Barren River Marinas — Styles
   Adapted from Bright Sky Campgrounds pattern
   ======================================== */

/* ---------- Color Palette ---------- */
:root {
  --navy:         #103242;
  --navy-dark:    #0a2230;
  --teal:         #3A9BBF;
  --teal-dark:    #2E839F;
  --teal-light:   #65B2C6;
  --light-blue:   #B8DDE6;
  --sky:          #E8F4F8;
  --sand:         #D4C4A0;
  --sand-light:   #E8DCC8;
  --amber:        #D4943A;
  --amber-dark:   #B87D2E;
  --white:        #FFFFFF;
  --off-white:    #F7FAFC;
  --text-dark:    #1a2a33;
  --text-body:    #4A5568;
  --gray-100:     #f8f9fa;
  --gray-300:     #dee2e6;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', 'Open Sans', 'Segoe UI', sans-serif;
  color: var(--text-body);
  background-color: var(--off-white);
  line-height: 1.7;
}

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', 'Lora', 'Georgia', serif;
  color: var(--text-dark);
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--navy);
}

/* ---------- Utility ---------- */
.text-accent { color: var(--teal) !important; }
.text-navy { color: var(--navy) !important; }
.bg-light-section { background-color: var(--sky); }

.section-padding {
  padding: 5rem 0;
}

.section-title {
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--navy);
}

.section-lead {
  font-size: 1.125rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-body);
}

/* ---------- CTA Button (Amber accent) ---------- */
.btn-cta {
  background-color: var(--amber);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  font-family: 'Inter', 'Open Sans', sans-serif;
  transition: background-color 0.25s, transform 0.15s, box-shadow 0.25s;
  box-shadow: 0 2px 8px rgba(212, 148, 58, 0.3);
}
.btn-cta:hover,
.btn-cta:focus {
  background-color: var(--amber-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(212, 148, 58, 0.4);
}

.btn-outline-cta {
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 6px;
  padding: 0.5rem 1.3rem;
  font-weight: 600;
  font-family: 'Inter', 'Open Sans', sans-serif;
  background: transparent;
  transition: all 0.25s;
}
.btn-outline-cta:hover {
  background-color: var(--navy);
  color: var(--white);
}

/* ---------- Navbar ---------- */
#mainNav {
  background-color: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.35s;
  padding: 0.75rem 0;
}

#mainNav .navbar-brand img {
  height: 60px;
  transition: filter 0.3s;
}

#mainNav .nav-link {
  font-family: 'Inter', 'Open Sans', sans-serif;
  font-weight: 500;
  color: var(--text-dark);
  padding: 0.5rem 1rem;
  transition: color 0.2s;
}
#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  color: var(--teal);
}

#mainNav .navbar-toggler {
  border-color: rgba(0, 0, 0, 0.2);
}

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 34, 48, 0.7) 0%,
    rgba(16, 50, 66, 0.5) 60%,
    rgba(16, 50, 66, 0.65) 100%
  );
}
.hero-title {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  max-width: 600px;
  opacity: 0.95;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* ---------- About / Value Props ---------- */
.value-prop {
  padding: 1.5rem 1rem;
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.value-prop:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.value-prop i {
  color: var(--teal);
}
.value-prop h5 {
  color: var(--navy);
}
.value-prop p {
  font-size: 0.95rem;
}

/* ---------- Marina Cards ---------- */
.marina-card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border-left: 4px solid var(--teal);
}

.marina-card .marina-img-wrap {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-blue);
  background-size: cover;
  background-position: center;
  padding: 2rem;
  position: relative;
}

.marina-badge {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.marina-name {
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.marina-location {
  color: var(--teal);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.marina-list {
  list-style: none;
  padding-left: 0;
  font-size: 0.9rem;
}
.marina-list li {
  padding: 0.15rem 0;
}
.marina-list li::before {
  content: "\f058"; /* fa-check-circle */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 0.4rem;
  color: var(--teal);
  font-size: 0.85rem;
}

/* ---------- Section Divider Accent ---------- */
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, var(--teal), var(--amber));
  margin-top: 0.5rem;
}

.text-center .section-title::after {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- FAQ ---------- */
.accordion-item {
  border: none;
  border-bottom: 1px solid var(--gray-300);
  background-color: transparent;
}
.accordion-button {
  font-family: 'Playfair Display', 'Lora', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-dark);
  background-color: transparent;
  padding: 1.25rem 0;
  box-shadow: none;
}
.accordion-button:not(.collapsed) {
  color: var(--teal);
  background-color: transparent;
  box-shadow: none;
}
.accordion-button:focus {
  box-shadow: none;
  border-color: transparent;
}
.accordion-button::after {
  filter: brightness(0) saturate(100%) invert(55%) sepia(30%) saturate(500%) hue-rotate(150deg) brightness(90%);
}
.accordion-body {
  padding: 0 0 1.25rem 0;
  color: var(--text-body);
  line-height: 1.7;
}

/* ---------- Rates Collapse Toggle ---------- */
.rates-collapse-toggle {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--gray-300);
  transition: background-color 0.2s, box-shadow 0.2s;
}
.rates-collapse-toggle:hover {
  background-color: var(--sky);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.rates-collapse-toggle h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}
.rates-chevron {
  font-size: 0.8rem;
  color: var(--teal);
  transition: transform 0.3s;
}
.rates-collapse-toggle[aria-expanded="true"] .rates-chevron {
  transform: rotate(180deg);
}

/* ---------- Navbar Dropdown ---------- */
.dropdown-menu {
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
}
.dropdown-item {
  font-family: 'Inter', 'Open Sans', sans-serif;
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
  transition: background-color 0.15s;
}
.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--sky);
  color: var(--navy);
}
.dropdown-item.active {
  background-color: var(--teal);
  color: var(--white);
}

/* ---------- Rates Table ---------- */
.rates-table {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.rates-table thead {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
}

.rates-table thead th {
  font-weight: 600;
  padding: 1rem;
  border: none;
  font-family: 'Inter', 'Open Sans', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.rates-table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
}

.rates-table tbody tr:hover {
  background-color: var(--sky);
  transition: background-color 0.15s;
}

.rates-note {
  font-size: 0.9rem;
  color: var(--text-body);
  margin-top: 1rem;
}

/* ---------- Photo Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 50, 66, 0.3) 0%, transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-item:hover::after {
  opacity: 1;
}

/* ---------- Lightbox ---------- */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2rem;
  color: var(--white);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  z-index: 10000;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: var(--white);
  background: none;
  border: none;
  cursor: pointer;
  padding: 1rem;
  z-index: 10000;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ---------- Dock Map ---------- */
.dock-map-img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ---------- Contact ---------- */
.form-control,
.form-select {
  border-color: #d4cfc6;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 0.2rem rgba(58, 155, 191, 0.2);
}

.contact-info a {
  color: var(--text-body);
}
.contact-info a:hover {
  color: var(--teal);
}

/* Social icons on light backgrounds (outside footer) */
section .social-icons a {
  background-color: var(--navy);
  color: var(--white);
}
section .social-icons a:hover {
  background-color: var(--amber);
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}
.form-success i {
  font-size: 3rem;
  color: #28a745;
  margin-bottom: 1rem;
}

/* ---------- Detail Page Header ---------- */
.detail-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 1.5rem 0;
  margin-top: 72px; /* account for fixed nav */
  border-bottom: 3px solid var(--teal);
}
.detail-header h1 {
  color: var(--white);
  font-size: 1.75rem;
  margin: 0;
}
.detail-header .detail-badge {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ---------- Detail Page Sections ---------- */
.detail-section {
  padding: 3rem 0;
}
.detail-section:nth-child(even) {
  background-color: var(--gray-100);
}
.detail-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--navy);
}

.rental-card {
  background: var(--white);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  height: 100%;
  border-top: 3px solid var(--teal);
  transition: transform 0.2s, box-shadow 0.2s;
}
.rental-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.rental-card i {
  font-size: 2rem;
  color: var(--teal);
  margin-bottom: 0.75rem;
}
.rental-card .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}
.rental-card .period {
  font-size: 0.85rem;
  color: var(--text-body);
}

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--navy-dark) 0%, #061520 100%);
  color: var(--white);
  padding: 3rem 0 1.5rem;
  border-top: 3px solid var(--teal);
}
.site-footer h6 {
  color: var(--white);
  font-family: 'Inter', 'Open Sans', sans-serif;
  font-weight: 700;
}
.footer-links li {
  margin-bottom: 0.35rem;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--amber);
}
.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  margin-right: 0.5rem;
  font-size: 1.1rem;
  transition: background-color 0.25s;
}
.social-icons a:hover {
  background-color: var(--amber);
  color: var(--white);
}

/* Labeled social icons (side-by-side with text beneath) */
.social-icons-labeled {
  display: flex;
  gap: 1.25rem;
}
.social-icons-labeled a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.social-icons-labeled a:hover .social-icon-circle {
  background-color: var(--amber);
}
.social-icons-labeled .social-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 1.1rem;
  transition: background-color 0.25s;
}
section .social-icons-labeled .social-icon-circle {
  background-color: var(--navy);
}
.social-icons-labeled .social-label {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  opacity: 0.75;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .marina-card .marina-img-wrap {
    min-height: 220px;
  }
}

@media (max-width: 575.98px) {
  .section-padding {
    padding: 3rem 0;
  }
  .hero-section {
    min-height: 85vh;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5rem;
  }
  .detail-header h1 {
    font-size: 1.35rem;
  }
}

/* ========================================
   Interactive Slip Map
   ======================================== */

/* Legend */
.slip-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-body);
}
.legend-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.15);
}

/* Map container */
.slip-map-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  border: 2px solid var(--teal);
}
.slip-map-bg {
  display: block;
  width: 100%;
  height: auto;
}
.slip-map-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Slip rectangles */
.slip-rect {
  fill: #e74c3c;
  fill-opacity: 0.55;
  stroke: rgba(255,255,255,0.6);
  stroke-width: 1;
  cursor: pointer;
  transition: fill-opacity 0.2s, stroke-width 0.2s;
}
.slip-rect:hover {
  fill-opacity: 0.9;
  stroke: #fff;
  stroke-width: 2;
}
.slip-rect[data-status="available"] {
  fill: #2ecc71;
}
.slip-rect[data-status="occupied"] {
  fill: #e74c3c;
}
.slip-rect[data-status="waitlist"] {
  fill: #f39c12;
}
.slip-rect[data-status="maintenance"] {
  fill: #95a5a6;
}

/* Dock labels */
.dock-label {
  fill: rgba(255,255,255,0.9);
  font-size: 16px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  pointer-events: none;
}

/* Tooltip */
.slip-tooltip {
  position: absolute;
  display: none;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  padding: 0;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 100;
  pointer-events: none;
  font-size: 0.85rem;
}
.slip-tooltip.visible {
  display: block;
}
.slip-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.slip-tooltip-header strong {
  font-size: 1rem;
}
.slip-tooltip-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.slip-tooltip-badge.available { background: #2ecc71; color: #fff; }
.slip-tooltip-badge.occupied { background: #e74c3c; color: #fff; }
.slip-tooltip-badge.waitlist { background: #f39c12; color: #fff; }
.slip-tooltip-badge.maintenance { background: #95a5a6; color: #fff; }

.slip-tooltip-body {
  padding: 0.6rem 0.8rem;
}
.slip-tooltip-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0;
}
.slip-tooltip-row i {
  width: 16px;
  text-align: center;
  color: var(--teal-light);
}
