/* ========================================
   RECIPES PAGE - HERO
   ======================================== */
.recipes-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 120px;
    padding-bottom: 2rem;
    text-align: center;
}

.recipes-hero-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-light);
    z-index: 0;
}

/* Dot Pattern */
.recipes-hero-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(61, 122, 90, 0.06) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.4;
    z-index: 0;
}

/* Soft Floating Blobs */
.recipes-hero-blobs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.recipes-blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: blobFloat 20s infinite ease-in-out;
}

.recipes-blob-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(61, 122, 90, 0.18) 0%, transparent 70%);
    top: -5%;
    left: -8%;
    animation-delay: 0s;
}

.recipes-blob-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(139, 171, 154, 0.12) 0%, transparent 70%);
    top: 40%;
    right: -12%;
    animation-delay: -7s;
}

.recipes-blob-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(90, 154, 119, 0.1) 0%, transparent 70%);
    bottom: -5%;
    left: 15%;
    animation-delay: -14s;
}

.recipes-blob-4 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(61, 122, 90, 0.08) 0%, transparent 70%);
    top: 20%;
    right: 20%;
    animation-delay: -10s;
}

@keyframes blobFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(15px, -20px) scale(1.05);
    }
    66% {
        transform: translate(-10px, 10px) scale(0.97);
    }
}

/* Decorative Circles (matches home page style) */
.recipes-hero-circles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.recipes-circle {
    position: absolute;
    border: 2px solid rgba(61, 122, 90, 0.08);
    border-radius: 50%;
}

.recipes-circle-1 {
    width: 500px;
    height: 500px;
    top: -15%;
    right: -5%;
    opacity: 0.6;
}

.recipes-circle-2 {
    width: 350px;
    height: 350px;
    bottom: -10%;
    left: -8%;
    opacity: 0.5;
}

.recipes-circle-3 {
    width: 200px;
    height: 200px;
    top: 30%;
    left: 18%;
    opacity: 0.4;
}

.recipes-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 2rem;
}

.recipes-hero-content .section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--green);
    background: rgba(61, 122, 90, 0.08);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    border: 1px solid rgba(61, 122, 90, 0.15);
    margin-bottom: 1.5rem;
}

.recipes-hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.recipes-hero-content h1 span {
    color: var(--green);
}

.recipes-hero-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   RECIPES PAGE - CONTROLS (Search + Filters)
   ======================================== */
.recipes-controls {
    padding: 1rem 2rem 0;
    background: var(--bg-light);
}

.recipes-controls .section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.recipes-search {
    max-width: 400px;
    margin: 0 auto 1.25rem;
    position: relative;
}

.recipes-search input {
    width: 100%;
    background: var(--bg-white);
    border: 1px solid rgba(61, 122, 90, 0.2);
    border-radius: 60px;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    color: var(--text-primary);
    transition: all 0.3s;
}

.recipes-search input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(61, 122, 90, 0.1);
}

.recipes-search input::placeholder {
    color: var(--text-muted);
}

.recipes-search svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
    pointer-events: none;
}

.recipes-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.filter-btn {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 0.6rem 1.25rem;
    background: rgba(61, 122, 90, 0.06);
    border-radius: 50px;
    border: 1px solid rgba(61, 122, 90, 0.12);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'DM Sans', sans-serif;
}

.filter-btn:hover {
    border-color: var(--green);
    color: var(--green-dark);
    background: rgba(61, 122, 90, 0.1);
}

.filter-btn.active {
    background: var(--gradient-green);
    color: white;
    border-color: transparent;
}

/* ========================================
   RECIPES PAGE - LEAF DIVIDER
   ======================================== */
.recipes-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
    background: var(--bg-light);
    position: relative;
}

.recipes-divider::before,
.recipes-divider::after {
    content: '';
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(61, 122, 90, 0.2), transparent);
}

.recipes-divider svg {
    width: 24px;
    height: 24px;
    stroke: var(--sage);
    fill: none;
    stroke-width: 1.5;
    margin: 0 1rem;
    opacity: 0.5;
}

/* ========================================
   RECIPES PAGE - GRID
   ======================================== */
.recipes-grid-section {
    padding: 3rem 2rem 6rem;
    background: var(--bg-light);
    position: relative;
}

/* Subtle dot pattern on grid background */
.recipes-grid-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(61, 122, 90, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
    pointer-events: none;
}

.recipes-grid-section .section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.recipes-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.recipe-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(61, 122, 90, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    display: flex;
    flex-direction: row;
}

.recipe-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.recipe-card:hover {
    transform: translateY(-4px);
    border-color: var(--green);
    box-shadow: 0 16px 40px rgba(61, 122, 90, 0.12);
}

.recipe-card-image {
    position: relative;
    width: 280px;
    min-width: 280px;
    min-height: 240px;
    overflow: hidden;
    background: var(--green-pale);
}

