/*
 * Unisport – site styles.
 * Layout and header/footer/hero structure are based on the "Sailor" template by BootstrapMade
 * (https://bootstrapmade.com/license/), cleaned up and extended for the booking pages.
 */

/* ------------------------------------------------------------------
   Tokens
------------------------------------------------------------------ */
:root {
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --accent: #d9232d;
  --accent-dark: #b51b24;
  --accent-soft: #fdecee;
  --dark: #1f2730;
  --heading: #2f3a45;
  --text: #444b53;
  --muted: #5f666e;          /* ≥ 5:1 on white and on the tinted backgrounds below */
  --focus: #b51b24;          /* focus ring: 6.7:1 on white */
  --border: #e3e6ea;
  --surface: #ffffff;
  --bg-soft: #f5f6f8;
  --success: #146c3a;
  --warning: #7a5200;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(20, 28, 38, 0.08);
  --shadow-hover: 0 10px 32px rgba(20, 28, 38, 0.14);
  --header-h: 72px;

  /* Bootstrap integration */
  --bs-body-font-family: var(--font);
  --bs-body-color: var(--text);
  --bs-link-color: var(--accent);
  --bs-link-color-rgb: 217, 35, 45;
  --bs-link-hover-color: var(--accent-dark);
  --bs-link-hover-color-rgb: 181, 27, 36;
  --bs-primary: var(--accent);
  --bs-primary-rgb: 217, 35, 45;
  --bs-border-radius: var(--radius-sm);
  --bs-focus-ring-color: rgba(217, 35, 45, 0.25);
}

