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

:root {
    /* Force consistent colors regardless of device theme */
    color-scheme: light;
    --bg-color: #fafaf8;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --border-light: #e0e0e0;
    --overlay-bg: rgba(0, 0, 0, 0.95);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Force light mode colors even if device is in dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light;
        --bg-color: #fafaf8;
        --text-primary: #ffffff;
        --text-secondary: #fbd1d1;
        --border-light: #e0e0e0;
        --overlay-bg: rgba(0, 0, 0, 0.95);
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    /* Force light background */
    background: #fafaf8;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    background: linear-gradient(180deg, #0065BD 20%, #D9629B 100%);
}

.hero-content {
    max-width: 800px;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.hero-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 4rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.hero-text p {
    font-weight: 300;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.scroll-indicator span {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text-primary);
    animation: scrollLine 2s ease-in-out infinite;
}

/* Gallery Container */
.gallery-container {
    padding: 4rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Gallery Grid - Masonry via Columns */
.gallery-grid {
    column-count: 4;
    column-gap: 1.5rem;
    animation: fadeIn 1s ease-out;
}

/* Gallery Items - Desktop animations only */
.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: #f5f5f0;
    transition: var(--transition);
    break-inside: avoid-column;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1.5rem;
    border-radius: 2px;
}

/* Desktop only animations for gallery items */
@media (min-width: 769px) {
    .gallery-item {
        animation: fadeInUp 0.6s ease-out;
    }
    
    .gallery-item:nth-child(odd) {
        animation-delay: 0.1s;
    }
    
    .gallery-item:nth-child(even) {
        animation-delay: 0.2s;
    }
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    /* Remove transition by default for mobile */
    opacity: 1;
}

/* Only add transitions on desktop */
@media (min-width: 769px) {
    .gallery-item img {
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
    }
}

/* Enhanced hover effects - Desktop only */
@media (min-width: 769px) {
    .gallery-item:hover img {
        transform: scale(1.05);
    }
    
    .gallery-item:hover {
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        z-index: 10;
    }
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.image-title {
    color: white;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 400;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-bg);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    animation: scaleIn 0.3s ease;
}

.lightbox-caption {
    margin-top: 2rem;
    text-align: center;
    color: white;
    max-width: 600px;
}

#lightbox-title {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

#lightbox-description {
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

/* Lightbox Controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 2rem;
    padding: 1rem;
    transition: opacity 0.3s ease;
    z-index: 1001;
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 2.5rem;
    font-weight: 300;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.7;
}

/* Footer */
.footer {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border-light);
    background: #fafaf8;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.back-link:hover {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scrollLine {
    to {
        top: 100%;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
        padding: 1.5rem;
    }
    
    /* Keep hero animations on mobile */
    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
        margin-bottom: 2rem;
    }
    
    .hero-text {
        font-size: 1rem;
        margin-bottom: 3rem;
    }
    
    .gallery-container {
        padding: 2rem 0.5rem;
    }
    
    .gallery-grid {
        column-count: 1;
        column-gap: 0.5rem;
        /* Remove animation on mobile */
        animation: none;
    }
    
    .gallery-item {
        margin-bottom: 0.5rem;
        /* No animation on mobile */
        animation: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
    
    /* Disable ALL transitions and animations for gallery images on mobile */
    .gallery-item img {
        opacity: 1 !important;
        transition: none !important;
        animation: none !important;
        transform: none !important;
        background: none !important;
    }
    
    /* Disable animation play state manipulation on mobile */
    .gallery-item {
        animation-play-state: running !important;
    }
    
    .image-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    }
    
    .lightbox {
        padding: 1rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 1.5rem;
        padding: 0.5rem;
    }
    
    .lightbox-close {
        font-size: 2rem;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    #lightbox-image {
        max-height: 70vh;
    }
    
    .lightbox-caption {
        margin-top: 1rem;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .gallery-grid {
        column-count: 2;
        column-gap: 1rem;
    }
    
    .gallery-item {
        margin-bottom: 1rem;
    }
}

/* Medium screens - 3 column layout */
@media (min-width: 1025px) and (max-width: 1400px) {
    .gallery-grid {
        column-count: 3;
        column-gap: 1.25rem;
    }
    
    .gallery-item {
        margin-bottom: 1.25rem;
    }
}

/* Large screens - 4 columns */
@media (min-width: 1401px) {
    .gallery-grid {
        column-count: 4;
    }
}

/* Loading State - Desktop only */
@media (min-width: 769px) {
    .gallery-item img.loading {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: loading 1.5s ease-in-out infinite;
    }
}

/* Ensure no loading state on mobile */
@media (max-width: 768px) {
    .gallery-item img {
        background: transparent !important;
    }
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Print Styles */
@media print {
    .hero,
    .lightbox,
    .footer {
        display: none;
    }
    
    .gallery-grid {
        column-count: 3;
    }
}

.scroll-arrow {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.scroll-arrow svg {
    color: #333;
}
.arrow-path {
    animation: bounce 1.5s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(4px); }
    60% { transform: translateY(2px); }
}

#login-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #f5f5f0 0%, #e0e0e0 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    font-size: 1rem;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #0065BD;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.login-box button:hover {
    background: #D9629B;
}