/* Movie Details Page Styles */

/* Base main styling container padding */
.movie-page-content {
    padding-top: 100px; /* Leave room for header */
}

/* Movie Hero Section */
.movie-hero {
    position: relative;
    padding: 80px 0;
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    background-color: #00040d;
    overflow: hidden;
}

.movie-hero-glow {
    position: absolute;
    width: 650px;
    height: 650px;
    left: 70%;
    top: 10%;
    background: #ffd119;
    opacity: 0.08;
    filter: blur(120px);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.movie-hero-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Left Column: Content */
.movie-hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.movie-hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-color);
    margin-bottom: 20px;
}

.movie-logo-container {
    margin-bottom: 30px;
    max-width: 320px;
}

.movie-hero-logo {
    width: 100%;
    height: auto;
    display: block;
}

.movie-hero-description {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    max-width: 440px;
}

/* Middle Column: Poster */
.movie-hero-poster-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.movie-hero-poster {
    width: 326px;
    height: 408px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0px 10px 50px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.movie-hero-poster:hover {
    transform: translateY(-5px);
    border-color: var(--gold-color);
}

.movie-hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right Column: Timeline & Info list */
.movie-hero-info-track {
    display: flex;
    flex-direction: row;
    gap: 25px;
    align-items: stretch;
}

.info-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.timeline-dot.active {
    background-color: var(--gold-color);
    box-shadow: 0 0 8px var(--gold-color);
}

.timeline-line {
    width: 1px;
    flex-grow: 1;
    border-left: 1px dashed rgba(255, 255, 255, 0.25);
    margin: 8px 0;
}

.info-list {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px 0;
    gap: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label {
    font-size: 14px;
    color: var(--gold-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

/* --- Section Dividers --- */
.movie-page-content section {
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* About Section */
.movie-about {
    padding: 100px 0;
}

.movie-about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    text-align: center;
}

.movie-section-title {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 30px;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.movie-section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: var(--gold-color);
    margin: 15px auto 0 auto;
}

.movie-about-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
}

/* Cast Section */
.movie-cast {
    padding: 100px 0;
}

.movie-cast-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 60px;
    text-align: center;
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px 20px;
    margin-top: 50px;
}

.cast-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cast-image {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, #111522 0%, #030610 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

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

.cast-card:hover .cast-image {
    transform: translateY(-5px);
    border-color: var(--gold-color);
}

.cast-initials {
    font-size: 32px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
}

.cast-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.cast-role {
    font-size: 13px;
    color: #828282;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cast-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

/* Crew Section */
.movie-crew {
    padding: 100px 0;
}

.movie-crew-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 60px;
    text-align: center;
}

.crew-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-top: 50px;
}

.crew-card {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #030610;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.crew-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-color);
    box-shadow: 0 10px 30px rgba(156, 126, 33, 0.25);
}

.crew-card .crew-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: transform 0.5s ease;
}

.crew-card:hover .crew-img {
    transform: scale(1.05);
}

.crew-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(212, 183, 93, 0) 44%, #9c7e21 100%);
    z-index: 2;
    pointer-events: none;
}

.crew-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 3;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
}

.crew-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.crew-role {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

/* Trailer Section */
.movie-trailer {
    padding: 100px 0;
}

.movie-trailer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    text-align: center;
}

.movie-trailer-description {
    max-width: 700px;
    margin: 0 auto 40px auto;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

.movie-trailer-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0px 20px 80px rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.movie-trailer-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-trailer-wrapper:hover .movie-trailer-poster {
    transform: scale(1.02);
}

.movie-play-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 60px;
    background: #ff0000;
    border: none;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0px 10px 30px rgba(255, 0, 0, 0.3);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.movie-trailer-wrapper:hover .movie-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: #e60000;
}

.movie-play-btn img {
    width: 24px;
    height: 24px;
}

/* Gallery Section */
.movie-gallery {
    padding: 100px 0 140px 0;
}

.movie-gallery-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 60px;
    text-align: center;
}

