/*
  Kings' Chess Academy — Premium Dark Theme
  Presentation-only overrides. Page content, navigation paths, metadata,
  headings and structured data continue to come from the existing ASPX pages.
*/

/* ───────────────────── Design Tokens ───────────────────── */
:root {
  --kca-black: #070809;
  --kca-black-soft: #0c0e12;
  --kca-surface: #12161c;
  --kca-surface-raised: #191e26;
  --kca-surface-hover: #1f252f;
  --kca-line: rgba(215, 183, 93, .15);
  --kca-line-strong: rgba(215, 183, 93, .32);
  --kca-text: #f3f0e8;
  --kca-text-soft: #d5d0c5;
  --kca-muted: #9e9a90;
  --kca-gold: #d7b75d;
  --kca-gold-bright: #f4d983;
  --kca-gold-deep: #a27a20;
  --kca-gold-glow: rgba(215, 183, 93, .18);
  --kca-focus: #f8dd8c;
  --kca-danger: #ff8e8e;
  --kca-radius: 1rem;
  --kca-radius-sm: .65rem;
}

/* ───────────────────── Base ───────────────────── */
html {
  background: var(--kca-black);
  scroll-behavior: smooth;
}

body.site-shell {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 80% -10%, rgba(215, 183, 93, .07), transparent),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(120, 90, 20, .05), transparent),
    var(--kca-black);
  color: var(--kca-text);
  line-height: 1.72;
}

body.site-shell ::selection {
  background: var(--kca-gold);
  color: var(--kca-black);
}

/* ───────────────────── Typography ───────────────────── */
body.site-shell h1,
body.site-shell h2,
body.site-shell h3,
body.site-shell h4,
body.site-shell h5,
body.site-shell h6 {
  color: var(--kca-text);
  letter-spacing: -.02em;
}

body.site-shell h2 {
  position: relative;
  display: inline-block;
  padding-bottom: .45rem;
}

body.site-shell section > .container-lg > h2::after,
body.site-shell section > .container-lg > .row h2:first-child::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, var(--kca-gold-bright), transparent);
  border-radius: 2px;
}

body.site-shell h2.text-center {
  display: block;
}

body.site-shell h2.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

body.site-shell .lead {
  color: var(--kca-text-soft);
}

body.site-shell a {
  color: var(--kca-gold-bright);
  text-underline-offset: .2em;
}

body.site-shell a:hover,
body.site-shell a:focus {
  color: #fff4c7;
}

/* ───────────────────── Navbar ───────────────────── */
body.site-shell .site-header {
  min-height: 5.35rem;
  background: rgba(7, 8, 9, .92) !important;
  border-bottom: 1px solid var(--kca-line);
  box-shadow: 0 4px 30px rgba(0, 0, 0, .45) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.site-shell .site-header .navbar-brand {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
  text-decoration: none;
}

body.site-shell .site-header .navbar-brand img {
  height: 4.2rem !important;
  max-height: 4.2rem !important;
  width: auto !important;
  max-width: 14rem !important;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  filter: none !important;
}

body.site-shell .site-header .nav-item {
  box-shadow: none !important;
}

body.site-shell .site-header .nav-link {
  position: relative;
  padding: .8rem .75rem !important;
  color: #e9e4d9 !important;
  font-family: 'Poppins', sans-serif;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: color .25s ease;
}

body.site-shell .site-header .nav-link::after {
  position: absolute;
  right: .75rem;
  bottom: .3rem;
  left: .75rem;
  height: 2px;
  background: linear-gradient(90deg, var(--kca-gold), var(--kca-gold-bright));
  content: '';
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity .25s ease, transform .3s cubic-bezier(.4,0,.2,1);
}

body.site-shell .site-header .nav-link:hover,
body.site-shell .site-header .nav-link:focus {
  color: var(--kca-gold-bright) !important;
}

body.site-shell .site-header .nav-link:hover::after,
body.site-shell .site-header .nav-link:focus::after {
  opacity: 1;
  transform: scaleX(1);
}

body.site-shell .navbar-toggler {
  border-color: var(--kca-line-strong);
}

/* ───────────────────── Focus rings ───────────────────── */
body.site-shell .navbar-toggler:focus,
body.site-shell .btn:focus,
body.site-shell .form-control:focus,
body.site-shell .form-select:focus,
body.site-shell a:focus-visible {
  box-shadow: 0 0 0 .22rem rgba(244, 217, 131, .28) !important;
  outline: 0;
}

/* ───────────────────── Hero ───────────────────── */
body.site-shell .hero-bg {
  position: relative;
  overflow: hidden;
  background-color: var(--kca-black) !important;
  background-image:
    linear-gradient(90deg, rgba(7,8,9,.97) 2%, rgba(7,8,9,.80) 50%, rgba(7,8,9,.55) 100%),
    url('/assets/img/hero-bg.jpg') !important;
  background-position: center right !important;
  background-size: cover !important;
  border-bottom: 1px solid var(--kca-line-strong);
}

body.site-shell .hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 20% 80%, rgba(215, 183, 93, .06), transparent);
  pointer-events: none;
}

