:root {
  --bg: #faf8f3;
  --bg-2: #fffdf8;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-2: rgba(255, 252, 246, 0.90);
  --stroke: rgba(14, 37, 69, 0.10);
  --text: #10233f;
  --muted: #637282;

  --brand: #0e2545;
  --brand-2: #07182d;
  --accent: #b8872d;
  --accent-2: #d5ad58;
  --cream: #fff8ea;
  --good: #2f7563;
  --warn: #b8872d;
  --danger: #a9482d;

  --shadow: 0 20px 56px rgba(14, 37, 69, 0.13);
  --shadow-sm: 0 8px 24px rgba(14, 37, 69, 0.08);
  --shadow-hover: 0 24px 64px rgba(14, 37, 69, 0.16);
  --radius: 22px;
  --radius-sm: 16px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.22s var(--ease);
  --transition-slow: 0.42s var(--ease);
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
}

body.bg-soft {
  background:
    radial-gradient(900px 420px at 6% 6%, rgba(184, 135, 45, 0.13), transparent 58%),
    radial-gradient(900px 420px at 94% 12%, rgba(14, 37, 69, 0.09), transparent 58%),
    linear-gradient(180deg, #fffdf8 0%, #faf8f3 46%, #f7f1e6 100%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.bg-soft::before {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: 260px;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.55)),
    url("/images/stableops-equestrian-mark.svg") left 4vw bottom -52px / 360px auto no-repeat;
  opacity: 0.055;
  z-index: -1;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
  text-decoration: none;
}

h1,
h2,
h3,
.h1,
.h2,
.h3,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  font-family: var(--font-display);
  color: var(--brand);
  letter-spacing: -0.025em;
  line-height: 1.08;
}

h4, h5, h6, .h4, .h5, .h6 {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--brand);
}

.text-secondary,
.text-muted {
  color: var(--muted) !important;
}

.stableops-navbar,
.navbar {
  background: rgba(255, 253, 248, 0.94) !important;
  border-bottom: 1px solid rgba(14, 37, 69, 0.10);
  box-shadow: 0 10px 26px rgba(14, 37, 69, 0.08);
  backdrop-filter: blur(10px);
}

.navbar .navbar-brand {
  color: var(--brand) !important;
}

.navbar .brand-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1;
}

.navbar .brand-submark {
  display: block;
  font-family: var(--font-body);
  font-size: 0.64rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2px;
}

.navbar .nav-link {
  color: rgba(14, 37, 69, 0.78) !important;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.48rem 0.8rem !important;
  transition: color var(--transition), background var(--transition);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--brand) !important;
  background: rgba(184, 135, 45, 0.10);
}

.navbar .dropdown-menu {
  border: 1px solid rgba(14, 37, 69, 0.10);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 0.65rem;
}

.navbar .dropdown-item {
  border-radius: 12px;
  font-weight: 650;
  color: var(--brand);
  transition: background var(--transition), color var(--transition);
}

.navbar .dropdown-item:hover {
  background: rgba(184, 135, 45, 0.12);
  color: var(--brand);
}

.navbar-toggler {
  border: 1px solid rgba(14, 37, 69, 0.22);
  border-radius: 14px;
}

.brand-logo {
  height: 42px;
  width: auto;
  display: block;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.navbar-brand:hover .brand-logo {
  transform: scale(1.03);
  filter: drop-shadow(0 8px 14px rgba(184, 135, 45, 0.26));
}

.card-soft,
.card,
.modal-content {
  background: var(--surface) !important;
  border: 1px solid var(--stroke) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:not(.modal-content):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover) !important;
}

.card .card-body {
  position: relative;
}

.card-elegant {
  position: relative;
  overflow: hidden;
}

.card-elegant::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -100px;
  width: 260px;
  height: 210px;
  background: url("/images/stableops-equestrian-mark.svg") center / contain no-repeat;
  opacity: 0.045;
  pointer-events: none;
}

.btn {
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding-left: 1rem;
  padding-right: 1rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), filter var(--transition);
}

.btn:active {
  transform: scale(0.97) !important;
}

