/* Base Styles and Variables */
:root {
    --primary-color: #e0e0e0;
    /* Headings - Light Gray */
    --secondary-color: #AD5822;
    /* Accents - Orange/Bronze */
    --text-color: #b0b0b0;
    /* Body Text - Medium Gray */
    --bg-body: #101010;
    /* Main Background - Dark Gray */
    --bg-card: #202020;
    /* Card/Section Background - Gray */
    --bg-alt: #181818;
    /* Alternate Section Background */
    --border-color: #333;
    /* For borders/dividers */
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-body);
    line-height: 1.6;
}

/* Fallback background if needed for transparency context */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: #121212;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: #fff;
    border: 1px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(173, 88, 34, 0.4);
    filter: brightness(1.1);
}

/* Top Bar */
.top-bar {
    background-color: var(--bg-alt);
    color: #777;
    padding: 12px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 25px;
    display: inline-flex;
    align-items: center;
}

.contact-info i,
.social-icons i {
    margin-right: 8px;
    color: var(--secondary-color);
}

.social-icons a {
    margin-left: 15px;
    color: #777;
    font-size: 0.9rem;
}

.social-icons a:hover {
    color: var(--secondary-color);
}

/* Header */
.main-header {
    background-color: rgba(20, 20, 20, 0.85);
    /* Transparent Dark Gray */
    backdrop-filter: blur(10px);
    /* Glassmorphism effect */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle border */
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo img {
    height: 75px;
    width: auto;
    object-fit: contain;
}

.logo h1 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: 35px;
}

.main-nav ul li a {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
    position: relative;
    text-transform: uppercase;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--secondary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    height: 700px;
    background: url('https://images.unsplash.com/photo-1519501025264-65ba15a82390?q=80&w=1920&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: linear-gradient(rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.7));
    /* Dark gradient overlay */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h2 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 25px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #f5f5f5;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    font-weight: 400;
    color: #dcdcdc;
}

/* Intermediate Hero Section */
.mid-hero-section {
    height: 300px;
    /* Kept as a spacer */
    background: url('https://images.unsplash.com/photo-1621905251189-08b45d6a269e?q=80&w=1920&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
    background-attachment: fixed;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mid-hero-section .hero-overlay {
    display: none;
}


.mid-hero-section .hero-content h2 {
    display: none;
}

/* Section Styles */
.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.section-title .separator {
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 0 auto;
}

/* About Section */
.about-section {
    background: url('https://images.unsplash.com/photo-1621905251189-08b45d6a269e?q=80&w=1920&auto=format&fit=crop') no-repeat center center/cover;
    background-attachment: fixed;
    position: relative;
    /* Overlay handled by pseudo-element */
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 30, 30, 0.8);
    /* Transparent Gray */
    backdrop-filter: blur(10px);
    z-index: 1;
}

.about-section .container {
    position: relative;
    z-index: 2;
}

.about-content {
    display: flex;
    align-items: flex-start;
    gap: 50px;
    position: relative;
    z-index: 2;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
}

.about-image {
    flex: 1;
    position: relative;
}

.img-placeholder {
    width: 100%;
    height: 400px;
    border-radius: 4px;
    background: url('https://images.unsplash.com/photo-1581094794329-cd1961f03478?q=80&w=800&auto=format&fit=crop') no-repeat center center/cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    filter: brightness(0.8);
}

.about-video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* .about-image::before removed as requested */

/* Services Section */
.services-section {
    background: url('https://images.unsplash.com/photo-1621905251189-08b45d6a269e?q=80&w=1920&auto=format&fit=crop') no-repeat center center/cover;
    background-attachment: fixed;
    position: relative;
    /* Overlay handled by pseudo-element to allow image to show through tint */
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 20, 0.85);
    /* Dark transparent overlay */
    backdrop-filter: blur(5px);
    z-index: 1;
}

.services-section .container {
    position: relative;
    z-index: 2;
}

/* Ensure grid stays on top */
.services-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: all 0.4s ease;
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-bottom-color: var(--secondary-color);
    background-color: #1a1a1a;
}

.service-card .icon {
    font-size: 3rem;
    color: #777;
    margin-bottom: 25px;
    transition: color 0.3s;
}

.service-card:hover .icon {
    color: var(--secondary-color);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 700;
}

.service-card p {
    color: var(--text-color);
    font-size: 0.95rem;
}

/* References Section */
.references-section {
    background: url('https://images.unsplash.com/photo-1621905251189-08b45d6a269e?q=80&w=1920&auto=format&fit=crop') no-repeat center center/cover;
    background-attachment: fixed;
    position: relative;
    z-index: 2;
    /* Explicitly set z-index */
}

.references-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 20, 0.85);
    /* Consistent overlay */
    backdrop-filter: blur(5px);
    z-index: 1;
}

.references-section .container {
    position: relative;
    z-index: 2;
}

.references-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: center;
    justify-items: center;
}

.reference-item {
    background-color: rgba(255, 255, 255, 0.05);
    width: 100%;
    height: 120px;
    /* Increased height slightly */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    color: #777;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    /* Change cursor to pointer */
    padding: 10px;
    /* Padding for logo */
}

.reference-item img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    filter: grayscale(0%);
    /* Grayscale removed as requested */
    transition: filter 0.3s ease;
}

.reference-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
    transform: translateY(-5px);
}

.reference-item:hover img {
    filter: grayscale(0%);
}

/* Reference Details */
.reference-detail {
    display: none;
    margin-top: 40px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 8px;
    animation: fadeIn 0.5s ease;
}

.reference-detail.active {
    display: block;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.project-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.project-gallery img:hover {
    transform: scale(1.05);
}

.project-info h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.project-info ul {
    list-style: none;
    color: #ccc;
}

.project-info li {
    margin-bottom: 10px;
    font-size: 1rem;
}

.project-info li strong {
    color: var(--secondary-color);
    margin-right: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.main-footer {
    background-color: #111;
    color: #888;
    padding: 80px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
}

.footer-col h3 {
    color: #eee;
    margin-bottom: 25px;
    font-size: 1.4rem;
    position: relative;
    padding-bottom: 15px;
    font-weight: 700;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #888;
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
    padding-left: 8px;
}

.footer-col p {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    font-size: 0.95rem;
}

.footer-col p i {
    min-width: 25px;
    color: var(--secondary-color);
    margin-top: 4px;
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 25px;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: var(--secondary-color);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #d35400;
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .main-header .container {
        height: 70px;
    }

    .hero-section {
        height: 500px;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .mid-hero-section {
        height: 300px;
    }

    .mid-hero-section .hero-content h2 {
        font-size: 2rem;
    }

    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: rgba(30, 30, 30, 0.95);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
        padding: 20px 0;
    }

    .main-nav ul.active {
        display: flex;
    }

    .main-nav ul li {
        margin: 0;
        text-align: center;
        margin-bottom: 15px;
    }

    .about-content {
        flex-direction: column;
    }

    .img-placeholder {
        height: 300px;
    }

    .section {
        padding: 60px 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .references-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .references-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 500px) {
    .references-grid {
        grid-template-columns: 1fr;
    }
}

/* Lightbox Modal Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoomIn {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

@media only screen and (max-width: 700px) {
    .lightbox-content {
        width: 95%;
    }
}