body.site-shell .hero-bg .container-lg {
  position: relative;
  z-index: 1;
}

/* ───────────────────── Sections & Backgrounds ───────────────────── */
body.site-shell .bg-white,
body.site-shell .bg-light,
body.site-shell section.container-fluid.bg-white,
body.site-shell section.container-fluid.bg-light {
  background-color: var(--kca-black-soft) !important;
  color: var(--kca-text) !important;
}

/* Alternate section backgrounds for visual rhythm */
body.site-shell section.container-fluid:not(.hero-bg):not(.bg-theme):not(.site-footer-main) {
  border-bottom: 1px solid rgba(215, 183, 93, .06);
}

body.site-shell .bg-theme,
body.site-shell .site-footer-main {
  background:
    linear-gradient(115deg, #15110a 0%, #1c170d 42%, #10131a 100%) !important;
  color: var(--kca-text) !important;
  border-top: 1px solid var(--kca-line-strong);
  border-bottom: 1px solid var(--kca-line);
}

body.site-shell .bg-dark,
body.site-shell .site-footer {
  background-color: #040506 !important;
  color: var(--kca-text);
}

/* ───────────────────── Text overrides ───────────────────── */
body.site-shell .text-dark,
body.site-shell .link-dark {
  color: var(--kca-text) !important;
}

body.site-shell .text-primary,
body.site-shell .text-info,
body.site-shell .text-theme {
  color: var(--kca-gold-bright) !important;
}

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

/* ───────────────────── Cards ───────────────────── */
body.site-shell .card,
body.site-shell .front,
body.site-shell .back,
body.site-shell .white-board {
  background: linear-gradient(145deg, var(--kca-surface-raised), var(--kca-surface)) !important;
  color: var(--kca-text);
  border: 1px solid var(--kca-line);
  border-radius: var(--kca-radius);
  box-shadow:
    0 1px 0 0 rgba(255,255,255,.03) inset,
    0 1rem 2.8rem rgba(0, 0, 0, .32) !important;
  transition: transform .25s ease, box-shadow .25s ease;
}

body.site-shell .card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 0 rgba(255,255,255,.04) inset,
    0 1.5rem 3.5rem rgba(0, 0, 0, .40),
    0 0 0 1px rgba(215, 183, 93, .12) !important;
}

body.site-shell .card-group {
  gap: 1.25rem;
  background: transparent;
  box-shadow: none !important;
}

body.site-shell .card-group > .card {
  border-radius: var(--kca-radius) !important;
  overflow: hidden;
}

body.site-shell .card .card-title,
body.site-shell .card h1,
body.site-shell .card h2,
body.site-shell .card h3,
body.site-shell .card h4,
body.site-shell .card h5 {
  color: var(--kca-gold-bright) !important;
}

body.site-shell .card-img-top,
body.site-shell .card-img {
  border-bottom: 1px solid var(--kca-line);
}

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

/* ───────────────────── Shadows ───────────────────── */
body.site-shell .shadow,
body.site-shell .shadow-sm {
  box-shadow: 0 1rem 2.8rem rgba(0, 0, 0, .35) !important;
}

