/* =========================================
   CsehSzerviz – Master Stylesheet
   GSX-R inspired: Red #e30310 + Blue #00309a
   Dark industrial motorsport aesthetic
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ══════════════════════════════════════════
   ROOT TOKENS
══════════════════════════════════════════ */
:root {
  --red:         #e30310;
  --red-dark:    #b8010c;
  --red-dim:     rgba(227, 3, 16, 0.15);
  --red-glow:    rgba(227, 3, 16, 0.35);
  --blue:        #00309a;
  --blue-dim:    rgba(0, 48, 154, 0.18);
  --blue-light:  #1a55d4;
  --dark:        #0b0b0b;
  --dark-2:      #111111;
  --dark-3:      #181818;
  --dark-4:      #222222;
  --steel:       #2c2c2c;
  --border:      rgba(255,255,255,0.07);
  --muted:       #777777;
  --light:       #e8e4dc;
  --white:       #ffffff;
  --green:       #2ecc71;
  --yellow:      #ffc107;
  --radius:      12px;
  --radius-lg:   18px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);

  /* Bootstrap compat */
  --primary:     #e30310;
  --secondary:   #00309a;
  --bs-primary:  #e30310;
}

/* ══════════════════════════════════════════
   GLOBAL RESET & BASE
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--dark);
  color: var(--light);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--dark-2); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

img { max-width: 100%; }

/* ══════════════════════════════════════════
   TYPOGRAPHY UTILITIES
══════════════════════════════════════════ */
.font-display { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.07em; }

.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.85rem;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.title-underline {
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--blue));
  border-radius: 2px;
  margin-top: 0.5rem;
}

.title-accent { color: var(--red); }

/* ══════════════════════════════════════════
   SCROLLBAR & SELECTION
══════════════════════════════════════════ */
::selection { background: var(--red); color: #fff; }

/* ══════════════════════════════════════════
   NAVBAR / HEADER
══════════════════════════════════════════ */

/* Top info bar */
header .container-fluid {
  background-color: var(--dark-2) !important;
  border-bottom: 1px solid var(--border);
}

header .container-fluid small {
  color: var(--muted);
  font-size: 0.8rem;
}

header .container-fluid .text-primary {
  color: var(--red) !important;
}

/* Social icon buttons in header */
header .btn-sm-square {
  background: var(--dark-3) !important;
  border: 1px solid var(--steel) !important;
  color: var(--muted) !important;
  width: 30px;
  height: 30px;
  border-radius: 6px !important;
  transition: all 0.25s;
}

header .btn-sm-square:hover {
  background: var(--red) !important;
  color: #fff !important;
  border-color: var(--red) !important;
}

/* Main navbar */
nav.navbar {
  background: var(--dark-2) !important;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--red) 50%, var(--blue) 50%) 1;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5) !important;
  padding: 0 !important;
  z-index: 1000;
}

.navbar-brand h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.1em;
  color: var(--white) !important;
  margin: 0;
}

.navbar-brand h2 i { color: var(--red); }

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

/* Nav links */
.navbar-light .navbar-nav .nav-link {
  color: var(--muted) !important;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 28px 0 !important;
  position: relative;
  transition: color 0.25s;
}

.navbar-light .navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
  color: var(--white) !important;
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

@media (min-width: 1200px) {
  .navbar-light .navbar-nav .nav-link { margin-right: 28px; }
}

/* Navbar CTA buttons */
.navbar .btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  border: none;
  color: #fff !important;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 10px 22px !important;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 3px 12px var(--red-glow);
}

.navbar .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--red-glow);
}

.navbar .btn-secondary {
  background: transparent;
  border: 1.5px solid var(--blue);
  color: var(--blue-light) !important;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 10px 22px !important;
  border-radius: 6px;
  transition: all 0.2s;
}

.navbar .btn-secondary:hover {
  background: var(--blue);
  color: #fff !important;
}

/* Mobile hamburger */
.navbar-toggler {
  border: 1px solid var(--steel);
  border-radius: 6px;
  padding: 6px 10px;
  margin-right: 12px;
}

.navbar-toggler-icon {
  filter: invert(1);
}

/* Mobile collapse */
@media (max-width: 1199px) {
  .navbar-nav {
    background: var(--dark-3);
    border-top: 1px solid var(--border);
    padding: 16px;
  }

  .navbar-light .navbar-nav .nav-link {
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--border);
  }

  .navbar-light .navbar-nav .nav-link::after { display: none; }

  .navbar .btn-primary,
  .navbar .btn-secondary {
    width: 100%;
    text-align: center;
    margin-top: 6px;
  }
}

