/* --- Custom CSS --- */
:root {
    /* Navy blue theme matching the screenshot */
    --theme-blue: #283a61;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

}

/* Top Bar Styles */
.top-bar {
    background-color: var(--theme-blue);
    color: #ffffff;
    font-size: 0.9rem;
    padding: 8px 0;
}

.top-bar a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.top-bar a:hover {
    opacity: 0.8;
}

.social-icons a {
    margin-left: 15px;
    font-size: 1rem;
}

/* Navbar Styles */
.navbar {
    padding: 15px 0;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.navbar-brand img {
    max-height: 70px;
    /* Adjust based on your ML-Roof logo size */
}

.nav-link {
    color: var(--theme-blue) !important;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    margin: 0 10px;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    color: #000 !important;
}

.btn-quote {
    border: 2px solid var(--theme-blue);
    color: var(--theme-blue);
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 20px;
    border-radius: 0;
    /* Square edges like the screenshot */
    transition: all 0.3s ease;
}

.btn-quote:hover {
    background-color: var(--theme-blue);
    color: #ffffff;
}

/* Hero Video Section Styles */
.hero-section {
    position: relative;
    width: 100%;
    height: 70vh;
    /* Adjust height as needed */
    min-height: 500px;
    overflow: hidden;
    background-color: #000;
    /* Fallback color */
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    object-fit: cover;
}

/* Optional slight dark overlay to make any text readable */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* The text in the top right of the video */
.hero-watermark {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #ffffff;
    z-index: 2;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .top-bar .text-end {
        text-align: center !important;
        margin-top: 5px;
    }

    .top-bar .text-start {
        text-align: center !important;
    }

    .navbar-nav {
        margin-top: 15px;
        text-align: center;
    }

    .btn-quote {
        margin-top: 10px;
        display: inline-block;
    }

    .hero-watermark {
        right: 20px;
        top: 20px;
        font-size: 1rem;
    }
}

/* --- About Section Styles --- */
.about-section {
    background-color: #ffffff;
}

.theme-text-blue {
    color: var(--theme-blue);
}

.experience-number {
    font-size: 4rem;
    line-height: 1;
    letter-spacing: -2px;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

/* Solid Blue Button for this section */
.btn-solid-blue {
    background-color: var(--theme-blue);
    color: #ffffff;
    border: 2px solid var(--theme-blue);
    font-weight: 700;
    text-transform: uppercase;
    padding: 12px 30px;
    border-radius: 0;
    /* Square edges */
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-solid-blue:hover {
    background-color: #ffffff;
    color: var(--theme-blue);
}

/* --- CTA / Why Choose Us Section Styles --- */
.bg-dark-custom {
    background-color: #222222;
    /* Matches the dark grey background */
}

.bg-theme-blue {
    background-color: var(--theme-blue);
    /* Uses the blue from your top bar */
}

.border-right-custom {
    border-right: 3px solid #555555;
}

.text-call-blue {
    color: #5c72a6;
    /* Muted blue to remain readable on dark background */
}

.text-call-grey {
    color: #777777;
}

.list-check-icon {
    color: #6b88ce;
    /* Faded blue for the checkmarks */
    font-size: 1.1rem;
}

/* --- Certificate Slider Styles --- */
.certificate-slider {
    background-color: #ffffff;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    /* Keeps all logos vertically centered */
}

.slider-logo {
    max-height: 80px;
    /* Prevents logos from being too large */
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    mix-blend-mode: multiply;
    /* Helps hide white backgrounds on the logo image files */
}

.slider-logo:hover {
    opacity: 1;
}

/* Customizing the Pagination Dots */
.swiper-pagination {
    position: relative !important;
    bottom: 0 !important;
    margin-top: 15px;
}

.swiper-pagination-bullet-active {
    background-color: var(--theme-blue) !important;
}

/* --- Services Section Styles --- */
.services-section {
    background-color: #efefef;
    /* Light gray background matching the image */
}

.service-card {
    overflow: hidden;
    height: 100%;
    /* Subtle shadow to lift the images off the gray background slightly */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.service-img {
    height: 300px;
    object-fit: cover;
    /* Ensures images fill the box without distorting */
}

.service-box {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 85%;
    /* Leaves a gap on the right side as seen in the screenshot */
    background-color: #556fb5;
    /* A slightly softer blue to match the reference image */
    z-index: 2;
    transition: background-color 0.3s ease;
}

/* Optional hover effect to make the card interactive */
.service-card:hover .service-box {
    background-color: var(--theme-blue);
}

/* --- Tailored Solutions Section Styles --- */
.solution-card {
    background-size: cover;
    background-position: center right;
    min-height: 400px;
    /* Keeps the boxes tall enough to fit the content */
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* This creates the solid blue left side that fades into the background image */
.solution-overlay {
    background: linear-gradient(to right, var(--theme-blue) 0%, var(--theme-blue) 45%, rgba(40, 58, 97, 0) 100%);
    width: 100%;
}

.btn-white-square {
    background-color: #ffffff;
    color: var(--theme-blue);
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 25px;
    border: 2px solid #ffffff;
    border-radius: 0;
    /* Square edges */
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-white-square:hover {
    background-color: transparent;
    color: #ffffff;
}

/* --- Reviews Section Styles --- */
.reviews-section {
    background-color: #f1f2f4;
}

/* Give the swiper container padding so shadows and content don't clip */
.reviewsSwiper {
    padding: 20px 5px !important;
}

/* Force slides to stretch equally */
.reviewsSwiper .swiper-slide {
    height: auto !important;
    display: flex;
}

.review-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* Slightly stronger shadow for depth */
    width: 100%;
    height: 100%;
    /* Stretches to match the tallest card */
    display: flex;
    flex-direction: column;
}

.avatar-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Avatar Colors */
.bg-orange {
    background-color: #e8710a;
}

.bg-dark {
    background-color: #333333;
}

.bg-secondary {
    background-color: #6c757d;
}

.review-text {
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    /* Pushes the 'read more' to the bottom uniformly */
}

.read-more-link {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    margin-top: 10px;
    display: inline-block;
}

.read-more-link:hover {
    color: var(--theme-blue);
}

.trustindex-badge {
    background-color: #117855;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Customizing the Swiper Navigation Arrows */
.review-nav-btn {
    background-color: #ffffff;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    color: #555 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.review-nav-btn::after {
    font-size: 1rem !important;
    font-weight: bold;
}

.swiper-button-prev.review-nav-btn {
    left: -15px;
}

.swiper-button-next.review-nav-btn {
    right: -15px;
}

/* --- Contact Section Styles --- */
.contact-heading-left {
    border-left: 4px solid var(--theme-blue);
    padding-left: 15px;
}

/* Form Inputs (Line Style) */
.custom-line-input {
    border: none;
    border-bottom: 1px solid #d1d1d1;
    border-radius: 0;
    padding-left: 0;
    padding-bottom: 10px;
    background-color: transparent;
    box-shadow: none !important;
    color: #333;
}

.custom-line-input::placeholder {
    color: #999;
}

.custom-line-input:focus {
    border-bottom: 1px solid var(--theme-blue);
    background-color: transparent;
}

/* Button */
.btn-outline-theme-blue {
    color: var(--theme-blue);
    border: 2px solid var(--theme-blue);
    background-color: transparent;
    border-radius: 0;
    padding: 10px 25px;
    transition: all 0.3s ease;
}

.btn-outline-theme-blue:hover {
    background-color: var(--theme-blue);
    color: #ffffff;
}

/* Contact Details Card */
.contact-details-card {
    border: none;
    border-top: 4px solid var(--theme-blue);
    border-radius: 10px;
}

.contact-icon {
    color: var(--theme-blue);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

/* Social Media Circles */
.social-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: #d8d8d8;
    /* Light grey */
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.social-circle:hover {
    background-color: var(--theme-blue);
    color: #ffffff;
}

/* --- Footer Styles --- */
.footer-section {
    background-color: #222222;
    /* Matches the dark grey */
    color: #cccccc;
    /* Light grey text for readability */
}

.footer-text {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* The vertical blue line next to headings */
.footer-heading-line {
    border-left: 3px solid var(--theme-blue);
    padding-left: 12px;
}

/* Services Links */
.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-links i {
    font-size: 0.8rem;
    color: #888888;
    /* Slightly muted color for the arrows */
}

/* Enquire Online Button */
.btn-outline-white {
    color: #ffffff;
    border: 2px solid #ffffff;
    background-color: transparent;
    border-radius: 0;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-white:hover {
    background-color: #ffffff;
    color: #222222;
}

/* Bottom Bar */
.border-top-custom {
    border-top: 1px solid #333333;
}

.footer-social-icons a {
    color: #888888;
    margin-left: 15px;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.footer-social-icons a:hover {
    color: #ffffff;
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    .footer-social-icons {
        margin-top: 10px;
    }

    .footer-social-icons a {
        margin: 0 10px;
    }
}

@media (max-width: 991px) {
    .swiper-button-prev.review-nav-btn {
        left: -5px;
        /* Changed from -5px to keep it inside the screen */
    }

    .swiper-button-next.review-nav-btn {
        right: -5px;
        /* Changed from -5px to keep it inside the screen */
    }
}

/* Mobile Adjustments for the fade overlay so it's readable on smaller screens */
@media (max-width: 767px) {
    .solution-overlay {
        background: linear-gradient(to right, rgba(40, 58, 97, 0.95) 0%, rgba(40, 58, 97, 0.8) 100%);
    }
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    .service-box {
        width: 90%;
    }
}

/* Mobile adjustments to move the vertical border to a horizontal line */
@media (max-width: 767px) {
    .border-right-custom {
        border-right: none;
        border-bottom: 3px solid #555555;
        padding-bottom: 1.5rem;
    }
}

/* Mobile Adjustments for About Section */
@media (max-width: 991px) {
    .experience-number {
        font-size: 3rem;
    }

    .about-section .d-flex.gap-4 {
        gap: 15px !important;
        flex-direction: column;
        align-items: flex-start !important;
    }
}

/* --- Dropdown on Hover (Desktop Only) --- */
@media (min-width: 992px) {
    .navbar .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        /* Prevents the menu from closing if there's a gap between the link and the menu */
    }
}

/* --- BULLETPROOF MOBILE OVERFLOW FIX --- */
@media (max-width: 991px) {

    /* Stops Bootstrap 'g-5' rows from pushing past the screen edge */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Ensures slider arrows don't cause hidden scrolling */
    .swiper-button-prev.review-nav-btn {
        left: 5px !important;
    }

    .swiper-button-next.review-nav-btn {
        right: 5px !important;
    }
}