/* ───────────────────── Buttons ───────────────────── */
body.site-shell .btn {
  border-radius: var(--kca-radius-sm);
  font-weight: 700;
  letter-spacing: .01em;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

body.site-shell .btn:hover {
  transform: translateY(-2px);
}

body.site-shell .btn-primary,
body.site-shell .btn-success {
  background: linear-gradient(135deg, var(--kca-gold-bright), var(--kca-gold-deep));
  border-color: var(--kca-gold);
  color: #15100a;
  box-shadow: 0 4px 15px rgba(215, 183, 93, .25);
}

body.site-shell .btn-primary:hover,
body.site-shell .btn-primary:focus,
body.site-shell .btn-success:hover,
body.site-shell .btn-success:focus {
  background: #f7db80;
  border-color: #f7db80;
  color: #15100a;
  box-shadow: 0 6px 22px rgba(215, 183, 93, .35);
}

body.site-shell .btn-outline-light,
body.site-shell .btn-outline-primary,
body.site-shell .btn-outline-secondary {
  background: transparent;
  border: 2px solid var(--kca-gold);
  color: var(--kca-gold-bright);
}

body.site-shell .btn-outline-light:hover,
body.site-shell .btn-outline-primary:hover,
body.site-shell .btn-outline-secondary:hover {
  background: var(--kca-gold);
  border-color: var(--kca-gold);
  color: #15100a;
  box-shadow: 0 4px 18px rgba(215, 183, 93, .3);
}

/* ───────────────────── Forms ───────────────────── */
body.site-shell .form-control,
body.site-shell .form-select {
  background-color: rgba(4, 5, 6, .65);
  border: 1px solid rgba(215, 183, 93, .22);
  color: var(--kca-text);
  border-radius: var(--kca-radius-sm);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

body.site-shell .form-control:focus,
body.site-shell .form-select:focus {
  background-color: #090b0e;
  border-color: var(--kca-gold);
  color: var(--kca-text);
  box-shadow: 0 0 0 .2rem rgba(215, 183, 93, .25) !important;
}

/* Default placeholder for non-floating inputs (e.g. contact form) */
body.site-shell .form-control::placeholder {
  color: #97938b;
  opacity: 1;
}

/* Floating label inputs: Placeholders MUST be transparent to prevent overlap with floating labels */
body.site-shell .form-floating > .form-control::-webkit-input-placeholder {
  color: transparent !important;
}
body.site-shell .form-floating > .form-control::-moz-placeholder {
  color: transparent !important;
}
body.site-shell .form-floating > .form-control:-ms-input-placeholder {
  color: transparent !important;
}
body.site-shell .form-floating > .form-control::placeholder {
  color: transparent !important;
}

body.site-shell .form-floating > label,
body.site-shell .form-label {
  color: #a8a39a !important;
}

body.site-shell .form-floating > label {
  padding: 1rem 0.85rem !important;
  font-size: 0.92rem;
  transition: opacity .15s ease-in-out, transform .15s ease-in-out, color .15s ease-in-out !important;
}

body.site-shell .form-floating > .form-control:focus ~ label,
body.site-shell .form-floating > .form-control:not(:placeholder-shown) ~ label,
body.site-shell .form-floating > .form-select ~ label {
  color: var(--kca-gold-bright) !important;
  opacity: 0.95 !important;
  transform: scale(0.85) translateY(-0.55rem) translateX(0.15rem) !important;
}

/* Textarea inside form-floating */
body.site-shell .form-floating > textarea.form-control {
  height: 6.8rem !important;
  min-height: 6.8rem;
  padding-top: 1.85rem !important;
  padding-bottom: 0.75rem !important;
  line-height: 1.5;
  resize: vertical;
}

body.site-shell .form-floating > textarea.form-control ~ label {
  height: auto !important;
  width: 100%;
  white-space: normal;
  pointer-events: none;
}

/* Select inside form-floating */
body.site-shell .form-floating > .form-select {
  padding-top: 1.625rem !important;
  padding-bottom: 0.625rem !important;
  height: calc(3.5rem + 2px) !important;
  color: var(--kca-text) !important;
  background-color: rgba(4, 5, 6, .75) !important;
}

body.site-shell .form-select option {
  background-color: var(--kca-surface-raised) !important;
  color: var(--kca-text) !important;
}

/* ───────────────────── Breadcrumbs ───────────────────── */
body.site-shell .breadcrumb-item,
body.site-shell .breadcrumb-item.active,
body.site-shell .breadcrumb-item + .breadcrumb-item::before {
  color: #e6dcc4 !important;
}

/* ───────────────────── List groups (About Us & Programs) ───────────────────── */
body.site-shell .list-group {
  --bs-list-group-bg: transparent;
  --bs-list-group-color: var(--kca-text);
  --bs-list-group-border-color: var(--kca-line);
  background-color: transparent !important;
}

body.site-shell .list-group-item {
  background-color: transparent !important;
  color: var(--kca-text) !important;
  border-color: var(--kca-line) !important;
}

body.site-shell .list-group-flush > .list-group-item {
  background-color: transparent !important;
  color: var(--kca-text-soft) !important;
  border-bottom: 1px solid var(--kca-line) !important;
  padding: 1.1rem 0.5rem;
  line-height: 1.75;
}

body.site-shell .list-group-flush > .list-group-item:last-child {
  border-bottom: 0 !important;
}

body.site-shell ul.list-group-flush > li.list-group-item.mb-3 {
  background: linear-gradient(145deg, var(--kca-surface-raised), var(--kca-surface)) !important;
  border: 1px solid var(--kca-line) !important;
  border-radius: var(--kca-radius-sm) !important;
  padding: 1.25rem !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
  transition: transform .2s ease, border-color .2s ease;
}

body.site-shell ul.list-group-flush > li.list-group-item.mb-3:hover {
  transform: translateY(-2px);
  border-color: var(--kca-line-strong) !important;
}

/* ───────────────────── Tables ───────────────────── */
body.site-shell .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--kca-text);
  --bs-table-striped-bg: rgba(255, 255, 255, .03);
  --bs-table-hover-bg: rgba(215, 183, 93, .07);
  --bs-table-border-color: var(--kca-line);
  color: var(--kca-text);
}

