/* the actual cards container is inline-flex and wraps rows */
.all-cards {
    display: grid;
    grid-template-rows: auto;
    grid-auto-rows: auto;
    grid-template-columns: repeat(auto-fit, 450px);
    gap: 50px;

    /* justify-content: center; */
    /* align-items: flex-start; */
    align-content: start;
}


/* main card container */
.container {
    position: relative;
    width: 480px;
    height: 400px;
    overflow: hidden;
}


/* image shown before hover */
.Movie-image {
    width: 100%;
    height: 100%;

    object-fit: cover;

    border: 4px solid white;
    border-radius: 50px;

    box-shadow: 5px 5px 15px #000;

    box-sizing: border-box;
}


/* overlay shown when hovering over the card */
.overlay {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    opacity: 0;

    transition: opacity 0.3s ease;

    overflow: auto;
}


/* show overlay when hovering over card */
.container:hover .overlay {
    opacity: 1;
}


/* actual card inside the overlay */
.movie-details {
    background-color: #fff;
    color: #5e3163;
    width: 100%;
    height: 100%;

    border: 4px solid white;
    border-radius: 5px;
    box-shadow: 5px 5px 15px #000;
    text-align: left;

    box-sizing: border-box;

    /* Allows the description to expand and
       keeps the tools at the bottom */
    display: flex;
    flex-direction: column;
}


/* movie name at the top */
.movie-name {
    font-size: 20px;

    text-align: center;

    padding: 18px 10px;

    background-color: var(--med-orange);
    color: #fff;

    flex-shrink: 0;
}


/* row containing the movie and director icons */
.icon-row {
    display: flex;

    padding: 25px 20px 15px;

    align-items: center;
    justify-content: center;

    gap: 45px;

    flex-shrink: 0;
}


/* clickable icon boxes */
.icon-row a {
    width: 150px;
    height: 130px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #5E3163;
    border-radius: 5px;

    background-color: #fff;

    box-sizing: border-box;
}


/* images inside icon boxes */
.icon-row a img {
    width: 100%;
    height: 100%;

    padding: 10px;

    object-fit: contain;

    border: none;
    border-radius: 5px;

    box-sizing: border-box;
}


/* change icon when mouse is over it */
.icon-row a:hover {
    background-color: var(--light-orange-2);
}

.icon-row a img:hover {
    background-color: transparent;
}


/* description text */
.description {
    padding: 5px 25px 10px;

    color: #555;

    font-size: 16px;

    line-height: 1.25;

    /* Takes up the remaining space */
    flex: 1;

    /* Prevents long descriptions from pushing
       the tools outside the card */
    overflow: hidden;
}


/* genre tags */
.genre-tags {
    display: flex;

    margin: 0;
    padding: 0 25px 8px;

    gap: 15px;

    flex-shrink: 0;
}


/* individual genre buttons */
.genre-tags a {
    flex: 1;

    padding: 8px;
    margin: 0;

    background-color: var(--med-orange);

    border: 2px solid #5E3163;
    border-radius: 5px;

    color: var(--white);
    text-decoration: none;

    font-size: 105%;

    text-align: center;
}


/* change genre when mouse is over it */
.genre-tags a:hover {
    background-color: var(--light-orange-2);
    color: #fff;
    font-weight: bold;
}


/* movie card tools */
.movie-details .tools {
    margin-top: auto;

    flex-shrink: 0;
}


/* delete button styling */
.delete-tags a {
    background-color: #fff;
    color: #660000;
    border: 2px solid #660000;
}


/* change delete button when mouse is over it */
.delete-tags a:hover {
    color: #fff;
    background-color: #660000;
}