/* 
   Theme Name: EMeniu Theme - Single Recipe Styles
   Description: Modern, premium styles for single recipe pages.
*/

/* --- Variables & Typography --- */
:root {
    --color-primary: #5F6F56;
    /* Sage Green */
    --color-dark: #2c3e2e;
    --color-text: #555;
    --color-light-bg: #fdfbf7;
    /* Warm off-white */
    --color-white: #ffffff;
    --font-heading: 'DM Serif Display', serif;
    --font-body: 'Outfit', sans-serif;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.single-reteta {
    background-color: var(--color-light-bg);
    color: var(--color-text);
    font-family: var(--font-body);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--color-dark);
}

/* --- Hero Section --- */
.recipe-hero {
    position: relative;
    padding: 180px 0 100px;
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    margin-bottom: 60px;
    border-radius: 0 0 40px 40px;
    overflow: hidden;
}

.recipe-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(232, 222, 208, 0.4);
    z-index: 1;
}

.recipe-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.recipe-hero h1 {
    font-size: 3.5rem;
    color: white;
    /* Override default dark */
    margin-bottom: 20px;
    line-height: 1.2;
}

.recipe-excerpt {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
    font-weight: 300;
}

.recipe-meta-bar {
    display: inline-flex;
    gap: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
}

.meta-item .icon {
    font-size: 1.2rem;
}

/* --- Layout --- */
.recipe-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

/* --- Main Content Sections --- */
.recipe-section {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 40px;
}

.recipe-section h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* Ingredients */
.ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ingredients-list li {
    padding: 12px 0 12px 30px;
    /* Add left padding to accommodate the absolute icon */
    border-bottom: 1px dashed #eee;
    font-size: 1.05rem;
    position: relative;
    /* Keep relative for absolute child */
    display: block;
    /* Switch back to block to avoid flex conflicts with absolute */
    line-height: 1.5;
}

.ingredients-list li::before {
    content: '✓';
    /* Use checkmark consistent with main theme but styled here */
    color: var(--color-primary);
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: 12px;
    /* Align with top padding */
    line-height: 1;
    font-weight: 700;
    margin-right: 0;
    /* Reset margin */
}

/* Steps */
.recipe-steps {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
}

.recipe-steps li {
    position: relative;
    padding-left: 50px;
    margin-bottom: 25px;
    font-size: 1.05rem;
    line-height: 1.6;
    counter-increment: none;
}

.recipe-steps li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 35px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* --- Sidebar --- */
.recipe-sidebar {
    position: sticky;
    top: 40px;
    height: fit-content;
}

.nutrition-card,
.time-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 30px;
}

.nutrition-card h3,
.time-card h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--color-dark, #2c3e2e);
    font-family: var(--font-heading, serif);
    font-weight: 700;
}

.nutrition-note {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
    font-style: italic;
}

/* --- Improved Nutrition Cards with Better Alignment --- */
.nutrition-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
}

/* Special layout for the first row (calories gets full width) */
.nutrition-item:nth-child(1) {
    grid-column: 1 / -1; /* Full width for calories */
    background: #f8faf7; /* Slight green tint for calories highlight */
    border: 1px solid #e8f0e5;
}

.nutrition-item:nth-child(1) .nutrition-icon {
    background: #6f7f63; /* Brand color for calories icon */
}

.nutrition-item:nth-child(1) .nutrition-icon img {
    filter: brightness(0) invert(1); /* Make icon white */
}

.nutrition-item:nth-child(1) .nutrition-value {
    font-size: 1.4rem; /* Larger text for calories */
    color: #6f7f63; /* Brand color for calories value */
}

.nutrition-item {
    background: #ffffff;
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    min-height: 72px; /* Consistent height for all items */
}

.nutrition-item:hover {
    transform: translateY(-1px);
    border-color: var(--color-primary, #6f7f63);
    box-shadow: 0 6px 16px rgba(111, 127, 99, 0.12);
}

.nutrition-icon {
    width: 44px;
    height: 44px;
    background: #F4F7F3;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.nutrition-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nutrition-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    min-width: 0; /* Prevents text overflow issues */
}

.nutrition-label {
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 3px;
    line-height: 1.2;
}

.nutrition-value {
    color: var(--color-dark);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-body);
    line-height: 1.2;
}

/* --- Nutrition Cards: Mobile Responsive --- */
@media (max-width: 768px) {
    .nutrition-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 10px;
    }

    .nutrition-item:nth-child(1) {
        grid-column: 1; /* Reset full-width on mobile */
    }

    .nutrition-item:nth-child(1) .nutrition-value {
        font-size: 1.3rem; /* Slightly smaller on mobile but still prominent */
    }

    .nutrition-item {
        padding: 14px;
        min-height: 64px;
    }

    .nutrition-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .nutrition-icon img {
        width: 26px;
        height: 26px;
    }

    .nutrition-label {
        font-size: 0.75rem;
    }

    .nutrition-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .nutrition-card {
        padding: 20px;
    }

    .nutrition-item {
        padding: 12px;
        gap: 10px;
        min-height: 60px;
    }
}

