.recipes-grid {
    width: 100%;
    padding: 4px 16px 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.recipe-card {
    background-color: #FFFFFF;
    border: 1px solid #C8D6CE;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #182B20;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(24, 43, 32, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.recipe-card:hover {
    transform: translateY(-3px);
    border-color: #52B788;
    box-shadow: 0 8px 20px rgba(24, 43, 32, 0.1);
}

.recipe-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: #E3EDE7;
    overflow: hidden;
}

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

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

.recipe-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(24, 43, 32, 0.85);
    color: #EDF5F0;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 6px;
}

.recipe-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.recipe-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #182B20;
}

.recipe-card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: #355844;
    padding-top: 8px;
    border-top: 1px solid #EDF5F0;
}

.recipes-status {
    grid-column: 1 / -1;
    text-align: center;
    padding: 36px 16px;
    color: #355844;
    font-size: 15px;
    font-weight: 600;
}

.recipe-page {
    position: fixed;
    inset: 0;
    z-index: 900;
    background-color: #F4F8F5;
    overflow-y: auto;
    animation: recipePageFadeIn 0.2s ease;
}

.recipe-page[hidden] {
    display: none;
}

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

.recipe-page-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #182B20;
    color: #EDF5F0;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(24, 43, 32, 0.14);
}

.recipe-back-btn {
    background-color: #243E2F;
    color: #EDF5F0;
    border: 1px solid #355844;
    height: 36px;
    padding: 0 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s, border-color 0.2s;
}

.recipe-back-btn:hover {
    background-color: #355844;
    border-color: #52B788;
}

.recipe-share-btn {
    background-color: transparent;
    color: #B9D3C4;
    border: 1px solid #355844;
    height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.recipe-share-btn:hover {
    color: #EDF5F0;
    border-color: #52B788;
}
.recipe-article {
    max-width: 820px;
    margin: 20px auto 48px;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recipe-hero {
    background-color: #FFFFFF;
    border: 1px solid #C8D6CE;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(24, 43, 32, 0.05);
}

.recipe-hero-img {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    display: block;
    background-color: #E3EDE7;
}

.recipe-hero-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recipe-hero-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.recipe-badge-cat {
    background-color: #E3EDE7;
    color: #182B20;
    border: 1px solid #C8D6CE;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
}

.recipe-badge-time {
    font-size: 13px;
    font-weight: 600;
    color: #355844;
}

.recipe-hero-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    color: #182B20;
}

.recipe-hero-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #355844;
    margin-top: 4px;
    white-space: pre-line;
}

.recipe-section-box {
    background-color: #FFFFFF;
    border: 1px solid #C8D6CE;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(24, 43, 32, 0.05);
}

.recipe-section-heading {
    font-size: 18px;
    font-weight: 700;
    color: #182B20;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #EDF5F0;
}

.recipe-ingredients-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recipe-ingredients-list li {
    position: relative;
    padding-left: 18px;
    font-size: 15px;
    line-height: 1.5;
    color: #182B20;
}

.recipe-ingredients-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #52B788;
}

.recipe-steps-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recipe-step-card {
    background-color: #F4F8F5;
    border: 1px solid #C8D6CE;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recipe-step-num {
    display: inline-block;
    align-self: flex-start;
    background-color: #182B20;
    color: #EDF5F0;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
}

.recipe-step-text {
    font-size: 15px;
    line-height: 1.6;
    color: #182B20;
    white-space: pre-line;
}

.recipe-step-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #C8D6CE;
    display: block;
}

@media (max-width: 992px) {
    .recipes-grid {
        padding: 4px 10px 24px;
        gap: 10px;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .recipe-card-body {
        padding: 10px;
        gap: 6px;
    }

    .recipe-card-title {
        font-size: 14px;
    }

    .recipe-article {
        margin: 12px auto 36px;
        padding: 0 10px;
        gap: 14px;
    }

    .recipe-hero-content,
    .recipe-section-box {
        padding: 16px;
    }

    .recipe-hero-title {
        font-size: 20px;
    }
}


@media (prefers-color-scheme: dark) {
    .recipe-card,
    .recipe-hero,
    .recipe-section-box {
        background-color: var(--bg-surface);
        border-color: var(--border-color);
        color: var(--text-main);
    }

    .recipe-card-title,
    .recipe-hero-title,
    .recipe-section-heading,
    .recipe-ingredients-list li,
    .recipe-step-text {
        color: var(--text-main);
    }

    .recipe-card-meta,
    .recipe-badge-time,
    .recipe-hero-desc,
    .recipes-status {
        color: var(--text-muted);
    }

    .recipe-card-meta,
    .recipe-section-heading {
        border-color: var(--border-color);
    }

    .recipe-page {
        background-color: var(--bg-body);
    }

    .recipe-page-topbar {
        background-color: var(--header-bg);
        border-bottom: 1px solid var(--border-color);
    }

    .recipe-badge-cat,
    .recipe-step-card {
        background-color: var(--bg-subtle);
        border-color: var(--border-color);
        color: var(--text-main);
    }
}

