/* recipes.css - DARK THEME */
.recipes-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 6vw 60px;
    box-sizing: border-box;
}

.page-title {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* Enhanced Toolbar */
.recipes-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    align-items: center;
    justify-content: center;
}

.recipes-toolbar input[type=search],
.recipes-toolbar select {
    border: 2px solid rgba(105, 178, 84, 0.3);
    border-radius: 10px;
    font: 1rem/1.2 'Poppins', sans-serif;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

.recipes-toolbar select option {
    background: #1f1f1f;
    color: #ffffff;
}

.recipes-toolbar input[type=search]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.recipes-toolbar input[type=search]:focus,
.recipes-toolbar select:focus {
    border-color: #69B254;
    box-shadow: 0 0 0 3px rgba(105, 178, 84, 0.3);
    background: rgba(105, 178, 84, 0.1);
}

.recipes-toolbar input[type=search] {
    flex: 1 1 280px;
    min-width: 240px;
    max-width: 400px;
}

.recipes-toolbar select {
    min-width: 180px;
    cursor: pointer;
}

/* Enhanced Grid */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 24px;
}

/* Enhanced Card - Dark Theme */
.recipe-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recipe-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(105, 178, 84, 0.4);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(105, 178, 84, 0.3);
}

.recipe-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-thumb {
    transform: scale(1.02);
}

.recipe-body {
    padding: 24px 26px 28px;
    text-align: center;
}

.recipe-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #ffffff;
    line-height: 1.2;
}

.short-desc {
    font-size: 0.98rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    height: 3.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    font-weight: 600;
    color: #7bc463;
    font-size: 0.95rem;
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .recipes-wrapper {
        padding: 90px 4vw 50px;
    }
    
    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 28px;
    }
}

@media (max-width: 992px) {
    .recipes-wrapper {
        padding: 80px 3vw 40px;
    }
    
    .page-title {
        font-size: clamp(1.8rem, 3.5vw, 2.8rem);
        margin-bottom: 20px;
    }
    
    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }
    
    .recipe-card {
        border-radius: 16px;
    }
    
    .recipe-body {
        padding: 20px 22px 24px;
    }
    
    .recipe-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .recipes-wrapper {
        padding: 70px 20px 35px;
    }
    
    .recipes-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 24px;
    }
    
    .recipes-toolbar input[type=search] {
        flex: none;
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    
    .recipes-toolbar select {
        width: 100%;
        min-width: 0;
    }
    
    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
    
    .recipe-body {
        padding: 18px 20px 22px;
    }
    
    .recipe-title {
        font-size: 1.15rem;
        margin-bottom: 10px;
    }
    
    .short-desc {
        font-size: 0.95rem;
        height: 3em;
    }
    
    .recipe-meta {
        margin-top: 16px;
        font-size: 0.9rem;
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .recipes-wrapper {
        padding: 60px 16px 30px;
    }
    
    .page-title {
        font-size: clamp(1.6rem, 3vw, 2.2rem);
        margin-bottom: 18px;
    }
    
    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .recipe-card {
        max-width: 100%;
        margin: 0 auto;
        border-radius: 14px;
    }
    
    .recipe-body {
        padding: 16px 18px 20px;
    }
    
    .recipe-title {
        font-size: 1.1rem;
    }
    
    .short-desc {
        font-size: 0.92rem;
        height: 2.8em;
        line-height: 1.4;
    }
    
    .recipe-meta {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-top: 14px;
    }
    
    .recipe-meta span {
        font-size: 0.88rem;
    }
}

@media (max-width: 480px) {
    .recipes-wrapper {
        padding: 50px 12px 25px;
    }
    
    .page-title {
        font-size: clamp(1.4rem, 2.5vw, 1.8rem);
        margin-bottom: 16px;
    }
    
    .recipes-toolbar {
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .recipes-toolbar input[type=search],
    .recipes-toolbar select {
        padding: 10px 14px;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    
    .recipes-grid {
        gap: 16px;
    }
    
    .recipe-card {
        border-radius: 12px;
    }
    
    .recipe-body {
        padding: 14px 16px 18px;
    }
    
    .recipe-title {
        font-size: 1.05rem;
        margin-bottom: 8px;
    }
    
    .short-desc {
        font-size: 0.9rem;
        height: 2.6em;
    }
    
    .recipe-meta {
        margin-top: 12px;
        gap: 6px;
    }
}

@media (max-width: 360px) {
    .recipes-wrapper {
        padding: 45px 10px 20px;
    }
    
    .page-title {
        font-size: 1.3rem;
        margin-bottom: 14px;
    }
    
    .recipe-body {
        padding: 12px 14px 16px;
    }
    
    .recipe-title {
        font-size: 1rem;
    }
    
    .short-desc {
        font-size: 0.88rem;
        height: 2.4em;
    }
}

/* Enhanced hover effects for touch devices */
@media (hover: none) {
    .recipe-card:hover {
        transform: none;
    }
    
    .recipe-card:active {
        transform: scale(0.98);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .recipe-card,
    .recipe-thumb {
        transition: none;
    }

    .recipe-card:hover {
        transform: none;
    }
}

/* ===== LANDSCAPE ORIENTATION OPTIMIZATIONS ===== */

/* Mobile Landscape - Multi-Column Recipe Grid */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .recipes-wrapper {
        padding: 80px 4vw 40px;
    }

    .page-title {
        font-size: clamp(1.8rem, 3.5vw, 2.4rem);
        margin-bottom: 18px;
    }

    .recipes-toolbar {
        flex-direction: row;
        gap: 12px;
        margin-bottom: 24px;
        flex-wrap: wrap;
    }

    .recipes-toolbar input[type=search] {
        flex: 1 1 240px;
        min-width: 200px;
        max-width: 300px;
    }

    .recipes-toolbar select {
        flex: 1 1 160px;
        min-width: 140px;
    }

    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
        margin-top: 20px;
    }

    .recipe-card {
        border-radius: 16px;
    }

    .recipe-body {
        padding: 18px 20px 22px;
    }

    .recipe-title {
        font-size: 1.15rem;
        margin-bottom: 10px;
    }

    .short-desc {
        font-size: 0.92rem;
        height: 2.8em;
    }

    .recipe-meta {
        margin-top: 14px;
        font-size: 0.88rem;
        gap: 12px;
    }
}

/* Tablet Landscape - 3-4 Column Grid */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .recipes-wrapper {
        padding: 88px 3.5vw 45px;
    }

    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }

    .recipe-card {
        border-radius: 18px;
    }

    .recipe-body {
        padding: 22px 24px 26px;
    }
}

