/* 1. CSS VARIABLES (Colors from Logo) */
:root {
    /* Primary brand colors */
    --color-primary-blue: #0A3742; /* Dark, professional blue */
    --color-primary-green: #007B4F; /* Deep brand green */
    /* Neutral colors */
    --color-light: #f4f4f4;
    --color-dark: #333;
    --color-white: #ffffff;
    
    /* Font families */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* 2. BASE STYLES & RESET */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    background: var(--color-white);
    color: var(--color-dark);
}

a {
    text-decoration: none;
    color: var(--color-primary-green);
}

ul {
    list-style: none;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
}

.section-padding {
    padding: 60px 0;
}

.section-dark {
    background: var(--color-primary-blue);
    color: var(--color-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: inherit; /* Inherits from the section color */
}

/* 3. HEADER & NAV STYLES */
#main-header {
    background: var(--color-primary-blue);
    color: var(--color-white);
    padding: 15px 0;
    position: sticky; /* Keeps the nav bar visible on scroll */
    top: 0;
    z-index: 100;
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
}

/* ADDED STYLE FOR HEADER LOGO IMAGE */
.header-logo-img {
    height: 40px; /* Set a fixed height for consistency */
    width: auto;
}
/* END LOGO STYLE */


#navbar ul {
    display: flex;
}

#navbar ul li a {
    color: var(--color-white);
    padding: 10px 15px;
    display: block;
    transition: background 0.3s ease;
}

#navbar ul li a:hover, #navbar ul li a.current {
    background: var(--color-primary-green);
}

/* NEW: MOBILE MENU TOGGLE STYLES */
#menu-toggle {
    background: transparent;
    border: 0;
    color: var(--color-white);
    font-size: 1.8rem;
    cursor: pointer;
    display: none; /* Hide by default on desktop */
}
/* END NEW */

/* 4. HERO SECTION STYLES */
.hero {
    background: url('kentcontactors1.jpg') no-repeat center center/cover; /* Placeholder background */
    height: 70vh; /* Viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    position: relative;
}

/* Dark overlay for better text readability */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); 
}

.hero-content {
    position: relative;
    z-index: 5;
    padding: 20px;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}


/* 5. BUTTON STYLES */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    transition: background 0.3s ease;
}

.btn-primary {
    background: var(--color-primary-green);
    color: var(--color-white);
}

.btn-primary:hover {
    background: #004d33; /* Darker green on hover */
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-primary-green);
    color: var(--color-primary-green);
    margin-top: 1.5rem;
}
/* For dark sections, reverse colors */
.section-dark .btn-secondary {
    border-color: var(--color-light);
    color: var(--color-light);
}

/* 6. FOOTER STYLES */
.site-footer {
  background: #0A3742;
  color: #ffffff;
  padding: 50px 0 20px;
  margin-top: 40px;
}

.footer-container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

/* LOGO */
.footer-logo-box {
  text-align: left;
}
.footer-logo {
  width: 140px;
  height: auto;
  margin-bottom: 12px;
  border-radius: 6px;
  background: #ffffff;
  padding: 6px;
}

.footer-col h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
  color: #00A36C;
  font-weight: 700;
}

.footer-col p,
.footer-col ul li a {
  font-size: 0.95rem;
  color: #d0e6e6;
  line-height: 1.5;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin: 6px 0;
}

.footer-col ul li a:hover {
  color: #00A36C;
}

.footer-bottom {
  text-align: center;
  margin-top: 25px;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 15px;
  font-size: 0.9rem;
  color: #cce0e0;
}


/* --- New CSS for the About Page Layout --- */

.page-header {
    padding: 100px 0 60px 0; /* Add extra padding for pages below the sticky header */
}

.page-title {
    text-align: left;
    font-size: 3rem;
    margin: 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Two columns: 2/3 text, 1/3 image */
    gap: 40px;
    align-items: center;
}

.about-text h3 {
    color: var(--color-primary-green);
    margin-top: 1.5rem;
    font-size: 1.5rem;
}

/* ABOUT PAGE SLIDER CONTAINER */
.about-image {
    position: relative;
    overflow: hidden;
    min-height: 400px;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.about-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s ease-in-out;
    opacity: 0; /* Controlled by JS */
}

/* PLACEHOLDER IMAGES FOR ABOUT SLIDER */
.about-slide-1 {
    background-image: url('about/heic.HEIC');
}
.about-slide-2 {
    background-image: url('about/1000527944.JPEG');
}
.about-slide-3 {
    background-image: url('about/1000545552.HEIC');
}
/* END ABOUT PAGE SLIDER STYLES */


/* --- PROJECTS GALLERY (Legacy/Teaser, not used on projects.html now) --- */

