/* --- MAIN STYLESHEET (main.css) --- */
/* Contains global styles for header, footer, typography, and site structure. */

:root {
  --brand-red: #d92332;
  --light-text: #ccc;
  --dark-bg: #212121;
  --darker-bg: #141414;
  --card-bg: #3a3a3a;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Oswald', sans-serif;
  background-color: var(--dark-bg);
  color: var(--light-text);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* ===== TOP BAR ===== */
.top-bar {
  background: var(--darker-bg);
  color: #bbb;
  font-size: 0.9rem;
  padding: 8px 0;
  position: relative;
  z-index: 1040;
}

.top-bar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}

.top-bar .phone-link {
  color: inherit;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.top-bar .phone-link:hover {
  color: var(--brand-red);
}

.top-bar .btn {
  --bs-btn-bg: var(--brand-red);
  --bs-btn-border-color: var(--brand-red);
  --bs-btn-hover-bg: #c11d2a;
  --bs-btn-hover-border-color: #c11d2a;
  white-space: nowrap;
}

/* ===== MOBILE HAMBURGER BUTTON ===== */
.mobile-hamburger {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1060;
  background: rgba(28, 28, 28, 0.95);
  border: 2px solid var(--brand-red);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.mobile-hamburger:hover {
  background: var(--brand-red);
  transform: scale(1.05);
}

.mobile-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brand-red);
  margin: 3px 0;
  transition: all 0.3s ease;
}

.mobile-hamburger:hover span {
  background: #fff;
}

.mobile-hamburger.active span {
  background: #fff;
}

.mobile-hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.mobile-hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===== MOBILE OFF-CANVAS MENU ===== */
.mobile-offcanvas {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  height: 100vh;
  background: var(--darker-bg);
  z-index: 1055;
  transition: left 0.3s ease;
  overflow-y: auto;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
}

.mobile-offcanvas.active {
  left: 0;
}

.offcanvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #333;
}

.offcanvas-header h3 {
  color: #fff;
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 2px;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--brand-red);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: #fff;
  transform: rotate(90deg);
}

.offcanvas-body {
  padding: 0;
}

.mobile-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item-mobile {
  border-bottom: 1px solid #333;
}

.nav-link-mobile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  color: var(--light-text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.nav-link-mobile:hover,
.nav-link-mobile[aria-expanded="true"] {
  color: var(--brand-red);
  background: rgba(217, 35, 50, 0.1);
  padding-left: 25px;
}

.nav-link-mobile i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.nav-link-mobile[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.nav-item-mobile .collapse {
  background: rgba(0, 0, 0, 0.3);
}

.sub-link {
  display: block;
  padding: 12px 20px 12px 40px;
  color: #bbb;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.sub-link:hover {
  color: var(--brand-red);
  padding-left: 45px;
}

/* ===== MOBILE BACKDROP ===== */
.mobile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.mobile-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ===== HEADER & HERO ===== */
header {
  position: relative;
  background-image: url('../../hero-engine.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  width: 100%;
}

header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* ===== LOGO - BREAKS THE RULES ON DESKTOP ===== */
.logo-wrapper {
  position: relative;
  text-align: center;
  z-index: 1050;
  pointer-events: none;
}

.logo-wrapper img {
  border-radius: 50%;
  border: none;
  outline: none;
  position: relative;
  pointer-events: auto;
}

/* Desktop: Big logo that overlays the top bar */
@media (min-width: 992px) {
  .logo-wrapper {
    margin-top: -35px;
    padding-bottom: 10px;
  }
  
  .logo-wrapper img {
    width: 350px;
    max-width: 90%;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8)) 
            drop-shadow(0 20px 20px rgba(0, 0, 0, 0.8))
  }
}

/* Mobile: Normal sized logo */
@media (max-width: 991.98px) {
  .logo-wrapper {
    padding-top: 30px;
    padding-bottom: 0px;
  }
  
  .logo-wrapper img {
    width: 300px;
    max-width: 80%;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8)) 
            drop-shadow(0 20px 20px rgba(0, 0, 0, 0.8))
  }
}