/* Sticky */
.navbar-light.sticky-top {
  top: -200px;
  transition: top 0.5s;
}

/* ══════════════════════════════════════════
   BOOKING / DARK SECTION BACKGROUND
══════════════════════════════════════════ */
.booking {
  background: var(--dark-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ══════════════════════════════════════════
   BUTTONS (Global)
══════════════════════════════════════════ */
.btn {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.25s var(--ease);
  border-radius: var(--radius);
}

.btn.btn-primary,
.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px var(--red-glow);
}

.btn.btn-primary:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--red-glow);
  background: linear-gradient(135deg, #ff1420 0%, var(--red) 100%);
  color: #fff;
}

.btn.btn-secondary,
.btn-secondary {
  background: var(--blue);
  border: none;
  color: #fff;
}

.btn.btn-secondary:hover,
.btn-secondary:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
  color: #fff;
}

/* Ghost green */
.ghost-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(46, 204, 113, 0.15);
  border: 1.5px solid var(--green);
  border-radius: var(--radius);
  transition: all 0.25s var(--ease);
  cursor: pointer;
}

.ghost-green:hover,
.ghost-green:focus {
  background: rgba(46, 204, 113, 0.3);
  box-shadow: 0 0 18px rgba(46, 204, 113, 0.3);
  transform: translateY(-1px);
  color: #fff;
}

/* Red transparent */
.red-tp-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  background: transparent;
  border: 1.5px solid var(--red);
  border-radius: var(--radius);
  transition: all 0.25s var(--ease);
  cursor: pointer;
}

.red-tp-btn:hover {
  background: var(--red-dim);
  color: var(--red);
  box-shadow: 0 0 14px var(--red-dim);
}

/* Logout */
.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(220, 20, 60, 0.2);
  border: 1.5px solid var(--red);
  border-radius: var(--radius);
  transition: all 0.25s var(--ease);
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(220, 20, 60, 0.4);
  box-shadow: 0 0 18px rgba(220, 20, 60, 0.3);
  transform: translateY(-1px);
  color: #fff;
}

/* Btn square */
.btn-square, .btn-sm-square, .btn-lg-square {
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.btn-sm-square { width: 32px; height: 32px; }
.btn-square    { width: 38px; height: 38px; }
.btn-lg-square { width: 48px; height: 48px; }

/* ══════════════════════════════════════════
   FORM CONTROLS
══════════════════════════════════════════ */
.form-control,
.form-select {
  background-color: var(--dark-4) !important;
  color: var(--light) !important;
  border: 1.5px solid var(--steel) !important;
  border-radius: var(--radius) !important;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px var(--red-dim) !important;
  outline: none;
  background-color: var(--dark-3) !important;
}

.form-control::placeholder { color: var(--muted); }

.form-label {
  color: var(--light);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

/* ══════════════════════════════════════════
   STATUS MESSAGES
══════════════════════════════════════════ */
.alert-message {
  max-width: 600px;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius);
  margin: 10px auto;
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
}

.success, .alert-message.success {
  background: rgba(46, 204, 113, 0.12);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.error, .alert-message.error {
  background: rgba(227, 3, 16, 0.12);
  color: #ff6b6b;
  border: 1px solid rgba(227, 3, 16, 0.3);
}

/* ══════════════════════════════════════════
   HERO IMAGE
══════════════════════════════════════════ */
.hero-img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  display: block;
}

/* ══════════════════════════════════════════
   FACT / STATS SECTION
══════════════════════════════════════════ */
.fact {
  background: var(--dark-2) !important;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--red) 50%, var(--blue) 50%) 1;
  position: relative;
}

.fact::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.fact h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  letter-spacing: 0.06em;
}

.fact p { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.footer {
  background: var(--dark-2) !important;
  border-top: 1px solid var(--border);
}

.footer::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--red) 50%, var(--blue) 50%);
}

.footer .btn.btn-social {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--steel) !important;
  background: var(--dark-3) !important;
  color: var(--muted) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  margin-right: 6px;
}

.footer .btn.btn-social:hover {
  background: var(--red) !important;
  border-color: var(--red) !important;
  color: #fff !important;
}

.footer .btn.btn-link {
  display: block;
  padding: 0;
  color: var(--muted) !important;
  font-size: 0.875rem;
  font-weight: normal;
  text-transform: none;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s, letter-spacing 0.2s;
}

.footer .btn.btn-link::before {
  content: "\f105";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 8px;
  color: var(--red);
}

.footer .btn.btn-link:hover {
  color: var(--white) !important;
  letter-spacing: 0.02em;
}

