/*/*
====================================
Barns Water Solutions - Final Stylesheet
====================================
*/

/* --- Global Reset and Variables --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1.5;
    font-family: Arial, Helvetica, sans-serif;
    background-color: white;
}

:root {
    /* Theme Colors */
    --dark-blue: #003366; 
    --light-blue: #ADD8E6; 
    --yellow-accent: #FFC300; 
    --orange-band: #FF6600; 
    --dark-green-accent: #006400; 
    /* Gallery Background Color - Light, complementary shade */
    --gallery-bg: #F8FBFE; 
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* Helper for content containers */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Add active state for navigation */
.active-link {
    background-color: var(--yellow-accent);
    color: var(--dark-blue) !important;
}

.active-link:hover {
    background-color: var(--yellow-accent) !important;
}

/* -------------------------------------------------------------------------------------- */
/* --- 1. HEADER & NAVIGATION SECTION --- */
/* -------------------------------------------------------------------------------------- */

#site-nav {
    background-color: var(--dark-blue); 
    padding: 15px 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#site-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-end; 
}

#site-nav ul li a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

#site-nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--yellow-accent);
}

.contact-link {
    background-color: var(--orange-band); 
    border-radius: 5px;
}

.contact-link:hover {
    background-color: #e65c00;
    color: white !important;
}

/* --- Hero Banner Styling (The Graphic) --- */
.hero-banner {
    width: 100%;
    overflow: hidden; 
    background-color: white;
}

.header-graphic {
    width: 100%; 
    height: auto;
    display: block;
}

/* -------------------------------------------------------------------------------------- */
/* --- 2. PROJECTS CAROUSEL SECTION (Index Page) --- */
/* -------------------------------------------------------------------------------------- */

.carousel-section {
    padding: 0; 
    background-color: white; 
    text-align: center;
}

.carousel-container {
    max-width: 800px; 
    margin: 0 auto;
    position: relative; 
    overflow: hidden; 
    border-radius: 0; 
    box-shadow: none; 
}

.carousel-slides {
    display: flex; 
    transition: transform 0.5s ease-in-out; 
}

.carousel-item {
    min-width: 100%; 
    display: none;
    position: relative;
}

.carousel-item.active {
    display: block; 
}

.carousel-item img {
    width: 100%;
    height: auto; /* Uses original aspect ratio */
    object-fit: unset; /* Ensures no zooming/cropping */
    display: block;
}

/* HIDE THE ENTIRE CAPTION BLOCK */
.carousel-caption {
    display: none; 
}

/* Controls (Arrows) Styling */
.prev-button, .next-button {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.4); 
    border: none;
    z-index: 10;
}

.prev-button { left: 0; border-radius: 0 3px 3px 0; }
.next-button { right: 0; border-radius: 3px 0 0 3px; }

.prev-button:hover, .next-button:hover {
    background-color: var(--yellow-accent);
    color: var(--dark-blue);
}

/* Indicators (Dots) Styling */
.carousel-indicators {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 4px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.dot.active, .dot:hover {
    background-color: var(--yellow-accent);
}

/* -------------------------------------------------------------------------------------- */
/* --- 3. OUR COMPANY & CORE SERVICES SECTION (Index Page) --- */
/* -------------------------------------------------------------------------------------- */

.company-section {
    padding: 80px 20px;
    background-color: white; 
    text-align: center;
}

.section-title {
    color: var(--dark-blue);
    font-size: 2.5em;
    margin-bottom: 40px;
}

.section-subtitle {
    color: var(--dark-blue);
    margin-bottom: 40px;
    font-style: italic;
}

.content-wrapper {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    gap: 50px;
    text-align: left;
}

.company-column {
    flex: 1; 
    padding: 10px;
}

.company-intro-text {
    font-size: 1.2em;
    font-style: italic;
    color: var(--orange-band); 
    margin-bottom: 20px;
}

.company-detail-text {
    line-height: 1.6;
    color: #555;
}

.core-services-box {
    background-color: var(--light-blue); 
    border: 3px solid var(--yellow-accent); 
    padding: 30px;
    border-radius: 8px;
    height: 100%; 
    box-sizing: border-box;
}

.partner-tagline {
    color: var(--dark-blue);
    font-size: 1.4em;
    margin-bottom: 15px;
    font-weight: 700;
}

.main-services-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.main-services-list li {
    padding: 10px 0;
    color: var(--dark-blue);
    font-size: 1.1em;
    border-bottom: 1px dashed rgba(0, 51, 102, 0.2);
}

.main-services-list li:last-child {
    border-bottom: none;
}

.service-icon {
    color: var(--dark-green-accent); 
    margin-right: 10px;
    font-weight: bold;
}

.services-link {
    display: inline-block;
    color: var(--orange-band);
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.3s;
}

.services-link:hover {
    color: var(--dark-blue);
}

/* -------------------------------------------------------------------------------------- */
/* --- 4. MEET OUR TEAM SECTION / Projects Showcase (Index & Services Page) --- */
/* -------------------------------------------------------------------------------------- */

#team-section {
    padding: 80px 20px;
    background-color: #f1f1f1; 
    text-align: center;
}

