/* --- CSS Reset & Variables --- */
:root {
    --primary-color: #0b2b56; /* Professional Navy Blue */
    --accent-color: #f39c12; /* Construction Safety Orange/Yellow */
    --accent-hover: #e67e22;
    --text-color: #333333;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Typography & Buttons --- */
h1, h2, h3 { color: var(--primary-color); margin-bottom: 15px; }
p { margin-bottom: 15px; }

.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s, color 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary { background: var(--accent-color); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; border: 2px solid var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary-color); }
.btn-small { padding: 8px 16px; font-size: 0.9em; background: var(--primary-color); color: var(--white); }
.btn-small:hover { background: #082142; }
.btn-block { display: block; width: 100%; text-align: center; }

/* --- Header / Nav --- */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo {
    max-height: 75px;
    width: auto;
}

.nav-links a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
}
.nav-links a:hover { color: var(--accent-color); }
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(11, 43, 86, 0.8), rgba(11, 43, 86, 0.8)), url('../images/gallery/project1.jpg') center/cover;
    color: var(--white);
    padding: 100px 20px;
    text-align: center;
}
.hero h1 { color: var(--white); font-size: 3rem; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; max-width: 700px; margin: 0 auto 30px; }
.hero-buttons .btn { margin: 10px; }

/* --- Sections Common --- */
section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 2.2rem; }
.about { background: var(--light-bg); }
.about-text { text-align: center; max-width: 800px; margin: 0 auto; font-size: 1.1rem; }

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.service-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.service-img { width: 100%; height: 200px; object-fit: cover; }
.service-content { padding: 20px; text-align: center; }
.service-content h3 { font-size: 1.3rem; }
.service-content p { font-size: 0.95rem; color: #555; height: 60px; }
.service-content .btn { margin-top: 10px; }

/* --- Gallery Grid --- */
.gallery { background: var(--light-bg); }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}
.gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

/* --- Contact & Form --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}
.contact-details { list-style: none; margin-top: 20px; }
.contact-details li { margin-bottom: 15px; font-size: 1.1rem; }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

/* --- Footer & Sticky WhatsApp --- */
.footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
}
.sticky-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: transform 0.3s;
}
.sticky-whatsapp:hover { transform: scale(1.1); }

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .nav-links, .header .btn-primary { display: none; }
    .mobile-menu-toggle { display: block; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100px;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        padding: 20px;
        z-index: 1000;
    }
    .nav-links.active a { margin: 10px 0; }
    .hero h1 { font-size: 2rem; }
    .contact-wrapper { grid-template-columns: 1fr; }
}

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0.1s; }
.service-card:nth-child(2) { transition-delay: 0.2s; }
.service-card:nth-child(3) { transition-delay: 0.3s; }
.service-card:nth-child(4) { transition-delay: 0.4s; }
.gallery-grid img:nth-child(even) { transition-delay: 0.2s; }

/* --- Before & After Slider & Carousel Base --- */
.ba-slider-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 450px;
    margin: 40px auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    --slider-pos: 50%;
}

.ba-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ba-after { z-index: 1; }
.ba-before {
    z-index: 2;
    clip-path: polygon(0 0, var(--slider-pos) 0, var(--slider-pos) 100%, 0 100%);
}

.ba-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    z-index: 4;
    cursor: ew-resize;
    margin: 0;
    padding: 0;
}

.ba-range:focus { outline: none; }
.ba-range::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 40px;
    height: 100vh;
    background: transparent;
    cursor: ew-resize;
}
.ba-range::-moz-range-thumb {
    width: 40px;
    height: 100vh;
    background: transparent;
    cursor: ew-resize;
    border: none;
}

.ba-slider-line {
    position: absolute;
    top: 0;
    left: var(--slider-pos);
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: #ffffff;
    z-index: 3;
    pointer-events: none;
}

.ba-slider-button {
    position: absolute;
    top: 50%;
    left: var(--slider-pos);
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    z-index: 3;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.ba-slider-button::after {
    content: '◀ ▶';
    font-size: 10px;
    color: #333333;
    letter-spacing: -1px;
}

/* --- Carousel Layout Additions --- */
.ba-carousel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto 40px;
    gap: 15px;
}

.ba-slides-container {
    flex-grow: 1;
    overflow: hidden;
}

.ba-slide {
    display: none;
    width: 100%;
    animation: fadeInSlide 0.5s ease-in-out;
}

.ba-slide.active {
    display: block;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.ba-carousel-wrapper .ba-slider-container {
    margin: 0 auto;
}

.carousel-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: background 0.3s, transform 0.2s;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

/* --- Before & After Text Labels --- */
.ba-label {
    position: absolute;
    bottom: 20px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 3;
    pointer-events: none;
}

.ba-label-before {
    left: 20px;
}

.ba-label-after {
    right: 20px;
}

/* Responsive Fixes for Sliders and Labels */
@media (max-width: 768px) {
    .ba-slider-container { height: 300px; }
    
    .ba-carousel-wrapper {
        position: relative;
        gap: 0;
    }
    .carousel-btn {
        position: absolute;
        z-index: 10;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    .prev-btn { left: -10px; }
    .next-btn { right: -10px; }
    
    .ba-label {
        font-size: 12px;
        padding: 4px 10px;
        bottom: 10px;
    }
    .ba-label-before { left: 10px; }
    .ba-label-after { right: 10px; }
}
