/* ==========================================================================
   Premium 3D Recipes Page Styles
   ========================================================================== */
.recipes-page {
    overflow-x: hidden;
}

.recipes-container {
    max-width: var(--container-max-width, 1200px);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   1. 3D HERO BANNER SECTION
   ========================================================================== */
.recipes-hero-section {
    width: 100vw;
    height: 60vh;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* CSS Parallax Effect */
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

.recipes-hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Slight darkening so the glass pops */
    z-index: 1;
}

.glassmorphism-box {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3.5rem 3rem;
    border-radius: 16px;
    text-align: center;
    max-width: 700px;
    margin: 0 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    /* Continuous 3D Floating Animation */
    animation: glass-float 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes glass-float {
    0%, 100% { transform: translateY(0) translateZ(30px); }
    50% { transform: translateY(-15px) translateZ(30px); }
}

.glassmorphism-box h1 {
    color: #ffffff;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    margin-top: 0;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
    letter-spacing: -1px;
}

.glassmorphism-box p {
    color: rgba(255,255,255,0.95);
    font-size: 1.25rem;
    line-height: 1.6;
    margin: 0;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .recipes-hero-section {
        background-attachment: scroll; /* Disable parallax on mobile */
        height: auto;
        padding: 6rem 0;
    }
    .glassmorphism-box h1 {
        font-size: 2.5rem;
    }
    .glassmorphism-box p {
        font-size: 1.1rem;
    }
    .glassmorphism-box {
        padding: 2rem 1.5rem;
    }
}

/* ==========================================================================
   2. 3D RECIPE CARDS GRID
   ========================================================================== */
.recipes-grid-section {
    background-color: var(--color-bg-cream, #fdfbf7);
    padding: var(--section-padding-y, 6rem) 0 8rem;
}

.recipes-3d-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    perspective: 1500px;
}

@media (min-width: 768px) {
    .recipes-3d-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .recipes-3d-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Changed .3d-recipe-card to .recipe-card-3d because CSS classes cannot start with a number */
.recipe-card-3d {
    background: #ffffff;
    border-radius: 20px;
    transform-style: preserve-3d;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.recipe-card-3d:hover {
    transform: rotateX(5deg) rotateY(-5deg) translateZ(30px) translateY(-10px);
    box-shadow: 0 30px 60px rgba(4,92,47,0.15); /* Primary green tint shadow */
    z-index: 10;
}

.card-img-wrapper {
    width: 100%;
    height: 260px;
    overflow: hidden;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transform: translateZ(10px); /* Small depth inside the card */
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.recipe-card-3d:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.card-content {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    transform: translateZ(30px); /* Makes text pop out significantly */
}

.recipe-tag {
    color: var(--color-primary-green, #045c2f);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    display: inline-block;
}

.card-content h3 {
    margin: 0 0 1rem 0;
    color: var(--color-text-dark, #1a1a1a);
    font-size: 1.5rem;
    font-weight: 800;
}

.card-content p {
    color: var(--color-text-light, #4a4a4a);
    line-height: 1.7;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

.btn-read-recipe {
    color: var(--color-secondary-yellow, #f7b731);
    font-weight: 800;
    text-decoration: none;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.btn-read-recipe:hover {
    color: var(--color-primary-green, #045c2f);
}

.btn-read-recipe .arrow {
    display: inline-block;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.recipe-card-3d:hover .btn-read-recipe .arrow {
    transform: translateX(6px);
}

/* ==========================================================================
   Remove Astra Default Top Spacing (White Gap Fix)
   ========================================================================== */
#content,
.site-content,
.ast-container,
.site-main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
#masthead {
    margin-bottom: 0 !important;
}
.ast-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ==========================================================================
   Scroll Reveal Animations (Intersection Observer)
   ========================================================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: opacity, transform;
}

.scroll-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal.delay-1 { transition-delay: 0.1s; }
.scroll-reveal.delay-2 { transition-delay: 0.2s; }
.scroll-reveal.delay-3 { transition-delay: 0.3s; }

.scroll-reveal.fade-scale { transform: scale(0.9) translateY(40px); }

.scroll-reveal.in-view.fade-scale {
    transform: translate(0) scale(1);
}
