* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, #1a3a52 0%, #2b5a7a 50%, #3B9FD1 100%);
    min-height: 100vh;
}

/* Navigation Menu */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(26, 58, 82, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(93, 187, 235, 0.3);
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    flex-direction: column;
    gap: 1rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.nav-logo img {
    height: 120px;
    width: auto;
}

.nav-logo-text {
    display: flex;
    flex-direction: column;
}

.nav-logo-main {
    font-size: 1.25rem;
    line-height: 1.2;
    color: #ffffff;
}

.nav-logo-sub {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    margin: 0;
}

nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

nav a.active {
    background: rgba(59, 159, 209, 0.4);
    color: #ffffff;
}

.container {
    position: relative;
    width: 100%;
    margin-top: 4rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 74.25vh;
    overflow: hidden;
}

#familyVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 1.2s ease-in-out;
}

#familyVideo.fading {
    opacity: 0;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(10, 25, 41, 0.3) 0%,
        rgba(26, 58, 82, 0.2) 50%,
        rgba(10, 25, 41, 0.4) 100%
    );
    pointer-events: none;
}

.content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    color: white;
    padding: 2rem;
    animation: slideUp 1s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.family-name {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.video-controls {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.control-btn:active {
    transform: scale(0.98);
}

.indicators {
    display: flex;
    gap: 10px;
    align-items: center;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.indicator.active {
    background: #ffffff;
    width: 10px;
    height: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .video-controls {
        bottom: 2rem;
        gap: 1.5rem;
        padding: 0.75rem 1.5rem;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }

    .control-btn svg {
        width: 20px;
        height: 20px;
    }

    .indicator {
        width: 7px;
        height: 7px;
    }

    .indicator.active {
        width: 9px;
        height: 9px;
    }

    .content {
        padding: 1rem;
    }
}

/* Gallery Page Styles */
.gallery-page {
    padding: 6rem 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.gallery-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
}

.gallery-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: rgba(59, 159, 209, 0.5);
    border-color: rgba(93, 187, 235, 0.7);
}

.gallery-section {
    margin-bottom: 4rem;
}

.gallery-section.hidden {
    display: none;
}

.section-title {
    font-size: 2rem;
    color: white;
    margin-bottom: 2rem;
    text-align: center;
}

.year-group,
.theme-group {
    margin-bottom: 3rem;
}

.year-title,
.theme-title {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(93, 187, 235, 0.5);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.media-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(93, 187, 235, 0.6);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.media-caption {
    padding: 1rem;
    color: white;
    font-size: 0.95rem;
    background: rgba(26, 58, 82, 0.85);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    position: relative;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 3rem;
    line-height: 1;
    padding: 0.5rem 1rem;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-caption {
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .gallery-page {
        padding: 5rem 1rem 1rem;
    }

    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .media-item img,
    .media-item video {
        height: 200px;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 0.5rem;
        font-size: 1.5rem;
    }

    nav {
        padding: 0.75rem 1rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav-logo {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .nav-logo img {
        height: 96px;
    }

    .nav-logo-main {
        font-size: 1rem;
    }

    .nav-logo-sub {
        font-size: 0.65rem;
    }

    nav ul {
        gap: 0.75rem;
    }

    nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
