:root {
  --primary-red: #B71C1C;
  --accent-yellow: #FFC300;
  --bg-white: #FFFFFF;
  --text-dark: #212121;
  --text-light: #757575;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: #F8F8F8;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

/* Modern navbar */
.navbar {
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  padding: 0.75rem 2rem !important;
  background-color: var(--bg-white) !important;
  border-bottom: 4px solid var(--accent-yellow) !important;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-red) !important;
  letter-spacing: 1px;
}

.nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  margin: 0 0.75rem !important;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-red) !important;
}

/* Home Page */
.homePage {
  background-color: var(--bg-white);
}

section[id], .course-category[id] {
  scroll-margin-top: 110px;
}

/* Hero section */
.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-red) 0%, #A01515 100%);
  color: white;
  padding: 110px 0 100px;
  text-align: center;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 195, 0, 0.18), transparent 36%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.08), transparent 30%);
  pointer-events: none;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.hero-section .hero-subtext {
  font-size: 1.15rem;
  max-width: 720px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.hero-section .hero-subtext:last-of-type {
  margin-bottom: 0;
}

.hero-section .btn-alert {
  margin-top: 1rem;
  padding: 16px 44px;
  font-size: 1.08rem;
  font-weight: 700;
  border: 2px solid var(--primary-red);
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary-red);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  letter-spacing: 0.02em;
  min-width: 240px;
}

.hero-section .btn-alert:hover {
  background: var(--primary-red);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.hero-section .btn-alert:focus {
  box-shadow: 0 0 0 4px rgba(183, 28, 28, 0.22), 0 14px 30px rgba(0, 0, 0, 0.18);
}

.hero-section .btn-alert:active {
  transform: translateY(1px);
}

/* About Section */
#about-us {
  padding: 80px 0;
  background: white;
}

.welcomeTitle {
  font-weight: 700;
  font-size: 2.5rem;
  text-align: center;
  color: var(--primary-red);
  margin-bottom: 1.5rem;
}

.welcomeText {
  font-size: 1.1rem;
  text-align: center;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Featured Image Section */
.featured-image-section {
  padding: 60px 0;
  background: white;
}

.featured-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-image:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Alert Button */
.btn-alert {
  background-color: var(--primary-red);
  border: 3px solid var(--accent-yellow);
  color: white;
  padding: 12px 36px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-alert:hover {
  background-color: var(--accent-yellow);
  color: var(--primary-red);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(183, 28, 28, 0.3);
  text-decoration: none;
}

.btn-alert:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.2);
}

/* Trust section */
.trust-section {
  background: var(--bg-white);
  padding: 80px 0;
  border-top: 4px solid var(--accent-yellow);
}

.trust-section h3 {
  color: var(--primary-red);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.trust-section p {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 0;
}

.trust-section .col-md-4 {
  margin-bottom: 2rem;
}

/* Services Section */
.services-section {
  background: var(--bg-white);
  padding: 80px 0;
}

.services-section h2 {
  color: var(--primary-red);
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
}

.service-card {
  background: white;
  border-radius: 12px;
  padding: 30px 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-top: 4px solid var(--accent-yellow);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.service-card-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-red) 0%, #A01515 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 2.5rem;
  color: white;
}

.service-card h3 {
  color: var(--primary-red);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Forklift Training Section */
#forklift-training {
  background: white;
  padding: 80px 0;
}

#forklift-training h2 {
  color: var(--primary-red);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

#forklift-training .lead {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* Courses Section */
.courses-section {
  padding: 80px 0;
  background: #F9F9F9;
}

.course-search-panel {
  background: #ffffff;
  border: 1px solid rgba(183, 28, 28, 0.12);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  padding: 1.25rem;
  margin: 1.5rem auto 2rem;
  max-width: 820px;
}

.course-search-label {
  display: block;
  color: var(--primary-red);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.course-search-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.course-search-input {
  flex: 1 1 auto;
  border-radius: 999px;
  border: 1px solid rgba(183, 28, 28, 0.2);
  padding: 0.85rem 1rem;
  box-shadow: none;
}

.course-search-input:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.12);
}

.course-search-clear {
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  white-space: nowrap;
  border-color: var(--primary-red);
  color: var(--primary-red);
}

