/* ============================================
   LONGFIELD PERFORMANCE
   Dark theme, green accent - karting coaching
   ============================================ */

:root {
    --bg-dark: #0a0a0a;
    --bg-dark-alt: #111111;
    --bg-card: #161616;
    --text-primary: #f5f5f5;
    --text-muted: #8a8a8a;
    --accent: #7ed957;
    --accent-hover: #6bc348;
    --accent-dark: #5aad38;
    --nav-bg: rgba(10, 10, 10, 0.92);
    --border-color: #222222;
    --font-heading: 'Bebas Neue', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

/* ---- Reset & Base ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 1px;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
}

.text-accent {
    color: var(--accent);
}

.text-muted-light {
    color: var(--text-muted);
}

.display-heading {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: 2px;
    line-height: 1;
}

.section-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ---- Buttons ---- */
.btn-accent {
    background-color: var(--accent);
    color: #000;
    border: 2px solid var(--accent);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.75rem 2.5rem;
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background-color: transparent;
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-accent-sm {
    background-color: var(--accent);
    color: #000;
    border: 2px solid var(--accent);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-accent-sm:hover {
    background-color: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

/* ---- Navigation ---- */
.navbar {
    background-color: var(--nav-bg);
    backdrop-filter: blur(12px);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.navbar.scrolled {
    padding: 0.4rem 0;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
}

.nav-logo {
    height: 40px;
    width: auto;
}

.navbar-nav .nav-link {
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent);
}

.btn-book {
    background-color: var(--accent) !important;
    color: #000 !important;
    border-radius: 0;
    padding: 0.5rem 1.5rem !important;
    font-weight: 600 !important;
}

.btn-book:hover {
    background-color: var(--accent-hover) !important;
    color: #000 !important;
}

/* ---- Hero Section ---- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 50%, rgba(10,10,10,1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    text-align: center;
    z-index: 2;
}

/* ---- Hero Carousel ---- */
.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-carousel .carousel-inner,
.hero-carousel .carousel-item {
    height: 100%;
}

.hero-slide-img {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Extended crossfade transition (1.5s) */
.hero-carousel.carousel-fade .carousel-item {
    transition-duration: 1.5s;
}

.hero-carousel .carousel-item-next,
.hero-carousel .carousel-item-prev {
    transition-duration: 1.5s;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    letter-spacing: 4px;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-description {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.5vw, 1.15rem);
    font-weight: 300;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ---- Page Header ---- */
.page-header {
    padding-top: 8rem;
    padding-bottom: 3rem;
    background-color: var(--bg-dark);
    text-align: center;
}

/* ---- Page Hero (sub-page with background image) ---- */
.page-hero {
    position: relative;
    padding-top: 10rem;
    padding-bottom: 5rem;
    background-size: cover;
    background-repeat: no-repeat;
    text-align: center;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 50%, rgba(10,10,10,1) 100%);
    z-index: 1;
}

.page-hero-content {
    position: relative;
    z-index: 2;
}

/* ---- Section Spacing ---- */
.section-padding {
    padding: 5rem 0;
}

/* ---- Intro Section ---- */
.intro-section {
    padding: 5rem 0 3rem;
    background-color: var(--bg-dark);
}

.intro-body {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 1.5rem auto 0;
}

/* ---- Pillars Section ---- */
.pillars-section {
    padding: 3rem 0 5rem;
    background-color: var(--bg-dark);
}

a.pillar-card,
.pillar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    height: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
}

a.pillar-card:hover,
.pillar-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(126, 217, 87, 0.08);
    color: var(--text-primary);
}

.pillar-card h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    line-height: 1.5;
    margin: 0;
    text-transform: uppercase;
}

/* ---- Development Tool Section ---- */
.development-section {
    padding: 5rem 0;
    background-color: var(--bg-dark-alt);
}

.development-body {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-top: 1.5rem;
}

/* ---- Designed For Section ---- */
.designed-for-section {
    padding: 5rem 0;
    background-color: var(--bg-dark);
}

.designed-for-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}

.designed-for-list li {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.designed-for-list li:last-child {
    border-bottom: none;
}

/* ---- Services Section ---- */
.services-section {
    padding: 5rem 0;
    background-color: var(--bg-dark-alt);
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(126, 217, 87, 0.08);
}

.service-img-wrapper {
    overflow: hidden;
    height: 220px;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img {
    transform: scale(1.05);
}

.service-body {
    padding: 1.5rem;
}

.service-body h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.service-body p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ---- Contact Section ---- */
.contact-section {
    padding: 5rem 0;
    background-color: var(--bg-dark);
    border-top: 1px solid var(--border-color);
}

.contact-details a {
    color: var(--accent);
    font-size: 0.95rem;
}

.contact-details p {
    margin-bottom: 0.75rem;
}

.contact-form .form-control,
.booking-form .form-control {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    color: var(--text-primary);
    padding: 0.75rem 0;
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

.contact-form .form-control:focus,
.booking-form .form-control:focus {
    background-color: transparent;
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: none;
}

.contact-form .form-control::placeholder,
.booking-form .form-control::placeholder {
    color: var(--text-muted);
}

.contact-form select.form-control,
.booking-form select.form-control {
    appearance: auto;
}

.contact-form textarea,
.booking-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* ---- Gallery / Portfolio - Masonry Grid ---- */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
    gap: 6px;
}

.masonry-item {
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
}

.masonry-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.masonry-item:hover {
    border-color: var(--accent);
    z-index: 1;
}

.masonry-item:hover::after {
    opacity: 1;
}

.masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.masonry-item:hover img {
    transform: scale(1.08);
}

.masonry-wide {
    grid-column: span 2;
}

.masonry-tall {
    grid-row: span 2;
}

/* Legacy gallery fallback */
.gallery-item {
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    border-color: var(--accent);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ---- Team ---- */
.team-image-card {
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.team-image-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

/* ---- Booking Cards ---- */
.booking-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.booking-card:hover {
    border-color: var(--accent);
}

.booking-card h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.booking-card img {
    height: 120px;
    object-fit: cover;
    width: 100%;
}

/* ---- Footer ---- */
.site-footer {
    background-color: #050505;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-logo {
    height: 30px;
    width: auto;
    opacity: 0.7;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.site-footer p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.site-footer a {
    color: var(--accent);
    font-size: 0.85rem;
}

/* ---- FAQ Accordion ---- */
.accordion-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.accordion-button {
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 1.25rem 1.5rem;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    background-color: var(--bg-dark-alt);
    color: var(--accent);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--accent);
}

.accordion-button::after {
    filter: invert(1);
}

.accordion-button:not(.collapsed)::after {
    filter: invert(0.6) sepia(1) saturate(5) hue-rotate(70deg);
}

.accordion-body {
    background-color: var(--bg-dark-alt);
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    padding: 1rem 1.5rem 1.25rem;
}

/* ---- Content Pages ---- */
.content-body {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.bg-dark-alt {
    background-color: var(--bg-dark-alt);
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .masonry-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 240px;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .section-padding {
        padding: 3rem 0;
    }

    .services-section {
        padding: 3rem 0;
    }

    .hero-section {
        min-height: 85vh;
    }

    .hero-slide-img {
        min-height: 85vh;
    }

    .page-header {
        padding-top: 6rem;
        padding-bottom: 2rem;
    }

    .page-hero {
        padding-top: 8rem;
        padding-bottom: 3rem;
    }

    .gallery-item img {
        height: 200px;
    }

    .team-image-card img {
        height: 250px;
    }

    .booking-card .row {
        text-align: center;
    }

    .booking-card img {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .masonry-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 160px;
        gap: 4px;
    }

    .masonry-wide {
        grid-column: span 2;
    }

    .hero-title {
        letter-spacing: 3px;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .service-img-wrapper {
        height: 180px;
    }
}
