/* General reset for padding, margin, and box-sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body background color and text color for a sleek and inviting theme */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #ffffff;
    color: #1d1d1f;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px;
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Heading styles using Reddit Sans Condensed */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Reddit Sans Condensed', sans-serif;
    font-weight: 700;
    color: #1d1d1f;
}

/* Navigation bar styling */
nav {
    background-color: rgba(255, 255, 255, 0.9); /* Slightly transparent */
    padding: 15px 30px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

nav.scrolled {
    background-color: #ffffff; /* Change to solid background on scroll */
}

/* Logo / Site name on the left */
nav .logo {
    font-family: 'Reddit Sans Condensed', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d1d1f;
    text-transform: uppercase;
    text-decoration: none;
}

/* Navigation menu on the right */
nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end; /* Align items to the right */
    align-items: center;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #1d1d1f;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    transition: color 0.3s ease;
    padding: 5px 10px;
}

nav ul li a:hover {
    color: #0071e3; /* Blue highlight on hover */
    border-bottom: none; /* Underline on hover */
}

/* Toggle button for mobile */
.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hide nav menu by default on small screens */
nav ul {
    display: flex;
}

@media (max-width: 768px) {
    nav ul {
        display: none; /* Hide menu by default on small screens */
    }

    nav.active ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 20px;
        background-color: #ffffff;
        width: 200px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
    }

    nav.active ul li {
        margin: 10px 0;
    }

    .nav-toggle {
        display: block; /* Show toggle button on small screens */
    }
}

/* Hero section styling */
.hero-section {
    min-height: 90vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
    opacity: 1;
    transform: none;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.hero-text {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    opacity: 1;
    transform: none;
}

.hero-text h1 {
    font-size: 4.5rem;
    color: #1d1d1f;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
    animation: fadeInDown 1s ease-out;
}

.hero-text p {
    font-size: 1.8rem;
    color: #4a4a4a;
    margin-bottom: 40px;
    line-height: 1.6;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.cta-button {
    display: inline-block;
    padding: 20px 40px;
    background: linear-gradient(135deg, #0071e3 0%, #005bb5 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
}

/* Other section styling remains the same */
section {
    padding: 100px 20px;
    background-color: #ffffff;
    border-bottom: none;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #0071e3;
    position: relative;
}

section h2::after {
    content: '';
    width: 60px;
    height: 3px;
    background-color: #0071e3;
    display: block;
    margin: 20px auto 0;
}

/* About Section Styling */
#about p {
    font-size: 1rem;
    color: #6e6e73;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 20px;
    line-height: 1.8;
}

/* Features Section Styling */
#features ul {
    list-style: none;
    padding: 0;
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

#features ul li {
    font-size: 1rem;
    color: #1d1d1f;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

#features ul li:hover {
    transform: translateY(-5px);
}

/* How It Works section styling */
#how-it-works ol {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    counter-reset: step-counter;
    text-align: left;
}

#how-it-works ol li {
    font-size: 1rem;
    color: #1d1d1f;
    margin: 25px 0;
    padding-left: 60px;
    position: relative;
}

#how-it-works ol li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    font-size: 2.5rem;
    color: #0071e3;
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
}

/* Contact section styling */
#contact a {
    font-size: 1rem;
    color: #0071e3;
    text-decoration: none;
    font-weight: 500;
}

#contact a:hover {
    text-decoration: underline;
}

/* Enhanced Search Section Styling */
.search-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px 20px;
}