.btn-sm {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.btn-primary,
.btn-dark {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: 1px solid rgba(14, 37, 69, 0.90);
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(14, 37, 69, 0.20);
}

.btn-primary:hover,
.btn-dark:hover {
  background: linear-gradient(135deg, #14335f, var(--brand));
  border-color: var(--brand);
  box-shadow: 0 16px 36px rgba(14, 37, 69, 0.28);
  transform: translateY(-2px);
}

.btn-outline-primary,
.btn-outline-dark,
.btn-outline-secondary,
.btn-outline-light {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(14, 37, 69, 0.22);
  color: var(--brand) !important;
}

.btn-outline-primary:hover,
.btn-outline-dark:hover,
.btn-outline-secondary:hover,
.btn-outline-light:hover {
  background: rgba(184, 135, 45, 0.12);
  border-color: rgba(184, 135, 45, 0.46);
  color: var(--brand) !important;
}

.btn-gold {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 1px solid rgba(184, 135, 45, 0.72);
  color: #1b1508 !important;
  box-shadow: 0 12px 26px rgba(184, 135, 45, 0.20);
}

.btn-gold:hover {
  filter: brightness(1.05);
  box-shadow: 0 16px 36px rgba(184, 135, 45, 0.30);
  transform: translateY(-2px);
  color: #1b1508 !important;
}

.badge-soft,
.badge-pill,
.equestrian-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(184, 135, 45, 0.10);
  color: var(--brand);
  border: 1px solid rgba(184, 135, 45, 0.22);
  border-radius: 999px;
  padding: 0.36rem 0.68rem;
  font-weight: 800;
  font-size: 0.85rem;
}

.brand-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--accent);
  margin: 0.8rem 0 1rem;
}

.brand-divider::before,
.brand-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.brand-divider .diamond,
.brand-diamond {
  width: 13px;
  height: 13px;
  border: 2px solid var(--accent);
  transform: rotate(45deg);
  display: inline-block;
  background: var(--bg-2);
}

.kpi {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.kpi .kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: rgba(184, 135, 45, 0.12);
  border: 1px solid rgba(184, 135, 45, 0.22);
}

.kpi .kpi-title {
  font-weight: 900;
  margin: 0;
  color: var(--brand);
}

.kpi .kpi-sub {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  color: var(--muted);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.74rem;
  border-bottom: 1px solid rgba(14, 37, 69, 0.14) !important;
}

.table td {
  border-top: 1px solid rgba(14, 37, 69, 0.08) !important;
  vertical-align: middle;
}

.form-label {
  font-weight: 750;
  color: var(--brand);
}

.form-control,
.form-select,
textarea {
  border-radius: 16px;
  border: 1px solid rgba(14, 37, 69, 0.14);
  background: rgba(255, 255, 255, 0.95);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: rgba(184, 135, 45, 0.60);
  box-shadow: 0 0 0 0.22rem rgba(184, 135, 45, 0.13);
}

.icon-pill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: var(--surface-2);
}

.hr-soft {
  border: 0;
  border-top: 1px solid rgba(14, 37, 69, 0.10);
  margin: 1.25rem 0;
}

.alert {
  border-radius: 18px;
}

.horse-alert-card {
  border-radius: var(--radius);
  border: 1px solid rgba(184, 135, 45, 0.16) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 234, 0.88)) !important;
}

.landing-hero,
.brand-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(184, 135, 45, 0.16), transparent 60%),
    radial-gradient(760px 380px at 100% 10%, rgba(14, 37, 69, 0.10), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 249, 238, 0.94));
  border: 1px solid rgba(14, 37, 69, 0.10);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.landing-hero::after,
.brand-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -80px;
  width: 420px;
  height: 320px;
  background: url("/images/stableops-equestrian-mark.svg") center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
}

.landing-hero > *,
.brand-hero > * {
  position: relative;
  z-index: 1;
}

.hero-mark {
  width: min(330px, 82%);
  border-radius: 20px;
  filter: drop-shadow(0 18px 28px rgba(14, 37, 69, 0.12));
}

.hero-title {
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  line-height: 1.0;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.feature-card {
  height: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(184, 135, 45, 0.28);
}

.feat-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: rgba(184, 135, 45, 0.12);
  border: 1px solid rgba(184, 135, 45, 0.22);
}

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(14, 37, 69, 0.12);
  background:
    radial-gradient(760px 300px at 10% 10%, rgba(184, 135, 45, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 234, 0.90));
  box-shadow: var(--shadow-sm);
}

