/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Arial', sans-serif;
    color: #ffffff;
    background-color: #000000;
    line-height: 1.6;
    transition: opacity 0.3s ease;
}

body.loading {
    opacity: 0;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    background-color: #000000;
    padding: 15px 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s, opacity 0.3s, backdrop-filter 0.3s;
}

.navbar.transparent {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #808080;
}

.cta-button {
    background-color: #808080;
    color: #000000;
    border: none;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover {
    background-color: #a0a0a0;
    transform: scale(1.05);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 30px;
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: #ffffff;
    color: #000000;
}

.about h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.about p {
    font-size: 18px;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
}

.about-image {
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}

/* Projects Section */
.projects {
    padding: 80px 0;
}

.projects h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-item {
    text-align: center;
}

.project-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.project-item h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.project-item h3 a {
    color: #ffffff;
    text-decoration: none;
}

.project-item h3 a:hover {
    color: #808080;
}

.project-item p {
    font-size: 16px;
    font-weight: 400;
}

.text-center {
    text-align: center;
    margin-top: 40px;
}

/* Project Detail Section */
.project-detail {
    padding: 80px 0;
    background-color: #ffffff;
    color: #000000;
}

.project-detail h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.project-description {
    font-size: 18px;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.gallery-item {
    text-align: center;
}

.gallery-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
    object-fit: contain;
}

.gallery-item.large-image {
    grid-column: span 2;
}

.image-text-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.image-description {
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    max-width: 400px;
}

/* Quote Survey Section */
.quote {
    padding: 80px 0;
    background-color: #ffffff;
    color: #000000;
}

.quote h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.quote-description {
    font-size: 18px;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
}

.quote-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 400;
    border: 1px solid #808080;
    border-radius: 10px;
    background-color: #ffffff;
    color: #000000;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24"><path fill="%23808080" d="M7 10l5 5 5-5z"/></svg>') no-repeat right 12px center;
}

.form-group textarea {
    resize: vertical;
}

/* Footer */
.footer {
    background-color: #000000;
    padding: 20px 0;
    text-align: center;
}

.footer p {
    font-size: 14px;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery-item.large-image {
        grid-column: span 1;
    }

    .image-text-container {
        flex-direction: column;
        align-items: center;
    }

    .image-description {
        text-align: center;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        position: absolute;
        top: calc(70px - 1px);
        left: 0;
        padding: 20px 0;
        z-index: 100;
    }

    .nav-links.active {
        display: flex;
        background-color: #000000;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .about h2,
    .projects h2,
    .project-detail h2,
    .quote h2 {
        font-size: 28px;
    }

    .gallery-item img {
        max-width: 100%;
        height: auto;
    }
}

/* Lightbox Base Overlay */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

/* Upgraded Non-clipping Pan Box */
.lightbox-content-wrapper {
    overflow: hidden; /* Bypasses flex center scroll bugs completely */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    transform-origin: center center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    user-select: none;
    -webkit-user-drag: none;
}

/* Gallery Interactivity Indicator */
.gallery-item img {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.gallery-item img:hover {
    opacity: 0.9;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #ffffff;
    font-size: 42px;
    font-weight: 300;
    cursor: pointer;
    z-index: 2002;
    transition: transform 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover {
    color: #ff4d4d;
    transform: scale(1.1);
}

/* UI Controls Floating Panel */
.lightbox-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 2002;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lightbox-controls button {
    background: #ffffff;
    border: none;
    padding: 10px 18px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: #111111;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.lightbox-controls button:hover {
    background: #e5e5e5;
    transform: translateY(-1px);
}

.lightbox-controls button:active {
    transform: translateY(1px);
}