@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

:root {
    --main-blue: #002A6A;
    --accent-light: #bfe3ff;
    --secondary-gray: #4a4f55;
    --accent-gray: #8f8d8e;
    --white: #ffffff;
    --black: #000000;
    --transition: all 0.3s ease;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: url('../assets/images/background_pattern.jpg') repeat fixed !important;
    background-size: auto;
    color: var(--secondary-gray);
    line-height: 1;
}

/* Boxed Layout */
.site-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    background: var(--white);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

h1 {
    font-family: var(--font-heading);
    font-size: 8rem;
    font-weight: 600;
    line-height: 1.5;
    /*text-transform: uppercase;*/
    margin-bottom: 2.5rem;
}

h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: none;
    /* Changed from uppercase */
    line-height: 1.0;
}

h2 {
    font-size: 2.5rem;
}

p {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.5;
}

/* Header & Nav */
/* Header & Nav */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--main-blue);
    width: 100%;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
}

.logo-container img {
    height: 60px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.contact-bar {
    color: var(--white);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-nav ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.glass-btn,
.booking-nav-btn {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    font-family: var(--font-heading);
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.9rem;
    background: var(--main-blue);
    color: var(--white);
    border: 1px solid transparent;
}

/* Hover effects */
.glass-btn:hover,
.glass-btn.active,
.booking-nav-btn:hover {
    background: var(--main-blue);
    color: var(--white);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    border-color: var(--white);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .header-inner {
        padding: 1rem;
    }

    .mobile-toggle {
        display: block;
    }

    .header-right {
        align-items: center;
    }

    .contact-bar {
        display: none;
        /* Hide top bar on mobile for cleaner look, or keep if preferred */
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--main-blue);
        padding: 1rem;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .glass-btn,
    .booking-nav-btn {
        display: block;
        width: 100%;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slider {
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* Slide 1 specific animation */
.slide-overlay {
    position: absolute;
    top: 0;
    right: -100%;
    width: 50%;
    /* Reduced from 60% to stop it going too far left */
    height: 100%;
    background: rgba(37, 57, 147, 0.7);
    transform: skewX(-15deg);
    transform-origin: top;
    transition: right 2s ease-in-out;
    z-index: 2;
}

.slide.active .slide-overlay {
    right: 0;
    /* Slide in to cover the right side */
}

.slide-content {
    position: relative;
    z-index: 3;
    color: var(--white);
    max-width: 500px;
    padding: 4rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* Ensure left alignment */
    text-align: left;
    margin-left: auto;
    margin-right: 5%;
    /* Position text on the right side */
}

.slide-content h1.line {
    font-size: 42px;
    margin-bottom: 0.8em;
    /* Reduced to match Services gap */
    line-height: 1.2;
}

.slide-content p {
    font-family: 'Lato', sans-serif;
    line-height: 1.3;
    /* Shrunk line height */
}

.slide-content .line {
    opacity: 0;
    transform: translateX(50px);
    margin-bottom: 0.5rem;
}

.slide.active .slide-content .line {
    animation: slideInRightLine 0.8s forwards;
}

.slide.active .slide-content .line:nth-child(1) {
    animation-delay: 2.0s;
    /* Adjusted delay */
}

.slide.active .slide-content .line:nth-child(2) {
    animation-delay: 2.5s;
}

.slide.active .slide-content .line:nth-child(3) {
    animation-delay: 3.0s;
}

.slide.active .slide-content .line:nth-child(4) {
    animation-delay: 3.5s;
}

.slide.active .slide-content .line:nth-child(5) {
    animation-delay: 4.0s;
}

.slide.active .slide-content .line:nth-child(6) {
    animation-delay: 4.5s;
}

/* Target the button container specifically (last-child) */
.slide.active .slide-content .line:last-child {
    opacity: 0;
    animation: fadeInButton 1s forwards;
    animation-delay: 5.5s;
    /* Fade in after text is done */
}

@keyframes fadeInButton {
    from {
        opacity: 0;
        transform: translateX(0);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRightLine {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Services Section */
.services-section {
    margin-top: 0;
    /* Removed gap as requested */
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.col-text {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.col-text h2 {
    text-transform: none;
    /* Removed uppercase */
    margin-bottom: 0.5em;
    /* Reduced gap to 0.5 line */
}

.light-blue-bg {
    background: var(--accent-light);
    color: var(--main-blue);
}

.col-visual {
    position: relative;
    overflow: hidden;
}

.image-slider {
    height: 100%;
    position: relative;
}

.image-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 3s ease-in-out;
}

.image-slider img.active {
    opacity: 1;
}

/* CTA Section */
.cta-section {
    position: relative;
    height: 300px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-overlay {
    background: rgba(37, 57, 147, 0.7);
    /* Changed to blue overlay */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.cta-large-btn {
    padding: 0.8rem 2rem;
    background: var(--main-blue);
    color: var(--white);
    border: 2px solid transparent;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 1rem;
    transition: var(--transition);
    text-transform: uppercase;
}

/* Specific fix for hero button alignment */
.slide-content .cta-large-btn {
    margin-left: 0;
    margin-right: auto;
    display: inline-block;
}

.cta-large-btn:hover {
    background: var(--main-blue);
    color: var(--white);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    /* Menu glow effect */
    border-color: var(--white);
}

/* Info Box Section - 3 Columns */
.info-box-section {
    padding: 3rem 2rem 3rem;
    /* Reduced top and bottom padding to 3rem */
    background: #f9f9f9;
}

.info-box-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    text-align: left;
}

.ib-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ib-col p {
    font-size: 1rem;
    line-height: 1.6;
}

.service-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.service-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.service-list li::before {
    content: "\f0a4";
    /* FontAwesome Hand Right or Check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--main-blue);
    margin-right: 0.8rem;
}

/* Info Box Images */
.ib-img-top {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ib-img-bottom {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 900px) {
    .info-box-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .service-list li {
        justify-content: center;
    }
}

/* Footer Logos Fix */
.logos-col img {
    max-height: 80px;
    width: auto;
    display: block;
}

/* Info Cards */
.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 550px;
    /* Increased to accommodate content */
}

.info-cards-slider {
    height: 100%;
    position: relative;
}

.info-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s;
}

.bg-mot-logo {
    background-image: url('../assets/images/125x125_motlogo.png');
    /* MOT Logo Background */
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50%;
    /* Adjusted to not overpower */
}

.info-card.active {
    opacity: 1;
}

.card-overlay {
    background: rgba(37, 57, 147, 0.85);
    color: var(--white);
    height: 100%;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-overlay h2 {
    margin-bottom: 0.5em;
    /* Match Services section gap */
    text-transform: none;
}


/* Specific spacing adjustment for About Us as requested */
.about-section .col-text,
.about-section .card-overlay {
    padding-top: 2rem;
    /* Reduced from 4rem */
}

.card-overlay ul {
    margin-top: 1rem;
    list-style: none;
}

.card-overlay ul li::before {
    content: "✔";
    color: #48bb78;
    margin-right: 0.8rem;
    font-weight: bold;
}

.card-overlay ul li {
    margin-bottom: 1em;
    /* 1 line gap between items */
}

/* Footer */
.site-footer {
    background: var(--secondary-gray);
    color: var(--white);
    padding: 4rem 2rem 2rem;
    font-size: 0.9rem;
    /* Reduced font size as requested */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
}

.footer-col.left {
    flex: 1;
}

.footer-col.left p {
    font-size: 0.85rem;
    /* Smaller text for contact info */
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.logos-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo-row-top {
    display: flex;
    gap: 1rem;
}

.footer-col.center {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-col.right {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.social-links {
    margin-bottom: 1rem;
}

.footer-map-container {
    width: 100%;
    margin-top: 1rem;
    border: none;
}

.footer-col h3 {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--main-blue);
    padding-bottom: 0.5rem;
}

.logos-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.logos-row img {
    height: 60px;
    filter: none;
    /* Removed inversion if it was hiding logos */
    background: white;
    padding: 5px;
    border-radius: 4px;
}

.footer-map-container {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.google-map {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.fb-link {
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.2rem;
}

.fb-link i {
    margin-right: 10px;
}

.footer-bottom {
    text-align: center;
    margin-top: 4rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border: none;
    width: 80%;
    max-width: 800px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    color: var(--white);
    /* Changed to white as requested */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.modal-header {
    background: url('../assets/images/GarageFront.jpg') center/cover;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-align: center;
    padding: 2rem;
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(37, 57, 147, 0.7);
}

.modal-header h2,
.modal-header p {
    position: relative;
    z-index: 1;
}

#bookingForm,
#contactForm {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Subtle grey shadow */
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Custom Checkboxes */
.form-message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.g-recaptcha {
    margin-bottom: 1.5rem;
}

/* Custom Checkboxes */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping of items if screen is small */
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.custom-checkbox {
    display: flex;
    flex-direction: row;
    /* Force row layout */
    align-items: center;
    gap: 0.8rem;
    /* Increased gap slightly */
    cursor: pointer;
    user-select: none;
    background: #f5f5f5;
    padding: 10px 15px;
    /* More horizontal padding */
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
    /* Prevent text wrapping */
}

.custom-checkbox input {
    display: none;
}

.checkmark {
    width: 30px;
    height: 30px;
    min-width: 30px;
    /* Prevent shrinking */
    background: var(--white);
    border: 2px solid var(--main-blue);
    border-radius: 50%;
    position: relative;
    transition: var(--transition);
    display: flex;
    /* Restore display to make size work */
    align-items: center;
    justify-content: center;
}

.custom-checkbox input:checked+.checkmark {
    background: var(--white);
    border: 1px solid var(--main-blue) !important;
}

/* Green tick */
.custom-checkbox input:checked+.checkmark::after {
    content: '✔';
    color: #48bb78;
    font-size: 24px;
    /* Adjusted size to fit better */
    font-weight: 900;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /* Center perfectly */
    z-index: 5;
}

/* Remove inner white circle interfering with tick */
.custom-checkbox input:checked+.checkmark::before {
    display: none;
}

.site-bg-blue {
    background: var(--main-blue) !important;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--main-blue);
    color: var(--white);
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 8px !important;
    /* Forces rounded corners */
    -webkit-appearance: none;
    /* Removes default styling */
    appearance: none;
}

.submit-btn:hover {
    background: #4a6fa5;
    /* Lighter blue for visible hover state */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.light-blue-btn {
    background: var(--accent-light);
    color: var(--main-blue);
}

.light-blue-btn:hover {
    background: var(--main-blue);
    color: var(--white);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--main-blue);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeInRight 2s forwards;
}