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

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    color: #fff;
}

#bg-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 1s ease-in-out;
    z-index: 0;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

#site-header {
    position: absolute;
    top: 2rem;
    left: 2.5rem;
    z-index: 10;
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    line-height: 1.15;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #004b8e, #1a7bc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, 0.6));
}

#social-icons {
    position: absolute;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.social-link {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    transform: scale(1.25);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    color: #fff;
}

#gallery-section {
    position: absolute;
    bottom: 5rem;
    left: 0;
    width: 100%;
    z-index: 10;
    overflow: hidden;
    padding: 1rem 0;
    display: flex;
    justify-content: flex-end;
}

.gallery-track {
    display: flex;
    gap: 1rem;
    animation: scrollGallery 30s linear infinite;
    width: max-content;
}

.gallery-track:hover {
    animation-play-state: paused;
}

@keyframes scrollGallery {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.gallery-card {
    flex: 0 0 200px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.gallery-card:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.6);
}

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

.card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.4rem 0.6rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#marquee-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 0.6rem 0;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

#marquee-bar marquee {
    color: #f0e6d0;
}

#fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#fullscreen-modal.modal-visible {
    opacity: 1;
    visibility: visible;
}

#modal-image {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

#modal-close {
    position: absolute;
    top: 1.2rem;
    right: 2rem;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease;
    line-height: 1;
    z-index: 101;
}

#modal-close:hover {
    transform: scale(1.3);
}

.modal-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    z-index: 101;
    pointer-events: none;
}

.modal-toolbar > * {
    pointer-events: auto;
}

#modal-download {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    text-decoration: none;
}

#modal-download:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 101;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    font-size: 3rem;
    width: 52px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    border-radius: 6px;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

#modal-prev {
    left: 1rem;
}

#modal-next {
    right: 1rem;
}

@media (max-width: 768px) {
    #site-header {
        top: 1rem;
        left: 1rem;
    }

    .site-title {
        font-size: 1.4rem;
    }

    #social-icons {
        right: 0.75rem;
        gap: 0.75rem;
    }

    .social-link {
        width: 36px;
        height: 36px;
    }

    .social-link svg {
        width: 22px;
        height: 22px;
    }

    #gallery-section {
        bottom: 3.2rem;
    }

    .gallery-track {
        gap: 0.6rem;
    }

    .gallery-card {
        flex: 0 0 130px;
        height: 95px;
        border-radius: 8px;
    }

    .card-title {
        font-size: 0.6rem;
        padding: 0.3rem 0.4rem;
    }

    #marquee-bar {
        font-size: 0.7rem;
        padding: 0.4rem 0;
    }

    #modal-close {
        font-size: 2.2rem;
        top: 0.75rem;
        right: 1rem;
    }

    .modal-toolbar {
        padding: 0.6rem 0.8rem;
    }

    #modal-download {
        width: 36px;
        height: 36px;
    }

    #modal-download svg {
        width: 20px;
        height: 20px;
    }

    .modal-nav {
        font-size: 2rem;
        width: 40px;
        height: 70px;
    }

    #modal-prev {
        left: 0.4rem;
    }

    #modal-next {
        right: 0.4rem;
    }
}
