/* ==========================================================
   RSCS BRAND PALETTE & CENTRAL STYLESHEET
   ========================================================== */
:root {
  --primary-color: #f84c02;    /* Main brand color (nav accents, buttons, highlights) */
  --secondary-color: #474747;  /* Accent color (headers, dark cards, footer) */
  --text-dark: #2d3748;        /* Body text color */
  --text-light: #ffffff;       /* Header text on dark backgrounds */
  --bg-light: #ffffff;         /* Section background */
  --bg-alt: #f8fafc;           /* Subtle alternate background */
  --border-color: #e2e8f0;     /* Light borders */
  --font-family: 'Inter', sans-serif;
  --max-width: 1200px;
  --transition: all 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-family); color: var(--text-dark); line-height: 1.6; background: #fff; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* 1. TOP HEADER BAR */
.top-bar { background: var(--secondary-color); color: var(--text-light); padding: 0.6rem 0; font-size: 0.85rem; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.top-bar a { color: var(--text-light); text-decoration: none; margin-left: 0.5rem; }
.top-bar-item { display: inline-flex; align-items: center; gap: 0.4rem; margin-right: 1rem; }

/* 2. NAVIGATION */
header { background: #ffffff; border-bottom: 2px solid var(--border-color); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; }
.logo img { height: 100px; display: block; }

nav ul { display: flex; list-style: none; gap: 1.5rem; align-items: center; }
nav a { text-decoration: none; color: var(--text-dark); font-weight: 600; font-size: 0.95rem; transition: var(--transition); }
nav a:hover, nav a.active { color: var(--primary-color); }

.btn-quote { 
  background: var(--primary-color); 
  color: #fff !important; 
  padding: 0.6rem 1.2rem; 
  border-radius: 4px; 
  font-weight: 700; 
  display: inline-block;
  transition: var(--transition);
}
.btn-quote:hover { background: #d63f00; }

/* 3. HERO & BANNERS */
.hero { 
  background: linear-gradient(rgba(71, 71, 71, 0.85), rgba(71, 71, 71, 0.85)), url('/images/hero-bg.jpg') center/cover no-repeat; 
  color: #ffffff; 
  padding: 5rem 1.5rem; 
  text-align: center;
}
.hero-content { max-width: 850px; margin: 0 auto; }
.hero h1 { font-size: 2.8rem; margin-bottom: 1rem; font-weight: 700; line-height: 1.2; }
.hero p { font-size: 1.15rem; margin-bottom: 2rem; opacity: 0.95; }
.hero-btns { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.btn-secondary { background: transparent; border: 2px solid #fff; color: #fff; padding: 0.6rem 1.2rem; border-radius: 4px; text-decoration: none; font-weight: 600; }
.btn-secondary:hover { background: #fff; color: var(--secondary-color); }

/* 4. GRIDS & CARDS */
section { padding: 4.5rem 0; }
.bg-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.2rem; color: var(--secondary-color); margin-bottom: 0.5rem; }
.section-header h2 span { color: var(--primary-color); }
.section-header p { color: var(--text-dark); max-width: 700px; margin: 0 auto; opacity: 0.85; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Forces exact 2-column layout */
  gap: 2rem;
  align-items: stretch; /* Keeps card heights uniform across each row */
}
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }

.card { 
  background: #fff; 
  border: 1px solid var(--border-color); 
  border-radius: 6px; 
  padding: 2rem; 
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
  transition: var(--transition);
}
.card:hover { transform: translateY(-4px); border-color: var(--primary-color); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.card h3 { color: var(--secondary-color); margin-bottom: 0.8rem; }
.card p { font-size: 0.95rem; margin-bottom: 1rem; }
.card a { color: var(--primary-color); text-decoration: none; font-weight: 700; }

/* 5. TESTIMONIALS & FAQS */
.testimonial-card { background: #fff; padding: 2rem; border-left: 4px solid var(--primary-color); border-radius: 4px; border-top: 1px solid var(--border-color); border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.testimonial-card p { font-style: italic; margin-bottom: 1rem; }
.testimonial-author { font-weight: 700; color: var(--secondary-color); }
.testimonial-project { font-size: 0.85rem; color: var(--primary-color); }

.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--border-color); border-radius: 4px; margin-bottom: 1rem; overflow: hidden; }
.faq-question { padding: 1.2rem; font-weight: 700; color: var(--secondary-color); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { padding: 0 1.2rem 1.2rem 1.2rem; display: none; border-top: 1px solid #f0f0f0; }
.faq-item.active .faq-answer { display: block; }
.faq-item.active .faq-question { color: var(--primary-color); }

/* 6. FORMS & FOOTER */
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group textarea { padding: 0.8rem; border: 1px solid var(--border-color); border-radius: 4px; font-family: var(--font-family); font-size: 1rem; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); }

footer { background: var(--secondary-color); color: #fff; padding: 4rem 0 2rem 0; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; margin-bottom: 3rem; }
.footer-col h4 { color: var(--primary-color); margin-bottom: 1.2rem; font-size: 1.1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col a { color: #dddddd; text-decoration: none; }
.footer-col a:hover { color: #ffffff; }
.qr-codes { display: flex; gap: 1rem; margin-top: 1rem; }
.qr-codes img { width: 120px; height: 120px; border-radius: 6px; background: #fff; padding: 4px; }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; color: #aaa; }

/* 7. SCROLL FADE-IN */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ==========================================================
   SERVICES SUB-NAV & ANCHOR PAGE STYLES
   ========================================================== */
html {
  scroll-behavior: smooth;
}

.service-section {
  scroll-margin-top: 130px; /* Offset for sticky header + subnav */
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-color);
}

.sub-nav-wrapper {
  position: sticky;
  top: 77px; /* Sits right below the main header */
  z-index: 990;
  background: var(--secondary-color);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.sub-nav {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.5rem 0;
  gap: 0.5rem;
  scrollbar-width: none; /* Hide scrollbar Firefox */
}

.sub-nav::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}

.sub-nav a {
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 4px;
  transition: var(--transition);
}

.sub-nav a:hover, .sub-nav a.active-sub {
  background: var(--primary-color);
  color: #ffffff;
}

.service-badge {
  display: inline-block;
  background: rgba(248, 76, 2, 0.1);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 0.8rem;
}

.spec-list {
  list-style: none;
  margin: 1.2rem 0;
}

.spec-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.spec-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* ==========================================================
   FLEET CAROUSEL STYLES
   ========================================================== */
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 450px; /* Standardizes frame height for all mixed image ratios */
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  background: var(--secondary-color);
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 1;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Prevents distortion for vertical & square images */
  object-position: center;
  display: block;
}

/* Arrow Controls */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(71, 71, 71, 0.7);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  z-index: 10;
  transition: var(--transition);
}

.carousel-btn:hover {
  background: var(--primary-color);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* Navigation Dots */
.carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active, .dot:hover {
  background: var(--primary-color);
  transform: scale(1.2);
}

/* Responsive adjustment for small screens */
@media (max-width: 768px) {
  .carousel-container {
    height: 320px;
  }
}

/* Base Hero Structure */
.hero {
  color: #ffffff;
  padding: 5rem 1.5rem;
  text-align: center;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Page-Specific Hero Backgrounds with 85% Slate Tint */
.hero-home {
  background-image: linear-gradient(rgba(71, 71, 71, 0.85), rgba(71, 71, 71, 0.85)), url('images/hero-home.jpg');
}

.hero-about {
  background-image: linear-gradient(rgba(71, 71, 71, 0.85), rgba(71, 71, 71, 0.85)), url('images/hero-about.jpg');
}

.hero-services {
  background-image: linear-gradient(rgba(71, 71, 71, 0.85), rgba(71, 71, 71, 0.85)), url('images/hero-services.jpg');
}

.hero-contact {
  background-image: linear-gradient(rgba(71, 71, 71, 0.85), rgba(71, 71, 71, 0.85)), url('images/hero-contact.jpg');
}

/* ==========================================================================
   MOBILE NAVIGATION MENU STYLES
   ========================================================================== */

/* Burger Button Base (Hidden on Desktop) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color, #474747);
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

/* Mobile Screen Breakpoint (< 768px) */
@media (max-width: 768px) {
  /* Make header relative so dropdown positions correctly underneath */
  header {
    position: relative;
  }

  /* Show the burger icon on mobile */
  .menu-toggle {
    display: flex;
  }

  /* Hide default inline nav list on mobile */
  nav#navMenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    padding: 1.5rem 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-bottom: 3px solid var(--primary-color, #f84c02);
    z-index: 1000;
  }

  /* Display dropdown when JS adds the .active class */
  nav#navMenu.active {
    display: block;
  }

  /* Stack menu items vertically */
  nav#navMenu ul {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }

  nav#navMenu ul li {
    width: 100%;
    text-align: center;
  }

  /* Animated "X" close icon when menu is open */
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}

/* ==========================================================================
   TOP BAR & FOOTER SOCIAL LINKS
   ========================================================================== */

/* Top Bar Social Icons */
.top-bar-social {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 0.75rem;
}

.top-bar-social a {
  color: #ffffff;
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.top-bar-social a:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

/* Footer Social Badges */
.footer-social-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.social-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background-color: var(--secondary-color, #474747);
  color: #ffffff !important;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.social-badge:hover {
  background-color: var(--primary-color, #f84c02);
}

/* Make QR code images hover smoothly */
.qr-codes a img {
  transition: transform 0.2s ease;
}

.qr-codes a:hover img {
  transform: scale(1.05);
}