/* --- Premium CTA --- */
.recipe-cta-box {
    background: #FDFBF7;
    /* Cream background matching front page */
    color: var(--color-dark);
    /* Dark text */
    padding: 60px 40px;
    border-radius: 24px;
    text-align: center;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.recipe-cta-box::after {
    content: '';
    display: none;
}

.recipe-cta-box h3 {
    color: var(--color-dark);
    /* Dark text */
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-family: 'DM Serif Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

.recipe-cta-box p {
    font-size: 1.15rem;
    opacity: 0.8;
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    color: #666;
}

.btn-cta-gold {
    background: #6F7F63;
    /* Sage Green */
    color: #ffffff;
    padding: 18px 50px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    box-shadow: 0 14px 34px rgba(111, 127, 99, 0.18);
    animation: premiumPulse 2.5s infinite;
}

.btn-cta-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 48px rgba(111, 127, 99, 0.25);
    background: #5F6F56;
    /* Darker Sage */
    color: white;
}

@keyframes premiumPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .recipe-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {

    /* Prevent overflow issues */
    .recipe-hero-content {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    /* Wrap meta items on mobile using Grid */
    .recipe-meta-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        justify-items: center;
        /* Center items in their cells */
        align-items: center;
        width: 100%;
        padding: 25px 20px;
        box-sizing: border-box;
        gap: 20px 10px;
        /* Vertical gap 20px, Horizontal gap 10px */
    }

    /* Make the favorite toggle span full width at top */
    .recipe-favorite-toggle {
        grid-column: 1 / -1;
        justify-self: center;
        margin-bottom: 5px;
        background: white !important;
        /* Stand out more */
        color: var(--color-primary) !important;
        width: 50px;
        height: 50px;
        line-height: 55px;
        /* Center icon vertically */
    }

    .recipe-favorite-toggle svg {
        fill: transparent;
        /* Default empty/transparent */
        stroke: var(--color-primary);
        stroke-width: 2px;
        transition: all 0.3s ease;
        width: 24px;
        height: 24px;
    }

    .recipe-favorite-toggle.active svg {
        fill: #e74c3c !important;
        /* Red heart when active */
        stroke: #e74c3c !important;
    }

    /* Ensure stats look good in grid */
    .meta-item {
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
        /* Center content within the flex item */
    }

    /* Reduce side padding for content sections */
    .recipe-section,
    .nutrition-card,
    .time-card {
        padding: 25px 20px;
    }

    .recipe-cta-box {
        padding: 40px 20px;
    }

    .recipe-cta-box h3 {
        font-size: 2rem;
    }
}
/* --- Toast Notification Styles --- */
.fav-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.fav-toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.fav-toast-img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.fav-toast-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fav-toast-content {
    flex-grow: 1;
}

.fav-toast-msg {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.fav-toast-link {
    font-size: 12px;
    color: #FF6B6B;
    text-decoration: none;
    font-weight: 500;
}

.fav-toast-link:hover {
    text-decoration: underline;
}

.fav-toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    align-self: flex-start;
}

.fav-toast-close:hover {
    color: #333;
}

@media (max-width: 480px) {
    .fav-toast {
        left: 20px;
        right: 20px;
        min-width: auto;
        bottom: 80px; /* Adjust if needed */
    }
}

/* --- Recipe Benefits Box --- */
.recipe-benefits-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.2) 100%);
    border-radius: 20px;
    padding: 35px 40px;
    margin-top: 50px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.1);
    position: relative;
    overflow: hidden;
}

.recipe-benefits-box::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.recipe-benefits-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.benefits-icon {
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: gentleGlow 3s ease-in-out infinite;
}

@keyframes gentleGlow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 4px 12px rgba(251, 191, 36, 0.4));
    }
}

.recipe-benefits-header h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #92400E;
    margin: 0;
    line-height: 1.3;
}

.recipe-benefits-content {
    color: #78350F;
    font-size: 1.05rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.recipe-benefits-content p {
    margin: 0;
}

/* Remove quotes from benefits text if present */
.recipe-benefits-content {
    quotes: none;
}

/* Responsive Benefits Box */
@media (max-width: 768px) {
    .recipe-benefits-box {
        padding: 25px 20px;
        margin-top: 40px;
        border-radius: 16px;
    }

    .recipe-benefits-header {
        gap: 12px;
        margin-bottom: 15px;
    }

    .benefits-icon {
        font-size: 2rem;
    }

    .recipe-benefits-header h3 {
        font-size: 1.3rem;
    }

    .recipe-benefits-content {
        font-size: 0.95rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .recipe-benefits-box {
        padding: 20px 15px;
    }

    .benefits-icon {
        font-size: 1.8rem;
    }

    .recipe-benefits-header h3 {
        font-size: 1.2rem;
    }
}