.movie-gallery-description {
    max-width: 700px;
    margin: 0 auto 50px auto;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

.movie-gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: 164px 120px 254px;
    gap: 8px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #030610;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    border-color: var(--gold-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

/* Individual Image Sizes */
/* Image 11 */
.gallery-item.item-1 {
    grid-column: 1 / span 4;
    grid-row: 1 / span 2;
}

/* Image 12 */
.gallery-item.item-2 {
    grid-column: 5 / span 2;
    grid-row: 1 / span 2;
}

/* Image 14 */
.gallery-item.item-3 {
    grid-column: 7 / span 2;
    grid-row: 1 / span 2;
}

/* Image 13 */
.gallery-item.item-4 {
    grid-column: 9 / span 4;
    grid-row: 1;
}

/* Image 15 */
.gallery-item.item-5 {
    grid-column: 9 / span 4;
    grid-row: 2 / span 2;
}

/* Image 16 */
.gallery-item.item-6 {
    grid-column: 6 / span 3;
    grid-row: 3;
}

/* Image 17 */
.gallery-item.item-7 {
    grid-column: 1 / span 5;
    grid-row: 3;
}

/* --- Responsive Adaptations --- */

@media (max-width: 1200px) {
    .movie-hero-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    .movie-hero-info-track {
        grid-column: span 2;
        justify-content: center;
        margin-top: 20px;
    }
    .cast-grid, .crew-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .movie-hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .movie-hero-content {
        align-items: center;
    }
    .movie-hero-description {
        max-width: 100%;
    }
    .movie-hero-poster-wrapper {
        margin: 20px 0;
    }
    .movie-hero-info-track {
        grid-column: span 1;
    }
    .cast-grid, .crew-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .movie-gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
    }
    .gallery-item {
        grid-column: auto !important;
        grid-row: auto !important;
        width: 100% !important;
        height: 250px !important;
        margin-top: 0 !important;
    }
    .gallery-item.item-7 {
        grid-column: span 3 !important;
        grid-row: auto !important;
        width: 100% !important;
        height: 300px !important;
    }
}

@media (max-width: 768px) {
    .movie-hero {
        padding: 50px 0;
    }
    .movie-hero-container {
        padding: 0 20px;
    }
    .movie-hero-poster {
        width: 260px;
        height: 325px;
    }
    .movie-section-title {
        font-size: 28px;
    }
    .cast-grid, .crew-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 15px;
    }
    .crew-card {
        height: 300px;
    }
    .movie-gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .gallery-item {
        grid-column: auto !important;
        grid-row: auto !important;
        width: 100% !important;
        height: 220px !important;
        margin-top: 0 !important;
    }
    .gallery-item.item-7 {
        grid-column: span 2 !important;
        grid-row: auto !important;
        width: 100% !important;
    }
    .movie-about-container, .movie-cast-container, .movie-crew-container, .movie-trailer-container, .movie-gallery-container {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .cast-grid, .crew-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px 10px;
    }
    .crew-card {
        height: 260px;
    }
    .crew-name {
        font-size: 14px;
    }
    .crew-role {
        font-size: 11px;
    }
    .crew-info {
        padding: 12px;
    }
    .movie-gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .gallery-item {
        grid-column: auto !important;
        grid-row: auto !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 3 !important;
        margin-top: 0 !important;
    }
    .gallery-item.item-7 {
        grid-column: span 2 !important;
        grid-row: auto !important;
        width: 100% !important;
        aspect-ratio: 16 / 10 !important;
    }
    .movie-hero-info-track {
        flex-direction: column;
        align-items: center;
    }
    .info-timeline {
        display: none;
    }
    .info-list {
        text-align: center;
        gap: 20px;
    }
}

/* Lightbox Modal Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 85%;
    max-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.8);
    user-select: none;
    -webkit-user-drag: none;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #ffffff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10002;
}

.lightbox-close:hover {
    color: var(--gold-color);
    transform: scale(1.1);
}

/* Navigation Buttons */
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
    z-index: 10001;
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: var(--gold-color);
    border-color: var(--gold-color);
    color: #030610;
    transform: translateY(-50%) scale(1.05);
}

@media (max-width: 768px) {
    .lightbox-prev {
        left: 20px;
    }
    .lightbox-next {
        right: 20px;
    }
    .lightbox-prev, .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    .lightbox-close {
        top: 20px;
        right: 25px;
        font-size: 35px;
    }
}
