/**
 * Coachbus.ca — custom theme
 * Bootstrap 5 utilities handle layout; this file adds brand colours, hero, hovers, and mobile FAB.
 */

/* --- Design tokens (Canadian red + readable dark slate) --- */
:root {
    --mlc-red: #c8102e;
    --mlc-red-dark: #a30d25;
    --mlc-red-soft: rgba(200, 16, 46, 0.12);
    --mlc-slate: #1b2838;
    --mlc-slate-light: #2c3e50;
    --mlc-muted-bg: #f4f6f8;
    --mlc-body: #2b3a4b;
    --font-heading: "Outfit", system-ui, sans-serif;
    --font-body: "Source Sans 3", system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--mlc-body);
    /* Navbar is fixed; hero provides top spacing—avoid body padding or a white gap appears */
    padding-top: 0;
    padding-bottom: 0;
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: 5.25rem;
    }
}

h1, h2, h3, .section-title, .navbar-brand, .hero-title {
    font-family: var(--font-heading);
}

.text-body {
    color: var(--mlc-body) !important;
}

/* --- Navbar --- */
.bg-dark-slate {
    background-color: var(--mlc-slate) !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 0.375rem;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.06);
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: var(--mlc-red);
    color: #fff;
    font-size: 1rem;
}

.text-accent {
    color: var(--mlc-red) !important;
}

/* Primary CTA — Canadian red, readable on white */
.btn-accent {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--mlc-red);
    --bs-btn-border-color: var(--mlc-red);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--mlc-red-dark);
    --bs-btn-hover-border-color: var(--mlc-red-dark);
    --bs-btn-focus-shadow-rgb: 200, 16, 46;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--mlc-red-dark);
    --bs-btn-active-border-color: var(--mlc-red-dark);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(27, 40, 56, 0.15);
}

.btn-accent:active {
    transform: translateY(0);
}

.bg-accent-soft {
    background-color: var(--mlc-red-soft) !important;
}

.text-accent-emphasis {
    color: var(--mlc-red-dark) !important;
}

/* --- Server alert: clear fixed navbar (no body padding) --- */
.status-alert-wrap {
    padding-top: 5rem;
    padding-bottom: 0.25rem;
    margin-bottom: 0;
}

/* --- Hero --- */
.hero-section {
    position: relative;
    min-height: 78vh;
    /* Pull hero content below fixed navbar; background fills to top of viewport */
    padding-top: 5.5rem;
    background-color: var(--mlc-slate);
    /* Custom hero photography — assets/images/hero-background.png */
    background-image: url("../images/hero-background.png");
    background-size: cover;
    background-position: center;
}

/* Tighter hero top when server alert sits directly above (avoid stacked padding) */
.status-alert-wrap + .hero-section {
    padding-top: 1.25rem;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #fff !important;
    background-color: rgba(200, 16, 46, 0.35);
}

/* --- Inner page header (compact hero) --- */
.page-header {
    position: relative;
    overflow: hidden;
    padding: 5.5rem 0 3rem;
    background-color: var(--mlc-slate);
}

.status-alert-wrap + .page-header {
    padding-top: 1.25rem;
}

.page-header__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-header__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(27, 40, 56, 0.92) 0%,
        rgba(27, 40, 56, 0.72) 50%,
        rgba(44, 62, 80, 0.85) 100%
    );
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.breadcrumb-on-dark .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.breadcrumb-on-dark .breadcrumb-item a:hover {
    color: #fff;
    text-decoration: underline;
}

.breadcrumb-on-dark .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.65);
}

.breadcrumb-on-dark .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

.object-fit-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(27, 40, 56, 0.88) 0%,
        rgba(27, 40, 56, 0.55) 45%,
        rgba(44, 62, 80, 0.75) 100%
    );
    pointer-events: none;
}

.hero-section .container {
    z-index: 1;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.85) !important;
}

.hero-sub {
    max-width: 40rem;
}

/* --- Sections --- */
.section-muted {
    background-color: var(--mlc-muted-bg);
}

.section-title {
    color: var(--mlc-slate);
}

/* --- Service cards --- */
.service-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: 0.75rem !important;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 1rem 2rem rgba(27, 40, 56, 0.12) !important;
}

.icon-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mlc-red-soft);
    color: var(--mlc-red);
    font-size: 1.25rem;
}

/* --- Fleet cards --- */
.fleet-card {
    border-radius: 0.75rem !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fleet-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 1rem 2rem rgba(27, 40, 56, 0.14) !important;
}

/* --- Fleet images: clean edge-to-edge in card (no mat / frame) --- */
.fleet-card__media {
    background: transparent;
    padding: 0;
    display: block;
    overflow: hidden;
}

.fleet-card__img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    border: 0;
}

/* Fleet detail pages (fleets.php) */
.fleet-showcase {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    background: transparent;
    padding: 0;
    display: block;
    overflow: hidden;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

.fleet-showcase__img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 0;
    border: 0;
}

.amenity-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.amenity-list li:last-child {
    margin-bottom: 0;
}

.amenity-list i {
    color: var(--mlc-red);
    width: 1.25rem;
    text-align: center;
}

/* --- Why choose us --- */
.feature-box {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.5rem rgba(27, 40, 56, 0.1) !important;
}

.feature-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mlc-slate);
    color: #fff;
    font-size: 1.35rem;
}

/* --- Testimonials --- */
.testimonial-slide {
    background: linear-gradient(180deg, #fff 0%, var(--mlc-muted-bg) 100%);
    min-height: 280px;
    display: flex;
    align-items: center;
}

.carousel-indicators [data-bs-target] {
    background-color: var(--mlc-slate);
    opacity: 0.35;
}

.carousel-indicators .active {
    background-color: var(--mlc-red);
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 50% 50%;
}

.rounded-circle.bg-dark-slate {
    background-color: var(--mlc-slate) !important;
}

/* --- Quote form --- */
#quoteForm .form-control:focus,
#quoteForm .form-select:focus {
    border-color: var(--mlc-red);
    box-shadow: 0 0 0 0.2rem rgba(200, 16, 46, 0.2);
}

/* --- Footer --- */
.footer-dark {
    background: linear-gradient(180deg, var(--mlc-slate-light) 0%, var(--mlc-slate) 100%);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.social-link:hover {
    background: var(--mlc-red);
    color: #fff;
    transform: translateY(-2px);
}

/* --- Sticky Call Now (mobile) --- */
.btn-call-sticky {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0));
    z-index: 1050;
    border-radius: 2rem;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    animation: pulse-soft 2.5s ease-in-out infinite;
}

@keyframes pulse-soft {
    0%, 100% { box-shadow: 0 0.5rem 1.25rem rgba(200, 16, 46, 0.35); }
    50% { box-shadow: 0 0.65rem 1.5rem rgba(200, 16, 46, 0.5); }
}

/* --- Outline buttons on hero --- */
.btn-outline-light:hover {
    transform: translateY(-1px);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .service-card,
    .fleet-card,
    .feature-box,
    .btn-accent,
    .btn-outline-light,
    .social-link {
        transition: none;
    }
    .service-card:hover,
    .fleet-card:hover,
    .feature-box:hover {
        transform: none;
    }
    .btn-call-sticky {
        animation: none;
    }
}
