/* Global Styles */
:root {
    --primary-color: #000000;
    --secondary-color: #d4af37;
    --text-color: #f5f5f5;
    --accent-color: #ff0000;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Add will-change for hardware acceleration */
    will-change: transform;
    /* Add content-visibility for better rendering performance */
    content-visibility: auto;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Film Grain Effect */
.film-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjc1IiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIiBmaWx0ZXI9InVybCgjYSkiIG9wYWNpdHk9Ii4wNSIvPjwvc3ZnPg==');
    pointer-events: none;
    z-index: 1000;
    opacity: 0.05;
}

/* Hero Section with Slideshow */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Add contain property for better performance */
    contain: layout size style;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
    /* Add will-change for hardware acceleration */
    will-change: opacity;
    /* Add contain property for better performance */
    contain: layout style paint;
}

.slide.active {
    opacity: 1;
}

.hero-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 100%;
}

.hero-title h1 {
    font-family: 'Impact', sans-serif;
    font-size: 4.5rem;
    color: var(--accent-color);
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    white-space: nowrap !important; /* Force prevent text from wrapping */
    display: inline-block;
    width: auto;
    max-width: 100%;
    overflow: visible;
}

/* Ensure the title text stays on one line */
.proper-text, .pictures-text {
    display: inline-block;
}

/* Gallery Section */
.gallery {
    padding: 4rem 0;
    background-color: var(--primary-color);
    /* Add contain property for better performance */
    contain: content;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    /* Add contain property for better performance */
    contain: layout style;
}

.thumbnail {
    position: relative;
    overflow: visible; /* Changed from hidden to visible to show descriptions */
    border-radius: 3px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Add contain property for better performance */
    contain: content; /* Changed from layout style paint to content */
    /* Remove fixed aspect ratio to allow native aspect ratio */
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem; /* Add margin to separate thumbnails */
}

.thumbnail img {
    width: 100%;
    height: auto; /* Allow height to adjust based on native aspect ratio */
    object-fit: contain; /* Preserve aspect ratio */
    transition: transform 0.5s ease;
    /* Add will-change for hardware acceleration */
    will-change: transform;
    /* Add contain property for better performance */
    contain: layout style paint;
}

.thumbnail:hover img {
    transform: scale(1.05);
}

.thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
    opacity: 0;
    transition: var(--transition);
    pointer-events: none; /* Ensure this doesn't block the description */
    z-index: 1; /* Keep below the description */
}

.thumbnail:hover::after {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    /* Add will-change for hardware acceleration */
    will-change: transform, opacity;
    /* Add animation for smoother appearance */
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Contact Section */
.contact {
    padding: 3rem 0;
    background-color: #111;
    text-align: center;
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    .hero-title h1 {
        font-size: 4rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .hero-title h1 {
        font-size: 3rem;
    }
}

@media screen and (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .hero-title h1 {
        font-size: 2rem;
    }
}
