/* =========================
   Global Variables
   ========================= */
:root {
    --accent: #0b63ad;
    --accent-light: #0984e3;
    --muted: #9aa3ad;
    --bg-light: #f8f9fa;
    --bg-dark: #111;
    --card-bg: #ffffff;
    --text-light: #fff;
    --text-muted: #ccc;
    --ui-font: "Segoe UI", system-ui, -apple-system, "Roboto", "Helvetica Neue", Arial;
}

/* =========================
   Body & Global
   ========================= */
html, body {
    height: 100%;
    margin: 0;
    font-family: var(--ui-font);
    background: var(--bg-light);
    color: #222;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1 0 auto; /* grow to fill space between navbar and footer */
    /*min-height: calc(100vh - 80px - 60px);*/ /* subtract navbar + footer height */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}
.topbar{
  background:#fff;
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-shadow:0 1px 0 rgba(0,0,0,0.04);
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.avatar{
  width:46px;
  height:46px;
  border-radius:50%;
  background:linear-gradient(135deg,#d6d6d6,#bdbdbd);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 6px 18px rgba(0,0,0,0.08);
}
.brand h1{
  margin:0;
  color:var(--accent);
  font-size:1.35rem;
  line-height:1;
  font-weight:600;
}
.badge{
  font-size:0.8em;
  border-radius:0.6rem;
  padding:5px 10px;
}


/* =========================
   Hero Section
   ========================= */
.hero {
    background: url('../assets/race_details.avif') center/cover no-repeat;
    height: 93vh;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
}

.hero .overlay {
    background: rgba(0,0,0,0.5);
    position: absolute;
    top:0; left:0; width:100%; height:100%;
}

.hero .hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.hero .btn {
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.hero .btn:hover {
    transform: scale(1.05);
    background: linear-gradient(90deg, #0d84ff, #0b63ad);
    color: #fff;
}

.search-row{
  padding:18px;
  display:flex;
  gap:10px;
  max-width:720px;
  margin:-18px auto 6px;
}
.search-row .form-control,
.search-row .btn{
  border-radius:8px;
}

/* ---------- Uniform Filter Row ---------- */
.filter-form {
  display: flex;
  flex-wrap: nowrap;        /* ensures all stay in one row */
  align-items: stretch;     /* same height for all boxes */
  gap: 10px;
  justify-content: space-between;
  overflow-x: auto;         /* allows horizontal scroll if too many filters */
  padding: 10px;
}

.filter-form > div {
  flex: 1 1 130px;          /* consistent width for each box */
  min-width: 130px;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}

.filter-form .form-control-sm,
.filter-form .form-select-sm {
  height: 42px;             /* uniform height */
  font-size: 0.875rem;
}

/* .filter-form .btn-sm {
  height: 42px;
  width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.filter-form .btn-secondary {
  margin-left: 5px;
} */

.filter-form .form-label {
  font-size: 0.75rem;
  margin-bottom: 3px;
  white-space: nowrap;
}

.filter-buttons {
    display: flex;            /* horizontal row */
    flex-direction: row !important;      /* default, just in case */
    gap: 5px;                 /* space between buttons */
    align-items: center;      /* vertically center buttons */
    justify-content: flex-start; /* align left inside the box */
}

/* =========================
   Sections
   ========================= */
section {
    padding: 60px 0;
    margin: 0; 
}
.section-title{
  font-size:1.6rem;
  font-weight:600;
  margin:22px 12px 10px;
  color:#222;
}
h2 {
    font-weight: 700;
    margin-bottom: 30px;
    border-left: 6px solid var(--accent);
    padding-left: 15px;
    color: var(--accent-light);
}

 .role-tabs {
  display: flex;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #dee2e6;
  margin-bottom: 1rem;
}

.role-tabs button {
  flex: 1;
  border: none;
  padding: 10px 0;
  background-color: #f8f9fa;
  color: #495057;
  font-weight: 500;
  transition: all 0.2s ease;
}

.role-tabs button.active {
  background-color: #0d6efd;
  color: #fff;
}

.role-tabs button:not(:last-child) {
  border-right: 1px solid #dee2e6;
}

/* ---------- Dash Cards ---------- */
.dash-cards{
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:14px;
  max-width:720px;
  margin:6px auto;
}
@media(min-width:900px){
  .dash-cards{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:18px;
  }
}

.stat-card{
  background:var(--card-bg);
  border-radius:12px;
  padding:18px;
  box-shadow:0 8px 20px rgba(14,30,37,0.06);
  position:relative;
  overflow:hidden;
}
.stat-card .icon{
  position:absolute;
  right:18px;
  top:14px;
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:8px;
  color:var(--accent);
  border:2px solid rgba(11,99,173,0.12);
  background:rgba(255,255,255,0.85);
}
.stat-card .title{
  color:var(--accent);
  font-size:1.1rem;
  font-weight:600;
}
.stat-card .bignum{
  font-size:2.4rem;
  margin:8px 0;
  font-weight:400;
}
.stat-card .muted{
  color:var(--muted);
  font-size:0.95rem;
  margin-bottom:10px;
}
.stat-card .card-actions{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
  padding:0 10px;
}
.stat-card a.view,
.stat-card a.manage{
  color:var(--accent);
  text-decoration:none;
  font-weight:600;
}

/* ---------- Overlay ---------- */
.overlay{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.6);
  z-index:9999;
  display:none;
}
.overlay-content{
  background:#fff;
  width:80%;
  max-width:280px;
  height:100%;
  padding:30px 20px;
  box-shadow:2px 0 8px rgba(0,0,0,0.2);
  position:absolute;
  top:0;
  left:-100%;
  transition:left 0.3s ease;
}
.overlay.open .overlay-content{
  left:0;
}
.overlay-content h3{
  font-weight:600;
  margin-bottom:20px;
}
.overlay-content a{
  display:block;
  padding:10px 0;
  color:#333;
  font-weight:500;
  text-decoration:none;
  border-bottom:1px solid #eee;
}
.overlay-content a:hover{
  color:var(--accent);
}
.overlay-close{
  position:absolute;
  top:15px;
  right:20px;
  font-size:1.5rem;
  color:#fff;
  cursor:pointer;
}

/* ---------- Itinerary Pages ---------- */
.card-itinerary{
  background: var(--card-bg);
  border-radius:1rem;
  border:none;
  box-shadow:0 8px 20px rgba(14,30,37,0.08);
  padding:2rem;
  max-width:500px;
  margin:2rem auto;
  transition:transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
  opacity:0;
  transform:translateY(15px);
}
.card-itinerary.show{
  opacity:1;
  transform:translateY(0);
}
.card-itinerary:hover{
  transform:translateY(-5px);
  box-shadow:0 12px 25px rgba(14,30,37,0.12);
}
.card-itinerary .header-title{
  font-weight:700;
  color:var(--accent);
}
.card-itinerary .card-icon{
  font-size:2.5rem;
  color:var(--accent);
}
.card-itinerary .btn-primary{
  background:linear-gradient(90deg,#0b63ad,#0d84ff);
  border:none;
  border-radius:0.5rem;
  font-weight:500;
}
.card-itinerary .btn-primary:hover{
  background:linear-gradient(90deg,#0955a0,#0b74e0);
}
.card-itinerary #errorMsg{
  white-space:pre-wrap;
}
.card-itinerary form .form-label{
  font-weight:500;
}

/* Tables */
.table-itinerary{
  width:85%;
  margin:1rem auto;
  border-radius:0.6rem;
  overflow:hidden;
  box-shadow:0 4px 12px rgba(0,0,0,0.05);
}
.table-itinerary th{
  width:35%;
  background:var(--accent);
  color:#fff;
  font-weight:600;
  padding:0.6rem 0.8rem;
}
.table-itinerary td{
  background:var(--card-bg);
  padding:0.6rem 0.8rem;
}
@media(max-width:768px){
  .table-itinerary{
    width:100%;
  }
}

/* =========================
   Cards (Race / Info / Gallery)
   ========================= */
.race-card, .contact-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.race-card:hover, .contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

/* =========================
   Countdown & Clock
   ========================= */
#countdown {
    font-size: 4rem;
    letter-spacing: 10px;
    font-weight: 900;
    text-shadow: 0 0 8px #74b9ff, 0 0 20px var(--accent-light), 0 0 30px var(--accent-light);
    margin-bottom: 40px;
    color: var(--accent-light);
}

.clock {
    margin: auto;
    width: 140px;
    height: 140px;
    border: 8px solid var(--accent-light);
    border-radius: 50%;
    position: relative;
    box-shadow: inset 0 0 30px #74b9ff, 0 0 50px rgba(0, 200, 255, 0.7);
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    background: #00cec9;
    border-radius: 3px;
    transform-origin: bottom center;
    transition: transform 0.5s ease-out;
}

.hour { width: 6px; height: 35px; }
.minute { width: 4px; height: 50px; }

.center {
    position: absolute;
    background: #00cec9;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px #00cec9;
}

/* =========================
   Gallery
   ========================= */
#gallery img {
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

#gallery img:hover {
    transform: scale(1.05);
}

/* =========================
   Contact Card
   ========================= */
.contact-card {
    max-width: 700px;
    margin: 50px auto;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 12px;
}

.contact-card h2 {
    color: var(--accent);
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 1.1rem;
    margin: 8px 0;
}

.contact-info a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Feedback Section */
.feedback-section {
    margin: 50px 0;
}

#feedbackText {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 12px;
    font-weight: 600;
    color: #574fa7;
}

/* Button Style */
.btn-primary {
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Button Style */
.btn-primary-feedback {
    padding: 12px 28px;
    background: linear-gradient(90deg,#574fa7,#6c5ce7);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(90deg,#6c5ce7,#574fa7);
    transform: translateY(-2px);
}

/* Modal Overlay */
#organiserModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 10000;
    overflow-y: auto;
}

/* Modal Content */
.modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 480px;
    margin: 60px auto;
    padding: 25px 30px;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Close Button */
#closeModalBtn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 26px;
    cursor: pointer;
    color: #555;
}

/* Form Title */
.form-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* Form Inputs */
form input[type="text"],
form input[type="email"],
form textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

form textarea {
    min-height: 50px;
}

/* Contact wrapper */
.contact-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.country-code {
    display: flex;
    align-items: center;
    gap: 5px;
}

.country-code img {
    height: 18px;
    width: auto;
}

/* Radio Buttons */
.enquiry-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.radio-item {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    gap: 4px;
}

.enquiry-toggle input[type="radio"] {
    accent-color: #574fa7;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 12px 0;
    background: #DB4497;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #c33b86;
}

/* =========================
   Footer
   ========================= */
footer {
    background: var(--bg-dark);
    color: var(--text-muted);
    padding: 20px 0;
    text-align: center;
    flex-shrink: 0; /* ensure it does not shrink */
}

footer a {
    color: var(--accent-light);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* =========================
   Navbar
   ========================= */
.navbar {
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
    padding: 0.8rem 1rem;
    height: 80px;
    z-index: 1030;
}

.navbar-transparent {
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0.8rem 2rem;
    height: 80px;
    z-index: 1030;
}

.navbar-transparent .container,
.navbar-transparent .container-fluid {
    background-color: transparent !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.navbar-transparent .nav-link {
    color: #fff !important;
}
.navbar-transparent .nav-link:hover,
.navbar-transparent .dropdown-item:hover {
    color: #f72585 !important;
    background-color: rgba(0,0,0,0.2) !important;
}

.navbar .nav-link {
    color: #fff !important;
    font-size: 1rem;
    margin: 0 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.navbar .nav-link:hover,
.navbar .dropdown-item:hover {
    color: #f72585 !important;
    background-color: rgba(0,0,0,0.2) !important;
}

/* Dropdown menu */
.navbar .dropdown-menu {
    background: #1e3c72;
    border-radius: 0.5rem;
    border: none;
    margin-top: 5px;
    min-width: 200px;
}

/* Dropdown items */
.navbar .dropdown-item {
    color: #fff !important;
    transition: all 0.3s ease;
}
.navbar .dropdown-item:hover {
    background-color: #14213d;
    color: #f72585;
}

/* Login button */
.btn-login {
    background: linear-gradient(90deg, #f72585, #b5179e);
    color: #fff;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(247, 37, 133, 0.4);
    margin-right: 20px;
}
.btn-login:hover {
    background: linear-gradient(90deg, #b5179e, #720026);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(183, 23, 158, 0.5);
}
.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(183, 23, 158, 0.3);
}


@media(max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    #countdown { font-size: 3rem; letter-spacing: 5px; }
    .clock { width: 110px; height: 110px; }
    .hour { height: 25px; }
    .minute { height: 35px; }
    .navbar .nav-link, .navbar .btn-login { text-align: center; padding: 0.5rem 0; }
}