/* ───────────────────── Alerts ───────────────────── */
body.site-shell .alert-light,
body.site-shell .alert-warning {
  background: #1d1a12;
  border-color: rgba(215, 183, 93, .42);
  color: #f4e5b6;
}

body.site-shell .alert-success {
  background: #102219;
  border-color: #397650;
  color: #c4efd2;
}

body.site-shell .alert-danger,
body.site-shell .text-danger {
  color: var(--kca-danger) !important;
}

/* ───────────────────── Feature icons ───────────────────── */
body.site-shell .feature-icon-2 {
  background: rgba(215, 183, 93, .08) !important;
  border: 1px solid rgba(215, 183, 93, .25);
  border-radius: .75rem;
  transition: background .2s ease;
}

body.site-shell .feature-icon-2:hover {
  background: rgba(215, 183, 93, .14) !important;
}

body.site-shell ul.list-checked li i {
  background: rgba(215, 183, 93, .15);
  color: var(--kca-gold-bright);
}

body.site-shell .icon-link {
  color: var(--kca-gold-bright) !important;
  font-weight: 700;
  transition: color .2s ease;
}

body.site-shell .icon-link:hover {
  color: #fff4c7 !important;
}

body.site-shell .icon-link i {
  transition: transform .2s ease;
}

body.site-shell .icon-link:hover i {
  transform: translateX(4px);
}