.project-grid-gallery {
    display: grid;
    /* Create a responsive 3-column layout */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-item {
    position: relative;
    overflow: hidden;
    height: 300px;
    background: var(--color-dark);
    cursor: pointer;
}

.project-img-placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-light); /* Placeholder for actual image */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-dark);
    font-weight: 700;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: var(--color-white);
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.project-item:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}
.project-overlay p {
    color: var(--color-primary-green);
}

/* --- CONTACT PAGE STYLES --- */

.contact-flex {
    display: flex;
    gap: 40px;
}

.contact-form-area, .contact-details {
    flex: 1; /* Both take equal space */
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

.contact-details h2 {
    color: var(--color-primary-blue);
    margin-bottom: 1.5rem;
}

.detail-box {
    margin-top: 25px;
}

.detail-box h3 {
    color: var(--color-primary-green);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

/* Add icons style (requires Font Awesome library link in the HTML <head>) */
.detail-box i {
    margin-right: 10px;
    font-size: 1.2em;
}

/* --- SLIDER CSS (Fading Animation) --- */

.slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0; /* Default state: hidden */
    transition: opacity 1.5s ease-in-out; /* Smooth transition */
}

.slide.active {
    opacity: 1; /* Only visible when active class is added by JS */
}

/* --- UPDATED: Placeholder Backgrounds for Slides --- */
.slide-1 {
    /* Design & Build - Use a blueprint/construction image */
    background: linear-gradient(rgba(10, 55, 66, 0.7), rgba(10, 55, 66, 0.7)), 
                url('hero/alu.jpg');
    background-size: cover;
}
.slide-2 {
    /* Construction & Renovation - Use a high-rise or large scale construction image */
    background: linear-gradient(rgba(0, 123, 79, 0.6), rgba(0, 123, 79, 0.6)), 
                url('hero/renovation.jpg');
    background-size: cover;
}
.slide-3 {
    /* MEP & Interior Design - Use a technical or modern interior image */
    background: linear-gradient(rgba(10, 55, 66, 0.7), rgba(10, 55, 66, 0.7)), 
                url('hero/IMG_6345.png');
    background-size: cover;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 90%;
    max-width: 800px;
}

/* --- SERVICES PAGE STYLES --- */

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px;
    margin-top: 2rem;
}

.service-card {
    background: var(--color-light);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
    color: var(--color-primary-blue);
    margin: 10px 0;
}

.service-card i {
    font-size: 3rem;
    color: var(--color-primary-green);
    margin-bottom: 10px;
}

/* === Client Section (New CSS Animation) === */
.clients-section {
    padding: 40px 0;
    text-align: center;
}

.carousel-container {
    position: relative;
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.carousel-viewport {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 30px;
    align-items: center;
    padding: 10px 0;
    white-space: nowrap;
    
    /* --- CORE AUTO-SCROLL ANIMATION --- */
    animation: auto-scroll 30s linear infinite; /* Adjust 30s for speed */
}

/* ROUND LOGOS FIX: Ensure 50% border-radius */
.client-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%; /* Makes the image container round */
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transition: .2s ease;
}

.client-logo img {
    width: 65%;
    height: 65%;
    object-fit: contain;
    /* Optional: Make the image inside the container round too, 
       though the container's overflow handles it visually */
    border-radius: 50%; 
}

/* HOVER EFFECT */
.client-logo:hover {
    transform: scale(1.08);
}

/* SIMPLE STANDALONE BUTTONS */
.client-btn {
    /* Manual buttons remain for interaction, but the auto-scroll relies on CSS */
    background: white;
    border: 2px solid #00A36C;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 26px;
    color: #00A36C;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    z-index: 20; /* Ensure buttons are above carousel */
}

.client-btn:hover {
    background: #00A36C;
    color: white;
}

/* --- KEYFRAMES FOR INFINITE CSS SCROLL --- */
@keyframes auto-scroll {
    0% {
        transform: translateX(0);
    }
    /* Move the entire track by exactly half its content (the duplication) */
    100% {
        transform: translateX(-50%);
    }
}

/* --- PROJECTS PAGE GALLERY STYLES (Showcase) --- */

.project-link-block {
    display: block; /* Make the whole area clickable */
    text-decoration: none;
    color: var(--color-dark); /* Ensure text remains readable */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Soft initial shadow */
    overflow: hidden; /* Contains child border radius */
}

.project-link-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-showcase {
    display: grid;
    grid-template-columns: 2fr 3fr; /* Text panel (2) and Gallery strip (3) */
    gap: 0; /* Remove gap inside the showcase container */
    align-items: start;
    background: var(--color-white);
}

.project-description-panel {
    background: var(--color-light);
    padding: 25px;
    border-radius: 0; /* Remove border-radius here as it is on the parent link block */
    height: 100%; 
}

.project-description-panel h2 {
    color: var(--color-primary-blue);
    margin-top: 0;
    font-size: 2rem;
}

