/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #f8f9fa;
}

/* Navigation */
.navbar {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1rem 0;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #dc3545 !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('assets/bg.png') no-repeat center center;
    background-size: cover;
    padding: 8rem 0;
    position: relative;
    min-height: 500px; /* Ensure minimum height for the hero section */
    display: flex;
    align-items: center;
}

.film-title {
    font-weight: 700;
    letter-spacing: 0.5rem;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 10px rgba(220, 53, 69, 0.7);
    margin-bottom: 2rem;
}

.blurb-container {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.25rem;
    font-style: italic;
    color: #e9ecef;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 600;
    color: #dc3545;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #dc3545;
}

/* About Section */
.description-text {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    height: 0;
    padding-bottom: 66.67%; /* 3:2 aspect ratio */
    transition: transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item.placeholder::after {
    content: 'Placeholder';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    text-align: center;
    padding: 4px;
    font-size: 0.8rem;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    padding: 8px;
    font-size: 0.9rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Director Section */
.director-image {
    max-width: 250px;
    margin: 0 auto;
}

.director-image img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 3px solid #dc3545;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.director-image img:hover {
    transform: scale(1.05);
}

.director-image p {
    margin-top: 1rem;
    font-weight: 500;
    color: #e9ecef;
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Credits Section */
.credits-text {
    white-space: pre-line;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Footer */
footer {
    background-color: rgba(0, 0, 0, 0.8);
    color: #adb5bd;
}

/* Modal for Gallery and Trailer */
.modal-content {
    background-color: #212529;
    color: #f8f9fa;
}

/* Trailer button styling */
#watch-trailer-btn {
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

#watch-trailer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 53, 69, 0.4);
}

#watch-trailer-btn i {
    transition: transform 0.3s ease;
}

#watch-trailer-btn:hover i {
    transform: scale(1.2);
}

/* Trailer modal styling */
.trailer-modal-content {
    background-color: #000;
    border: 1px solid #333;
}

#trailerModal .modal-dialog {
    max-width: 800px;
    width: 90%;
    margin: 1.75rem auto;
}

#trailerModal .modal-header {
    border-bottom: 1px solid #333;
}

#trailer-embed-container {
    width: 100%;
    background-color: #000;
}

#trailer-embed-container iframe {
    display: block;
}

/* Hide any navigation elements in the trailer modal */
#trailerModal .modal-body::before,
#trailerModal .modal-body::after {
    display: none;
}

@media (min-width: 992px) {
    #trailerModal .modal-dialog {
        max-width: 800px;
    }
}

.modal-header {
    border-bottom: 1px solid #343a40;
}

.modal-footer {
    border-top: 1px solid #343a40;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-navigation {
    margin-top: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
}

#modalImage {
    max-height: 80vh;
    object-fit: contain;
    cursor: pointer;
}

.modal-body {
    position: relative;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 5rem 0;
    }

    .film-title {
        font-size: 3rem;
        letter-spacing: 0.3rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