/* ───────────────────── Kings Circuit ───────────────────── */
body.site-shell .kings-circuit-card {
  background: linear-gradient(145deg, #171b21, #0f1216) !important;
}

body.site-shell .kings-circuit-poster {
  background: #090b0e;
}

/* ───────────────────── Carousel ───────────────────── */
body.site-shell .owl-theme .owl-nav [class*='owl-'] {
  background: var(--kca-gold-deep);
  color: #161109;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}

body.site-shell .owl-theme .owl-nav [class*='owl-']:hover {
  background: var(--kca-gold-bright);
}

body.site-shell .owl-theme .owl-dot span {
  background: #54504a;
  transition: background .2s ease, transform .2s ease;
}

body.site-shell .owl-theme .owl-dot.active span,
body.site-shell .owl-theme .owl-dot:hover span {
  background: var(--kca-gold-bright);
  transform: scale(1.3);
}

/* ───────────────────── Social links ───────────────────── */
body.site-shell .social-wrapper a,
body.site-shell .social-wrapper a:nth-child(1) {
  background: #111419;
  border: 1px solid var(--kca-gold);
  color: var(--kca-gold-bright);
}

/* ───────────────────── Footer ───────────────────── */
body.site-shell .site-footer {
  border-top: 1px solid var(--kca-line);
}

body.site-shell .site-footer-main {
  position: relative;
}

body.site-shell .site-footer-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 600px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--kca-gold), transparent);
}

body.site-shell .site-footer .border-start,
body.site-shell .site-footer .border-end {
  border-color: var(--kca-line) !important;
}

body.site-shell .site-footer a:not(.link-light) {
  color: #f0e5c4 !important;
  transition: color .2s ease;
}

body.site-shell .site-footer a:not(.link-light):hover {
  color: var(--kca-gold-bright) !important;
}

body.site-shell .site-footer .list-group-item.bg-transparent a {
  transition: color .2s ease, transform .2s ease;
  display: inline-block;
}

body.site-shell .site-footer .list-group-item.bg-transparent a:hover {
  transform: translateX(3px);
}

body.site-shell .site-footer .list-group-horizontal .list-group-item {
  border: none;
}

body.site-shell .site-footer .list-group-horizontal .list-group-item a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: rgba(215, 183, 93, .08);
  border: 1px solid var(--kca-line-strong);
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}

body.site-shell .site-footer .list-group-horizontal .list-group-item a:hover {
  background: rgba(215, 183, 93, .2);
  border-color: var(--kca-gold);
  transform: translateY(-2px);
}

/* ───────────────────── Iframes (Maps) ───────────────────── */
body.site-shell iframe {
  border-radius: var(--kca-radius);
  filter: grayscale(.75) contrast(.9) brightness(.8);
  transition: filter .3s ease;
}

body.site-shell iframe:hover {
  filter: grayscale(.4) contrast(.95) brightness(.85);
}

/* ───────────────────── Gallery images ───────────────────── */
body.site-shell .photos .item a img,
body.site-shell .gallery img {
  border-radius: var(--kca-radius-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}

body.site-shell .photos .item a:hover img,
body.site-shell .gallery a:hover img {
  transform: scale(1.03);
  box-shadow: 0 8px 30px rgba(215, 183, 93, .15);
}

/* ───────────────────── Section dividers (inline border styling) ───────────────────── */
body.site-shell div[style*="border-bottom:1px double #000000"] {
  border-bottom-color: var(--kca-gold) !important;
  border-bottom-style: solid !important;
  opacity: .35;
}

/* ───────────────────── Responsive ───────────────────── */
@media (max-width: 991.98px) {
  body.site-shell .site-header .navbar-collapse {
    margin-top: .7rem;
    padding: .65rem;
    background: rgba(11, 13, 16, .98);
    border: 1px solid var(--kca-line-strong);
    border-radius: var(--kca-radius);
    backdrop-filter: blur(12px);
  }

  body.site-shell .site-header .nav-link {
    padding: .7rem .85rem !important;
  }

  body.site-shell .card:hover {
    transform: none;
  }
}

@media (max-width: 575.98px) {
  body.site-shell .site-header .navbar-brand img {
    height: 3.2rem !important;
    max-height: 3.2rem !important;
    width: auto !important;
    max-width: 10rem !important;
  }

  body.site-shell .hero-bg {
    background-image:
      linear-gradient(180deg, rgba(7, 8, 9, .97), rgba(7, 8, 9, .78)),
      url('/assets/img/hero-bg.jpg') !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.site-shell *,
  body.site-shell *::before,
  body.site-shell *::after { transition-duration: .01ms !important; }
}