.course-search-clear:hover,
.course-search-clear:focus {
  background: var(--primary-red);
  border-color: var(--primary-red);
  color: #ffffff;
}

.course-search-help,
.course-search-results {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.course-search-help {
  margin-top: 0.75rem;
  color: var(--text-light);
}

.course-search-results {
  margin-top: 0.35rem;
  color: var(--primary-red);
  font-weight: 600;
}

.course-search-empty {
  background: rgba(183, 28, 28, 0.06);
  color: var(--primary-red);
  border: 1px dashed rgba(183, 28, 28, 0.24);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 600;
}

/* Course Category */
.course-category {
  margin-bottom: 80px;
  padding-bottom: 60px;
  border-bottom: 2px solid var(--accent-yellow);
}

.course-category-hidden {
  display: none;
}

.course-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--primary-red);
  margin-bottom: 50px;
}

/* Course Card Styling */
.course-card {
  background: white;
  border-radius: 12px;
  padding: 30px 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--accent-yellow);
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.course-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-red) 0%, #A01515 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 2rem;
  color: white;
}

.course-card h3 {
  color: var(--primary-red);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.course-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.course-features {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.course-features li {
  color: var(--text-dark);
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.course-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-yellow);
  font-weight: bold;
}

.course-card .btn-alert {
  padding: 8px 20px;
  font-size: 0.9rem;
  align-self: flex-start;
  margin-top: auto;
}

/* CTA Section */
.cta-section {
  background: white;
  padding: 80px 0;
  border-top: 4px solid var(--accent-yellow);
}

.cta-section h2 {
  color: var(--primary-red);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-section .lead {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* Responsive Typography */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .welcomeTitle {
    font-size: 1.8rem;
  }
  
  .welcomeText {
    font-size: 1rem;
  }

  .trust-section h3 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .course-card {
    margin-bottom: 20px;
  }

  .course-card h3 {
    font-size: 1.2rem;
  }

  .cta-section h2 {
    font-size: 2rem;
  }

  .course-search-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .course-search-clear {
    width: 100%;
  }
}

@media (max-width: 991.98px) {
  .navbar {
    padding: 0.75rem 1rem !important;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }

  .navbar-collapse {
    margin-top: 0.5rem;
  }

  .navbar-nav {
    width: 100%;
  }

  .nav-link {
    margin: 0.15rem 0 !important;
    padding: 0.5rem 0 !important;
  }

  .navbar-nav .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    margin-top: 0.25rem;
  }
}

/* Map container for About section */
.map-container {
  width: 100%;
  height: 380px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  margin-top: 24px;
}
.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 768px) {
  .map-container {
    height: 260px;
  }

  html {
    scroll-padding-top: 240px;
  }

  section[id], .course-category[id] {
    scroll-margin-top: 240px;
  }
}

/* Footer */
.site-footer {
  background: #0f0f0f;
  color: #f1f1f1;
  padding: 40px 0 20px;
  font-size: 0.95rem;
}
.site-footer a {
  color: #fff;
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--accent-yellow);
}
.site-footer .footer-top {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-footer .footer-bottom {
  padding-top: 16px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}
.site-footer .social-icons a { margin-right: 10px; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  background: rgba(15,15,15,0.98);
  color: #fff;
  padding: 16px 20px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 9999;
}
.cookie-banner p { margin: 0; padding-right: 12px; color: rgba(255,255,255,0.95); }
.cookie-banner .btn { margin-left: 8px; }

body.has-cookie-banner .back-to-top {
  bottom: 98px;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid var(--accent-yellow);
  border-radius: 999px;
  background: var(--primary-red);
  color: #ffffff;
  padding: 0.8rem 1rem;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.back-to-top i {
  font-size: 0.9rem;
}

.back-to-top:hover,
.back-to-top:focus {
  background: #991818;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26);
  outline: none;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:active {
  transform: translateY(1px);
}

@media (max-width: 576px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner p { padding-bottom: 12px; }

  body.has-cookie-banner .back-to-top {
    bottom: 156px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    padding: 0.7rem 0.85rem;
  }

  .back-to-top span {
    font-size: 0.85rem;
  }
}