/* ===== ROOT VARIABLES ===== */
:root {
    /* Nigerian Color Palette */
    --primary-orange: #FF6B35;
    --deep-orange: #E55934;
    --earth-brown: #8B4513;
    --rich-green: #228B22;
    --golden-yellow: #FFD700;
    --cream: #FFF8E7;
    --dark-brown: #3E2723;
    --light-brown: #D2B48C;
    
    /* Neutral Colors */
    --white: #FFFFFF;
    --black: #1A1A1A;
    --gray-100: #F5F5F5;
    --gray-200: #E5E5E5;
    --gray-300: #D4D4D4;
    --gray-600: #525252;
    --gray-800: #262626;
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--cream);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 248, 231, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-orange);
    margin-bottom: -0.25rem;
}

.nav-brand span {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 300;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-link {
    font-weight: 500;
    color: var(--gray-800);
    position: relative;
    padding: var(--spacing-xs) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-orange);
    transition: width 0.3s ease;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-orange);
    transition: 0.3s;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--spacing-2xl) var(--spacing-md);
    margin-top: 80px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    color: var(--dark-brown);
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-orange);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--deep-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--primary-orange);
    color: var(--white);
}

.hero-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-orange), var(--golden-yellow));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    box-shadow: var(--shadow-xl);
}

/* ===== RECIPES SECTION ===== */
.recipes {
    padding: var(--spacing-2xl) 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark-brown);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: var(--spacing-2xl);
    font-size: 1.125rem;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.recipe-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

.recipe-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.recipe-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--light-brown), var(--golden-yellow));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.recipe-content {
    padding: var(--spacing-md);
}

.recipe-title {
    font-size: 1.25rem;
    color: var(--dark-brown);
    margin-bottom: var(--spacing-xs);
}

.recipe-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recipe-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.recipe-difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty-easy { background: #dcfce7; color: #166534; }
.difficulty-medium { background: #fef3c7; color: #92400e; }
.difficulty-hard { background: #fee2e2; color: #991b1b; }

/* ===== ABOUT SECTION ===== */
.about {
    padding: var(--spacing-2xl) 0;
    background: var(--white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-brown);
    color: var(--white);
    text-align: center;
    padding: var(--spacing-lg) 0;
}

/* ===== UTILITY CLASSES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== RECIPE MODAL ===== */
.recipe-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--gray-100);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--gray-200);
    transform: rotate(90deg);
}

.modal-header {
    padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    color: var(--dark-brown);
    margin-bottom: var(--spacing-sm);
}

.modal-header .recipe-meta {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-body h3 {
    color: var(--dark-brown);
    margin: var(--spacing-lg) 0 var(--spacing-md);
}

.modal-body h3:first-child {
    margin-top: 0;
}

.ingredients-list {
    list-style: none;
    margin-bottom: var(--spacing-lg);
}

.ingredients-list li {
    padding: var(--spacing-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
}

.ingredients-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ingredients-list label {
    cursor: pointer;
    flex: 1;
}

.steps-list {
    counter-reset: step-counter;
    list-style: none;
}

.steps-list li {
    counter-increment: step-counter;
    padding: var(--spacing-sm) 0;
    padding-left: 3rem;
    position: relative;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: var(--spacing-sm);
    background: var(--primary-orange);
    color: var(--white);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.modal-footer {
    padding: var(--spacing-md) var(--spacing-xl) var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-orange);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background: var(--deep-orange);
    transform: translateY(-3px);
}

/* No Results */
.no-results {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--gray-600);
}

.no-results span {
    font-size: 4rem;
    display: block;
    margin-bottom: var(--spacing-md);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--dark-brown);
    color: var(--white);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    z-index: 3000;
    animation: slideInFromRight 0.3s ease-out;
}

.toast-success {
    background: #10b981;
}

.toast-error {
    background: #ef4444;
}

.toast-warning {
    background: #f59e0b;
}

.toast-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .recipe-modal {
        padding: var(--spacing-sm);
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--spacing-md);
    }
    
    .modal-header {
        padding-top: var(--spacing-lg);
    }
    
    .modal-body h3 {
        font-size: 1.25rem;
    }
    
    .ingredients-list li {
        font-size: 0.875rem;
    }
    
    .steps-list li {
        font-size: 0.875rem;
        padding-left: 2.5rem;
    }
    
    .steps-list li::before {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-header .recipe-meta {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}