@media (max-width: 1199px) {
  :root { --header-h: 64px; }
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 { color: var(--heading); font-weight: 700; line-height: 1.25; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-dark); }
/* Links inside running text are underlined so they don't rely on colour alone. */
p a, li p a, .auth-switch a, dd a, .form-text a { text-decoration: underline; text-underline-offset: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* On dark backgrounds the ring is white. */
.hero :focus-visible, .night-card :focus-visible, .mobile-nav-active .mobile-nav-toggle:focus-visible { outline-color: #fff; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 10000;
  background: var(--dark); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.text-accent { color: var(--accent); }
.optional { font-weight: 400; color: var(--muted); }

/* Buttons and form controls in the brand colour */
.btn { border-radius: var(--radius-sm); font-weight: 500; }
.btn-primary {
  --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent-dark); --bs-btn-hover-border-color: var(--accent-dark);
  --bs-btn-active-bg: #9d1720; --bs-btn-active-border-color: #9d1720;
  --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent);
  --bs-btn-focus-shadow-rgb: 217, 35, 45;
}
.btn-outline-primary {
  --bs-btn-color: var(--accent); --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: var(--accent); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--accent-dark); --bs-btn-active-border-color: var(--accent-dark); --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 217, 35, 45;
}
.form-control, .form-select { border-color: #cfd4da; padding: 0.6rem 0.8rem; }
.form-control:focus, .form-select:focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); outline: 3px solid rgba(181, 27, 36, 0.35); outline-offset: 1px; }
.form-label { font-weight: 500; color: var(--heading); margin-bottom: 0.35rem; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-check-input:focus { box-shadow: none; border-color: var(--focus); }
.form-check-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn:focus-visible { box-shadow: none; outline: 3px solid var(--focus); outline-offset: 2px; }
.btn-check:focus-visible + .btn { box-shadow: none; outline: 3px solid var(--focus); outline-offset: 2px; }
.nav-tabs .nav-link { color: var(--heading); }
.nav-tabs .nav-link.active { color: var(--accent); font-weight: 600; }
fieldset legend.form-label { font-size: 1rem; float: none; }
/* Validation messages placed by jQuery Validation (it shows/hides them with inline styles). */
.invalid-feedback[id$="-error"] { display: block; }
.field-error { color: var(--bs-form-invalid-color, #dc3545); font-size: 0.875em; margin-top: 0.25rem; }

/* ------------------------------------------------------------------
   Header and navigation
------------------------------------------------------------------ */
.header {
  background: var(--surface);
  min-height: var(--header-h);
  padding: 10px 0;
  z-index: 997;
  border-bottom: 3px solid var(--accent);
  transition: box-shadow 0.3s;
}
.scrolled .header { box-shadow: 0 0 18px rgba(0, 0, 0, 0.1); }

.header .logo { line-height: 1; color: var(--heading); }
.header .logo img { height: 36px; width: 36px; margin-right: 10px; }
.header .logo .sitename { font-size: 26px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

.header .btn-getstarted {
  color: #fff; background: var(--accent);
  font-size: 14px; font-weight: 500;
  padding: 8px 24px; margin-left: 28px; border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.header .btn-getstarted:hover, .header .btn-getstarted:focus { color: #fff; background: var(--accent-dark); }

@media (max-width: 1199px) {
  .header .logo { order: 1; }
  .header .btn-getstarted { order: 2; margin: 0 8px 0 0; padding: 0 16px; min-height: 44px; display: inline-flex; align-items: center; }
  .header .navmenu { order: 3; }
}
@media (max-width: 360px) {
  .header .logo .sitename { font-size: 21px; }
  .header .btn-getstarted { padding: 0 12px; font-size: 13px; }
}

@media (min-width: 1200px) {
  .navmenu ul { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
  .navmenu a {
    display: block; color: var(--heading); padding: 18px 14px; font-size: 15px; white-space: nowrap;
    position: relative;
  }
  .navmenu a::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 10px; height: 2px;
    background: var(--accent); transform: scaleX(0); transition: transform 0.2s;
  }
  .navmenu a:hover, .navmenu a.active { color: var(--accent); }
  .navmenu a.active::after, .navmenu a:hover::after { transform: scaleX(1); }
  .mobile-nav-toggle { display: none; }
}

@media (max-width: 1199px) {
  .mobile-nav-toggle {
    background: none; border: 0; color: var(--heading); font-size: 30px; line-height: 1;
    width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .navmenu ul {
    display: none; list-style: none; margin: 0; padding: 10px 0;
    position: absolute; inset: 64px 16px auto 16px; max-height: calc(100vh - 96px); overflow-y: auto;
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-hover); z-index: 9998;
  }
  .navmenu a { display: block; color: var(--heading); padding: 12px 22px; font-size: 17px; font-weight: 500; }
  .navmenu a:hover, .navmenu a.active { color: var(--accent); background: var(--accent-soft); }

  .mobile-nav-active { overflow: hidden; }
  .mobile-nav-active .navmenu { position: fixed; inset: 0; background: rgba(20, 26, 33, 0.75); z-index: 9997; }
  .mobile-nav-active .navmenu > ul { display: block; }
  .mobile-nav-active .mobile-nav-toggle { position: fixed; top: 14px; right: 16px; color: #fff; z-index: 9999; }
}

/* ------------------------------------------------------------------
   Views
------------------------------------------------------------------ */
main#spapp { outline: none; min-height: 60vh; display: flex; flex-direction: column; }
main#spapp > section:not(.is-active) { display: none; }
main#spapp > section.is-active { flex: 1 0 auto; display: flex; flex-direction: column; }
main#spapp > section.is-active > .page, main#spapp > section.is-active > .hero { flex: 0 0 auto; }
main#spapp > section.is-active > .page:only-of-type, main#spapp > section.is-active > .page:first-child { flex-grow: 1; }

.page { position: relative; padding: 48px 0 72px; overflow: hidden; }
.container.narrow { max-width: 880px; }

.page-heading { margin-bottom: 36px; position: relative; z-index: 1; }
.page-heading h1 { font-size: clamp(1.75rem, 3vw, 2.4rem); margin-bottom: 8px; }
.page-heading h1::after {
  content: ""; display: block; width: 56px; height: 3px; background: var(--accent); margin-top: 12px; border-radius: 2px;
}
.page-heading.text-center h1::after { margin-left: auto; margin-right: auto; }
.page-heading p { color: var(--muted); margin: 0; font-size: 1.05rem; }

.card-panel {
  position: relative; z-index: 1;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px;
}
@media (max-width: 575px) { .card-panel { padding: 20px; } }

/* Decorative brand circles (red and dark), as on the original site */
.brand-circles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
/* Only shown where there is free space beside the 1140 px content column, so they never sit behind text. */
.brand-circles .circle { position: absolute; border-radius: 50%; opacity: 0.45; }
.brand-circles .circle-red { width: 300px; height: 300px; background: var(--accent); top: 12%; left: calc((100vw - 1140px) / 2 - 330px); }
.brand-circles .circle-dark { width: 380px; height: 380px; background: var(--dark); bottom: 8%; right: calc((100vw - 1140px) / 2 - 410px); }
.brand-circles .ski-figure { position: absolute; right: calc((100vw - 880px) / 2 - 250px); top: 30%; width: 220px; height: auto; opacity: 0.85; }
@media (max-width: 1499px) { .brand-circles { display: none; } }

/* Loading / empty / error states */
.state { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 12px; color: var(--muted); text-align: center; }
.state-loading.is-slow { flex-wrap: wrap; }
.state-loading .slow-text { flex-basis: 100%; font-size: 0.92rem; }
.state-inline { justify-content: flex-start; padding: 0; text-align: left; }
/* "Server se pokreće…" under a busy button or a loading field (free backend waking up). */
.slow-note { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 0.92rem; }
.modal-footer .slow-note { flex-basis: 100%; margin: 0 0 4px; }
.state-error { color: #a1131b; flex-wrap: wrap; }
.state-error .btn-link { color: var(--accent); font-weight: 500; }

/* Status badges */
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.status-confirmed { background: #e6f5ec; color: var(--success); }
.status-pending { background: #fff4d6; color: var(--warning); }
.status-cancelled { background: #eceef1; color: #59616a; }

/* ------------------------------------------------------------------
   Hero
------------------------------------------------------------------ */
.hero { position: relative; background: var(--dark); }
.hero .carousel, .hero .carousel-item { height: calc(100vh - var(--header-h)); min-height: 460px; max-height: 900px; }
.hero .carousel-item img, .hero .carousel-item video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero .carousel-item::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 1; }
.hero .carousel-container {
  position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 0 56px;
}
.hero h1, .hero .hero-title {
  color: #fff; font-size: clamp(1.6rem, 4.5vw, 3rem); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  margin: 0 0 12px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.hero p { font-size: clamp(1rem, 2vw, 1.25rem); margin: 0 0 22px; max-width: 640px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4); }
.hero .btn-get-started {
  background: var(--accent); color: #fff; font-weight: 500; letter-spacing: 0.5px;
  padding: 12px 32px; border-radius: var(--radius-sm); transition: background 0.2s;
}
.hero .btn-get-started:hover { background: var(--accent-dark); color: #fff; }
.hero .carousel-control-prev, .hero .carousel-control-next { width: 56px; z-index: 3; opacity: 0.75; }
.hero .carousel-control-prev-icon, .hero .carousel-control-next-icon { background-image: none; font-size: 32px; width: auto; height: auto; }
.hero .carousel-indicators { z-index: 3; margin-bottom: 1.25rem; }
.hero .carousel-indicators [data-bs-target] {
  width: 44px; height: 4px; box-sizing: content-box; border: 0; border-top: 20px solid transparent; border-bottom: 20px solid transparent;
  background: #fff; background-clip: padding-box; opacity: 0.5;
}
.hero .carousel-indicators .active { background: var(--accent); opacity: 1; }
@media (max-width: 575px) {
  .hero .carousel-container { padding: 0 44px; }
  .hero .carousel-control-prev, .hero .carousel-control-next { width: 40px; }
}

/* ------------------------------------------------------------------
   Gallery
------------------------------------------------------------------ */
#gallery { padding: 64px 0 72px; background: var(--bg-soft); }
.section-heading { margin-bottom: 36px; }
.section-heading h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 6px; }
.section-heading h2::after { content: ""; display: block; width: 56px; height: 3px; background: var(--accent); margin: 12px auto 0; border-radius: 2px; }
.section-heading p { color: var(--muted); margin: 0; }

.gallery-admin { max-width: 620px; margin: 0 auto 28px; background: var(--surface); padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 991px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .gallery-grid { gap: 10px; } .gallery-item { aspect-ratio: 1 / 1; } }
@media (max-width: 339px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item { position: relative; margin: 0; border-radius: var(--radius-sm); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.gallery-item a { display: block; height: 100%; position: relative; }
.gallery-item a:focus-visible { outline-offset: -3px; outline-color: #fff; }
.gallery-media { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.gallery-item a:hover .gallery-media, .gallery-item a:focus-visible .gallery-media { transform: scale(1.04); }
.gallery-loading { grid-column: 1 / -1; }
.gallery-placeholder { background: linear-gradient(135deg, #2b3540, #151b22); }
.play-badge {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 2rem;
  border: 2px solid rgba(255, 255, 255, 0.85); pointer-events: none;
}
.gallery-delete { position: absolute; top: 10px; right: 10px; z-index: 2; min-width: 44px; min-height: 44px; }
/* No lone tile in the last row: the last tile widens instead. */
@media (min-width: 992px) {
  .gallery-item:last-child:nth-child(3n + 1) { grid-column: 1 / -1; aspect-ratio: 4 / 1; }
  .gallery-item:last-child:nth-child(3n + 2) { grid-column: span 2; aspect-ratio: 8 / 3; }
}
@media (min-width: 340px) and (max-width: 991px) {
  .gallery-item:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
}
/* Videos open in the lightbox as a plain <video> (no external player). */
.glightbox-container .ginlined-content { padding: 0; background: #000; max-width: 100%; }
.glightbox-container .gslide-inline { background: #000; max-height: calc(100vh - 40px); }
.lightbox-video { display: block; width: 100%; max-height: 80vh; background: #000; }

/* ------------------------------------------------------------------
   About
------------------------------------------------------------------ */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 767px) { .about-grid { grid-template-columns: 1fr; } }
.about-text .lead { color: var(--heading); font-weight: 500; }
.feature-list { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; }
.feature-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--heading); }
.feature-list i { color: var(--accent); font-size: 1.25rem; }
.about-video { text-align: center; }
.about-video video { width: 100%; max-width: 340px; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: #000; }

/* ------------------------------------------------------------------
   Team
------------------------------------------------------------------ */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 20px; position: relative; z-index: 1; }
@media (max-width: 575px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.team-member {
  display: flex; flex-direction: column; overflow: hidden; text-align: center;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}
.team-member:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.team-member .pic { width: 100%; aspect-ratio: 4 / 5; background: #eef0f3; overflow: hidden; }
.team-member .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-member .member-info { padding: 14px 12px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; flex-grow: 1; }
.team-member h2 { font-size: 1.05rem; margin: 0; }
.team-member .licence { display: inline-block; background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; }
.team-member .btn { margin-top: auto; min-height: 44px; display: inline-flex; align-items: center; }

/* ------------------------------------------------------------------
   Reviews
------------------------------------------------------------------ */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.review-item { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; border-top: 3px solid var(--accent); }
.review-item header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.review-item h2 { font-size: 1.05rem; margin: 0; }
.review-item time { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.review-item .stars { color: #f0a500; margin: 6px 0 10px; letter-spacing: 2px; }
.review-item blockquote { margin: 0; color: var(--text); font-style: italic; overflow-wrap: anywhere; }
.review-item blockquote p { margin: 0; white-space: pre-line; }
.review-delete { margin-top: 12px; min-height: 44px; }

.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 2rem; color: #d3d7dc; cursor: pointer; line-height: 1; transition: color 0.15s; }
.star-input label:hover, .star-input label:hover ~ label,
.star-input input:checked ~ label { color: #f0a500; }
.star-input input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------------
   Services and pricing
------------------------------------------------------------------ */
.service-block { position: relative; z-index: 1; margin-bottom: 56px; }
.service-block:not(.pricing):not(.night) { display: grid; grid-template-columns: 1fr 1.35fr; gap: 36px; align-items: start; }
@media (max-width: 991px) { .service-block:not(.pricing):not(.night) { grid-template-columns: 1fr; gap: 24px; } }
.service-intro h2 { font-size: 1.75rem; margin: 4px 0 12px; }
.service-intro p { margin-bottom: 20px; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.8rem; font-weight: 700; color: var(--accent); }

.feature-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 575px) { .feature-cards { grid-template-columns: 1fr; } }
.feature-cards li { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.feature-cards i { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 1.35rem; margin-bottom: 10px; }
.feature-cards h3 { font-size: 1.05rem; margin: 0 0 4px; }
.feature-cards p { margin: 0; font-size: 0.95rem; }
.badge-big { display: inline-flex; align-items: center; min-height: 36px; font-size: 1.15rem; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.badge-big i { margin: 0; width: auto; height: auto; background: none; font-size: 1.3rem; }

.night-card { display: flex; gap: 20px; align-items: flex-start; background: var(--dark); color: #e6e9ec; border-radius: var(--radius); padding: 28px; }
.night-card > i { font-size: 2.2rem; color: #ffd36b; line-height: 1; }
.night-card h2 { color: #fff; font-size: 1.5rem; margin: 0 0 8px; }
.night-card a { color: #ff9aa0; }
.night-card a:hover { color: #fff; }

.pricing h2 { font-size: 1.75rem; margin-bottom: 24px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 20px; }
.pricing-item { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; border-top: 3px solid var(--accent); }
.pricing-item h3 { font-size: 1.1rem; margin-bottom: 10px; }
.pricing-item .price { margin: 0 0 10px; color: var(--accent); }
.pricing-item .amount { font-size: 2.2rem; font-weight: 700; line-height: 1; }
.pricing-item .currency { font-weight: 600; }
.pricing-item .unit { color: var(--muted); font-size: 0.95rem; }
.pricing-item .price-request { font-size: 1.2rem; font-weight: 600; }
.pricing-item .desc { color: var(--muted); font-size: 0.92rem; flex-grow: 1; }
.pricing-item .btn { min-height: 44px; display: inline-flex; align-items: center; padding: 0 20px; }
.pricing-level { display: inline-block; margin-bottom: 6px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; }
.night-card .night-price { font-weight: 700; color: #fff; font-size: 1.1rem; }
.night-card .btn-light { min-height: 44px; display: inline-flex; align-items: center; color: var(--dark); }

/* ------------------------------------------------------------------
   Contact
------------------------------------------------------------------ */
.contact-info { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.contact-info li { display: flex; gap: 16px; align-items: flex-start; }
.contact-info i { flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent); color: #fff; font-size: 1.2rem; }
.contact-info h2 { font-size: 1.05rem; margin: 0 0 2px; }
.contact-info p { margin: 0; overflow-wrap: anywhere; }
.map-wrap iframe { display: block; width: 100%; height: 300px; border: 0; border-radius: var(--radius); }

/* ------------------------------------------------------------------
   Sign in / register / password
------------------------------------------------------------------ */
.auth-page { background: var(--bg-soft); }
.auth-card { max-width: 480px; margin: 0 auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.auth-card h1 { font-size: 1.6rem; text-align: center; margin-bottom: 24px; }
.auth-switch { text-align: center; margin: 20px 0 0; color: var(--muted); }
@media (max-width: 575px) { .auth-card { padding: 22px; } }

.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 46px; }
.password-toggle {
  position: absolute; top: 0; right: 0; height: 100%; width: 44px; border: 0; background: none;
  color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.password-toggle:hover { color: var(--heading); }
.password-wrap .form-control.is-invalid { background-image: none; }

.iti { width: 100%; display: block; }
.iti input.form-control { width: 100%; }

/* ------------------------------------------------------------------
   Booking
------------------------------------------------------------------ */
.booking-form { position: relative; z-index: 1; }
.choice-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 479px) { .choice-cards { grid-template-columns: 1fr; } }
.choice-card { position: relative; display: block; cursor: pointer; margin: 0; }
.choice-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-body {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  border: 2px solid var(--border); border-radius: var(--radius); padding: 16px 18px; transition: border-color 0.15s, background 0.15s;
}
.choice-body i { font-size: 1.5rem; color: var(--accent); margin-bottom: 4px; }
.choice-title { font-weight: 700; color: var(--heading); }
.choice-sub { color: var(--muted); font-size: 0.9rem; }
.choice-card:hover .choice-body { border-color: #e9a4a8; }
.choice-card input:checked + .choice-body { border-color: var(--accent); background: var(--accent-soft); }
.choice-card input:focus-visible + .choice-body { outline: 3px solid var(--focus); outline-offset: 2px; }

.booking-fields { border-top: 1px solid var(--border); padding-top: 22px; margin-top: 24px; min-width: 0; }
.admin-box { background: var(--accent-soft); border: 1px solid #f3c6ca; border-radius: var(--radius-sm); padding: 16px; margin-bottom: 20px; }
.admin-box h2 { color: var(--accent-dark); margin-bottom: 12px; }
.field-note { margin-top: 8px; color: var(--warning); font-size: 0.92rem; }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.slot-placeholder { grid-column: 1 / -1; color: var(--muted); padding: 10px 12px; background: var(--bg-soft); border-radius: var(--radius-sm); font-size: 0.95rem; }
.slot {
  display: flex; flex-direction: column; align-items: center; gap: 0; padding: 8px 4px;
  border: 1px solid #cfd4da; border-radius: var(--radius-sm); background: var(--surface); color: var(--heading);
  font-weight: 600; transition: border-color 0.15s, background 0.15s;
}
.slot:hover:not([disabled]) { border-color: var(--accent); }
.slot.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot[disabled] { background: #f1f2f4; color: var(--muted); border-style: dashed; cursor: not-allowed; }
.slot { min-height: 44px; }
.booking-summary {
  margin: 24px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--bg-soft);
  border-left: 4px solid var(--accent); color: var(--heading); font-weight: 500;
}
.booking-summary + .btn { margin-top: 12px !important; }
.btn-group .btn { min-height: 44px; min-width: 64px; }
.slot-state { font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

.my-bookings { margin-top: 48px; position: relative; z-index: 1; }
.my-bookings h2 { font-size: 1.4rem; margin-bottom: 16px; }
#my-bookings-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.booking-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; border-left: 4px solid var(--accent); }
.booking-card header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.booking-card h3 { font-size: 1.05rem; margin: 0; }
.booking-card dl { margin: 0 0 14px; display: grid; gap: 4px; }
.booking-card dl div { display: grid; grid-template-columns: 140px 1fr; gap: 8px; font-size: 0.95rem; }
.booking-card dt { color: var(--muted); font-weight: 400; }
.booking-card dd { margin: 0; color: var(--heading); overflow-wrap: anywhere; }
@media (max-width: 400px) { .booking-card dl div { grid-template-columns: 1fr; gap: 0; } }

/* Larger close buttons in dialogs (touch). */
.modal-header .btn-close { box-sizing: content-box; padding: 14px; margin: -14px -10px -14px auto; }

/* flatpickr in brand colours */
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--accent); border-color: var(--accent); }
.flatpickr-day.today { border-color: var(--accent); }

/* Touch: 44 px day cells, month arrows and country rows (the libraries ship 39 px, 34 px and about 30 px). */
@media (pointer: coarse), (max-width: 575px) {
  .flatpickr-calendar, .flatpickr-days, .dayContainer { width: 308px; }
  .dayContainer { min-width: 308px; max-width: 308px; }
  .flatpickr-day { max-width: 44px; height: 44px; line-height: 44px; }
  .flatpickr-months .flatpickr-month,
  .flatpickr-months .flatpickr-prev-month,
  .flatpickr-months .flatpickr-next-month { height: 44px; }
  .flatpickr-months .flatpickr-prev-month,
  .flatpickr-months .flatpickr-next-month { width: 44px; padding: 15px; }
  .flatpickr-current-month { padding-top: 12px; }
  .iti__country { padding: 12px 10px; }
  .iti__country-list { max-height: 264px; }
}

/* ------------------------------------------------------------------
   Admin and instructor panels
------------------------------------------------------------------ */
.panel-page { background: var(--bg-soft); }
.panel-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.panel-header h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.panel-tabs { border-bottom-color: var(--border); }
.panel-tabs .nav-link { white-space: nowrap; min-height: 44px; }
/* Phones: the tabs wrap into rows of pills instead of scrolling out of view. */
@media (max-width: 767px) {
  .panel-tabs { border-bottom: 0; gap: 6px; flex-wrap: wrap; }
  .panel-tabs .nav-link { border: 1px solid var(--border); border-radius: 999px; background: var(--surface); padding: 8px 14px; }
  .panel-tabs .nav-link.active { background: var(--accent); border-color: var(--accent); color: #fff; }
}
@media (min-width: 768px) {
  .panel-tabs .nav-link.active { background: var(--bg-soft); border-color: var(--border) var(--border) var(--bg-soft); }
}
.panel-content { padding-top: 24px; }
.panel-section { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.panel-section h2 { font-size: 1.2rem; margin: 0 0 14px; }
.panel-section h3 { margin: 0 0 12px; }
.panel-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-section-head h2 { margin: 0; }
.panel-section .table { margin: 0; }
.panel-section .table th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.panel-section .table td { font-size: 0.95rem; }
.count { display: inline-block; background: var(--bg-soft); color: var(--muted); font-size: 0.8rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; margin-left: 6px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #eef0f3; }
.week-past td { color: var(--muted); }

/* Tables become stacked cards on phones, with the action buttons inside each card. */
@media (max-width: 575px) {
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; background: var(--surface); }
  .table-stack td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 104px 1fr; gap: 8px; text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; }
  .table-stack td::before { content: attr(data-label); color: var(--muted); font-size: 0.85rem; }
  .table-stack td[data-label=""] { display: flex; gap: 8px; }
  .table-stack td[data-label=""]::before { content: none; }
  .table-stack td.cell-actions { justify-content: flex-end; padding-top: 8px; }
  .table-stack td.cell-actions .btn { min-width: 44px; min-height: 44px; }
  .table-stack td[colspan] { display: block; }
  .table-stack td[colspan]::before { content: none; }
  .table-responsive:has(> .table-stack) { overflow: visible; }
}

.blocked-list { list-style: none; padding: 0; margin: 0; }
.blocked-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.blocked-list li:last-child { border-bottom: 0; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; border-left: 4px solid var(--accent); }
.stat-value { display: block; font-size: 2.2rem; font-weight: 700; color: var(--heading); line-height: 1.1; }
.stat-label { color: var(--muted); }

.section-sub { color: var(--muted); margin: -6px 0 12px; font-size: 0.92rem; }
.day-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 575px) { .day-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Available: green with a check. Unavailable: grey. Booked: badge (cannot be switched off). */
.day-toggle {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; min-height: 76px;
  border: 1px solid #d5d9de; border-radius: var(--radius-sm); background: #f1f2f4; color: var(--muted);
  transition: background 0.15s, border-color 0.15s;
}
.day-toggle:hover { border-color: #7f8790; }
.day-toggle .day-name { font-weight: 700; font-size: 0.9rem; }
.day-toggle .day-date { font-size: 0.85rem; }
.day-toggle .day-state { font-size: 0.78rem; font-weight: 500; display: inline-flex; align-items: center; gap: 3px; }
.day-toggle.available { background: #e9f6ee; border-color: #2e8b57; color: var(--success); }
.day-toggle.available .day-name, .day-toggle.available .day-date { color: var(--heading); }
.day-toggle.locked { cursor: default; }
.booked-badge { display: inline-block; background: var(--success); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 0.72rem; font-weight: 600; }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.footer { background: var(--surface); font-size: 0.95rem; border-top: 1px solid var(--border); }
.footer .footer-top { padding-top: 48px; padding-bottom: 16px; }
.footer .sitename { font-size: 1.6rem; font-weight: 700; color: var(--heading); text-transform: uppercase; letter-spacing: 0.5px; }
.footer .footer-about .logo { margin-bottom: 16px; }
.footer-contact p { margin-bottom: 6px; color: var(--muted); }
.footer-contact a { color: var(--text); }
.footer-contact a:hover { color: var(--accent); }
.footer .social-links { gap: 10px; margin-top: 16px; }
.footer .social-links a {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%; color: var(--muted); font-size: 1.05rem;
}
.footer .social-links a:hover { color: var(--accent); border-color: var(--accent); }
.footer-heading { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { padding: 0; }
.footer-links a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
.footer-contact a { display: inline-block; padding: 10px 0; }
.footer-links a:hover { color: var(--accent); }
.footer-mascot { display: flex; justify-content: center; align-items: center; }
.footer-mascot img { max-width: 180px; height: auto; }
.footer .copyright { text-align: center; padding: 20px 0; border-top: 1px solid var(--border); color: var(--muted); }
.footer .copyright p { margin: 0; }
.footer .copyright .sitename { font-size: inherit; letter-spacing: 0; text-transform: none; color: var(--heading); }
@media (max-width: 767px) {
  .footer .footer-about, .footer .footer-links { text-align: center; }
  .footer .footer-about .logo, .footer .social-links { justify-content: center; }
  .footer-mascot img { max-width: 140px; }
}

/* ------------------------------------------------------------------
   Scroll-to-top and preloader
------------------------------------------------------------------ */
.scroll-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 9990; width: 44px; height: 44px;
  border: 0; border-radius: var(--radius-sm); background: var(--accent); color: #fff;
  visibility: hidden; opacity: 0; transition: opacity 0.3s, visibility 0.3s, background 0.2s;
}
.scroll-top i { font-size: 26px; line-height: 0; }
.scroll-top:hover { background: var(--accent-dark); }
.scroll-top.active { visibility: visible; opacity: 1; }

#preloader { position: fixed; inset: 0; z-index: 999999; background: var(--surface); }
#preloader::before {
  content: ""; position: fixed; top: calc(50% - 28px); left: calc(50% - 28px); width: 56px; height: 56px;
  border: 6px solid var(--accent); border-color: var(--accent) transparent var(--accent) transparent; border-radius: 50%;
  animation: preloader-spin 1.4s linear infinite;
}
@keyframes preloader-spin { to { transform: rotate(360deg); } }

/* toastr: bottom right, above the scroll-to-top button; colours with ≥ 5:1 contrast for the white text. */
#toast-container.toast-bottom-right { bottom: 72px; right: 16px; }
#toast-container > div { opacity: 1; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22); }
#toast-container > div:hover { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3); }
#toast-container > .toast-success { background-color: #146c3a; }
#toast-container > .toast-info { background-color: #0a5f78; }
#toast-container > .toast-warning { background-color: #7a4a00; }
#toast-container > .toast-error { background-color: #b02a2f; }
@media (max-width: 575px) {
  #toast-container.toast-bottom-right { left: 12px; right: 12px; bottom: 68px; }
  #toast-container.toast-bottom-right > div { width: auto; }
}
