/* 
   Mapemba Builders KZN - Premium Construction Styles 
   Colors: Dark Grey (#1E1E1E), Medium Grey (#3A3A3A), Orange (#F57C00)
*/

:root {
    --primary-dark: #1E1E1E;
    --secondary-dark: #2A2A2A;
    --card-dark: #3A3A3A;
    --accent-color: #F57C00;
    --accent-hover: #D96D00;
    --text-light: #F5F5F5;
    --text-muted: #B0B0B0;
    --white: #FFFFFF;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--primary-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography & Utilities */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.underline {
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 10px auto 20px auto;
}

.underline-left {
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 10px 0 20px 0;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 124, 0, 0.4);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    margin-left: 15px;
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

header.scrolled {
    background-color: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

header.header-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper {
    width: 70px;
    /* Adjust size as needed */
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--white);
    /* Fallback */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Clean up white edges/background if image is non-transparent square */
}

/* Nav Links */
.desktop-nav ul {
    display: flex;
    gap: 30px;
}

.desktop-nav a {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    position: relative;
    padding: 5px 0;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.desktop-nav a:hover::after {
    width: 100%;
}

.btn-nav {
    background-color: var(--accent-color);
    padding: 8px 18px !important;
    border-radius: 4px;
}

.btn-nav:hover {
    background-color: var(--accent-hover);
}

.btn-nav::after {
    display: none !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--white);
    background: none;
    border: none;
    cursor: pointer;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--primary-dark);
    z-index: 2000;
    transition: 0.4s ease;
    padding: 60px 40px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-menu-overlay.active {
    right: 0;
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu-overlay ul {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.mobile-menu-overlay a {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
}

.mobile-menu-overlay a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
    transform: scale(1);
    transition: transform 10s ease;
    /* Subtle zoom effect */
}

.hero:hover .hero-bg {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: -1;
}

.hero-text {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    color: var(--accent-color);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: block;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #DDDDDD;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-image {
    height: 200px;
    /* Reduced height to make images smaller */
    overflow: hidden;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.service-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* Ensure full image is visible */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-details {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.service-card .icon-box {
    width: 70px;
    height: 70px;
    background-color: var(--accent-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.8rem;
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.service-card:hover .icon-box {
    transform: translateX(-50%) rotateY(180deg);
}

.service-card h3 {
    margin-top: 25px;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.service-card p {
    color: #666;
    font-size: 1rem;
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* About Section */
.about-section {
    background-color: #f9f9f9;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-content h2 {
    font-size: 2.5rem;
}

.about-content .lead {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary-dark);
    margin-bottom: 20px;
}

.about-list {
    margin-top: 25px;
}

.about-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--primary-dark);
}

.about-list i {
    color: var(--accent-color);
    margin-right: 12px;
    font-size: 1.1rem;
}

/* Gallery / Work */
.dark-section {
    background-color: var(--primary-dark);
    color: var(--white);
}

.dark-section h2 {
    color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
    transition: all 0.5s ease;
}

.hidden-gallery-item {
    display: none;
}

.hidden-gallery-item.show {
    display: block;
    animation: fadeInUp 0.5s ease forwards;
}

.gallery-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    /* Clicks pass through to the image */
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.overlay i {
    color: var(--white);
    font-size: 2rem;
}

/* Contact Section */
.contact-section {
    padding-bottom: 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: var(--white);
    padding: 50px;
    box-shadow: var(--shadow);
    border-radius: 8px;
    position: relative;
    top: 50px;
    /* Overlap map */
    z-index: 10;
    margin-bottom: -50px;
    /* Compensate for overlap */
}

.contact-info {
    padding-right: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.info-item i {
    width: 40px;
    height: 40px;
    background: #FFF0E0;
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1rem;
    flex-shrink: 0;
}

.info-item h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.rating-badge {
    margin-top: 30px;
    background: #f4f4f4;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.stars {
    color: #FFD700;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

.full-width {
    width: 100%;
}

/* Map */
.map-section {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding-top: 100px;
    /* Space for hidden overlapping contact box */
}

/* Footer */
footer {
    background-color: #111;
    color: #888;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Align watermark to right */
    gap: 10px;
}

.watermark-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: 1px;
    transition: all 0.3s ease;
    user-select: none;
    text-shadow: 0 0 15px rgba(245, 124, 0, 0.3);
    cursor: pointer;
    display: inline-block;
    margin-top: 10px;
}

.watermark-text:hover {
    color: var(--white);
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.lightbox-wrapper {
    position: relative;
    max-width: 80%;
    max-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 100%;
    max-height: 100vh;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    border: 5px solid var(--white);
    border-radius: 4px;
    object-fit: contain;
    transition: opacity 0.3s ease;
    transform: scale(0.9);
}

.lightbox.active .lightbox-content {
    animation: lightboxPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes lightboxPop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    left: 40px;
    color: var(--white);
    font-size: 50px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3100;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--accent-color);
    transform: scale(1.2) rotate(90deg);
}

.lightbox-close:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 3100;
}

.lightbox-nav:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 40px;
}

.lightbox-nav.next {
    right: 40px;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }

    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 35px;
    }
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    transform: translateY(20px);
}

.whatsapp-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-info {
        padding-right: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .btn-secondary {
        margin-left: 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .container {
        width: 95%;
        padding: 0 10px;
    }

    .section {
        padding: 50px 0;
    }
}