.project-summary {
    margin-bottom: 15px;
    font-size: 1rem;
}

.project-specs {
    list-style: disc;
    padding-left: 20px;
    margin-top: 15px;
    font-size: 0.95rem;
}

.project-specs li strong {
    font-weight: 700;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.tag-completed {
    background: var(--color-primary-green);
    color: var(--color-white);
}

.tag-ongoing {
    background: #e67e22; /* Orange/Warning color */
    color: var(--color-white);
}

.project-gallery-strip {
    display: flex;
    gap: 10px;
    overflow: hidden; /* Hides the duplicate images */
    flex-shrink: 0;
    width: 100%;
}

.auto-scroll-strip {
    display: flex;
    gap: 10px;
    /* 3 images * 250px width + 3 images * 10px gap = 780px. 
       We use 2x the content width for the animation calculation */
    width: 1560px; 
    animation: project-scroll 25s linear infinite; /* Adjust time for speed */
}

.project-link-block:hover .auto-scroll-strip {
    animation-play-state: paused; /* Pause animation on hover */
}

.gallery-photo-box {
    flex-shrink: 0;
    width: 250px;
    height: 180px;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gallery-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-photo-box img:hover {
    transform: scale(1.05);
}

.project-divider {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 40px 0;
}

/* Keyframes for the Project Strip Continuous Scroll */
@keyframes project-scroll {
    0% {
        transform: translateX(0);
    }
    /* Move the entire track by the exact width of the original content */
    100% {
        transform: translateX(calc(-1 * (3 * 250px + 3 * 10px))); /* 780px total */
    }
}

/* --- NEW PROJECT DETAIL PAGE STYLES --- */

.project-detail-grid {
    display: grid;
    grid-template-columns: 3fr 1fr; /* Main content (3) and sidebar (1) */
    gap: 40px;
}

.lead-in-text {
    font-size: 1.1rem;
    color: var(--color-dark);
    margin-bottom: 25px;
    font-style: italic;
}

.detail-content h3 {
    color: var(--color-primary-blue);
    margin-top: 2rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--color-primary-green);
    padding-bottom: 5px;
}

/* Gallery inside the detail page */
.detail-gallery-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns for 3 photos */
    gap: 15px;
    margin: 20px 0;
}
.detail-photo-box {
    height: 250px; /* Enforce height for consistent look */
}


.sidebar-details {
    background: var(--color-light);
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-details h2 {
    color: var(--color-primary-green);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.sidebar-details p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* --- MOBILE OPTIMIZATION (Media Queries) --- */

@media(max-width: 768px) {
    /* Global layout stacking */
    .about-grid, .project-showcase, .contact-flex, .project-detail-grid {
        grid-template-columns: 1fr; 
        flex-direction: column;
    }
    
    /* NEW: MOBILE NAV MENU STYLES */
    #menu-toggle {
        display: block; /* Show hamburger on mobile */
    }

    #navbar {
        /* Mobile: Hide nav by default and collapse content */
        position: absolute;
        top: 70px; /* Below the header height (40px logo + padding) */
        left: 0;
        width: 100%;
        background: var(--color-primary-blue);
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease;
    }

    #navbar.active {
        /* Show the nav when active (toggled by JS) */
        /* Approximate height for 5 list items with padding */
        height: 250px; 
    }

    #navbar ul {
        flex-direction: column; /* Stack menu items vertically */
        padding: 10px 0;
    }

    #navbar ul li a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }
    /* END NEW */
    
    /* Project detail gallery grid stacks images vertically */
    .detail-gallery-strip {
        grid-template-columns: 1fr;
    }
    .detail-photo-box {
        height: 200px;
    }

    /* Project portfolio on mobile */
    .project-showcase {
        gap: 20px;
    }
    
    .project-gallery-strip {
        flex-wrap: nowrap; /* Force horizontal scrolling */
        overflow-x: scroll; /* Allow manual swipe on touch devices */
        padding: 0 0 10px 0;
        /* Important: Disable CSS animation on mobile to avoid interference with manual scroll */
        animation: none !important; 
    }
    .auto-scroll-strip {
        animation: none !important; 
        width: auto; /* Allow content to dictate width */
    }

    .gallery-photo-box {
        width: 80vw; /* Make photo boxes wide on mobile */
        max-width: 300px;
    }
    
    .about-image {
        order: -1; 
        min-height: 250px;
    }

    /* Text Sizes */
    .hero-content h2 {
        font-size: 2.5rem; 
    }
    
    .section-title, .page-title {
        font-size: 2rem;
    }
    
    .client-btn { 
        display: none; 
    }
    .client-logo { 
        width: 90px; 
        height: 90px; 
    }
    .carousel-track {
        animation-duration: 20s;
    }
}