/* Very Small Phone Landscape - 2 Column Compact */
@media (max-width: 740px) and (max-height: 420px) and (orientation: landscape) {
    .recipes-wrapper {
        padding: 64px 3vw 32px;
    }

    .page-title {
        font-size: clamp(1.5rem, 3vw, 2rem);
        margin-bottom: 14px;
    }

    .recipes-toolbar {
        gap: 10px;
        margin-bottom: 20px;
    }

    .recipes-toolbar input[type=search],
    .recipes-toolbar select {
        padding: 9px 14px;
        font-size: 0.92rem;
        border-radius: 8px;
    }

    .recipes-toolbar input[type=search] {
        flex: 1 1 200px;
        min-width: 180px;
        max-width: 260px;
    }

    .recipes-toolbar select {
        flex: 1 1 140px;
        min-width: 120px;
    }

    .recipes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-top: 16px;
    }

    .recipe-card {
        border-radius: 14px;
    }

    .recipe-body {
        padding: 14px 16px 18px;
    }

    .recipe-title {
        font-size: 1.05rem;
        margin-bottom: 8px;
    }

    .short-desc {
        font-size: 0.88rem;
        height: 2.6em;
        line-height: 1.3;
    }

    .recipe-meta {
        margin-top: 12px;
        font-size: 0.85rem;
        gap: 10px;
        flex-direction: row;
        justify-content: space-around;
    }

    .recipe-meta span {
        font-size: 0.85rem;
    }
}

/* ===== LOADING SKELETON ===== */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 24px;
}

.skeleton-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.skeleton-body {
    padding: 24px 26px 28px;
}

.skeleton-title {
    height: 24px;
    width: 80%;
    margin: 0 auto 12px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0.08) 100%
    );
    background-size: 200% 100%;
    border-radius: 8px;
    animation: shimmer 2s infinite;
}

.skeleton-desc {
    height: 16px;
    width: 100%;
    margin-bottom: 8px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    border-radius: 6px;
    animation: shimmer 2s infinite 0.2s;
}

.skeleton-desc:last-of-type {
    width: 70%;
}

.skeleton-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 16px;
}

.skeleton-meta-item {
    height: 18px;
    width: 80px;
    background: linear-gradient(
        90deg,
        rgba(123, 196, 99, 0.15) 0%,
        rgba(123, 196, 99, 0.3) 50%,
        rgba(123, 196, 99, 0.15) 100%
    );
    background-size: 200% 100%;
    border-radius: 6px;
    animation: shimmer 2s infinite 0.4s;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Responsive skeleton */
@media (max-width: 768px) {
    .skeleton-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }

    .skeleton-body {
        padding: 18px 20px 22px;
    }
}

@media (max-width: 600px) {
    .skeleton-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}
