/* Reset some default styling for all elements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Set the base styles for the entire page */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #111;
}

.container-blur.popup-active {
    filter: blur(20px);
    pointer-events: none;
}

.hero {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    background-color: #111;
    padding: 20px;
    height: 100vh;
    color: #fff;
}

.hero-content {
    text-align: center;
    padding: 20px;
}

h1 {
    font-size: 2rem;
}

p {
    font-size: 1.2rem;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    color: #fff;
}

.hero-image > img {
    object-fit: cover;
    max-width: 20rem;
    margin-top: 15rem;
    height: 30rem;
    border-radius: 1rem;
    box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.4);
    transition: all 0.5s ease;
}

.hero-image > img:hover {
    cursor: pointer;
    transform: scale(1.1);
    transition: all 0.5s ease;
}

/* Remove underlines from links */
a {
    text-decoration: none;
    transition: all 0.5s ease;

}

.hero-content > a:hover {
    cursor: pointer;
    background-color: #34495e;
    transition: all 0.5s ease;
}

/* Create a container for page content and apply a blur effect when a popup is active */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    margin-top: 5rem;
}

/* Style for the main title header */
.title-header h1 {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    margin: 50px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: honeydew;
}

/* Add a horizontal line under the title */
.title-header h1 hr {
    width: 50%;
    margin-top: 15px;
}

/* Style for the search container */
.container-search {
    position: relative;
    width: 300px;
    height: 100px;
}

/* Style for the search button */
.container-search .search {
    /* Absolute position and circular shape */
    position: absolute;
    margin: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background: crimson;
    border-radius: 50%;
    transition: all 1s;
    z-index: 4;
    box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.4);
}

/* Change cursor to pointer when hovering over the search button */
.container-search .search:hover {
    cursor: pointer;
}

/* Styles for the elements inside the search button */
.container-search .search::before {
    content: "";
    position: absolute;
    margin: auto;
    top: 22px;
    right: 0;
    bottom: 0;
    left: 22px;
    width: 12px;
    height: 2px;
    background: white;
    transform: rotate(45deg);
    transition: all .5s;
}

.container-search .search::after {
    content: "";
    position: absolute;
    margin: auto;
    top: -5px;
    right: 0;
    bottom: 0;
    left: -5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid white;
    transition: all .5s;
}

/* Styles for the input element in the search container */
.container-search input {
    /* Absolute position and initial opacity set to 0 */
    position: absolute;
    margin: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 50px;
    outline: none;
    border: none;
    background: crimson;
    color: white;
    text-shadow: 0 0 10px crimson;
    padding: 0 80px 0 20px;
    border-radius: 30px;
    box-shadow: 0 0 25px 0 crimson, 0 20px 25px 0 rgba(0, 0, 0, 0.2);
    transition: all 1s;
    opacity: 0;
    z-index: 5;
    font-size: 1em;
    font-weight: bolder;
    letter-spacing: 0.05em;
}

/* Show the input field when focused and change styles */
.container-search input:hover {
    cursor: pointer;
}

/* Expand the input field and move the search button when focused */
.container-search input:focus {
    width: 300px;
    opacity: 1;
    cursor: text;
}

/* Animate the search button when the input is focused */
.container-search input:focus~.search {
    right: -250px;
    background: #151515;
    z-index: 6;
}

/* Animate the magnifying glass icon when the input is focused */
.container-search input:focus~.search::before {
    top: 0;
    left: 0;
    width: 25px;
}

/* Animate the outer circle when the input is focused */
.container-search input:focus~.search::after {
    top: 0;
    left: 0;
    width: 25px;
    height: 2px;
    border: none;
    background: white;
    border-radius: 0%;
    transform: rotate(-45deg);
}

/* Placeholder text style for the search input */
.container-search input::placeholder {
    color: white;
    opacity: 0.5;
    font-weight: bolder;
}

/* Container for a collection of cards */
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1000px;
    gap: 20px;
}

/* Style for individual cards */
.card {
    width: 270px;
    height: 350px;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    z-index: 1;
}

/* Content inside a card */
.card .content {
    z-index: 2;
    width: 100%;
    position: absolute;
    bottom: -85px;
    border-top-right-radius: 20px;
    border-top-left-radius: 20px;
    transition: all 0.7s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    min-height: 100px;
    background: #fff;
}

/* Active content within a card */
.card .content.active {
    z-index: 3;
}

/* Image container in a card */
.card .image {
    z-index: 1;
    height: 100%;
}

/* Image style inside a card */
.card img {
    height: 100%;
    width: 100%;
    transform: scale(1.1);
    transition: all 0.5s ease;
    object-fit: cover;
}