.status-banner {
  border-radius: 22px;
  border: 1px solid rgba(184, 135, 45, 0.24);
  background: linear-gradient(135deg, rgba(255, 248, 234, 0.96), rgba(255, 243, 214, 0.92));
  box-shadow: 0 18px 50px rgba(184, 135, 45, 0.11);
}

.brand-intro {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(255, 253, 248, 0.96), rgba(250, 248, 243, 0.86));
  backdrop-filter: blur(4px);
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.brand-intro.hidden {
  opacity: 0;
}

.brand-intro-logo {
  width: min(58vw, 380px);
  max-width: 380px;
  border-radius: 18px;
  filter: drop-shadow(0 18px 40px rgba(14, 37, 69, 0.18));
  transform-origin: center center;
  transition: transform 1.2s cubic-bezier(0.2, 0.85, 0.2, 1), opacity 0.5s ease;
}

.brand-intro.hidden .brand-intro-logo {
  opacity: 0.2;
}

.auth-card {
  max-width: 520px;
  margin: 0 auto;
}

.auth-brand-mark {
  width: min(260px, 78%);
  display: block;
  margin: 0 auto 1rem;
  border-radius: 18px;
}

.public-booking-card {
  overflow: hidden;
}

.package-option {
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.package-option:hover,
.package-option:has(input:checked) {
  transform: translateY(-2px);
  border-color: rgba(184, 135, 45, 0.55) !important;
  box-shadow: 0 12px 28px rgba(184, 135, 45, 0.14);
}

.bg-light,
.bg-light-subtle {
  background-color: rgba(255, 248, 234, 0.58) !important;
}

footer {
  color: var(--muted);
  padding-top: 2.5rem !important;
  padding-bottom: 2.5rem !important;
}

@media (max-width: 991.98px) {
  .navbar .nav-link {
    border-radius: 14px;
  }

  .hero-title {
    font-size: clamp(2.1rem, 12vw, 3.3rem);
  }
}

/* ── Scroll reveal animation ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Improved section spacing ────────────────────────────── */
.section-gap {
  margin-bottom: 2.5rem;
}

/* ── Slightly increase default row gutters for more breathing room */
.row.g-3 {
  --bs-gutter-x: 1.35rem;
  --bs-gutter-y: 1.35rem;
}

/* ── Consistent page header (card-soft header bar) ───────── */
.page-header {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.025em;
}

/* ── Interior page section title (card-soft top bars) ────── */
.card-soft h1.h5,
.card-soft h1.h4 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ── Main container breathing room (overrides Bootstrap py utilities) */
main.container {
  padding-top: 2.25rem !important;
  padding-bottom: 3.5rem !important;
}

@media (min-width: 992px) {
  main.container {
    padding-top: 3rem !important;
    padding-bottom: 4.5rem !important;
  }
}

/* ── Badge/pill hover ────────────────────────────────────── */
.badge-soft,
.badge-pill,
.equestrian-pill {
  transition: background var(--transition), border-color var(--transition);
}

/* ── Table row hover ─────────────────────────────────────── */
.table tbody tr {
  transition: background var(--transition);
}

.table tbody tr:hover td {
  background: rgba(184, 135, 45, 0.04);
}

/* ── Card-soft hover (dashboard panels) ─────────────────── */
.card-soft {
  transition: box-shadow var(--transition);
}

/* ── Feat icon subtle pulse on card hover ───────────────── */
.feature-card:hover .feat-icon {
  background: rgba(184, 135, 45, 0.18);
  border-color: rgba(184, 135, 45, 0.36);
  transition: background var(--transition), border-color var(--transition);
}

/* ── Alert improved ──────────────────────────────────────── */
.alert {
  border-radius: 18px;
  border-width: 1px;
}

/* ── Status banner ────────────────────────────────────────── */
.status-banner {
  border-radius: 24px;
  border: 1px solid rgba(184, 135, 45, 0.22);
  background: linear-gradient(135deg, rgba(255, 248, 234, 0.97), rgba(255, 243, 214, 0.93));
  box-shadow: 0 12px 40px rgba(184, 135, 45, 0.10);
}

/* ── Lead text readability ────────────────────────────────── */
.lead {
  font-size: 1.1rem;
  line-height: 1.72;
  font-weight: 450;
}

/* ── Icon pill hover ──────────────────────────────────────── */
.icon-pill {
  transition: background var(--transition), border-color var(--transition);
}

