@import url(variables.css);

/* -----==== БЛОК РЕКОМЕНДОВАННОГО ФИЛЬМА ====----- */
expected-movie {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-height: 560px;
    gap: 30px;
}

/* === настройка обложки === */
expected-movie .cover {
    width: 60%;
    height: 560px;
    overflow: hidden;
    position: relative;
    border-radius: var(--elem-radius);
}

expected-movie .cover::after {
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
        radial-gradient(circle at 0% 0%, #111111 0%, transparent 20%),
        radial-gradient(circle at 100% 0%, #111111 0%, transparent 20%),
        radial-gradient(circle at 0% 100%, #111111 0%, transparent 20%),
        radial-gradient(circle at 100% 100%, #111111 0%, transparent 20%),
        linear-gradient(to right, #111111 0%, transparent 20%),
        linear-gradient(to left, #111111 0%, transparent 20%),
        linear-gradient(to bottom, #111111 0%, transparent 20%),
        linear-gradient(to top, #111111 0%, transparent 20%);
}

expected-movie .cover img {
    position: absolute;
    height: 100%;
    width: 100%;
    object-fit: cover;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* === настройка блоков .info === */
expected-movie .info {
    height: 100%;
    width: 34%;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-end;
}

expected-movie .info #logo_movie {
    width: 100%;
    margin-bottom: 20px;
}

expected-movie .info #logo_movie img {
    width: 100%;
    max-height: 150px;
    object-fit: contain;
    object-position: left;
}

/* === настройка блоков информации === */
expected-movie .info #info_movie {
    display: flex; 
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

expected-movie .info #main_info #info_movie .second-block {
    background-color: var(--elem-bg-color);
    margin-right: 0;
    padding: 10px 20px;
    border-radius: var(--elem-radius);
    white-space: nowrap;
}

#age-rating {
    background-color: var(--elem-bg-color);
    padding: 10px 20px;
    border-radius: var(--elem-radius);
}

/* -описание-*/
expected-movie .info #description_movie {
    font-size: 16px;
    letter-spacing: 1px;
    line-height: 1.4;
    font-family: var(--main-font);
    color: var(--accent-color);
    margin: 30px 0;
    width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word; 
}

/* -кнопка- */
expected-movie .info button {
    width: 100%;
    max-width: 350px;
    height: 50px;
    background-image: var(--elem-gradient);
    font-size: clamp(18px, 2vw, 20px);
    font-family: var(--main-font);
    border: none;
    padding: 10px 20px;
    border-radius: var(--elem-radius);
    cursor: pointer;
    font-weight: bold;
}

/* -отступы у блоков- */
expected-movie .info #main_info, 
expected-movie .info #description_movie {
    margin-bottom: 30px;
    width: 100%;
}

/* -----==== БЛОКИ ====----- */
.content {
    margin: 0 auto;
    width: 90%;
    max-width: 1450px;
    padding: 40px 0;
}

.content h2 {
    font-size: clamp(24px, 4vw, 30px);
    margin-bottom: 25px;
}

.horizontal, .vertical {
    display: grid;
    gap: 1.5rem;
}

.horizontal {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.movie {
    max-width: 400px;
    height: max-content;
}
a{
    color: white;
}
a:not(footer, header) {
    text-decoration: none;
}
a.movie:hover{
    .movie-banner {
        transform: scale(1.02);
        box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    }
}
.movie .movie-banner{
    cursor: pointer;
    background: white;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 35px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.horizontal .movie .movie-banner {
    height: 200px;
}

.vertical .movie .movie-banner {
    height: 300px;
}



.price_movie {
    position: absolute;
    top: 13px; 
    left: 13px;
    padding: 8px 15px;
    border-radius: var(--elem-radius);
    background-color: rgba(0, 0, 0, 0.8);
    font-size: 14px;
    z-index: 2;
}

.horizontal .movie h4, .vertical .movie h4 {
    margin: 12px 0 5px;
    font-size: clamp(16px, 2vw, 18px);
}

.horizontal .movie p, .vertical .movie p {
    margin: 0;
    color: var(--accent-color);
    font-size: 14px;
}

/* Адаптивность */
@media (max-width: 1200px) {
    main {
        padding: 30px 5%;
    }
    
    expected-movie {
        min-height: 500px;
    }
    
    expected-movie .cover {
        height: 500px;
    }
}

@media (max-width: 992px) {
    expected-movie {
        flex-direction: column;
        min-height: auto;
        gap: 30px;
    }
    
    expected-movie .cover {
        width: 100%;
        height: 400px;
        order: -1;
    }
    
    expected-movie .info {
        width: 100%;
        align-items: center;
        text-align: center;
    }
    
    expected-movie .info #logo_movie img {
        object-position: center;
        max-height: 120px;
    }
    
    expected-movie .info #info_movie {
        justify-content: center;
    }
    
    expected-movie .info button {
        margin: 0 auto;
    }
    
    .vertical {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .content {
        width: 95%;
        padding: 30px 0;
    }
    
    expected-movie .cover {
        height: 350px;
    }
    
    expected-movie .info #description_movie {
        font-size: 16px;
    }
    
    .movie-banner {
        height: 250px;
        border-radius: 25px;
    }
    
    .vertical {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    .vertical .movie .movie-banner {
        height: 220px;
    }
}

@media (max-width: 576px) {
    main {
        padding: 20px 3%;
    }
    
    expected-movie .cover {
        height: 250px;
        border-radius: 25px;
    }
    .movie-banner {
        height: 200px;
        border-radius: 25px;
    }
    expected-movie .info #main_info #info_movie .second-block,
    #age-rating {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    expected-movie .info button {
        height: 45px;
        font-size: 16px;
    }
    
    .movie-banner {
        height: 150px;
        border-radius: 20px;
    }
    
    .price_movie {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    content-horizontal {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    
    .vertical {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
}

@media (max-width: 400px) {
    content-horizontal {
        grid-template-columns: 1fr;
    }
    
    .vertical {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .movie-banner {
        height: 130px;
    }
    /* .vertical {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    } */
}