@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&family=Lato:wght@300;400;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lato', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #F5F2EF;
}

header {
    width: 100%;
    max-width: 100vw;
    height: auto;
    background-color: #F5F2EF;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow: visible;
}

.navbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: auto;
    background: #F5F2EF;
}

header.scrolled-nav{
    background-color: #F5F2EF;
}

.navbar.scrolled-nav{
    background: #F5F2EF;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 55px;
    padding: 0 20px;
}

.logo img {
    max-width: 35%;
    height: auto;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 55px;
    text-decoration: none;
    cursor: pointer;
}

.navbar ul {
    display: flex;
    align-items: center;
    margin: 0;
}

.navbar ul li {
    list-style: none;
    margin-right: 55px;
}

.navbar ul li a {
    color: #333333;
    text-decoration: none;
    font-weight: 500;
}

.navbar ul li a.get-in-touch {
    background-color: #4A7C59 !important;
    color: #ffffff !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    text-decoration: none !important;
}

.navbar ul li a.get-in-touch:hover {
    background-color: #3a6048 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(74, 124, 89, 0.3) !important;
}

.navlist .dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: " ▾";
    font-size: 12px;
}

.dropdown-content {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background-color: #F5F2EF;
    padding: 8px 0;
    z-index: 1001;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.3s ease;
}

.dropdown-content li {
    margin-right: 0;
}

.dropdown-content li a {
    display: block;
    padding: 8px 14px;
    white-space: nowrap;
    color: #333333;
}

.dropdown-content li a:hover {
    color: #D4AF37;
}

.dropdown.open .dropdown-content {
    max-height: 140px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.navbar ul li a:hover {
    color: #D4AF37;
}

.navlist {
    position: static;
    background-color: transparent;
    flex-direction: row;
    width: auto;
    height: auto;
    justify-content: flex-start;
    padding-top: 0;
    transform: none;
    transition: transform 0.3s ease;
    margin-left: auto;
    margin-right: 16px;
}

.navlist.active {
    transform: translateX(0);
}

.navlist li {
    margin-right: 45px;
    margin-bottom: 0;
    padding: 0;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 8px;
    margin-right: 20px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333333;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(12px, 12px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.rightnav {
    display: flex;
    gap: 10px;
    margin-left: auto;
    padding-right: 20px;
    align-items: center;
}

.rightnav input {
    width: 140px;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    outline: none;
}

.searchbutton {
    padding: 8px 20px;
    background-color: #4A7C59;
    color: #F5F2EF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.searchbutton:hover {
    background-color: #D4AF37;
}

main {
    padding-top: 80px;
    min-height: 80vh;
    flex: 1;
}

.project-header {
    background: #FFFFFF;
    color: #333333;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #e0e0e0;
}

.project-header h1 {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #333333;
}

.project-description {
    font-size: 18px;
    font-weight: 300;
    opacity: 0.85;
    color: #333333;
}

/* Project Brief Section - Text Left, Images Right */
.project-content {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.project-content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}

.project-brief {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.project-brief h2 {
    font-size: 32px;
    color: black;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.project-brief p {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

.project-images-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-gallery {
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.project-gallery-grid.four-column {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.gallery-item {
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    height: 260px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.gallery-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 2000;
}

.gallery-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.gallery-modal-content {
    max-width: min(900px, 86vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    object-fit: contain;
    background-color: #111111;
    transition: transform 0.2s ease-out;
    touch-action: none;
    user-select: none;
}

.gallery-counter {
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 1px;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(74, 124, 89, 0.7);
    color: #ffffff;
    border: none;
    padding: 12px 18px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.gallery-nav:hover {
    background-color: rgba(212, 175, 55, 0.95);
}

@media (hover: none) and (pointer: coarse) {
    .gallery-nav:hover,
    .gallery-nav:active,
    .gallery-nav:focus,
    .gallery-nav:focus-visible {
        background-color: transparent !important;
        outline: none !important;
        box-shadow: none !important;
    }
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

body.modal-open {
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.slider-item {
    display: none;
    width: 100%;
    min-height: 500px;
}

.slider-item.active {
    display: block;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(74, 124, 89, 0.7);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(212, 175, 55, 0.95);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dots .dot.active {
    background-color: white;
}

.back-button-section {
    text-align: center;
    padding: 40px 20px;
}

.back-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: #4A7C59;
    color: #F5F2EF;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #D4AF37;
}

footer {
    background-color: #e0e0e0;
    color: #333333;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

footer a {
    color: #4A7C59;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #D4AF37;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .navbar ul {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .rightnav {
        display: none;
    }

    .navlist {
        position: fixed;
        left: 0;
        top: 0;
        background-color: #ffffff;
        flex-direction: column;
        width: 100vw;
        height: 100%;
        justify-content: flex-start;
        padding-top: 60px;
        transform: translateX(100%);
        margin-left: 0;
        margin-right: 0;
        overflow-x: hidden;
    }

    .navlist .dropdown {
        width: 100%;
    }

    .navlist .dropdown-content {
        position: static;
        min-width: 100%;
        padding: 0;
        background-color: transparent;
        max-height: 0;
        opacity: 0;
        transform: translateY(-6px);
        overflow: hidden;
        pointer-events: none;
    }

    .navlist .dropdown.open .dropdown-content {
        max-height: 140px;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .navlist .dropdown-content li a {
        padding: 6px 14px;
    }

    .slider-item {
        min-height: 400px;
    }

    .project-header h1 {
        font-size: 36px;
    }

    .gallery-item {
        height: 220px;
    }

    .project-gallery-grid.four-column {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .project-content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-brief h2 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .project-gallery-grid.four-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    /* Gallery modal full-screen on mobile */
    .gallery-modal-content {
        max-width: 100vw;
        max-height: 100vh;
        width: 100%;
        height: 100%;
        gap: 0;
    }

    .gallery-modal-image {
        max-width: 100vw;
        max-height: 100vh;
        width: 100%;
        height: 100%;
        border-radius: 0;
        object-fit: contain;
        touch-action: none;
    }

    .gallery-counter {
        position: absolute;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        font-size: 15px;
        background-color: rgba(0, 0, 0, 0.4);
        padding: 6px 16px;
        border-radius: 20px;
    }

    .gallery-close {
        top: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 30px;
        background: rgba(0, 0, 0, 0.5);
        z-index: 20;
    }

    .gallery-nav {
        background-color: transparent !important;
        width: 50%;
        height: 100%;
        top: 0;
        transform: none;
        border-radius: 0;
        padding: 0;
        font-size: 0;
        opacity: 0;
        -webkit-tap-highlight-color: transparent !important;
        tap-highlight-color: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }

    .gallery-prev {
        left: 0;
    }

    .gallery-next {
        right: 0;
    }
}

@media (max-width: 480px) {
    .project-header {
        padding: 40px 20px;
        margin-bottom: 20px;
    }

    .project-header h1 {
        font-size: 28px;
    }

    .project-description {
        font-size: 16px;
    }

    .project-gallery-grid {
        grid-template-columns: 1fr;
    }

    .project-gallery-grid.four-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-item {
        height: 200px;
    }

    .slider-item {
        min-height: 300px;
    }

    .prev-btn, .next-btn {
        padding: 10px 15px;
        font-size: 18px;
    }

    .slider-dots {
        bottom: 10px;
    }

    .slider-dots .dot {
        width: 10px;
        height: 10px;
        gap: 5px;
    }

    .back-button {
        padding: 12px 30px;
        font-size: 14px;
    }

    .project-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .project-brief h2 {
        font-size: 24px;
    }

    .project-brief p {
        font-size: 15px;
    }
}
