/* ================================
   RECIPES PAGE STYLES
   Featured Hero + Overlay Grid
   ================================ */

/* ================================
   FILTERS
   ================================ */
.filters-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filters-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.filter-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.75rem 1rem;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

.clear-filters {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
}

.clear-filters:hover {
    color: var(--accent);
}

.clear-filters.visible {
    display: block;
}

/* Search */
.search-container {
    flex-shrink: 0;
}

.search-input {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    padding: 0.75rem 1.25rem;
    width: 200px;
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
    text-transform: uppercase;
}

.search-input:focus {
    border-color: var(--accent);
}

/* ================================
   FEATURED CARD (Hero — recipes[0])
   ================================ */
.featured-card {
    position: relative;
    width: 100%;
    height: 320px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    margin-bottom: 1.25rem;
    display: block;
}

.featured-card.hidden {
    display: none;
}

.featured-card:hover {
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.featured-card-image {
    position: absolute;
    inset: 0;
}

.featured-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-card:hover .featured-card-image img {
    transform: scale(1.04);
}

.featured-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 10, 10, 0.92) 0%, rgba(10, 10, 10, 0.6) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
}

.featured-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--bg-primary);
    background: var(--accent);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    width: fit-content;
    margin-bottom: 0.75rem;
}

.featured-tag {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.featured-title {
    font-family: 'Anta', sans-serif;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.6rem;
    max-width: 450px;
    transition: color 0.3s ease;
}

.featured-card:hover .featured-title {
    color: var(--accent);
}

.featured-desc {
    font-family: 'Amaranth', sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 400px;
    margin-bottom: 0.75rem;
}

.featured-meta {
    display: flex;
    gap: 1.5rem;
}

.featured-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.featured-meta-label {
    font-family: 'Segoe UI', Tahoma, 'Outfit', sans-serif;
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.featured-meta-value {
    font-family: 'Amaranth', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ================================
   GRID DIVIDER
   ================================ */
.grid-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.grid-divider.hidden {
    display: none;
}

.grid-divider-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.grid-divider-line {
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

/* ================================
   OVERLAY CARD GRID
   ================================ */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.overlay-card {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: none;
}

.overlay-card.visible {
    display: block;
}

.overlay-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.overlay-card-image {
    position: absolute;
    inset: 0;
}

.overlay-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.overlay-card:hover .overlay-card-image img {
    transform: scale(1.06);
}

.overlay-card-content {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 20%, rgba(10, 10, 10, 0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    transition: background 0.3s ease;
}

.overlay-card:hover .overlay-card-content {
    background: linear-gradient(transparent 15%, rgba(10, 10, 10, 0.98) 100%);
}

.overlay-tag {
    font-family: 'Outfit', sans-serif;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.overlay-title {
    font-family: 'Anta', sans-serif;
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.35rem;
    transition: color 0.3s ease;
}

.overlay-card:hover .overlay-title {
    color: var(--accent);
}

.overlay-desc {
    font-family: 'Amaranth', sans-serif;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-bottom: 0;
}

.overlay-card:hover .overlay-desc {
    max-height: 3rem;
    opacity: 1;
    margin-bottom: 0.5rem;
}

.overlay-meta {
    display: flex;
    gap: 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.overlay-card:hover .overlay-meta {
    max-height: 2rem;
    opacity: 1;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    display: none;
}

.no-results.visible {
    display: block;
}

.no-results p {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--text-muted);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 900px) {
    .recipes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .featured-card {
        height: 280px;
    }

    .featured-card-overlay {
        padding: 2rem;
    }

    .featured-title {
        font-size: 1.5rem;
    }

    .featured-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 500px) {
    .recipes-grid {
        grid-template-columns: 1fr;
    }

    /* Featured becomes a regular overlay card with border badge */
    .featured-card {
        height: auto;
        aspect-ratio: 4/3;
        border-radius: 12px;
        border: 1px solid rgba(212, 165, 116, 0.35);
        overflow: visible;
    }

    .featured-card-image {
        border-radius: 12px;
        overflow: hidden;
    }

    .featured-card-overlay {
        background: linear-gradient(transparent 20%, rgba(10, 10, 10, 0.95) 100%);
        justify-content: flex-end;
        padding: 1.5rem;
        border-radius: 12px;
    }

    /* Hide the full badge, desc, and detailed meta on mobile */
    .featured-badge,
    .featured-desc,
    .featured-meta {
        display: none;
    }

    /* Restyle tag + title to match overlay cards */
    .featured-tag {
        font-size: 0.6rem;
        margin-bottom: 0.3rem;
    }

    .featured-title {
        font-size: 1.15rem;
        max-width: none;
    }

    /* "Newest" border-breaking label */
    .featured-card::before {
        content: 'Newest';
        position: absolute;
        top: -0.5rem;
        left: 1rem;
        z-index: 2;
        font-family: 'Outfit', sans-serif;
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--accent);
        background: var(--glass-bg);
        padding: 0.1rem 0.5rem;
    }
}