#projects-showcase {
    padding: 80px 20px;
    background-color: #f1f1f1;
    text-align: center;
}

.team-heading {
    color: var(--dark-blue);
    font-size: 2em;
    margin-bottom: 50px;
}

.team-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.team-member {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.team-member:hover {
    transform: translateY(-5px); 
}

.team-member img {
    width: 100%;
    height: 300px; 
    object-fit: cover; 
    display: block;
    transition: filter 0.3s;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 51, 102, 0.85); 
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; 
    transition: opacity 0.3s ease;
    padding: 10px;
}

.team-member:hover .photo-overlay {
    opacity: 1; 
}

.role-caption {
    color: var(--yellow-accent); 
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
}

/* Video Placeholder Style */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 30px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* -------------------------------------------------------------------------------------- */
/* --- 5. FOOTER SECTION --- */
/* -------------------------------------------------------------------------------------- */

#main-footer {
    background-color: var(--dark-blue); 
    color: white;
    padding: 30px 20px;
}

.footer-content-wrapper {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Stylish font placeholder for Spence Developers */
.developer-name {
    font-family: 'Cursive', sans-serif; 
    font-size: 1.8em;
    font-weight: bold;
    color: var(--yellow-accent); 
    margin: 0;
}

.developer-contact {
    font-size: 0.9em;
    color: var(--yellow-accent); 
    font-weight: bold;            
}

.copyright {
    color: white;
    font-size: 0.9em;
}

/* -------------------------------------------------------------------------------------- */
/* --- 6. SERVICES DETAIL STYLING (Services Page) --- */
/* -------------------------------------------------------------------------------------- */

.service-detail-block {
    margin-bottom: 60px;
    padding: 20px 0;
    border-bottom: 1px solid #ccc;
}

.service-detail-block:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.service-detail-block h3 {
    color: var(--dark-blue);
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.service-detail-block h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--yellow-accent);
    margin: 10px auto 0;
}

.service-content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start; 
}

.service-photo {
    flex: 1; 
    min-width: 40%;
    max-width: 40%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.service-photo img {
    width: 100%;
    height: 350px; 
    object-fit: cover;
    display: block;
}

.service-explanation {
    flex: 1.5; 
    padding-top: 10px;
    text-align: left;
}

.service-explanation p {
    font-size: 1.1em;
    line-height: 1.7;
    color: #333;
}

/* Reverse layout for alternating blocks */
.service-detail-block.reverse-layout .service-content-wrapper {
    flex-direction: row-reverse;
}

/* -------------------------------------------------------------------------------------- */
/* --- 7. CONTACT PAGE STYLING (Contact Page) --- */
/* -------------------------------------------------------------------------------------- */

/* New class for the light blue background theme */
.contact-section-bg {
    padding: 80px 20px;
    background-color: var(--light-blue); /* Sets light blue background */
    text-align: center;
}

/* Use the flexbox on the wrapper to place form and details side-by-side */
.contact-wrapper {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    text-align: left;
}

/* Styles for the main heading (Get in Touch) */
.contact-page-title {
    color: var(--dark-blue) !important;
    font-size: 2.8em !important;
    text-align: left !important;
}

.contact-column {
    flex: 1;
    padding: 10px;
}

/* Form Styling */
.contact-form label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--dark-blue);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--orange-band);
    outline: none;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin-top: 25px;
    background-color: var(--orange-band);
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: var(--dark-blue);
}

