/**
* Riex Motors brand theme
* Colours taken from the logo (assets/img/rie.jpg): signal red, tyre black, gear grey, white.
* Loaded after main.css and the header's inline styles, so it layers on top of the template.
*/

:root {
  --riex-red: #d7141a;
  --riex-red-dark: #a50f14;
  --riex-red-light: #ff3b41;
  --riex-black: #0f0f11;
  --riex-charcoal: #1c1c20;
  --riex-grey: #6b6b72;
  --riex-silver: #e7e7ea;
  --riex-gradient: linear-gradient(135deg, #ff3b41 0%, #d7141a 45%, #a50f14 100%);
  --riex-dark-gradient: linear-gradient(135deg, #1c1c20 0%, #0f0f11 100%);
  --riex-shadow-sm: 0 4px 14px rgba(15, 15, 17, 0.06);
  --riex-shadow: 0 14px 40px rgba(15, 15, 17, 0.10);
  --riex-shadow-red: 0 12px 30px rgba(215, 20, 26, 0.28);
  --riex-radius: 14px;
  --default-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --heading-font: "Poppins", sans-serif;
}

/*--------------------------------------------------------------
# Base
--------------------------------------------------------------*/
body {
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
}

::selection {
  background: var(--riex-red);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--riex-black);
}

::-webkit-scrollbar-thumb {
  background: var(--riex-red);
  border-radius: 10px;
  border: 2px solid var(--riex-black);
}

.light-background {
  background-image:
    radial-gradient(circle at 0% 0%, rgba(215, 20, 26, 0.04), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(15, 15, 17, 0.04), transparent 40%);
}

/*--------------------------------------------------------------
# Top promo banner (header.php)
--------------------------------------------------------------*/
.top-ad-banner {
  background: var(--riex-dark-gradient);
  border-bottom: 3px solid var(--riex-red);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.top-ad-banner .ad-badge {
  background: var(--riex-gradient);
  color: #fff;
  letter-spacing: 0.5px;
}

.top-ad-banner .ad-text {
  color: #fff;
}

.top-ad-banner .ad-feature {
  color: rgba(255, 255, 255, 0.7);
}

.top-ad-banner .ad-image {
  border: 2px solid var(--riex-red);
}

.top-ad-banner .ad-cta-small {
  background: var(--riex-gradient);
  border: none;
  box-shadow: var(--riex-shadow-red);
}

.top-ad-banner .ad-cta-small:hover {
  background: #fff;
  color: var(--riex-red);
}

.top-ad-banner .ad-close {
  color: rgba(255, 255, 255, 0.7);
}

.top-ad-banner .ad-close:hover {
  color: var(--riex-red-light);
}

/*--------------------------------------------------------------
# Header & navigation
--------------------------------------------------------------*/
.header {
  transition: all 0.4s ease;
}

.scrolled .header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(215, 20, 26, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.header .logo img,
.header .logo .logo-image {
  max-height: 48px;
  border-radius: 10px;
  background: #fff;
  padding: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.header .logo h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

@media (min-width: 1200px) {
  .navmenu a,
  .navmenu a:focus {
    font-weight: 500;
    font-size: 15px;
    position: relative;
  }

  .navmenu > ul > li > a::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 10px;
    height: 2px;
    border-radius: 2px;
    background: var(--riex-red-light);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
  }

  .navmenu li:last-child > a::after {
    right: 0;
  }

  .navmenu > ul > li:hover > a::after,
  .navmenu > ul > li > a.active::after {
    transform: scaleX(1);
  }
}

@media (max-width: 1199px) {
  .navmenu ul {
    border-radius: var(--riex-radius);
    border-top: 4px solid var(--riex-red);
  }

  .mobile-nav-active .navmenu {
    background: rgba(15, 15, 17, 0.9);
  }
}

.header .btn-getstarted,
.header .btn-getstarted:focus {
  background: var(--riex-gradient);
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 9px 28px;
  box-shadow: var(--riex-shadow-red);
}

.header .btn-getstarted:hover,
.header .btn-getstarted:focus:hover {
  background: #fff;
  color: var(--riex-red);
  transform: translateY(-2px);
}

/*--------------------------------------------------------------
# Page titles (inner pages)
--------------------------------------------------------------*/
.page-title {
  padding: 190px 0 90px;
}

.page-title:before {
  background: linear-gradient(120deg, rgba(15, 15, 17, 0.92) 0%, rgba(15, 15, 17, 0.75) 55%, rgba(215, 20, 26, 0.55) 100%);
}

.page-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: var(--riex-gradient);
}

.page-title h1 {
  font-size: 48px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-title .breadcrumbs ol li a {
  color: var(--riex-red-light);
}

/*--------------------------------------------------------------
# Section titles
--------------------------------------------------------------*/
.section-title h2 {
  font-size: 38px;
  font-weight: 800;
}

.section-title h2:before {
  width: 120px;
  background: color-mix(in srgb, var(--default-color), transparent 85%);
}

.section-title h2::after {
  width: 70px;
  height: 4px;
  border-radius: 4px;
  background: var(--riex-gradient);
}

.section-title p {
  max-width: 720px;
  margin: 0 auto;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

/*--------------------------------------------------------------
# Buttons (shared)
--------------------------------------------------------------*/
.btn-primary {
  --bs-btn-bg: var(--riex-red);
  --bs-btn-border-color: var(--riex-red);
  --bs-btn-hover-bg: var(--riex-red-dark);
  --bs-btn-hover-border-color: var(--riex-red-dark);
  --bs-btn-active-bg: var(--riex-red-dark);
  --bs-btn-active-border-color: var(--riex-red-dark);
}

.text-primary {
  color: var(--riex-red) !important;
}

.bg-primary {
  background: var(--riex-gradient) !important;
}

/*--------------------------------------------------------------
# Hero
--------------------------------------------------------------*/
.hero .hero-overlay {
  background:
    linear-gradient(180deg, rgba(15, 15, 17, 0.55) 0%, rgba(15, 15, 17, 0.35) 40%, rgba(15, 15, 17, 0.9) 100%),
    linear-gradient(110deg, rgba(15, 15, 17, 0.85) 0%, rgba(15, 15, 17, 0.4) 55%, rgba(215, 20, 26, 0.45) 100%);
}

.hero .container {
  z-index: 3;
}

.hero .hero-content p {
  font-size: 1.25rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero .hero-content .hero-actions .btn {
  border-radius: 50px;
  padding: 15px 36px;
  font-weight: 600;
}

.hero .hero-content .hero-actions .btn-primary {
  background: var(--riex-gradient);
  border: none;
  box-shadow: var(--riex-shadow-red);
}

.hero .hero-content .hero-actions .btn-primary:hover {
  background: var(--riex-gradient);
  filter: brightness(1.1);
  box-shadow: 0 16px 36px rgba(215, 20, 26, 0.45);
}

.hero .hero-content .hero-actions .btn-secondary {
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: #fff;
}

.hero .hero-content .hero-actions .btn-secondary:hover {
  background: #fff;
  border-color: #fff;
  color: var(--riex-red);
}

.hero .hero-content .hero-stats {
  background: rgba(15, 15, 17, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 3px solid var(--riex-red);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.hero .hero-content .hero-stats .stat-item .stat-number {
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, #ff6b70 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (min-width: 992px) {
  .hero .hero-content .hero-stats .col-lg-3 + .col-lg-3 .stat-item {
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/*--------------------------------------------------------------
# About
--------------------------------------------------------------*/
.about .section-heading {
  font-weight: 800;
}

.about .main-image img {
  border-radius: 20px;
  box-shadow: var(--riex-shadow);
}

.about .image-section .floating-badge {
  --surface-color: var(--riex-charcoal);
  --heading-color: #ffffff;
  --default-color: #ffffff;
  --accent-color: var(--riex-red-light);
  background: var(--riex-dark-gradient);
  border-left: 4px solid var(--riex-red);
  border-radius: var(--riex-radius);
}

.about .cta-link {
  display: inline-flex;
  align-items: center;
  background: var(--riex-gradient);
  color: #fff !important;
  padding: 13px 30px;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: var(--riex-shadow-red);
  transition: all 0.3s ease;
}

.about .cta-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/*--------------------------------------------------------------
# Services
--------------------------------------------------------------*/
.services .services-grid {
  gap: 30px;
}

.services .service-item {
  border-radius: 18px;
  border: 1px solid var(--riex-silver);
  box-shadow: var(--riex-shadow-sm);
}

.services .service-item::before {
  height: 4px;
  background: var(--riex-gradient);
}

.services .service-item .service-number {
  color: color-mix(in srgb, var(--default-color), transparent 88%);
  font-weight: 800;
}

.services .service-item .service-icon {
  border-radius: 16px;
  background: rgba(215, 20, 26, 0.08);
}

.services .service-item .service-icon i {
  color: var(--riex-red);
}

.services .service-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--riex-shadow);
}

.services .service-item:hover .service-icon {
  background: var(--riex-gradient);
  box-shadow: var(--riex-shadow-red);
}

.services .service-item.featured {
  background: var(--riex-dark-gradient);
  border-color: var(--riex-charcoal);
}

.services .service-item.featured h3 {
  color: #fff;
}

.services .service-item.featured p {
  color: rgba(255, 255, 255, 0.75);
}

.services .service-item.featured .service-number {
  color: rgba(255, 255, 255, 0.12);
}

.services .service-item.featured .service-icon {
  background: var(--riex-gradient);
}

.services .service-item.featured .service-icon i {
  color: #fff;
}

.services .service-item.featured .featured-badge {
  background: var(--riex-gradient);
  box-shadow: var(--riex-shadow-red);
}

/*--------------------------------------------------------------
# Branches (index.php) - had no styles before
--------------------------------------------------------------*/
.branches .branch-card {
  height: 100%;
  background: var(--surface-color);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--riex-silver);
  box-shadow: var(--riex-shadow-sm);
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}

.branches .branch-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--riex-shadow);
  border-color: rgba(215, 20, 26, 0.35);
}

.branches .branch-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--riex-charcoal);
}

.branches .branch-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 15, 17, 0.6) 100%);
}

