/* RideCircle theme — dark/light via Bootstrap data-bs-theme + custom vars */
:root {
  --rc-primary: #e94f37;
  --rc-primary-2: #ff8c42;
  --rc-gradient: linear-gradient(135deg, #e94f37 0%, #ff8c42 100%);
  --rc-radius: 16px;
}
[data-bs-theme="dark"] {
  --rc-bg: #0e0f13;
  --rc-surface: rgba(255, 255, 255, 0.05);
  --rc-border: rgba(255, 255, 255, 0.09);
  --bs-body-bg: #0e0f13;
}
[data-bs-theme="light"] {
  --rc-bg: #f6f7fb;
  --rc-surface: rgba(255, 255, 255, 0.75);
  --rc-border: rgba(0, 0, 0, 0.08);
  --bs-body-bg: #f6f7fb;
}

body { font-family: "Segoe UI", system-ui, sans-serif; }

/* ------- gradient text / buttons ------- */
.text-gradient {
  background: var(--rc-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn-gradient {
  background: var(--rc-gradient); color: #fff; border: 0;
  border-radius: 10px; font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}
.btn-gradient:hover { color:#fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(233,79,55,.35); }
.btn-icon {
  border: 1px solid var(--rc-border); border-radius: 10px;
  color: var(--bs-body-color); background: var(--rc-surface);
}
.btn-icon:hover { border-color: var(--rc-primary); color: var(--rc-primary); }

/* ------- glass nav & cards ------- */
.glass-nav {
  background: color-mix(in srgb, var(--bs-body-bg) 72%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rc-border);
}

/* Theme-aware outline button (visible in BOTH light and dark mode) */
.btn-ghost {
  color: var(--bs-body-color);
  border: 1px solid var(--bs-body-color);
  border-radius: 10px; font-weight: 500;
  background: transparent;
}
.btn-ghost:hover { background: var(--rc-gradient); color: #fff; border-color: transparent; }

/* Navbar links: strong contrast in both themes */
.glass-nav .nav-link { color: var(--bs-body-color); font-weight: 500; }
.glass-nav .nav-link:hover, .glass-nav .nav-link.active { color: var(--rc-primary); }
[data-bs-theme="light"] .glass-nav .nav-link { color: #16181d; }
[data-bs-theme="light"] .glass-nav .nav-link:hover { color: var(--rc-primary); }
[data-bs-theme="light"] .glass-nav .navbar-brand { color: #16181d; }
.glass-card {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .25s, box-shadow .25s;
}
.glass-card:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(0,0,0,.25); }
.glass-card .card-img-top { border-radius: var(--rc-radius) var(--rc-radius) 0 0; height: 200px; object-fit: cover; }

/* ------- hero ------- */
.hero {
  min-height: 82vh; display: flex; align-items: center; position: relative;
  /* remote photo layered over local SVG — if the photo fails, the SVG shows */
  background:
    linear-gradient(120deg, rgba(14,15,19,.88) 30%, rgba(233,79,55,.35)),
    url('https://images.unsplash.com/photo-1558981403-c5f9899a28bc?w=1600&auto=format&fit=crop&q=70') center/cover no-repeat,
    url('../images/hero.svg') center/cover no-repeat;
  color: #fff;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; }
.hero .lead { max-width: 620px; }

/* Carousel slide variants — local images (slide 2: solo, slide 3: group) */
/* solo-ride.jpg is square — 'contain' shows the FULL image anchored right,
   with a left-to-right dark fade so the text stays readable and the seam blends */
.hero-solo {
  background:
    linear-gradient(90deg, #0e0f13 0%, rgba(14,15,19,.94) 38%, rgba(14,15,19,.45) 58%, rgba(14,15,19,.05) 78%, rgba(14,15,19,.35) 100%),
    url('../images/solo-ride.jpg') right center / contain no-repeat,
    #0e0f13;
}
@media (max-width: 767px) {
  /* portrait screens match the square image better — crop normally */
  .hero-solo {
    background:
      linear-gradient(180deg, rgba(14,15,19,.75), rgba(14,15,19,.45)),
      url('../images/solo-ride.jpg') center 20% / cover no-repeat;
  }
}
.hero-group {
  background:
    linear-gradient(120deg, rgba(14,15,19,.85) 25%, rgba(255,140,66,.3)),
    url('../images/group-ride.png') center 30% / cover no-repeat;
}

/* Equal height for every banner slide */
#heroCarousel .hero { height: min(88vh, 760px); min-height: 540px; }
@media (max-width: 767px) {
  #heroCarousel .hero { height: auto; min-height: 88vh; padding: 4rem 0; }
}

/* Highly visible indicators */
#heroCarousel .carousel-indicators { margin-bottom: 1.6rem; }
#heroCarousel .carousel-indicators button {
  width: 36px; height: 6px; border-radius: 3px; border: 0;
  background: rgba(255, 255, 255, .45); opacity: 1;
  transition: background .3s, width .3s;
}
#heroCarousel .carousel-indicators button.active {
  background: var(--rc-gradient); width: 52px;
  box-shadow: 0 0 10px rgba(233, 79, 55, .8);
}

/* Highly visible prev/next arrows — brand-colored circles */
#heroCarousel .carousel-control-prev, #heroCarousel .carousel-control-next {
  width: 8%; opacity: 1;
}
#heroCarousel .carousel-control-prev-icon, #heroCarousel .carousel-control-next-icon {
  background-color: var(--rc-primary);
  border-radius: 50%; width: 48px; height: 48px;
  background-size: 45%; background-position: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
  transition: transform .2s, background-color .2s;
}
#heroCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#heroCarousel .carousel-control-next:hover .carousel-control-next-icon {
  background-color: var(--rc-primary-2); transform: scale(1.12);
}

/* ------- misc ------- */
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--rc-primary); }
.avatar-lg { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid var(--rc-primary); }
.cover-photo { height: 240px; object-fit: cover; width: 100%; border-radius: var(--rc-radius) var(--rc-radius) 0 0; }
.section-title { font-weight: 800; }
.section-title span { color: var(--rc-primary); }
.stat-box { text-align: center; padding: 1rem; }
.stat-box .h3 { color: var(--rc-primary); margin-bottom: 0; }
.footer-links a { color: var(--bs-secondary-color); text-decoration: none; line-height: 2; }
.footer-links a:hover { color: var(--rc-primary); }
.mega-footer { background: color-mix(in srgb, var(--bs-body-bg) 50%, #000 12%); border-top: 1px solid var(--rc-border); }
.social-link { color: var(--bs-secondary-color); }
.social-link:hover { color: var(--rc-primary); }
.ride-meta i { width: 20px; color: var(--rc-primary); }
img { max-width: 100%; }
.form-control, .form-select { border-radius: 10px; }
.auth-card { max-width: 460px; margin: 3rem auto; }

/* ------- skeleton loading ------- */
.skeleton {
  border-radius: var(--rc-radius); height: 320px;
  background: linear-gradient(90deg, var(--rc-surface) 25%, var(--rc-border) 50%, var(--rc-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------- spinner overlay ------- */
#pageLoader {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: var(--bs-body-bg); z-index: 2000; transition: opacity .4s;
}
#pageLoader.done { opacity: 0; pointer-events: none; }

/* ------- ride chat widget (bottom-right) ------- */
#chatBox {
  position: fixed; right: 20px; bottom: -600px; z-index: 1090;
  width: 340px; max-width: calc(100vw - 32px);
  background: var(--bs-body-bg);
  border: 1px solid var(--rc-border); border-radius: 16px 16px 0 0;
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
  display: flex; flex-direction: column;
  transition: bottom .3s ease;
}
#chatBox.open { bottom: 0; }
.chat-header {
  background: var(--rc-gradient); color: #fff; font-weight: 600;
  padding: 10px 14px; border-radius: 15px 15px 0 0;
  display: flex; justify-content: space-between; align-items: center;
}
.chat-body {
  height: 320px; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.chat-msg { max-width: 85%; align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.chat-msg .bubble {
  display: inline-block; padding: 8px 12px; border-radius: 14px 14px 14px 4px;
  background: var(--rc-surface); border: 1px solid var(--rc-border);
  word-break: break-word; text-align: left;
}
.chat-msg.mine .bubble {
  background: var(--rc-gradient); color: #fff; border: 0;
  border-radius: 14px 14px 4px 14px;
}
.chat-time { font-size: .68rem; color: var(--bs-secondary-color); margin-top: 2px; }
.chat-footer {
  display: flex; gap: 6px; padding: 10px;
  border-top: 1px solid var(--rc-border);
}

/* ------- admin ------- */
.admin-sidebar {
  min-height: 100vh; width: 240px;
  background: color-mix(in srgb, var(--bs-body-bg) 55%, #000 15%);
  border-right: 1px solid var(--rc-border);
}
.admin-sidebar .nav-link { color: var(--bs-body-color); border-radius: 8px; margin: 2px 8px; }
.admin-sidebar .nav-link.active, .admin-sidebar .nav-link:hover { background: var(--rc-gradient); color: #fff; }

@media (max-width: 991px) { .admin-sidebar { width: 100%; min-height: auto; } }
