* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variable */
:root {
    /* Colors */
    --font-primary-color: #1D1D1F;
    --font-secondary-color: #ffffff;
    --font-tertiary-color: #6E6E73;
    --bg-primary-color: #F5F5F7;
    --bg-secondary-color: #000000;
    --bg-tertiary-color: #999999;
    --primary-color: #0071E3;
    --secondary-color: #D2D2D7;
    --interactive-color: #ff8c42;

    /* Font sizes */
    --font-title: 1.75rem;
    --font-heading: 1.5rem;
    --font-sub-heading: 1.25rem;
    --font-medium: 1rem;
    --font-small: .85rem;

    /* Font weight */
    --font-weight-thin: 300;
    --font-weight-normal-thin: 400;
    --font-weight-normal: 500;
    --font-weight-bold: 700;
    --font-weight-extrabold: 900;

    /* Font Style */
    --font-family-content: "Inter", sans-serif;
}

/* General */
html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    font-style: normal;
    background-color: var(--bg-primary-color);
    color: var(--font-primary-color);
}

#favorites-content {
    padding: 1rem;
}

a {
    text-decoration: none;
    color: var(--font-primary-color);
}

p {
    line-height: 1.5;
}

/* Images */
img {
    width: 100%;
    height: auto;
}

.recipe-img {
    max-width: 600px;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.social-links a img {
    transition: fill 0.5s ease;
    cursor: pointer;
}

.social-icons {
    width: 25px;
    height: 25px;
}

/* Footer */

footer {
    color: var(--font-secondary-color);
    background-color: var(--bg-secondary-color);
}

.creator img {
    width: 24px;
    border-radius: 4px;
}

/* Buttons */
.btn {
    font-size: var(--font-small);
    padding: .65rem 1rem;
    border-radius: 30px;
    font-weight: var(--font-weight-normal-thin);
    transition: transform 0.2s ease, background-color 0.3s;
}

.btn:hover {
    transform: scale(1.05);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--font-secondary-color);
}

.btn-primary:hover {
    background-color: var(--primary-interactive-color);
}

.btn-secondary {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    background-color: transparent;
}

.btn-secondary:hover {
    color: var(--font-secondary-color);
    background-color: var(--primary-interactive-color);
    border: none;
}

#clearFavorites {
    display: block;
    margin: 0 auto;
}

/* Navigation */
header {
    position: relative;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: .5rem 1rem;
    background-color: rgb(22, 22, 23);
}

.navbar a {
    color: var(--font-secondary-color);
}

.bar {
    height: 2px;
    width: 20px;
    background-color: var(--bg-tertiary-color);
    color: var(--bg-tertiary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

#logo {
    width: 32px;
}

/* Hamburguer menu */
.menu {
    display: none;
    background-color: var(--bg-secondary-color);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    transition: all .3s ease;
}

.menu-active {
    display: flex;
    flex-direction: column;
    transform: translateY(0);
}

li a {
    list-style: none;
    color: var(--bg-tertiary-color);
    cursor: pointer;
}

li {
    list-style: none;
}

.menu li {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.menu li:hover {
    background-color: var(--bg-tertiary-color);
}

.menu-icon {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    height: 20px;
    width: 20px;
}

.menu-icon.open .bar:nth-child(1) {
    transform: rotate(45deg);
    position: relative;
    top: 5px;
}

.menu-icon.open .bar:nth-child(2) {
    transform: rotate(-45deg);
    position: relative;
    top: -5px;
}

/* Hamb menu list */
.menu-list li {
    display: flex;
    align-items: center;
    height: 5rem;
    cursor: pointer;
}

.menu-list li a {
    padding-left: 2.5rem;
    font-size: 1.75rem;
    font-weight: var(--font-weight-normal);
    color: var(--font-secondary-color);
}

#food-generator h2,
#food-generator p,
#contact h2,
#contact p {
    padding: 0 1.5rem;
}

#contact h2,
#food-generator h2 {
    font-size: var(--font-sub-heading);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Hero */
#hero {
    position: relative;
    height: 70vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--primary-color);
}

.hero-img,
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-img {
    z-index: 1;
}

.hero-img .overlay {
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.content h1,
.content p {
    margin: 0 auto 2rem auto;
    color: var(--font-secondary-color);
    line-height: 1.5;
}

.content h1 {
    font-size: var(--font-title);
    width: 70%;
}

.content p {
    width: 70%;
    font-size: var(--font-heading);
    margin-bottom: 4rem;
    font-weight: var(--font-weight-thin);
}

.social-links {
    position: absolute;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    right: 1rem;
}

.content .btn-secondary {
    margin-left: 1rem;
}

/* Food Generator */
#recipesContainer,
#favoritesContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 2rem;
}

.error-recipe {
    color: red;
}

.recipe-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 1rem;
    border-radius: 4px;
    background-color: rgba(0, 113, 227, 0.1);
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.recipe-card:hover {
    box-shadow: 0 10px 25px rgba(0, 113, 227, 0.3);
    cursor: pointer;
}

.recipe-heading {
    margin-bottom: 1rem;
}

.viewRecipe {
    border-radius: 4px;
}

/* Backdrop */
dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Home Dialog */
#recipeDialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    border: none;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
}

#recipeDialog>*:not(:last-child) {
    margin-bottom: 1rem;
}

.dialog-btn-container {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem;
}

/* Contact form message */
#form-message {
    margin-top: 1rem;
    color: green;
    font-weight: bold;
}

/* Favorites content */
#favorites-content {
    margin: 0 auto 2rem auto;
}

/* Footer */
.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1rem;
    background-color: var(--bg-secondary-color);
    color: var(--font-secondary-color);
    text-align: center;
}

.footer-container h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.footer-info p,
.my-info p,
.follow-me {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.social-icons {
    margin: 0 0.4rem;
    transition: transform 0.3s ease;
}

/* Contact Page */
.contact-header,
.about-header {
    background-color: var(--primary-color);
    color: var(--bg-primary-color);
    padding: 1.5rem 1rem;
    text-align: center;
}

header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

form {
    background-color: var(--bg-primary-color);
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

label {
    font-weight: 600;
    font-size: 0.9rem;
}

input,
textarea {
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
}

button {
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: var(--bg-primary-color);
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--interactive-color);
    color: var(--font-primary-color);
}

/* About */
.about {
    max-width: 100%;

}

.about section {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--bg-primary-color);
    border: 1px solid #d2d2d7;
}

h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.about ul li {
    margin-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceCard {
    0% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-8px);
    }

    50% {
        transform: translateY(2px);
    }

    70% {
        transform: translateY(-4px);
    }

    100% {
        transform: translateY(0);
    }
}