.recipe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.recipe-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: white;
    background: var(--green);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
}

.recipe-card-body {
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.recipe-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.recipe-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.recipe-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.recipe-meta-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--sage);
    fill: none;
    stroke-width: 2;
}

/* Nutrition highlights row on card */
.recipe-card-nutrition {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.recipe-card-nutrition .nutrition-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--green-dark);
    background: rgba(61, 122, 90, 0.07);
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    letter-spacing: 0.02em;
}

.recipe-card-nutrition .nutrition-chip strong {
    font-weight: 700;
}

/* "View recipe" link at bottom of card */
.recipe-card-link {
    margin-top: auto;
    padding-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green);
    transition: gap 0.3s ease;
}

.recipe-card:hover .recipe-card-link {
    gap: 0.7rem;
}

.recipe-card-link svg {
    width: 16px;
    height: 16px;
    stroke: var(--green);
    fill: none;
    stroke-width: 2;
}

/* ========================================
   RECIPES PAGE - EMPTY STATE
   ======================================== */
.recipes-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.recipes-empty svg {
    width: 64px;
    height: 64px;
    stroke: var(--green-muted);
    fill: none;
    stroke-width: 1.5;
    margin-bottom: 1rem;
}

/* ========================================
   RECIPES PAGE - LOADING
   ======================================== */
.recipes-loading {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--green-pale);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   RECIPES PAGE - MODAL
   ======================================== */
.recipe-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recipe-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.recipe-modal {
    background: var(--bg-white);
    border-radius: 24px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}

/* Modal scrollbar */
.recipe-modal::-webkit-scrollbar {
    width: 6px;
}

.recipe-modal::-webkit-scrollbar-track {
    background: transparent;
}

.recipe-modal::-webkit-scrollbar-thumb {
    background: var(--sage);
    border-radius: 3px;
}

.recipe-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.recipe-modal-close:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.recipe-modal-close svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-primary);
    fill: none;
    stroke-width: 2;
}

/* Modal content */
.recipe-detail-hero {
    height: 350px;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
}

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

.recipe-detail-header {
    padding: 2rem 2.5rem 1.5rem;
}

.recipe-detail-header .recipe-card-category {
    position: static;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.recipe-detail-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.recipe-detail-header > p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.recipe-detail-stats {
    display: flex;
    gap: 2rem;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(61, 122, 90, 0.1);
    border-bottom: 1px solid rgba(61, 122, 90, 0.1);
}

.recipe-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.recipe-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green-dark);
}

.recipe-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Nutrition */
.recipe-detail-nutrition {
    padding: 1.5rem 2.5rem;
}

.recipe-detail-nutrition h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.nutrition-item {
    background: var(--green-pale);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.nutrition-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 0.25rem;
}

.nutrition-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Ingredients */
.recipe-detail-ingredients {
    padding: 1.5rem 2.5rem;
}

.recipe-detail-ingredients h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

.recipe-detail-ingredients li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(61, 122, 90, 0.06);
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recipe-detail-ingredients li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Instructions */
.recipe-detail-instructions {
    padding: 1.5rem 2.5rem 2.5rem;
}

.recipe-detail-instructions h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.recipe-detail-instructions ol {
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.recipe-detail-instructions li {
    counter-increment: step;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(61, 122, 90, 0.06);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    display: flex;
    gap: 1rem;
}

.recipe-detail-instructions li::before {
    content: counter(step);
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--gradient-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 2px;
}

/* ========================================
   RECIPES PAGE - RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .recipes-hero {
        padding-top: 100px;
        min-height: 40vh;
    }

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

    .recipes-hero-blobs {
        display: none;
    }

    .recipes-hero-circles {
        display: none;
    }

    .recipe-card {
        flex-direction: column;
    }

    .recipe-card-image {
        width: 100%;
        min-width: unset;
        height: 220px;
        min-height: 220px;
    }

    .recipe-modal {
        max-height: 95vh;
        border-radius: 16px;
        margin: 1rem;
    }

    .recipe-detail-hero {
        height: 250px;
        border-radius: 16px 16px 0 0;
    }

    .recipe-detail-header {
        padding: 1.5rem;
    }

    .recipe-detail-header h2 {
        font-size: 1.5rem;
    }

    .recipe-detail-stats {
        gap: 1rem;
    }

    .recipe-detail-nutrition,
    .recipe-detail-ingredients,
    .recipe-detail-instructions {
        padding: 1.25rem 1.5rem;
    }

    .recipe-modal-overlay {
        padding: 0;
    }
}

@media (max-width: 600px) {
    .recipes-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    .recipes-hero-content h1 {
        font-size: 2rem;
    }

    .recipes-hero-content p {
        font-size: 1rem;
    }

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

    .recipe-stat-value {
        font-size: 1.25rem;
    }
}
