/* define colors as variable to use them easily */

:root {
    --darkest: rgb(27, 26, 23);
    --dark: #0e1511;
    --yellow: #eee5c8;
    --red: #772017;
    --dark-red: #281102;
    --light: #696969;
    --lightest: #EFEFEF;
    --green: #9c9b84;
    --brown: rgb(166, 153, 124);
}

* {
    box-sizing: border-box;
    font-family: 'lora', serif;
}

body {
    background-image: url("../images/narrative-bg.webp");
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.nar-content {
    background-color: rgba(0, 0, 0, 0.75);
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px;
    width: 100%;
    animation: animatezoom 1.5s;
}

.region-section,
.meal-section,
.prepration-section,
.reg-section,
.time-section {
    animation: animatezoom 1.5s;
}


/* fade up the information */

@keyframes animatezoom {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.nar-head {
    margin-bottom: 48px;
}


/* styling buttons on the landing page */

.nar-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    width: 90%;
    justify-content: center;
    align-items: baseline;
}


/* Float four columns side by side */

.nar-option {
    flex: 1;
    /* Ensure responsiveness with flex-grow, flex-shrink, and flex-basis */
    max-width: 20%;
    box-sizing: border-box;
}


/* Style the narrative button */

.nar-btn {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.nar-btn span {
    transition: all 0.3s;
    font-weight: 550;
    font-size: 24px;
    color: var(--lightest);
    position: relative;
}


/* style of the buttons */

.nar-btn::before {
    content: '';
    transition: all 0.3s;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    transition: all 0.3s;
    border-top-width: 3px;
    border-bottom-width: 3px;
    border-top-style: solid;
    border-bottom-style: solid;
    border-top-color: var(--lightest);
    border-bottom-color: var(--lightest);
    transform: scale(0.1, 1);
}

.nar-btn:hover span {
    letter-spacing: 2px;
}

.nar-btn:hover::before {
    opacity: 1;
    transform: scale(1, 1);
}

.nar-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
}


/* background color will change when you hover */

.nar-btn:hover::after {
    opacity: 0;
    transform: scale(0.1, 1);
}


/* style narrative headings and text */

.nar-h1 {
    font-size: 64px;
    font-weight: 600;
    color: var(--lightest);
}

.nar-h2 {
    font-size: 36px;
    font-weight: 500;
    padding-top: 36px;
    color: var(--lightest);
}


/* narrative sections style */

.main-page {
    background-color: rgba(27, 26, 23, 0.3);
}

.region,
.prepration,
.meal,
.ingredient {
    margin-bottom: 16px;
}

.region,
.prepration,
.time {
    background-color: rgb(166, 153, 124);
    height: auto;
}

.meal,
.ingredient {
    background-color: var(--yellow);
    height: auto;
}

.reg-section,
.meal-section,
.ingredient-section,
.prepration-section,
.time-section {
    padding-bottom: 24px;
    padding: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
}

.general-header {
    font-size: 45px;
    margin-top: 8px;
    margin-bottom: 16px;
    font-weight: 600;
    padding: 0 48px 16px 48px;
    border-width: 0 0 3px;
    border-image: linear-gradient( 90deg, rgba(239, 239, 239, 0), rgb(46, 45, 45) 50%, rgba(239, 239, 239, 0) 100%) 0 0 100%;
    border-style: solid;
}

a {
    text-decoration: none;
    cursor: pointer;
}

.up-icon {
    color: var(--red);
    text-decoration: none;
    margin-bottom: 0;
}

.nar-cards {
    width: 85%;
    display: flex;
    padding-top: 24px;
    justify-content: center;
}

.nar-card {
    width: 33.3%;
    padding: 0 16px;
}

.pre-card {
    width: 25%;
    padding: 0 16px;
}

.nar-card p {
    font-size: 18px;
    margin-top: 16px;
}

.nar-card .card {
    border: 1px solid #ccc;
    border-radius: 15px;
    padding: 16px;
    margin: 10px;
    background-color: var(--lightest);
    text-align: center;
    box-shadow: 0 4px 8px rgba(27, 26, 23, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    cursor: pointer;
    transform: translateY(-16px);
    box-shadow: 0 8px 16px rgba(27, 26, 23, 0.3);
    color: var(--red);
}


/* up button style */

#scrollToTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    font-size: 24px;
    background-color: var(--red);
    color: var(--yellow);
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(27, 26, 23, 0.2);
}

#scrollToTop:hover {
    background-color: var(--dark-red);
}

.show-scroll-button {
    display: flex !important;
}


/* Responsive adjustments */

@media (max-width: 992px) {
    .general-header {
        font-size: 36px;
        text-align: center;
    }
    .nar-h1 {
        font-size: 57px;
    }
    .nar-h2 {
        font-size: 32px;
    }
    .nar-h3 {
        font-size: 20px;
    }
    .nar-card {
        width: 50%;
        margin-bottom: 20px;
    }
    .nar-cards {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .nar-option {
        flex: 1 1 calc(50% - 8px);
        max-width: 60%;
    }
}

@media (max-width: 768px) {
    .nar-h1 {
        font-size: 36px;
    }
    .nar-h2 {
        font-size: 28px;
    }
    .nar-h3 {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .general-header {
        font-size: 24px;
        text-align: center;
    }
    .nar-cards {
        width: 80%;
        flex-direction: column;
    }
    .nar-card {
        width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .nar-h1 {
        font-size: 28px;
    }
    .nar-h2 {
        font-size: 24px;
    }
    .nar-btn .nar-h3 {
        font-size: 16px;
    }
}