/* Expand the content when hovering over a card */
.card:hover .content {
    bottom: 0px;
}

/* Zoom in on the image when hovering over a card */
.card:hover .image img {
    transform: scale(1.25);
}

/* First line of text inside a card */
.card .content span:first-child {
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    font-size: 16px;
}

/* Second line of text inside a card */
.card .content span:last-child {
    font-size: 14px;
    text-align: center;
    font-weight: 700;
}

/* Style for a "More" button */
.btn-more {
    border: none;
    background: transparent;
    padding: 0 20px;
    font-size: 16px;
    margin-top: 10px;
    font-weight: bold;
    line-height: 37px;
    position: relative;
    color: #111;
    cursor: pointer;
    letter-spacing: 0.5px;
}

/* Styles for the "More" button's before and after pseudo-elements */
.btn-more:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 35px;
    background: transparent;
    border: 2px solid #111;
    z-index: -1;
    border-radius: 5px;
    transition: 0.3s ease-in-out;
}

.btn-more:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    height: 25px;
    width: 80%;
    z-index: -1;
    transition: 0.3s linear;
}

/* Style changes when hovering over the "More" button */
.btn-more:hover:after {
    opacity: 0;
    background: #111;
}

.btn-more:hover {
    color: #fff;
}

/* Animate the button border and background when hovering */
.btn-more:hover:before {
    width: 100%;
    background: #111;
    box-shadow: 0 10px 90px -2px rgba(0, 0, 0, 0.2);
}

/* Pagination container */
.pagination {
    display: flex;
    margin-top: 10px;
}

/* Styling for the next arrow in pagination */
.next-arrow {
    --delay: 0.2s;
    --colour: #111;
    position: relative;
    display: block;
    width: 70px;
    height: 40px;
    margin: 5px;
    border-radius: 20px;
    border: 3px solid var(--colour);
    box-sizing: border-box;
    transition: all .5s ease;
    overflow: hidden;
}

/* Pseudo-elements for the next arrow */
.next-arrow::before,
.next-arrow::after {
    content: "";
    position: absolute;
    display: block;
    box-sizing: border-box;
    transition: all var(--delay) ease-in-out;
}

/* Styles for the left section of the next arrow */
.next-arrow::before {
    width: 0%;
    height: 3px;
    left: -50px;
    top: 50%;
    background: var(--colour);
    transform: translate(0, -50%);
}

/* Styles for the right section of the next arrow */
.next-arrow::after {
    width: 10px;
    height: 10px;
    left: 20px;
    top: 50%;
    border: 3px solid var(--colour);
    border-left: 0;
    border-bottom: 0;
    transform: translate(50%, -50%) rotate(45deg);
}

/* Change cursor to pointer and animate the arrow when hovering */
.next-arrow:hover {
    cursor: pointer;
    transition: all var(--delay) ease;
}

/* Animate the left section of the next arrow when hovering */
.next-arrow:hover::before {
    opacity: 1;
    left: 15px;
    width: 20px;
}

/* Animate the right section of the next arrow when hovering */
.next-arrow:hover::after {
    width: 10px;
    height: 10px;
    left: 37px;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Styling for the previous arrow in pagination */
.prev-arrow {
    --delay: 0.2s;
    --colour: #111;
    position: relative;
    display: block;
    width: 70px;
    height: 40px;
    margin: 5px;
    border-radius: 20px;
    border: 3px solid var(--colour);
    box-sizing: border-box;
    transition: all .5s ease;
    overflow: hidden;
}

/* Pseudo-elements for the previous arrow */
.prev-arrow::before,
.prev-arrow::after {
    content: "";
    position: absolute;
    display: block;
    box-sizing: border-box;
    transition: all var(--delay) ease-in-out;
}

/* Styles for the left section of the previous arrow */
.prev-arrow::before {
    width: 0%;
    height: 3px;
    right: -50px;
    top: 50%;
    background: var(--colour);
    transform: translate(0, -50%);
}

/* Styles for the right section of the previous arrow */
.prev-arrow::after {
    width: 10px;
    height: 10px;
    right: 30px;
    top: 50%;
    border: 3px solid var(--colour);
    border-right: 0;
    border-top: 0;
    transform: translate(50%, -50%) rotate(45deg);
}

/* Change cursor to pointer and animate the arrow when hovering */
.prev-arrow:hover {
    cursor: pointer;
    transition: all var(--delay) ease;
}

/* Animate the left section of the previous arrow when hovering */
.prev-arrow:hover::before {
    opacity: 1;
    right: 15px;
    width: 20px;
}

/* Animate the right section of the previous arrow when hovering */
.prev-arrow:hover::after {
    width: 10px;
    height: 10px;
    right: 37px;
    transform: translate(50%, -50%) rotate(45deg);
}

/* Container for the recipe card content */
.recipe-card__content-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    height: auto;
    margin: 0 auto;
    background: #f5f5f5;
    box-shadow: 0 2.8px 2.2px rgba(0, 0, 0, 0.02),
        0 6.7px 5.3px rgba(0, 0, 0, 0.028), 0 12.5px 10px rgba(0, 0, 0, 0.035),
        0 22.3px 17.9px rgba(0, 0, 0, 0.042), 0 41.8px 33.4px rgba(0, 0, 0, 0.05),
        0 100px 80px rgba(0, 0, 0, 0.07);
    transition: 0.3s ease-in-out;
    border-radius: 15px;
    overflow: hidden;
    opacity: 0;
    z-index: 4;
    visibility: hidden;
}

