/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #333;
}

body.home-page {
    min-height: 100vh;
    position: relative;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    transition: opacity 1.5s ease;
    z-index: 0;
}

body.home-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Header */
header {
    background-color: #f8c1cc;
    padding: 0.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

body.home-page header, body.about-page header, body.gallery-page header, body.contact-page header {
    background-color: #0D2B29;
}

.logo-link {
    display: block;
    text-decoration: none;
}

.logo {
    max-width: 120px;
    height: auto;
    display: block;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: #fff;
    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 {
    flex-grow: 1;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    margin: 0;
    gap: 2.5rem;
    max-width: 600px;
}

nav a {
    text-decoration: none;
    color: #fff;
    font-weight: normal;
    font-size: 1.25rem;
    padding: 0.3rem 1rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #e75480;
}

body.home-page nav a:hover, body.about-page nav a:hover, body.gallery-page nav a:hover, body.contact-page nav a:hover {
    color: #a5d6a7;
}

/* Main Content */
.hero {
    padding: 3rem 2rem;
    text-align: center;
    background-color: #fff0f5;
}

body.home-page .hero {
    padding: 1.5rem 2rem;
    background-color: transparent;
    position: relative;
    z-index: 5;
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.home-page .hero h2, body.home-page .hero p {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

body.about-page .hero, body.contact-page .hero {
    background-color: #e8f5e9;
    padding: 1.5rem 2rem;
    padding-top: calc(4.5rem + 10vh);
    min-height: calc(100vh - 4rem);
    box-sizing: border-box;
}

body.gallery-page .hero {
    background-color: #e8f5e9;
    padding: 0;
    padding-top: 4rem;
    min-height: calc(100vh - 4rem);
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero h2 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    font-weight: normal;
}

body.home-page .hero h2 {
    color: #fff;
}

body.about-page .hero h2, body.gallery-page .hero h2, body.contact-page .hero h2 {
    color: #333;
}

body.contact-page .hero h2 {
    color: #000;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 1rem;
}

/* Contact Page Specific Styles */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 1rem auto 0;
}

.contact-item {
    text-align: center;
}

.contact-item h3 {
    font-size: 1.3rem;
    color: #000;
    margin-bottom: 0.25rem;
    font-weight: normal;
}

.contact-item p {
    font-size: 1rem;
    color: #000;
    margin-bottom: 0.5rem;
}

.contact-item a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #555;
}

/* Gallery Styles */
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    padding: 1rem;
    height: calc(100% - 2rem);
}

.gallery {
    flex: 1 1 300px;
    max-width: 33.33%;
    cursor: pointer;
}

.gallery-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-preview {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: opacity 0.3s ease;
    display: block;
    z-index: 1; /* Below text */
}

.gallery:hover .gallery-preview {
    opacity: 0.8;
}

.gallery-wrapper .gallery-text { /* Increased specificity */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff !important; /* Force formatting */
    font-size: 1.5rem !important;
    font-weight: bold !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 4px !important;
    pointer-events: none;
    text-align: center;
    z-index: 2; /* Above image */
}

.album {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.album.active {
    display: flex;
}

.album-images {
    position: relative;
    width: 80vw;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.album-images img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.album-images img.active {
    display: block;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    user-select: none;
    z-index: 1001;
}

.prev {
    left: 1rem;
}

.next {
    right: 1rem;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

/* Footer */
footer {
    background-color: #f8c1cc;
    text-align: center;
    padding: 0.75rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    color: #333;
    font-size: 0.9rem;
    z-index: 10;
}

body.home-page footer, body.about-page footer, body.gallery-page footer, body.contact-page footer {
    background-color: #0D2B29;
    color: #fff;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        background-color: #0D2B29;
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem;
        gap: 0.5rem;
    }

    nav ul.show {
        display: flex;
    }

    nav a {
        width: 100%;
        text-align: left;
    }

    .hero {
        padding: 2rem 1rem;
    }

    body.home-page .hero {
        padding: 1rem 1rem;
        min-height: calc(100vh - 3.5rem);
    }

    body.about-page .hero, body.contact-page .hero {
        padding: 1rem;
        padding-top: calc(3.5rem + 10vh);
        min-height: calc(100vh - 3.5rem);
    }

    body.gallery-page .hero {
        padding: 0;
        padding-top: 3.5rem;
        min-height: calc(100vh - 3.5rem);
    }

    .contact-info {
        gap: 1rem;
        margin: 0.75rem auto 0;
    }

    .gallery {
        flex: 1 1 250px;
        max-width: 50%;
    }

    .gallery-wrapper .gallery-text {
        font-size: 1.2rem !important;
        padding: 0.4rem 0.8rem !important;
    }

    .logo {
        max-width: 100px;
    }

    .album-images {
        width: 90vw;
        height: 70vh;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.5rem 1rem;
    }

    nav ul {
        top: 100%;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .logo {
        max-width: 80px;
    }

    .album-images {
        width: 95vw;
        height: 60vh;
    }

    body.home-page .hero {
        min-height: calc(100vh - 3rem);
    }

    body.about-page .hero, body.contact-page .hero {
        padding-top: calc(3rem + 10vh);
        min-height: calc(100vh - 3rem);
    }

    body.gallery-page .hero {
        padding-top: 3rem;
        min-height: calc(100vh - 3rem);
    }

    .gallery {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .gallery-wrapper .gallery-text {
        font-size: 1rem !important;
        padding: 0.3rem 0.6rem !important;
    }
}