/**
 * ninawarren.com — vanilla replacements for the Bootstrap 5 classes
 * this site actually uses. Loaded BEFORE design-system.css so that
 * its component customisations (navbar, btn, etc.) win the cascade,
 * matching the prior Bootstrap-as-base + design-system-as-override
 * structure exactly. ~55 classes, ~250 lines, no third-party deps.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
}

/* ============================================
   CONTAINERS — Bootstrap 5 default max-widths
   ============================================ */

.container {
  width: 100%;
  padding-inline: 0.75rem;
  margin-inline: auto;
}
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

/* ============================================
   GRID — 12-col, 1.5rem gutter (Bootstrap default)
   ============================================ */

.row {
  display: flex;
  flex-wrap: wrap;
  margin-inline: -0.75rem;
}

.row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-inline: 0.75rem;
}

.col-12 { flex: 0 0 auto; width: 100%; }

@media (min-width: 768px) {
  .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
}

@media (min-width: 992px) {
  .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
  .offset-lg-3 { margin-inline-start: 25%; }
  .order-lg-1 { order: 1; }
  .order-lg-2 { order: 2; }
}

/* ============================================
   SPACING — Bootstrap scale: 1=.25 2=.5 3=1 4=1.5 5=3 (rem)
   ============================================ */

.p-4 { padding: 1.5rem; }
.py-5 { padding-block: 3rem; }
.pt-5 { padding-block-start: 3rem; }
.mb-0 { margin-block-end: 0; }
.mb-3 { margin-block-end: 1rem; }
.mb-4 { margin-block-end: 1.5rem; }
.mb-5 { margin-block-end: 3rem; }
.mt-4 { margin-block-start: 1.5rem; }
.me-3 { margin-inline-end: 1rem; }
.me-auto { margin-inline-end: auto; }
.mx-auto { margin-inline: auto; }

/* ============================================
   DISPLAY / FLEX
   ============================================ */

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-start { align-items: flex-start; }
.align-items-center { align-items: center; }
.h-100 { height: 100%; }

/* ============================================
   TEXT
   ============================================ */

.text-center { text-align: center; }
.text-end { text-align: end; }
.text-muted { color: var(--color-text-muted, #5a6068); }
.text-decoration-none { text-decoration: none; }

.lead {
  font-size: 1.25rem;
  font-weight: 300;
}

.display-4 {
  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1.2;
}
@media (max-width: 1200px) {
  .display-4 { font-size: calc(1.475rem + 2.7vw); }
}

/* ============================================
   IMAGES
   ============================================ */

.img-fluid {
  max-width: 100%;
  height: auto;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0, 0, 0, 0.175);
  border-radius: 0.375rem;
}

.card-body {
  flex: 1 1 auto;
  padding: 1rem;
}

.card-title { margin-block-end: 0.5rem; }
.card-subtitle { margin-block: -0.25rem 0; }
.card-text:last-child { margin-block-end: 0; }

.card-img-top {
  width: 100%;
  border-top-left-radius: calc(0.375rem - 1px);
  border-top-right-radius: calc(0.375rem - 1px);
}

/* ============================================
   BADGE
   ============================================ */

.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.375rem;
}

/* ============================================
   BACKGROUND UTILITIES
   ============================================ */

