@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200;300;400;500;600;700&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100&display=swap');

:root {
    --primary-red: #ee1d23;
    --primary-blue: #134091;
    --accent-yellow: #f8e00e;
    --text-dark: #363636;
    --text-light: #fff;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

/* Reset & Base */
* { box-sizing: border-box; }
html, body {
    width: 100%;
    overflow-x: hidden;
    background: #fff;
}
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
a:hover { color: var(--primary-blue); }
ul { list-style: none; padding: 0; margin: 0; }

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}
.row { display: flex; flex-wrap: wrap; }
.col-25 { width: 25%; }
.col-50 { width: 50%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-100%, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(100%, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
@keyframes subpageFloat {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50% { transform: translate3d(0, 12px, 0) rotate(1deg); }
    100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

.animated { animation-duration: 1s; animation-fill-mode: both; }
.fadeInRight { animation-name: fadeInRight; }
.fadeInLeft { animation-name: fadeInLeft; }
.fadeInUp { animation-name: fadeInUp; }

/* Scroll Reveal Animations */
.reveal-on-scroll {
    opacity: 0;
    transition: opacity 1s ease-out, transform 1s ease-out;
    will-change: opacity, transform;
}

.reveal-on-scroll.from-left {
    transform: translateX(-100px);
}

.reveal-on-scroll.from-right {
    transform: translateX(100px);
}

.reveal-on-scroll.from-bottom {
    transform: translateY(50px);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}

/* Stagger delays for grids */
.service-card:nth-child(2) { transition-delay: 0.2s; }
.service-card:nth-child(3) { transition-delay: 0.4s; }
.service-card:nth-child(4) { transition-delay: 0.6s; }

.review-card:nth-child(2) { transition-delay: 0.2s; }
.review-card:nth-child(3) { transition-delay: 0.4s; }
.review-card:nth-child(4) { transition-delay: 0.6s; }

/* Hexagon Mask (Kept for other elements if needed, but removed from header btns) */
.hex-mask {
    display: inline-block;
    position: relative;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    -webkit-clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

/* Header */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: transparent;
    padding: 10px 0;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo img {
    height: 80px;
    width: auto;
    max-height: none;
    max-width: none;
    display: block;
}
nav ul { display: flex; gap: 20px; }
nav a {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    font-size: 1.1rem;
    white-space: nowrap;
}
nav a:hover { color: var(--primary-red); }

/* Header Buttons */
.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: bold;
    /* Parallelogram Shape */
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
    transition: 0.3s;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.header-quote {
    background: var(--accent-yellow);
    color: var(--primary-blue); /* Blue text on yellow */
}
.header-quote:hover {
    background: #e6ce0d;
    color: var(--primary-blue);
}

.header-phone {
    background: var(--primary-red);
    color: white; /* White text on red */
}
.header-phone:hover {
    background: #c0171c;
    color: white;
}

body.scrolled .header-phone {
    position: fixed;
    top: 12px;
    right: 20px;
    z-index: 9999;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: inline-flex;
}

@media (max-width: 768px) {
    body.scrolled .header-phone {
        top: 8px;
        right: 50%;
        transform: translateX(50%);
    }
}

/* Hero Section */
.hero {
    position: relative;
    background-image: url('assets/images/home-bg.webp');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    height: auto;
    min-height: 80vh;
    padding-top: 150px;
    padding-bottom: 50px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2; /* Text above vehicle */
    max-width: 800px;
    margin: 0 auto; 
    text-align: center; 
    padding-bottom: 150px;
}

/* Typography */
.hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 20px;
    margin-top: 5px;
}
.hero h1 span { display: block; }

.hero p {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 500;
    animation: fadeInUp 1s both; 
    animation-delay: 0.5s;
}

/* Vehicle Image */
.hero-vehicle {
    position: absolute;
    left: 0;
    top: 500px;
    width: 60vw;
    max-width: 2600px;
    height: auto;
    z-index: 1;
}

.hero-vehicle.drive-in {
    opacity: 1;
    transform: translateX(-110%);
    transition: transform 0.48s ease-out;
    will-change: transform;
}

.hero-vehicle.drive-in.is-visible {
    opacity: 1;
    transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
    .hero-vehicle.drive-in {
        transition: none;
        transform: translateX(0);
    }
}

/* Services / Features */
.services { padding: 60px 0; background: #fff; }
.services,
.reviews {
    overflow: hidden;
}
.section-title {
    text-align: center;
    font-family: var(--font-heading);
    color: var(--primary-blue);
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-transform: uppercase;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.service-card {
    background: #f9f9f9;
    padding: 30px;
    text-align: center;
    border-bottom: 3px solid var(--primary-red);
    transition: transform 0.3s;
}
.service-card-link {
    display: block;
    color: inherit;
}
.service-card-link:hover { color: inherit; }
.service-card-link:hover .service-card { transform: translateY(-5px); }
.service-card:hover { transform: translateY(-5px); }
.service-card h3 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    margin-bottom: 15px;
}
.service-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
.button {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    background: var(--primary-red);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.85rem;
    margin-top: 15px;
}
.button:hover { background: var(--primary-blue); color: #fff; }

/* Bottom Section (Reviews + Emergency) */
.bottom-section {
    position: relative;
    overflow: hidden;
}
.bottom-section::before {
    content: "";
    background-image: url("/assets/images/footer-bg.webp");
    background-size: 100% auto;
    background-position: center bottom;
    background-repeat: no-repeat;
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Reviews */
.bottom-section .reviews {
    background: transparent;
    color: white;
    padding: 60px 0 0;
    position: relative;
    z-index: 1;
}
.bottom-section .reviews .section-title { color: white; }
.review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.review-card {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 8px;
}
.stars { color: var(--accent-yellow); margin-bottom: 10px; }
.bottom-section .reviews .container {
    background: var(--primary-blue);
    padding: 50px 40px 60px;
    border-radius: 12px;
    max-width: 1100px;
}

/* Footer */
footer {
    background: var(--primary-blue);
    color: white;
    padding: 40px 0;
}
footer .footer-col-left { width: 25%; }
footer .footer-col-mid { width: 30%; }
footer .footer-col-right { width: 45%; }
.footer-logo img { max-height: 60px; margin-bottom: 20px; }
.footer-cert-logos {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
.footer-cert-row {
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.footer-cert-logos .ethical-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}
.footer-cert-logos img {
    max-height: 88px;
    width: auto;
}
.footer-captain-link {
    display: inline-block;
}
.footer-captain-link.blowup {
    animation: captain-pop 0.5s ease-out forwards;
    transform-origin: center;
}
@keyframes captain-pop {
    0% { transform: scale(1); }
    100% { transform: scale(2.2); }
}
.footer-cert-logos .footer-logo-mark {
    max-height: 88px;
}
.social-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}
.social-icons .icon-map {
    transform: translateY(-2px);
    margin-right: 5px;
}
.social-icons .icon-facebook {
    transform: translateY(-1px) scale(1.03);
    transform-origin: bottom center;
}
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}
.social-icons i,
.social-icons .icon-x {
    color: #ffffff;
    fill: #ffffff;
}
.social-icons .icon-x {
    width: 32px;
    height: 32px;
    transform: scale(1.06);
    transform-origin: bottom center;
}
.footer-links h3 {
    font-family: var(--font-heading);
    color: white;
    margin-bottom: 15px;
}
.footer-links a, .footer-links p { color: #ccc; transition: 0.2s; }
.footer-links a:hover { color: white; }
.footer-nav ul li { margin-bottom: 8px; }
.footer-nav a {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #fff;
}
.copyright {
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}
.footer-menu {
    margin-top: 20px;
}
.footer-menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-menu a {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}
.footer-menu a:hover { color: var(--accent-yellow); }

/* Emergency Section */
.bottom-section .emergency {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 80px 0;
}
.bottom-section .emergency .container {
    position: relative;
    z-index: 1;
}
.bottom-section .emergency h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    margin-bottom: 10px;
}
.bottom-section .emergency h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--primary-red);
    margin: 0;
}
.emergency-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.bottom-section .emergency h3 a {
    color: inherit;
    text-decoration: none;
}
.emergency-logo {
    max-width: 150px;
    margin: 20px auto 0;
    display: block;
}

.bottom-section .emergency .reveal-on-scroll,
footer .reveal-on-scroll {
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Responsive */
@media (max-width: 800px) {
    .site-header {
        position: relative; 
        background-color: var(--primary-blue);
    }
    .header-inner { flex-direction: column; }
    nav ul { margin-top: 15px; flex-wrap: wrap; justify-content: center; margin-bottom: 15px; }
    
    .header-buttons {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }
    .header-btn {
        width: 100%;
        max-width: 300px;
    }

    .hero {
        background-position: center top;
        height: auto;
        min-height: 100vh;
        text-align: center;
        padding-top: 50px;
    }
    .hero-content {
        margin: 0;
        text-align: center;
        padding: 20px;
        padding-bottom: 250px;
    }
    /* Compensate for menu push by lifting vehicle */
    .hero-vehicle {
        width: 120vw;
        top: 500px; 
    }
    
    .col-25, .col-50,
    footer .footer-col-left,
    footer .footer-col-mid,
    footer .footer-col-right {
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
    }
    footer .row { text-align: center; }
    .footer-logo { margin: 0 auto 20px; }
}

@media (max-width: 799px) {
    .review-grid {
        grid-template-columns: 1fr;
    }
}


@media (min-width: 800px) {
    .hero-vehicle {
        width: 90vw;
    }
}

/* Subpage Styling (match main page) */
body.subpage .site-header {
    position: relative;
    background: var(--primary-blue);
}

body.subpage nav a {
    color: #fff;
}


body.subpage .main-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    min-height: 50vh;
    position: relative;
    z-index: 1;
    background: #fff;
    background-image: linear-gradient(180deg, rgba(19, 64, 145, 0.05), rgba(255, 255, 255, 0) 180px);
}

body.subpage {
    background:
        radial-gradient(800px 400px at 12% -10%, rgba(248, 224, 14, 0.18), transparent 70%),
        radial-gradient(900px 500px at 95% 10%, rgba(19, 64, 145, 0.18), transparent 70%),
        linear-gradient(180deg, #f7f9ff 0%, #ffffff 70%);
    position: relative;
    overflow-x: hidden;
}

body.subpage::before,
body.subpage::after {
    content: "";
    position: fixed;
    width: 260px;
    height: 140px;
    background: linear-gradient(120deg, rgba(238, 29, 35, 0.25), rgba(248, 224, 14, 0.25));
    filter: blur(6px);
    opacity: 0.7;
    z-index: 0;
    pointer-events: none;
    transform: skewX(-18deg);
    animation: subpageFloat 12s ease-in-out infinite;
}

body.subpage::before {
    top: 18vh;
    left: -80px;
    animation-delay: -2s;
}

body.subpage::after {
    bottom: 12vh;
    right: -90px;
    animation-delay: -6s;
}

body.subpage .main-content-wrapper > * + * {
    margin-top: 28px;
}

body.subpage .main-content-wrapper :is(h1, h2, h3) {
    color: var(--primary-blue);
    letter-spacing: 0.01em;
}

body.subpage .main-content-wrapper h1 {
    font-size: clamp(2rem, 3.2vw, 3.1rem);
}

body.subpage .main-content-wrapper h2 {
    font-size: clamp(1.6rem, 2.4vw, 2.3rem);
    position: relative;
}

body.subpage .main-content-wrapper p,
body.subpage .main-content-wrapper li {
    color: var(--text-dark);
    line-height: 1.7;
}

body.subpage .main-content-wrapper ul,
body.subpage .main-content-wrapper ol {
    padding-left: 1.2rem;
}

body.subpage .main-content-wrapper li::marker {
    color: var(--primary-red);
}

body.subpage .main-content-wrapper hr {
    border: 0;
    height: 1px;
    background: rgba(19, 64, 145, 0.2);
    margin: 34px 0;
}

body.subpage .main-content-wrapper a {
    color: var(--primary-blue);
    text-decoration: none;
    background-image: linear-gradient(90deg, rgba(19, 64, 145, 0.2), rgba(19, 64, 145, 0.2));
    background-size: 0 2px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: color 0.3s ease, background-size 0.3s ease, box-shadow 0.3s ease;
}

body.subpage .main-content-wrapper a:hover {
    color: var(--primary-red);
    background-size: 100% 2px;
    box-shadow: 0 12px 26px rgba(19, 64, 145, 0.12);
}

body.subpage .main-content-wrapper img,
body.subpage .main-content-wrapper figure img {
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(11, 31, 58, 0.12);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

body.subpage .main-content-wrapper img:hover,
body.subpage .main-content-wrapper figure img:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(11, 31, 58, 0.18);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        transition: none;
    }
    body.subpage::before,
    body.subpage::after {
        animation: none;
    }
}

/* FAQ Styling */
.faq-section { padding: 60px 0; }
.faq-grid { max-width: 800px; margin: 0 auto 40px; }
.faq-item {
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}
.faq-item[open] .faq-question {
    color: var(--primary-red);
}
.faq-question {
    cursor: pointer;
    padding: 15px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--primary-blue);
    list-style: none; /* Remove default triangle */
    font-size: 1.1rem;
}
.faq-question::-webkit-details-marker { display: none; } /* Safari */

.faq-icon {
    color: var(--primary-red);
    flex: 0 0 auto;
    transition: transform 0.3s;
}
.faq-item[open] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding-bottom: 20px;
    color: var(--text-dark);
    line-height: 1.6;
}

/* OPB link styling */
.opb-link { color: #ffffff; }
.opb-link:hover { color: var(--primary-red); }

/* Dropdown */
nav ul li.nav-dropdown { position: relative; }

nav ul li.nav-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: #0b1f3a; /* change if needed */
  border-radius: 6px;
  z-index: 9999;
}

nav ul li.nav-dropdown .dropdown-menu li a {
  display: block;
  padding: 10px 16px;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

nav ul li.nav-dropdown .dropdown-menu li a:hover {
  color: var(--primary-red);
}

/* When dropdown is active (clicked) */
nav ul li.nav-dropdown.open .dropdown-menu {
  display: block;
}

@media (max-width: 1120px) {
    .header-inner {
        flex-wrap: wrap;
        align-items: center;
    }
    .logo {
        order: 1;
    }
    .header-buttons {
        order: 2;
        flex: 0 0 auto;
        margin-left: auto;
    }
    nav {
        order: 3;
        flex: 1 1 100%;
        margin-top: 10px;
    }
    nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
}