.branches .branch-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.branches .branch-card:hover .branch-image img {
  transform: scale(1.07);
}

.branches .branch-info {
  padding: 24px;
  border-top: 4px solid var(--riex-red);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.branches .branch-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.branches .branch-description {
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  font-size: 15px;
  flex: 1;
}

.branches .branch-meta .contact-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(215, 20, 26, 0.08);
  color: var(--riex-red);
  font-weight: 600;
  font-size: 14px;
  padding: 7px 16px;
  border-radius: 50px;
}

/*--------------------------------------------------------------
# Testimonials
--------------------------------------------------------------*/
.testimonials .testimonial-item {
  border-radius: 18px !important;
  border: 1px solid var(--riex-silver);
  box-shadow: var(--riex-shadow-sm) !important;
  position: relative;
  overflow: hidden;
  transition: all 0.35s ease;
}

.testimonials .testimonial-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--riex-gradient);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s ease;
}

.testimonials .testimonial-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--riex-shadow) !important;
}

.testimonials .testimonial-item:hover::before {
  transform: scaleY(1);
}

.testimonials .testimonial-item > p {
  font-style: italic;
  color: color-mix(in srgb, var(--default-color), transparent 15%);
}

.testimonials .quote-pattern i {
  opacity: 0.25;
}

.testimonials .client-icon {
  box-shadow: var(--riex-shadow-red);
}