/* ===== DESKTOP NAVIGATION ===== */
@media (min-width: 992px) {
  .main-navbar {
    position: relative;
    z-index: 100;
    padding: 20px 0;
  }

  .main-navbar .container-fluid {
    max-width: 1400px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .navbar-nav-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .main-navbar .navbar-nav {
    background: rgba(28, 28, 28, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 10px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .main-navbar .nav-link {
    font-size: 1.05rem;
    text-transform: uppercase;
    color: var(--light-text);
    padding: 12px 20px;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
  }

  .main-navbar .nav-link:hover,
  .main-navbar .show > .nav-link {
    color: #fff;
    background: rgba(217, 35, 50, 0.2);
    border-radius: 4px;
  }

  .dropdown-toggle::after {
    display: inline-block;
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    border: none;
    vertical-align: middle;
    margin-left: 8px;
    font-size: 0.7em;
  }

  .main-navbar .dropdown-menu {
    background-color: rgba(28, 28, 28, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    margin-top: 8px;
  }

  .main-navbar .dropdown-item {
    color: var(--light-text);
    text-align: center;
    padding: 10px 20px;
    transition: all 0.2s ease;
  }

  .main-navbar .dropdown-item:hover,
  .main-navbar .dropdown-item:focus {
    color: var(--brand-red);
    background-color: rgba(255, 255, 255, 0.05);
  }
}

/* ===== HERO SECTION ===== */
.hero {
  padding: 80px 20px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  margin-bottom: 20px;
}

.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: #eee;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
  max-width: 800px;
  margin: 0 auto;
}

/* ===== GENERIC SECTIONS ===== */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  text-transform: uppercase;
  font-weight: 700;
  color: var(--light-text);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--brand-red);
  margin: 15px auto 0;
}

/* ===== FOOTER ===== */
footer {
  background: var(--darker-bg);
  color: #bbb;
  padding: 50px 0 20px;
}

footer h5 {
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 600;
}

footer a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--brand-red);
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer ul li {
  margin-bottom: 12px;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  font-size: 1.8rem;
  color: var(--brand-red);
  transition: all 0.3s ease;
}

.social-icons a:hover {
  color: #fff;
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  margin-top: 30px;
  font-size: 0.9rem;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #c11d2a;
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(217, 35, 50, 0.4);
}

/* ===== SWEETALERT CUSTOM MODAL STYLING ===== */
.review-modal.swal2-popup {
  background: var(--card-bg);
  color: var(--light-text);
  border-radius: 8px;
  border: 1px solid #444;
  padding: 2em 1.5em 1.5em;
  width: 90%;
  max-width: 600px;
}

.review-modal .swal2-title {
  display: none;
}

.swal2-custom-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-direction: column;
  text-align: center;
}

.swal2-custom-header .review-avatar {
  width: 70px;
  height: 70px;
  font-size: 2.2rem;
}

.swal2-custom-header .review-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.swal2-custom-header h5 {
  color: #fff;
  font-size: 1.4rem; /* Match team-card__name */
  margin: 0 0 5px 0;
}

.swal2-custom-header .review-stars {
  color: #f1c40f;
  font-size: 1.1rem;
}

@media (min-width: 576px) {
  .swal2-custom-header {
    flex-direction: row;
    text-align: left;
  }
  .swal2-custom-header .review-meta {
    align-items: flex-start;
  }
}

.review-modal .swal2-html-container {
  padding: 0;
  margin: 0;
}

.swal2-custom-content p {
  color: var(--light-text);
  line-height: 1.7;
  text-align: left;
  margin: 0;
  white-space: pre-wrap;
}

.review-modal .swal2-close-button {
  color: var(--light-text);
  transition: all 0.2s ease;
}

.review-modal .swal2-close-button:hover {
  color: var(--brand-red);
  transform: scale(1.2);
}

.review-modal .swal2-actions {
  margin-top: 25px;
  gap: 15px;
}

.review-modal .swal2-styled {
  border-radius: 6px;
  font-weight: bold;
  font-size: 1rem;
  padding: 10px 25px;
  transition: all 0.2s ease;
  box-shadow: none !important;
}

.review-modal .swal-btn-confirm {
  background-color: var(--brand-red) !important;
  border: 2px solid var(--brand-red) !important;
}
.review-modal .swal-btn-confirm:hover {
  background-color: #c11d2a !important;
  border-color: #c11d2a !important;
}

.review-modal .swal-btn-cancel {
  background-color: transparent !important;
  color: var(--light-text);
  border: 2px solid #555 !important;
}

.review-modal .swal-btn-cancel:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: #777 !important;
  color: #fff;
}

.team-modal__title {
  color: var(--light-text);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}


/* ===== GLOBAL RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 991.98px) {
  header {
    background-attachment: scroll;
  }
  .hero {
    padding: 50px 20px;
  }
  .section {
    padding: 40px 0;
  }
  .section-title {
    margin-bottom: 35px;
  }
}

@media (max-width: 768px) {
  main .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .top-bar .phone-link {
    font-size: 0.85rem;
  }
  .top-bar .btn {
    font-size: 0.8rem;
    padding: 4px 10px;
  }
  .hero-content h1 {
    font-size: 1.8rem;
  }
  .hero-content p {
    font-size: 0.95rem;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .mobile-hamburger {
    width: 45px;
    height: 45px;
  }
  .mobile-hamburger span {
    width: 20px;
  }
  .mobile-offcanvas {
    width: 260px;
  }
}

/* ===== UTILITY CLASSES ===== */
.smooth-scroll {
  scroll-behavior: smooth;
}