/* Contact Details Styling */
.side-heading {
    color: var(--orange-band);
    font-size: 1.5em;
    margin-bottom: 15px;
    margin-top: 25px;
    border-bottom: 2px solid var(--dark-blue);
    padding-bottom: 5px;
}

.info-block {
    margin-bottom: 30px;
}

.info-block h4 {
    color: var(--dark-blue);
    font-size: 1.2em;
    margin-bottom: 5px;
}

.info-block p {
    color: #555;
    margin: 3px 0;
}

.map-container {
    margin-top: 20px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* WhatsApp Link Styling */
.whatsapp-link {
    color: var(--dark-green-accent); /* Green color for link recognition */
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s;
}

.whatsapp-link:hover {
    color: var(--orange-band);
    text-decoration: underline;
}

/* Facebook/Social Link Styling */
.social-link {
    display: block;
    padding: 10px 0;
    margin-top: 10px;
    text-decoration: none;
    color: var(--dark-blue);
    font-weight: 700;
    border: 1px solid var(--dark-blue);
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
}

.social-link:hover {
    background-color: var(--dark-blue);
    color: white;
}

/* -------------------------------------------------------------------------------------- */
/* --- 9. GALLERY PAGE STYLING (gallery.html) --- */
/* -------------------------------------------------------------------------------------- */

#gallery-hero {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--light-blue);
}

#gallery-hero h1 {
    font-size: 2.5em;
    color: var(--dark-blue);
    margin-bottom: 10px;
}

#gallery-hero p {
    font-size: 1.1em;
    color: #333;
}

/* Main Gallery Grid */
#projects-gallery {
    padding: 40px 20px;
    background-color: var(--gallery-bg); /* Light, complementary background */
    display: grid;
    /* Responsive 3-column grid */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.gallery-item img,
.gallery-item iframe,
.gallery-item video { /* Added video to the selector */
    width: 100%;
    height: 250px; /* Uniform fixed height for all media */
    object-fit: cover;
    display: block;
}
}

.media-caption {
    padding: 15px;
    text-align: center;
    font-size: 0.95em;
    font-weight: bold;
    color: var(--dark-blue);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f1f1;
}

.coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 350px;
    background-color: var(--light-blue);
    color: var(--dark-blue);
    font-size: 1.2em;
    font-weight: bold;
}

/* Gallery Call to Action */
#gallery-cta {
    text-align: center;
    padding: 50px 20px;
    background-color: var(--gallery-bg);
    border-top: 1px solid #ccc;
}

#gallery-cta h2 {
    color: var(--dark-blue);
    margin-bottom: 20px;
}

.contact-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--dark-green-accent); 
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.contact-button:hover {
    background-color: var(--orange-band);
}

/* -------------------------------------------------------------------------------------- */
/* --- 10. MEDIA QUERIES (Responsiveness) --- */
/* -------------------------------------------------------------------------------------- */

@media (max-width: 992px) {
    /* Index Page Layout */
    .content-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .company-column {
        text-align: center;
    }
    
    .company-detail-text {
        text-align: left; 
    }

    /* Carousel Height */
    .carousel-item img {
        height: auto;
    }

    /* Services Page Layout */
    .service-content-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    .service-detail-block.reverse-layout .service-content-wrapper {
        flex-direction: column; /* Stacks normally on mobile */
    }
    .service-photo, .service-explanation {
        min-width: 100%;
        max-width: 100%;
    }
    .service-photo img {
        height: 250px; /* Reduced fixed height for mobile */
    }
    
    /* Gallery Grid Adjustment */
    #projects-gallery {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }


    /* Contact Page Layout */
    .contact-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    /* Navigation adjustment for smaller screens */
    #site-nav {
        padding: 10px 20px;
    }

    #site-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    /* Section Padding */
    .company-section, #team-section, #projects-showcase, .contact-section-bg, #gallery-hero, #gallery-cta {
        padding: 40px 15px;
    }
    
    /* Team Grid */
    .team-photo-grid {
        grid-template-columns: 1fr;
    }

    /* Gallery Media Height */
    .gallery-item img, .gallery-item iframe {
        height: 200px;
    }

    /* Footer */
    #main-footer {
        padding: 20px 15px;
    }

    .footer-content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .developer-name {
        margin-bottom: 5px;
    }
}
}