.footer .copyright {
  padding: 20px 0;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.footer .copyright a { color: var(--muted); text-decoration: none; }
.footer .copyright a:hover { color: var(--red); }

.footer .footer-menu a {
  margin-right: 14px;
  padding-right: 14px;
  border-right: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.2s;
}

.footer .footer-menu a:last-child { margin-right: 0; padding-right: 0; border-right: none; }
.footer .footer-menu a:hover { color: var(--red); }

.footer h4, .footer h5 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.08em;
  color: var(--white);
}

/* ══════════════════════════════════════════
   MODAL
══════════════════════════════════════════ */
.modal-content {
  background: var(--dark-3);
  border: 1px solid var(--steel);
  border-radius: var(--radius-lg);
  color: var(--light);
}

.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}

.modal-header .modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.07em;
  color: var(--white);
}

.modal-footer { border-top: 1px solid var(--border); }

.btn-close-white { filter: invert(1) grayscale(1); }

/* Custom modal (old style) */
.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

.modal .modal-content {
  background: var(--dark-3);
  border: 1px solid var(--steel);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 480px;
  margin: 80px auto;
}

/* ══════════════════════════════════════════
   SPINNER
══════════════════════════════════════════ */
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-out, visibility 0s linear 0.5s;
  z-index: 99999;
}

#spinner.show {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s;
}

/* ══════════════════════════════════════════
   BACK TO TOP
══════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  display: none;
  right: 24px;
  bottom: 24px;
  z-index: 99;
  width: 42px;
  height: 42px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px var(--red-glow);
  transition: transform 0.25s;
}

.back-to-top:hover { transform: translateY(-3px); }

/* ══════════════════════════════════════════
   MISC UTILS
══════════════════════════════════════════ */
.green   { color: var(--green); }
.fw-medium { font-weight: 600 !important; }
.text-primary  { color: var(--red) !important; }
.text-secondary { color: var(--blue-light) !important; }
.bg-dark { background-color: var(--dark-2) !important; }
.bg-light { background-color: var(--dark-3) !important; }

.stop-scrolling { height: 100%; overflow: hidden; }

.break-word {
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* ══════════════════════════════════════════
   TEAM
══════════════════════════════════════════ */
.team-item .team-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(227, 3, 16, 0.88);
  transform: scale(0);
  transition: 0.4s var(--ease);
}

.team-item:hover .team-overlay { transform: scale(1); }

.team-item .team-overlay .btn {
  color: var(--red);
  background: #fff;
  border-radius: 50%;
  width: 38px; height: 38px;
  padding: 0;
}

.team-item .team-overlay .btn:hover {
  background: var(--blue);
  color: #fff;
}

/* ══════════════════════════════════════════
   SERVICE NAV
══════════════════════════════════════════ */
.service .nav .nav-link {
  background: var(--dark-3);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: 0.3s;
}

.service .nav .nav-link.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.service .nav .nav-link.active h4 { color: #fff !important; }

/* ══════════════════════════════════════════
   DATETIMEPICKER
══════════════════════════════════════════ */
.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover { background: var(--red); }
.bootstrap-datetimepicker-widget table td.today::before { border-bottom-color: var(--red); }

/* ══════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════ */
.page-header {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.page-header-inner { background: rgba(0,0,0,0.7); }

/* ══════════════════════════════════════════
   REGISTRATION FORM FIELDS
══════════════════════════════════════════ */
.regrow {
  --bs-gutter-x: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(-0.5 * var(--bs-gutter-x));
  margin-left: calc(-0.5 * var(--bs-gutter-x));
}

.regrow > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
}

#elfogad { height: auto; margin-right: 0.5rem; accent-color: var(--red); }
fieldset { padding: 0; }

/* ══════════════════════════════════════════
   CAROUSEL (shared)
══════════════════════════════════════════ */
.carousel-control-prev,
.carousel-control-next {
  width: 52px;
  height: 52px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  margin: 0 12px;
  opacity: 1;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: rgba(227, 3, 16, 0.5);
}

.carousel-caption {
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 100%);
  z-index: 1;
}

/* ══════════════════════════════════════════
   DROPDOWN
══════════════════════════════════════════ */
.navbar .dropdown-toggle::after {
  border: none;
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-left: 6px;
  vertical-align: middle;
}

@media (min-width: 999px) {
  .navbar .nav-item .dropdown-menu {
    display: block;
    border: 1px solid var(--steel);
    background: var(--dark-3);
    margin-top: 0;
    top: 150%;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    border-radius: var(--radius);
  }

  .navbar .nav-item:hover .dropdown-menu {
    top: 100%;
    visibility: visible;
    opacity: 1;
  }
}
