/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --text-color: #2d3436;
    --light-gray: #f5f6fa;
    --dark-gray: #636e72;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}
.navbar-link{
    text-decoration: none;
}
/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.cooking {
    position: relative;
    width: 100px;
    height: 100px;
}

.bubble {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: bubble 1.5s infinite;
}

.bubble:nth-child(2) { animation-delay: 0.2s; left: 20px; }
.bubble:nth-child(3) { animation-delay: 0.4s; left: 40px; }
.bubble:nth-child(4) { animation-delay: 0.6s; left: 60px; }
.bubble:nth-child(5) { animation-delay: 0.8s; left: 80px; }

@keyframes bubble {
    0% { transform: scale(0) translateY(0); opacity: 1; }
    100% { transform: scale(1) translateY(-100px); opacity: 0; }
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.header.scroll-down {
    transform: translateY(-100%);
}

.header.scroll-up {
    transform: translateY(0);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: 2rem 5%;
    background: var(--light-gray);
    position: relative;
    overflow: hidden;
}

/* Recipe Modal Styles */
.recipe-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.recipe-modal-content {
    background: var(--white);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 15px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 30px;
    color: var(--white);
    cursor: pointer;
    z-index: 1;
}

.recipe-modal-header {
    position: relative;
    padding-bottom: 56.25%;
}

.recipe-modal-header img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-modal-header h2 {
    position: absolute;
    bottom: 60px;
    left: 20px;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.recipe-stats {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 20px;
    color: var(--white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.recipe-modal-body {
    padding: 2rem;
}

.ingredients, .instructions, .additional-info {
    margin-bottom: 2rem;
}

.ingredients ul, .instructions ol {
    padding-left: 20px;
    margin-top: 1rem;
}

.ingredients li, .instructions li {
    margin-bottom: 0.5rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

/* Error Message Styles */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 5px;
    z-index: 1002;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .recipe-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .recipe-stats {
        flex-direction: column;
        gap: 10px;
    }

    .recipe-modal-header h2 {
        font-size: 1.5rem;
        bottom: 100px;
    }
    .categories-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 1rem;
    }
    
    .category-card {
        height: 200px;
    }
}




/*dbfhbfbsifijsfihsifisfiushfui*/
.hero-content {
    flex: 1;
    padding-right: 2rem;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.6s forwards;
}

.hero p {
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.6s 0.2s forwards;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.6s 0.4s forwards;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.search-box button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    background: var(--primary-color);
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.6s 0.6s forwards;
}

.stat {
    text-align: center;
}

.number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.label {
    color: var(--dark-gray);
}

.hero-image {
    flex: 1;
    position: relative;
}

.floating-images img {
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.main-image {
    width: 100%;
    max-width: 500px;
    animation: float 6s ease-in-out infinite;
}

.float-1 {
    position: absolute;
    width: 150px;
    top: 20%;
    right: -30px;
    animation: float 8s ease-in-out infinite;
}

.float-2 {
    position: absolute;
    width: 150px;
    bottom: 20%;
    left: -30px;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* Categories Section */
.categories {
    padding: 5rem 5%;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.category-card {
    perspective: 1000px;
    height: 300px;
    margin-bottom: 1rem;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 1.2s;
    transform-style: preserve-3d;
}

.category-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
}

.card-front {
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-front h3 {
    position: absolute;
    bottom: 30px;
    left: 20px;
    color: var(--white);
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.card-front span {
    position: absolute;
    bottom: 10px;
    left: 20px;
    color: var(--white);
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.card-back {
    background: var(--primary-color);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    color: var(--white);
}

.card-back h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-back p {
    margin-bottom: 1.5rem;
}

.view-category {
    padding: 0.8rem 2rem;
    border: 2px solid var(--white);
    border-radius: 50px;
    background: transparent;
    color: var(--white);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.view-category:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Featured Recipes */
.featured-recipes {
    padding: 5rem 5%;
    background: var(--light-gray);
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.recipe-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.recipe-card:hover {
    transform: translateY(-10px);
}

.recipe-image {
    position: relative;
    height: 200px;
}

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

.recipe-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
}

.time,
.difficulty {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

.difficulty.easy { color: #2ecc71; }
.difficulty.medium { color: #f1c40f; }
.difficulty.hard { color: #e74c3c; }

.recipe-content {
    padding: 1.5rem;
}

.recipe-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.recipe-content p {
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.view-recipe {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.view-recipe:hover {
    background: #ff5252;
}

/* Newsletter Section */
.newsletter {
    padding: 5rem 5%;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 0%, rgba(255,255,255,0.1) 100%);
    transform: skewY(-5deg);
}

.newsletter-content {
    position: relative;
    z-index: 1;
}

.glowing-text {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #ff6b6b; }
    to { text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #ff6b6b; }
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto 0;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
}

.pulse-button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    background: var(--text-color);
    color: var(--white);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success {
    background: #2ecc71 !important;
}

/* Footer */
.footer {
    background: #2d3436;
    color: var(--white);
    padding: 5rem 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-hover {
    color: var(--white);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-hover:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--light-gray);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--text-color);
        margin: 5px 0;
        transition: var(--transition);
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: var(--transition);
    }

    .nav-links.active {
        left: 0;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 4rem;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }

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

    .hero-stats {
        justify-content: center;
    }

    .newsletter-form {
        flex-direction: column;
        padding: 0 1rem;
    }

    .newsletter-form button {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}
.search-results {
    padding: 5rem 5%;
    background: var(--white);
    display: none;
}

.search-results .section-title {
    margin-bottom: 2rem;
}

.no-results {
    text-align: center;
    padding: 3rem;
    width: 100%;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.no-results p {
    color: var(--dark-gray);
    font-size: 1.2rem;
}

/* Recipe Modal Animation */
.recipe-modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.recipe-modal.active {
    opacity: 1;
    visibility: visible;
}

.recipe-modal-content {
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease;
}

.recipe-modal.active .recipe-modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Enhanced Loading Spinner */
.loading-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    width: 100%;
    grid-column: 1 / -1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--light-gray);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive Grid Adjustments */
@media (max-width: 1200px) {
    .recipes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .recipes-grid {
        grid-template-columns: 1fr;
    }
    
    .recipe-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .recipe-modal-header h2 {
        font-size: 1.5rem;
    }
}

/* Recipe Card Hover Effects */
.recipe-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.recipe-image {
    overflow: hidden;
}

.recipe-image img {
    transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-image img {
    transform: scale(1.1);
}

/* View Recipe Button Animation */
.view-recipe {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.view-recipe::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
    z-index: -1;
}

.view-recipe:hover::after {
    left: 100%;
}
.recipe-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.recipe-modal.active {
    opacity: 1;
    visibility: visible;
}

.recipe-modal-content {
    background: var(--white);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 15px;
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease;
}

.recipe-modal.active .recipe-modal-content {
    transform: scale(1);
    opacity: 1;
}

.recipe-modal-header {
    position: relative;
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem;
}

.recipe-hero-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--white);
    cursor: pointer;
    z-index: 1;
    transition: transform 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg);
}

.recipe-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.recipe-modal-body {
    padding: 2rem;
}

.recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.recipe-tag {
    background: var(--light-gray);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

.recipe-section {
    margin-bottom: 2rem;
}

.recipe-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ingredients-list {
    list-style: none;
    padding: 0;
}

.ingredient-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
}

.ingredient-amount {
    background: var(--light-gray);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-right: 1rem;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.instructions-list {
    padding-left: 2rem;
}

.instruction-step {
    margin-bottom: 1rem;
    position: relative;
}

.step-number {
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.nutrition-item {
    text-align: center;
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 8px;
}

.nutrition-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nutrition-label {
    font-size: 0.9rem;
    color: var(--dark-gray);
}

@media (max-width: 768px) {
    .recipe-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .recipe-hero-image {
        height: 200px;
    }

    .recipe-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}