.bg-light { background-color: #f8f9fa; }
.bg-primary { background-color: #0d6efd; color: #fff; }
.bg-success { background-color: #198754; color: #fff; }
.bg-warning { background-color: #ffc107; color: #000; }
.bg-info { background-color: #0dcaf0; color: #000; }

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover { color: #212529; }

.btn-md { padding: 0.5rem 1rem; }

.btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}
.btn-secondary:hover {
  color: #fff;
  background-color: #5c636a;
  border-color: #565e64;
}

.btn-outline-primary {
  color: #0d6efd;
  border-color: #0d6efd;
}
.btn-outline-primary:hover,
.btn-outline-primary.active,
.btn-outline-primary:focus {
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-group {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}
.btn-group > .btn {
  position: relative;
  flex: 1 1 auto;
}
.btn-group > .btn:not(:first-child) { margin-inline-start: -1px; }
.btn-group > .btn:first-child:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.btn-group > .btn:not(:first-child):not(:last-child) {
  border-radius: 0;
}
.btn-group > .btn:last-child:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* ============================================
   BLOCKQUOTE
   ============================================ */

.blockquote {
  margin-block: 0 1rem;
  font-size: 1.25rem;
}

.blockquote-footer {
  margin-block: -1rem 1rem;
  font-size: 0.875em;
  color: #6c757d;
}
.blockquote-footer::before {
  content: "\2014\00A0";
}

/* ============================================
   SHADOWS
   ============================================ */

.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); }
.shadow     { box-shadow: 0 0.5rem   1rem    rgba(0, 0, 0, 0.15);  }

/* ============================================
   ALBUM (gallery wrapper)
   ============================================ */

.album { padding: 2rem 0; }

/* ============================================
   RATIO (aspect-ratio container)
   ============================================ */

.ratio {
  position: relative;
  width: 100%;
}
.ratio::before {
  content: "";
  display: block;
  padding-block-start: var(--bs-aspect-ratio);
}
.ratio > * {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
}
.ratio-16x9 { --bs-aspect-ratio: 56.25%; }

/* ============================================
   VISUALLY HIDDEN (accessible label-only text)
   ============================================ */

.visually-hidden {
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  position: absolute !important;
}

/* ============================================
   COLLAPSE (mobile nav drawer)
   ============================================ */

.collapse:not(.show) {
  display: none;
}

/* ============================================
   NAVBAR (Bootstrap base; design-system.css customises further)
   ============================================ */

.navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.5rem;
}

.navbar > .container {
  display: flex;
  flex-wrap: inherit;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  padding-block: 0.3125rem;
  margin-inline-end: 1rem;
  font-size: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
}

.navbar-nav {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  background: 0 0;
  border: 0;
  transition: color 0.15s ease;
}

.navbar-toggler {
  padding: 0.25rem 0.75rem;
  font-size: 1.25rem;
  line-height: 1;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  transition: box-shadow 0.15s ease;
  cursor: pointer;
}

.navbar-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(33, 37, 41, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

.fixed-top {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
}

@media (min-width: 992px) {
  .navbar-expand-lg {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  .navbar-expand-lg .navbar-nav {
    flex-direction: row;
  }
  .navbar-expand-lg .navbar-nav .nav-link {
    padding-inline: 0.5rem;
  }
  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
  .navbar-expand-lg .navbar-toggler {
    display: none;
  }
}

/* ============================================
   CAROUSEL (Bootstrap structural; index.css visual)
   ============================================ */

.carousel {
  position: relative;
}

.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-item {
  position: relative;
  display: none;
  float: left;
  width: 100%;
  margin-inline-end: -100%;
  transition: transform 0.6s ease-in-out;
  backface-visibility: hidden;
}

.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
  display: block;
}

.carousel-item-next:not(.carousel-item-start),
.active.carousel-item-end {
  transform: translateX(100%);
}

.carousel-item-prev:not(.carousel-item-end),
.active.carousel-item-start {
  transform: translateX(-100%);
}

@media (prefers-reduced-motion: reduce) {
  .carousel-item {
    transition: none;
  }
}

.carousel-control-prev,
.carousel-control-next {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15%;
  padding: 0;
  color: #fff;
  text-align: center;
  background: 0 0;
  border: 0;
  opacity: 0.5;
  transition: opacity 0.15s ease;
  cursor: pointer;
}
.carousel-control-prev { inset-inline-start: 0; }
.carousel-control-next { inset-inline-end: 0; }
.carousel-control-prev:hover,
.carousel-control-next:hover { opacity: 0.9; color: #fff; }

.carousel-control-prev-icon,
.carousel-control-next-icon {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 100% 100%;
}

.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}
.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.carousel-caption {
  position: absolute;
  inset-inline-end: 15%;
  inset-block-end: 1.25rem;
  inset-inline-start: 15%;
  padding-block: 1.25rem;
  color: #fff;
  text-align: center;
}

/* ============================================
   FILTER BTN-GROUP RESPONSIVE WRAP
   Narrow viewports break the connected pill apart
   into wrapped, individually rounded buttons so the
   five filters fit on a phone screen.
   ============================================ */
@media (max-width: 575.98px) {
  .reviews-filter .btn-group,
  .gallery-filter .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }
  .reviews-filter .btn-group > .btn,
  .gallery-filter .btn-group > .btn {
    flex: 0 1 auto;
    margin-inline-start: 0;
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    font-size: 0.875rem;
  }
}