.search-heading {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1d1d1f;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-container {
    display: flex;
    width: 100%;
    max-width: 800px;
    position: relative;
    margin: 0 auto;
}

.search-box {
    flex-grow: 1;
    padding: 25px 30px;
    border-radius: 50px;
    border: 3px solid #e9ecef;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-box:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.2);
}

.search-button {
    padding: 0 40px;
    background: linear-gradient(135deg, #0071e3 0%, #005bb5 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
}

.suggestions {
    margin-top: 20px;
    width: 100%;
    max-width: 800px;
    border: none;
    border-radius: 15px;
    padding: 15px;
    display: none;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

.suggestions ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.suggestions ul li {
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    color: #1d1d1f;
}

.suggestions ul li:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.not-found {
    color: #dc3545;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1.1rem;
}

/* Enhanced Results Page Styling */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.recipe-card {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.recipe-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.recipe-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recipe-info h3 {
    font-size: 1.3rem;
    color: #1d1d1f;
    margin-bottom: 15px;
    line-height: 1.4;
}

.recipe-link {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(135deg, #0071e3 0%, #005bb5 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 15px;
}

.recipe-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
}

/* Footer styling */
footer {
    text-align: center;
    padding: 50px 20px;
    background-color: #ffffff;
    color: #6e6e73;
    border-top: 1px solid #d1d1d6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-heading {
        font-size: 2.5rem;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text p {
        font-size: 1.4rem;
    }

    .search-box, .search-button {
        padding: 20px 25px;
        font-size: 1rem;
    }

    .recipe-grid {
        grid-template-columns: 1fr;
        padding: 20px 15px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text p {
        font-size: 1.2rem;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }

    section {
        padding: 60px 15px;
    }

    nav ul {
        display: none;
    }

    .nav-toggle {
        display: block;
    }
}

/* Recipe Page Specific Styles */
.results-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.recipe-data-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 15px;
    margin: 30px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.results-section h1 {
    font-size: 2.5rem;
    color: #1d1d1f;
    text-align: center;
    margin-bottom: 20px;
}

.results-section h2 {
    font-size: 1.8rem;
    color: #0071e3;
    margin: 40px 0 20px;
    text-align: left;
}

.details {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.details p {
    font-size: 1.1rem;
    color: #1d1d1f;
}

.summary {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    line-height: 1.8;
    color: #4a4a4a;
}

.ingredients, .steps, .diet {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ingredients ul, .steps ol, .diet ul {
    list-style-position: inside;
    padding-left: 20px;
}

.ingredients li, .steps li, .diet li {
    margin: 10px 0;
    line-height: 1.6;
    color: #4a4a4a;
}

.steps li {
    margin-bottom: 20px;
    padding-left: 20px;
    position: relative;
}

.steps li::before {
    content: counter(item);
    counter-increment: item;
    position: absolute;
    left: 0;
    top: 0;
    color: #0071e3;
    font-weight: bold;
}

.diet ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding-left: 0;
}

.diet li {
    background-color: #f0f7ff;
    color: #0071e3;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .results-section {
        padding: 20px 15px;
    }

    .results-section h1 {
        font-size: 2rem;
    }

    .results-section h2 {
        font-size: 1.5rem;
    }

    .details {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .recipe-data-image {
        margin: 20px auto;
    }
}

/* Recipe Content Layout */
.recipe-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-top: 40px;
}

.ingredients {
    grid-column: 1;
}

.steps, .diet {
    grid-column: 2;
}

.error-message {
    text-align: center;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin: 40px auto;
    max-width: 600px;
}

.error-message p {
    font-size: 1.2rem;
    color: #4a4a4a;
    margin-bottom: 20px;
}

@media (max-width: 992px) {
    .recipe-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .ingredients, .steps, .diet {
        grid-column: 1;
    }
}

/* Search Page Additional Styles */
.search-subtitle {
    font-size: 1.5rem;
    color: #4a4a4a;
    margin-bottom: 40px;
    font-weight: 400;
}

.popular-cuisines {
    margin-top: 60px;
    text-align: center;
}

.popular-cuisines h3 {
    font-size: 1.5rem;
    color: #1d1d1f;
    margin-bottom: 20px;
}

.cuisine-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.cuisine-tags span {
    padding: 10px 20px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    color: #1d1d1f;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cuisine-tags span:hover {
    background: #0071e3;
    color: white;
    border-color: #0071e3;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .search-subtitle {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }

    .popular-cuisines h3 {
        font-size: 1.3rem;
    }

    .cuisine-tags {
        gap: 10px;
    }

    .cuisine-tags span {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}