/* Show the recipe card content container when active */
.recipe-card__content-container.popup-active {
    transition: 0.3s ease-in-out;
    top: 50%;
    visibility: visible;
    opacity: 1;
}

/* Close button for the recipe card */
.btn-close {
    width: 30px;
    height: 30px;
    position: relative;
    background: transparent;
    cursor: pointer;
    left: 90%;
    top: 15px;
}

/* Styles for the before and after pseudo-elements of the close button */
.btn-close::before,
.btn-close::after {
    content: '';
    position: absolute;
    height: 2px;
    width: 100%;
    background: #111;
    transition: transform 0.5s;
}

/* Style for the before pseudo-element */
.btn-close::before {
    transform: translateY(-50%) rotate(45deg);
}

/* Style for the after pseudo-element */
.btn-close::after {
    transform: translateY(-50%) rotate(-45deg);
}

/* Animate the before and after pseudo-elements when hovering over the close button */
.btn-close:hover::before,
.btn-close:hover::after {
    transform: translateY(-50%) rotate(0deg);
}

/* Container for recipe card actions */
.recipe-card__actions ul {
    padding: 0;
    margin: 0;
    list-style-type: none;
    display: flex;
    height: 60px;
    width: 100%;
    align-items: center;
}

/* Individual recipe card action items */
.recipe-card__actions li {
    display: flex;
    height: 60px;
    width: 100%;
    transition: background-color 0.2s ease;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Change background color when hovering over a recipe card action item */
.recipe-card__actions li:hover {
    background-color: #eee;
}

/* Styling for links in recipe card actions */
.recipe-card__actions a {
    padding: 10px;
    text-decoration: none;
    text-align: center;
    color: #333;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.2s ease;
    font-weight: 900;
}

/* Change border bottom color when hovering over a link in recipe card actions */
.recipe-card__actions a:hover {
    border-bottom: 2px solid #2c3e50;
}

/* Add a pseudo-element to links when active */
.recipe-card__actions a::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Style for active tab link in recipe card actions */
.recipe-card__actions a.tab-active {
    border-bottom: 2px solid #34495e;
}

/* Style for the content inside a recipe card */
.recipe-card__content {
    display: none;
    padding: 10px 20px;
    height: 360px;
    overflow-y: scroll;
}

/* Container for the preparation steps of a recipe */
.recipe-card__content ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Style for spans inside recipe card content */
.recipe-card__content span {
    font-weight: 900;
    background: #34495e;
    color: white;
    padding: 5px 3px;
}

/* Style for list items inside recipe card content */
.recipe-card__content li {
    min-height: 30px;
    display: flex;
    align-items: center;
    padding: 5px 3px;
    line-height: 1.4;
}

/* Alternate background color for even list items */
.recipe-card__content li:nth-child(even) {
    background: #eee;
}

/* Show the active content inside a recipe card */
.recipe-card__content--active {
    display: block;
}

/* Styling for preparation steps list */
.preparation-steps {
    counter-reset: section;
}

/* Style for individual preparation step items */
.preparation-steps li {
    margin-left: 10px;
    padding-left: 30px;
    position: relative;
    border-left: 3px solid rgba(52, 73, 94, .5);
}

/* Numbered marker for preparation steps */
.preparation-steps li::before {
    content: '1';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: -21px;
    background: rgba(52, 73, 94, 1);
    color: white;
    border-radius: 50%;
    height: 2em;
    width: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #F5F5F5;
    counter-increment: section;
    content: counter(section);
}

/* Media query for smaller screens */
@media screen and (max-width: 768px) {

    /* Adjust the position of the close button */
    .btn-close {
        left: 85%;
    }

    .hero {
        margin-top: 0;
    }
}