/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #333333; /* Dark gray fallback */
}

header {
    background-color: #1a1a1a;
    color: white;
    padding: 1rem;
    text-align: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Navigation Styles */
.nav-menu {
    width: 100%;
    margin-top: 0.5rem;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.nav-links li {
    margin: 0 1rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
}

.nav-links a:hover {
    color: #ffd700;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 1001; /* Ensure clickable */
}

.hamburger span {
    background-color: white;
    height: 3px;
    width: 100%;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Language Flags */
.language-flags {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    position: absolute;
    top: 1rem;
    right: 4rem; /* Moved away from hamburger */
    z-index: 9999;
}

.language-flags img {
    width: 20px;
    height: 14px;
    cursor: pointer;
    border: 1px solid #fff;
    transition: transform 0.2s ease;
}

.language-flags img:hover {
    transform: scale(1.1);
}

/* Main Content */
main {
    margin-top: 120px; /* Increased for mobile nav */
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* About Page Styles */
#about-page h2 {
    text-align: center;
    color: white !important;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 1.8rem;
}

#about-page p {
    background-color: rgba(0, 0, 0, 0.5);
    color: white !important;
    width: 100%;
    max-width: 600px;
    margin: 1rem auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 0.75rem;
    font-size: 1.2rem;
    line-height: 1.8;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
}

/* Services Page Styles */
#services-page h2 {
    text-align: center;
    color: white !important;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    border-radius: 5px;
}

#services-page .services-list {
    background-color: rgba(0, 0, 0, 0.5);
    color: white !important;
    width: 100%;
    max-width: 600px;
    margin: 1rem auto;
    border-collapse: collapse;
    border-radius: 5px;
    overflow: hidden;
    list-style-type: none;
    padding: 0;
}

#services-page .services-list li {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#services-page .services-list h3 {
    color: white !important;
    margin: 0;
    font-size: 1.2rem;
}

#services-page .services-list p {
    color: white !important;
    margin: 0.5rem 0 0;
    font-size: 1rem;
}

/* Contact Page Styles */
#contact-page h2 {
    text-align: center;
    color: white !important;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    border-radius: 5px;
}

#contact-page .contact-table {
    background-color: rgba(0, 0, 0, 0.5);
    color: white !important;
    width: 100%;
    max-width: 600px;
    margin: 1rem auto;
    border-collapse: collapse;
    border-radius: 5px;
    overflow: hidden;
}

#contact-page .contact-table th,
#contact-page .contact-table td {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#contact-page .contact-table th {
    background-color: rgba(255, 255, 255, 0.1);
    text-align: left;
    width: 30%;
    color: white !important;
}

#contact-page .contact-table td {
    text-align: left;
    color: white !important;
}

#contact-page .contact-table a {
    color: #ffd700;
    text-decoration: none;
}

#contact-page .contact-table a:hover {
    color: #fff;
}

/* Our Work Page Styles */
#our-work-page .work-item {
    display: inline-block;
    margin: 1rem;
    text-align: center;
}

#our-work-page .work-item img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #1a1a1a;
    transition: transform 0.3s ease;
    will-change: transform;
}

#our-work-page .work-item img:hover {
    transform: scale(1.05);
}

#our-work-page h2 {
    text-align: center;
    color: white !important;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 1.8rem;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px auto 10px;
}

.tab-button {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    background: #ccc;
    color: #333;
    cursor: pointer;
    transition: background 0.3s ease;
}

.tab-button.active, .tab-button:hover {
    background: #ffd700;
    color: #1a1a1a;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border: 5px solid white;
}

/* Index Page Styles */
#index-page .logo {
    max-width: 250px;
    margin: 2rem auto;
    display: block;
    background: transparent;
}

#index-page p {
    font-size: 1.8rem;
    text-align: center;
    color: white !important;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    border-radius: 5px;
}

/* Comments Page Styles */
#comments-page h2 {
    text-align: center;
    color: white !important;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    border-radius: 5px;
}

#comments-page form {
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 600px;
    margin: 1rem auto;
    padding: 1rem;
    border-radius: 5px;
}

#comments-page input,
#comments-page textarea {
    width: 100%;
    margin: 0.5rem 0;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

#comments-page button {
    background-color: #ffd700;
    color: #1a1a1a;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#comments-page button:hover {
    background-color: #fff;
}

#comments-page #comments-list {
    width: 100%;
    max-width: 600px;
    margin: 1rem auto;
}

#comments-page .comment {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
}

#comments-page .comment p {
    margin: 0.5rem 0;
}

#comments-page .comment .reply {
    color: #ffd700;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 0.5rem;
    }

    header h1 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        width: 100%;
        margin-top: 2rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #1a1a1a;
        position: absolute;
        top: 60px;
        left: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        text-align: center;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .language-flags {
        position: static;
        margin-top: 0.5rem;
        justify-content: center;
    }

    .language-flags img {
        width: 18px;
        height: 12px;
    }

    main {
        margin-top: 100px;
        padding: 1rem;
    }

    #about-page h2,
    #services-page h2,
    #contact-page h2,
    #our-work-page h2,
    #comments-page h2,
    #index-page p {
        font-size: 1.4rem;
        padding: 0.3rem;
    }

    #about-page p,
    #services-page .services-list,
    #contact-page .contact-table,
    #comments-page form,
    #comments-page #comments-list {
        max-width: 100%;
        margin: 0.5rem auto;
    }

    #our-work-page .work-item img {
        width: 100%;
        height: auto;
        max-width: 250px;
    }

    #index-page .logo {
        max-width: 200px;
    }

    .filter-tabs {
        flex-direction: column;
        align-items: center;
    }

    .tab-button {
        width: 80%;
        margin: 5px 0;
    }
}