/*--------------------------------------------------------------
# Call to action
--------------------------------------------------------------*/
.call-to-action .achievements-grid .achievement-item {
  border-radius: var(--riex-radius);
  border: 1px solid var(--riex-silver);
  box-shadow: var(--riex-shadow-sm);
}

.call-to-action .achievements-grid .achievement-item .achievement-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--riex-gradient);
  border-radius: 50%;
  box-shadow: var(--riex-shadow-red);
}

.call-to-action .achievements-grid .achievement-item .achievement-icon i {
  font-size: 1.8rem;
  color: #fff;
}

.call-to-action .achievements-grid .achievement-item .achievement-info h3 {
  font-weight: 800;
}

.call-to-action .action-panel {
  --surface-color: var(--riex-charcoal);
  --heading-color: #ffffff;
  --default-color: #ffffff;
  --accent-color: var(--riex-red-light);
  background: var(--riex-dark-gradient);
  border-radius: 20px;
  border-top: 4px solid var(--riex-red);
  box-shadow: var(--riex-shadow);
}

.call-to-action .action-panel .panel-content .action-buttons .btn-primary {
  background: var(--riex-gradient);
  color: #fff;
  border-radius: 50px;
  box-shadow: var(--riex-shadow-red);
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
  background: var(--riex-dark-gradient);
  border-top: 4px solid var(--riex-red);
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(215, 20, 26, 0.18), transparent 70%);
  pointer-events: none;
}

.footer .footer-brand .logo .sitename {
  font-weight: 800;
  text-transform: uppercase;
}

.footer .social-links a {
  border-radius: 50%;
}

.footer .footer-cta .btn-outline {
  border-radius: 50px;
  border-color: var(--riex-red);
}

.footer .footer-cta .btn-outline:hover {
  background: var(--riex-gradient);
  border-color: transparent;
}

.footer .footer-bottom {
  background: rgba(0, 0, 0, 0.3);
}

/*--------------------------------------------------------------
# Scroll top & preloader
--------------------------------------------------------------*/
.scroll-top {
  background: var(--riex-gradient);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  box-shadow: var(--riex-shadow-red);
}

.scroll-top:hover {
  background: var(--riex-black);
}

#preloader {
  background: var(--riex-black);
}

/*--------------------------------------------------------------
# Forms (contact / quote)
--------------------------------------------------------------*/
.form-control:focus,
.form-select:focus {
  border-color: var(--riex-red);
  box-shadow: 0 0 0 0.2rem rgba(215, 20, 26, 0.15);
}

.php-email-form button[type="submit"],
form button[type="submit"] {
  background: var(--riex-gradient);
  border: none;
  border-radius: 50px;
  box-shadow: var(--riex-shadow-red);
}
