/* ==========================================================================
   Ma and Pa's Kitchen - Shared Recipe Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Mukta+Mahee:wght@400;600;700;800&family=Noto+Sans+Gurmukhi:wght@400;600;700&family=Poppins:wght@300;400;600;700&family=Yatra+One&display=swap');

:root {
    --primary: #c2410c;
    --secondary: #9a3412;
    --bg: #fff7ed;
    --card-bg: #ffffff;
    --accent: #15803d;
    --text: #333333;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    line-height: 1.6;
}

/* Scroll Progress Bar */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 1000;
    transition: width 0.15s ease-out;
}

/* Top Navigation Bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 18px 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.back-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
    color: var(--secondary);
    transform: translateX(-3px);
}

.back-link .back-arrow {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.2s ease;
}

.back-link:hover .back-arrow {
    transform: translateX(-3px);
}

.nav-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(194, 65, 12, 0.2);
    transition: transform 0.25s ease;
    flex-shrink: 0;
    display: block;
}

.back-link:hover .nav-brand-icon {
    transform: rotate(-6deg) scale(1.06);
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.18;
}

.nav-brand-title {
    font-family: 'Amita', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary);
    letter-spacing: 0.3px;
}

.nav-brand-sub {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #5c4438;
    opacity: 0.85;
}

.kitchen-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: white;
    border: 1.5px solid rgba(0,0,0,0.12);
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.action-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Language Switch Container & Segmented Control */
.lang-switch-container,
.toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 15px auto 25px auto;
    position: relative;
    z-index: 10;
}

.lang-switch-container span,
.toggle-container > span {
    font-weight: 600;
    color: var(--secondary);
    font-family: 'Yatra One', cursive;
    font-size: 1.1rem;
}

.lang-segmented-control {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 30px;
    padding: 4px;
    gap: 4px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.lang-pill {
    background: transparent;
    border: none;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.lang-pill[data-lang="pa"] {
    font-family: 'Mukta Mahee', 'Noto Sans Gurmukhi', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
}

.lang-pill[data-lang="hi"] {
    font-family: 'Yatra One', cursive;
    font-size: 1.05rem;
}

.lang-pill:hover {
    color: var(--primary);
    background: rgba(194, 65, 12, 0.08);
}

.lang-pill.active {
    background: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(194, 65, 12, 0.3);
    transform: translateY(-1px);
}

.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Main Container */
.container {
    max-width: 800px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

/* Recipe Header */
.recipe-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out;
}

.recipe-header h1 {
    font-family: 'Yatra One', cursive;
    color: var(--primary);
    font-size: 3.2rem;
    margin: 0 0 10px 0;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.06);
}

.recipe-header p {
    color: var(--secondary);
    font-size: 1.15rem;
    font-style: italic;
    margin: 0 auto;
    max-width: 650px;
}

/* Hero Image */
.hero-image-container {
    width: 100%;
    height: 380px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    margin-bottom: 45px;
    overflow: hidden;
    animation: zoomIn 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-color: #f1f5f9;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Recipe Steps */
.step {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 30px;
    padding-left: 105px;
    margin-bottom: 35px;
    position: relative;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    opacity: 1;
    transform: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    border-left: 6px solid var(--accent);
}

.step.visible {
    opacity: 1;
    transform: none;
}

.step:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.step:nth-child(even) {
    padding-left: 30px;
    padding-right: 105px;
    border-left: none;
    border-right: 6px solid var(--primary);
    text-align: left;
}

/* Completed Step State */
.step.completed {
    background-color: #f0fdf4;
    border-color: #16a34a !important;
    box-shadow: inset 0 0 0 1px #16a34a, 0 4px 12px rgba(22, 163, 74, 0.08);
}

.step.completed h3 {
    color: #15803d !important;
}

.step.completed::after {
    content: '✓ Done';
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 0.95rem;
    color: #16a34a;
    font-weight: 700;
    background: #dcfce7;
    padding: 2px 10px;
    border-radius: 12px;
}

.step:nth-child(even).completed::after {
    right: auto;
    left: 18px;
}

/* Step Image Thumbnail */
.step-image-container {
    position: absolute;
    top: 50%;
    left: -50px;
    transform: translateY(-50%);
    width: 125px;
    height: 125px;
    border-radius: 50%;
    border: 5px solid var(--bg);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    background-color: #ffedd5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
}

.step:nth-child(even) .step-image-container {
    left: auto;
    right: -50px;
}

.step-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.step-image:hover {
    transform: scale(1.08);
}

.step h3 {
    color: var(--secondary);
    font-family: 'Yatra One', cursive;
    font-size: 1.45rem;
    margin-top: 0;
    margin-bottom: 8px;
}

.step p {
    line-height: 1.68;
    margin: 0;
    color: #334155;
    font-size: 1.05rem;
}

.step b,
.step strong {
    color: #0f172a;
    font-weight: 650;
}

/* Flame & Heat Badges */
.flame-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    color: #c2410c;
    background: #ffedd5;
    border: 1px solid #fed7aa;
    padding: 2px 9px;
    border-radius: 12px;
    vertical-align: middle;
    margin-left: 8px;
    letter-spacing: 0;
    line-height: 1.3;
}

/* Devanagari (Hindi) Typography Polish */
.lang-hi {
    line-height: 1.85;
}

.lang-hi p {
    line-height: 1.85;
}

.lang-hi h1, .lang-hi h2, .lang-hi h3 {
    line-height: 1.35;
    letter-spacing: 0.01em;
}

/* Ingredients Section */
.ingredients-section {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 35px 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    margin-top: 55px;
    border-top: 6px solid var(--primary);
    opacity: 1;
    transform: none;
}

.ingredients-section.visible {
    opacity: 1;
    transform: none;
}

.ingredients-section h2 {
    font-family: 'Yatra One', cursive;
    color: var(--primary);
    text-align: center;
    font-size: 2.2rem;
    margin: 0 0 10px 0;
}

.ingredients-hint {
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 25px;
}

.ingredients-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 40px;
}

.ingredients-section li {
    padding: 10px 8px;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 1.08rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.ingredients-section li:hover {
    background-color: #f8fafc;
}

.ingredients-section li.checked {
    text-decoration: line-through;
    color: #94a3b8;
    background-color: #f1f5f9;
}

.ingredients-section li.checked .qty {
    color: #94a3b8;
}

.qty {
    font-weight: 600;
    color: var(--secondary);
    margin-right: 8px;
    display: inline-block;
    min-width: 65px;
}

/* Original Notes Section */
.original-notes {
    margin-top: 65px;
    text-align: center;
    opacity: 1;
    transform: none;
}

.original-notes.visible {
    opacity: 1;
    transform: none;
}

.original-notes h2 {
    font-family: 'Yatra One', cursive;
    color: var(--primary);
    font-size: 2.4rem;
    margin-bottom: 6px;
}

.original-notes p {
    color: var(--secondary);
    font-style: italic;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.notes-gallery {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.note-img {
    max-width: 100%;
    width: 460px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 8px solid white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
}

.note-img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.22);
}

/* Trilingual Display Rules */
.lang-hi,
.lang-pa {
    display: none;
}

body.show-hindi .lang-en,
body.show-hindi .lang-pa {
    display: none !important;
}

body.show-hindi .lang-hi {
    display: block !important;
    animation: fadeIn 0.35s ease;
}

body.show-punjabi .lang-en,
body.show-punjabi .lang-hi {
    display: none !important;
}

body.show-punjabi .lang-pa {
    display: block !important;
    animation: fadeIn 0.35s ease;
}

/* Inline trilingual elements inside buttons, chips, meta labels */
span.lang-hi, span.lang-pa,
a.lang-hi, a.lang-pa,
strong.lang-hi, strong.lang-pa,
b.lang-hi, b.lang-pa {
    display: none;
}

body.show-hindi span.lang-hi,
body.show-hindi a.lang-hi,
body.show-hindi strong.lang-hi,
body.show-hindi b.lang-hi {
    display: inline-block !important;
    animation: none;
}

body.show-punjabi span.lang-pa,
body.show-punjabi a.lang-pa,
body.show-punjabi strong.lang-pa,
body.show-punjabi b.lang-pa {
    display: inline-block !important;
    animation: none;
}

body:not(.show-hindi):not(.show-punjabi) span.lang-en,
body:not(.show-hindi):not(.show-punjabi) a.lang-en,
body:not(.show-hindi):not(.show-punjabi) strong.lang-en,
body:not(.show-hindi):not(.show-punjabi) b.lang-en {
    display: inline-block !important;
}

/* Fallback: If recipe section has no Punjabi translation, show English */
body.show-punjabi .fallback-show-en {
    display: block !important;
}

/* Gurmukhi & Hindi Typography Enhancements */
.lang-pa {
    font-family: 'Mukta Mahee', 'Noto Sans Gurmukhi', sans-serif;
    line-height: 1.85;
}

.recipe-header .lang-pa h1,
.lang-pa h1,
.lang-pa h2,
.lang-pa h3 {
    font-family: 'Mukta Mahee', 'Noto Sans Gurmukhi', sans-serif;
    font-weight: 700;
}

.recipe-header .lang-hi h1,
.lang-hi h1,
.lang-hi h2,
.lang-hi h3 {
    font-family: 'Yatra One', cursive;
}

/* Cook Mode Notification Banner */
.cook-mode-banner {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1e293b;
    color: #f8fafc;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 1000;
    align-items: center;
    gap: 8px;
    border: 1px solid #334155;
    animation: slideUp 0.3s ease;
}

body.cook-mode-on .cook-mode-banner {
    display: flex;
}

/* Photo Lightbox Modal */
#photo-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#photo-lightbox.open {
    display: flex;
}

#photo-lightbox img {
    max-width: min(850px, 92vw);
    max-height: 88vh;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
    border: 3px solid rgba(255,255,255,0.2);
    object-fit: contain;
    animation: lbPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#photo-lightbox .lb-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: rgba(255,255,255,0.8);
    font-size: 2.4rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    user-select: none;
}

#photo-lightbox .lb-close:hover {
    color: #fff;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes lbPop {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

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

/* Mobile Responsive Adjustments */
@media (max-width: 680px) {
    .top-nav {
        padding: 12px 16px;
    }
    .back-link {
        font-size: 0.95rem;
    }
    .action-btn {
        padding: 5px 10px;
        font-size: 0.82rem;
    }
    .recipe-header h1 {
        font-size: 2.3rem;
    }
    .recipe-header p {
        font-size: 1.05rem;
    }
    .hero-image-container {
        height: 250px;
        border-radius: 14px;
    }
    .step {
        padding: 24px 20px 20px 20px;
        padding-top: 55px;
        text-align: left;
        border-left: 4px solid var(--accent);
        border-right: none !important;
    }
    .step:nth-child(even) {
        text-align: left;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 55px;
        border-left: 4px solid var(--primary);
    }
    .step-image-container {
        position: absolute;
        top: -35px;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
        width: 85px;
        height: 85px;
    }
    .step h3 {
        text-align: center;
        font-size: 1.3rem;
        margin-top: 10px;
    }
    .ingredients-section {
        padding: 25px 18px;
    }
    .ingredients-section ul {
        columns: 1;
    }
    .original-notes h2 {
        font-size: 2rem;
    }
    .note-img {
        width: 100%;
    }
}

/* ── Inline Step Timers ─────────────────────────────────────────────────── */
.step-timer-wrapper {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.step:nth-child(even) .step-timer-wrapper {
    justify-content: flex-start;
}

@media (max-width: 680px) {
    .step:nth-child(even) .step-timer-wrapper,
    .step-timer-wrapper {
        justify-content: center;
    }
}

.timer-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff7ed;
    border: 1.5px solid #ea580c;
    color: #c2410c;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.timer-chip:hover {
    background: #ea580c;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25);
}

.timer-chip.running {
    background: #ea580c;
    color: white;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25);
    animation: pulseGlow 1.5s infinite;
}

.timer-chip.finished {
    background: #15803d;
    border-color: #15803d;
    color: white;
    animation: bounce 0.5s ease;
}

.timer-controls {
    display: inline-flex;
    gap: 6px;
}

.timer-sub-btn {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 3px 9px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s ease;
}

.timer-sub-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* ── Thali Pairings ("Complete the Meal") ──────────────────────────────── */
.thali-pairing-section {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 35px 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    margin-top: 55px;
    border-top: 6px solid var(--accent);
    opacity: 1;
    transform: none;
}

.thali-pairing-section.visible {
    opacity: 1;
    transform: none;
}

.thali-pairing-section h2 {
    font-family: 'Yatra One', cursive;
    color: var(--primary);
    text-align: center;
    font-size: 2rem;
    margin: 0 0 6px 0;
}

.thali-subtitle {
    text-align: center;
    font-style: italic;
    color: var(--secondary);
    font-size: 1rem;
    margin-bottom: 25px;
}

.pairing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.pairing-card {
    background: #fdfbf7;
    border: 1.5px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.pairing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: var(--primary);
    background: white;
}

.pairing-icon {
    font-size: 2.4rem;
    line-height: 1;
}

.pairing-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--primary);
}

.pairing-tag {
    font-size: 0.8rem;
    color: #64748b;
}

/* ── Share Bar & Copy Link ─────────────────────────────────────────────── */
.share-actions-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 25px 0 10px 0;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.share-btn-whatsapp {
    background: #25D366;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.share-btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.share-btn-copy {
    background: white;
    color: var(--text);
    border-color: #cbd5e1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.share-btn-copy:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: #f8fafc;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Maa's Kitchen Secrets (The Khansama's Science) ────────────────────── */
.kitchen-secrets-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left: 6px solid #d97706;
    border-radius: 16px;
    padding: 24px 28px;
    margin: 35px 0 25px 0;
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.08);
    position: relative;
    overflow: hidden;
}

.kitchen-secrets-card::after {
    content: '💡';
    position: absolute;
    right: 20px;
    bottom: 10px;
    font-size: 4.5rem;
    opacity: 0.12;
    pointer-events: none;
}

.secrets-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.secrets-badge {
    font-family: 'Yatra One', cursive;
    color: #92400e;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.secrets-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #451a03;
    margin: 0;
}

/* ── Smart Serving Scaler ─────────────────────────────────────────────── */
.serving-scaler-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
}

.scaler-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 30px;
}

.scaler-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
}

.scaler-btn {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 3px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scaler-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.scaler-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.scaler-safeguard {
    font-size: 0.82rem;
    color: #64748b;
    font-style: italic;
    text-align: center;
    max-width: 580px;
    line-height: 1.4;
}

/* ── Interactive Diary Transcription Viewer ──────────────────────────── */
.diary-view-modes {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.diary-mode-btn {
    background: white;
    border: 1.5px solid #cbd5e1;
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.diary-mode-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.diary-mode-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.transcription-card {
    display: none;
    background: #fffdfa;
    border: 2px dashed rgba(146, 64, 14, 0.3);
    border-radius: 14px;
    padding: 25px 30px;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    font-family: 'Poppins', sans-serif;
    color: #2c241b;
}

.transcription-card h4 {
    font-family: 'Yatra One', cursive;
    color: var(--primary);
    font-size: 1.3rem;
    margin: 0 0 12px 0;
    border-bottom: 1px solid #fde68a;
    padding-bottom: 6px;
}

.transcription-text {
    font-size: 1.05rem;
    line-height: 1.8;
    white-space: pre-line;
}

.transcription-note {
    font-size: 0.85rem;
    color: #78350f;
    font-style: italic;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
}

/* Side-by-side mode */
.notes-container-side-by-side {
    display: flex;
    gap: 25px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.notes-container-side-by-side .notes-gallery,
.notes-container-side-by-side .transcription-card {
    flex: 1 1 380px;
    max-width: 480px;
}

/* ==========================================================================
   Punjabi Heritage Background, Punjab Map Watermark & Floating Motifs
   ========================================================================== */

/* Floating Heritage & Ingredient Background Layer */
.floating-heritage-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-icon {
    display: none !important;
}

.heritage-particle {
    position: fixed;
    bottom: -60px;
    font-size: 1.65rem;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    user-select: none;
    animation: floatUpHeritage 28s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    will-change: transform, opacity;
}

.heritage-particle.gurmukhi {
    font-family: 'Mukta Mahee', 'Noto Sans Gurmukhi', serif;
    font-weight: 500;
    color: var(--primary);
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
}

.heritage-particle.punjab-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.heritage-particle.punjab-map svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    opacity: 0.5;
}

@keyframes floatUpHeritage {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.85);
        opacity: 0;
    }
    15% {
        opacity: 0.05;
    }
    50% {
        opacity: 0.075;
        transform: translateY(-55vh) rotate(10deg) scale(1.02);
    }
    85% {
        opacity: 0.045;
    }
    100% {
        transform: translateY(-118vh) rotate(-10deg) scale(0.88);
        opacity: 0;
    }
}

/* Embossed Map of Punjab Watermark */
.punjab-map-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(84vw, 680px);
    height: min(84vw, 680px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.028;
    mix-blend-mode: multiply;
    transition: opacity 0.5s ease;
}

.punjab-map-watermark svg {
    width: 100%;
    height: 100%;
    stroke: var(--primary);
    fill: none;
}

/* Margin Embossed Gurmukhi Glyphs (Wide screens) */
.margin-embossed-letter {
    position: fixed;
    font-family: 'Mukta Mahee', 'Noto Sans Gurmukhi', serif;
    font-weight: 600;
    color: var(--primary);
    opacity: 0.02;
    user-select: none;
    pointer-events: none;
    z-index: 0;
    font-size: 3rem;
    line-height: 1;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
    transition: opacity 0.3s ease;
}

@media (max-width: 1024px) {
    .margin-embossed-letter {
        display: none !important;
    }
}

/* ── Chandigarh Heritage Embossed Seal ───────────────────────────────── */
.chandigarh-seal {
    display: inline-block;
    width: 140px;
    height: 140px;
    color: var(--earth, #5c4438);
    position: relative;
    user-select: none;
    transition: transform 0.3s ease, filter 0.3s ease;
    transform: rotate(-3deg);
    filter: drop-shadow(0 4px 10px rgba(92, 68, 56, 0.08));
}

.chandigarh-seal:hover {
    transform: rotate(0deg) scale(1.05);
    filter: drop-shadow(0 6px 18px rgba(194, 65, 12, 0.2));
}

.chandigarh-seal .seal-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Top Quick Action Bar (Sally's Jump & Action Group) ───────────────── */
.quick-action-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 22px auto 28px;
    position: relative;
    z-index: 10;
}

.quick-action-btn {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(194, 65, 12, 0.25);
    border-radius: 25px;
    padding: 8px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.22s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.quick-action-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(194, 65, 12, 0.25);
}

.quick-action-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ── Standardized Maa's Recipe Card Box (Sally's Tasty Recipes Box) ───── */
.recipe-card-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 26px;
    border: 2px solid rgba(194, 65, 12, 0.22);
    box-shadow: 0 16px 45px rgba(92, 68, 56, 0.1);
    padding: 36px 32px;
    margin: 35px 0 45px 0;
    position: relative;
    overflow: hidden;
}

.recipe-card-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.rc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1.5px solid rgba(92, 68, 56, 0.12);
    padding-bottom: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.rc-title-block h2 {
    font-family: 'Amita', serif;
    font-size: 2.2rem;
    color: var(--saag-green, var(--primary));
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.rc-badge-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.rc-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.rc-diet-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    color: #166534;
    font-weight: 600;
    font-size: 0.86rem;
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid rgba(22, 101, 52, 0.2);
}

.rc-origin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #1e40af;
    font-weight: 600;
    font-size: 0.86rem;
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.rc-header {
    position: relative;
}

.rc-chandigarh-stamp {
    position: absolute;
    right: 85px;
    top: -8px;
    width: 90px;
    height: 90px;
    opacity: 0.28;
    pointer-events: none;
    transform: rotate(8deg);
    color: var(--primary, #c2410c);
    transition: opacity 0.3s ease;
}

@media (max-width: 680px) {
    .rc-chandigarh-stamp {
        display: none;
    }
}

.rc-actions {
    display: flex;
    gap: 8px;
}

/* Key Meta Grid */
.rc-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    background: #fffdfa;
    border: 1.5px solid rgba(92, 68, 56, 0.08);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 28px;
}

.rc-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.rc-meta-icon {
    font-size: 1.45rem;
    margin-bottom: 4px;
}

.rc-meta-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.rc-meta-val {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-dark, #2c241b);
}

/* Ingredients Section inside Recipe Card */
.recipe-card-box .ingredients-section {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.recipe-card-box .ingredients-section h2 {
    font-family: 'Amita', serif;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.recipe-card-box .ingredients-section ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.recipe-card-box .ingredients-section li {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1.5px solid rgba(92, 68, 56, 0.12);
    border-radius: 14px;
    padding: 10px 16px;
    font-size: 0.98rem;
    color: var(--text-dark, #2c241b);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.recipe-card-box .ingredients-section li:hover {
    border-color: var(--primary);
    background: #fffdfa;
    transform: translateY(-1px);
}

.recipe-card-box .ingredients-section li.checked {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #94a3b8;
    text-decoration: line-through;
}

.ingr-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(92, 68, 56, 0.35);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
}

.recipe-card-box .ingredients-section li.checked .ingr-checkbox {
    background: var(--saag-green, #15803d);
    border-color: var(--saag-green, #15803d);
    color: #ffffff;
}

.recipe-card-box .ingredients-section li.checked .ingr-checkbox::after {
    content: '✓';
}

.rc-jump-steps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 25px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1.5px solid #cbd5e1;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.96rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

/* ── Reach Extensions: WhatsApp Grocery, Diaspora Notes, Glossary & Modals ── */
.grocery-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #ffffff !important;
    border: none;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.28);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    text-decoration: none;
}

.grocery-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.diaspora-substitutions-box {
    margin: 22px 0 28px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.65), rgba(255, 251, 235, 0.85));
    border-left: 4.5px solid #d97706;
    border-radius: 14px;
    font-size: 0.95rem;
    color: #78350f;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.07);
    position: relative;
}

.diaspora-substitutions-box h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.diaspora-substitutions-box p {
    margin: 0;
    line-height: 1.6;
    color: #451a03;
}

/* Modals: Visual Nuskhe Card & Glossary */
.recipe-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.28s ease;
}

.recipe-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.recipe-modal-content {
    background: #ffffff;
    border-radius: 24px;
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.recipe-modal-overlay.active .recipe-modal-content {
    transform: scale(1);
}

.recipe-modal-close {
    position: absolute;
    top: 16px; right: 18px;
    background: #f1f5f9;
    border: none;
    font-size: 1.3rem;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
}

.recipe-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Glossary Terms */
.glossary-grid {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.glossary-card {
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 14px;
    padding: 14px 16px;
    transition: border-color 0.2s;
}

.glossary-card:hover {
    border-color: #d97706;
}

.glossary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.glossary-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #78350f;
    font-family: 'Mukta Mahee', 'Playfair Display', serif;
}

.glossary-desc {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #44403c;
}

.glossary-audio-btn {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #b45309;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.18s ease;
}

.glossary-audio-btn:hover {
    background: #fde68a;
    transform: scale(1.04);
}

/* Seasonal Filter Pills on Index */
.seasonal-pills-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 18px auto 25px auto;
    max-width: 860px;
    padding: 0 10px;
}

.seasonal-pill {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.seasonal-pill:hover {
    border-color: var(--primary, #c2410c);
    color: var(--primary, #c2410c);
    transform: translateY(-1px);
}

.seasonal-pill.active {
    background: linear-gradient(135deg, #c2410c, #ea580c);
    color: #ffffff;
    border-color: #c2410c;
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.25);
}

/* Print Optimization */
@media print {
    #progress-bar,
    .top-nav,
    .quick-action-bar,
    .lang-switch-container,
    .toggle-container,
    .lang-segmented-control,
    .kitchen-actions,
    .cook-mode-banner,
    .step-timer-wrapper,
    .thali-pairing-section,
    .share-actions-bar,
    .toast-notification,
    .serving-scaler-wrapper,
    .diary-view-modes,
    .floating-heritage-layer,
    .heritage-particle,
    .bg-icon,
    .punjab-map-watermark,
    .margin-embossed-letter,
    #photo-lightbox,
    .recipe-modal-overlay,
    .grocery-whatsapp-btn,
    .rc-jump-steps-btn,
    .original-notes,
    .rc-actions,
    .back-link {
        display: none !important;
    }

    body {
        background: white !important;
        color: #000 !important;
        background-image: none !important;
        font-size: 11pt !important;
        line-height: 1.5 !important;
    }

    .container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .recipe-card-box {
        border: 2px solid #333 !important;
        box-shadow: none !important;
        padding: 18px !important;
        margin-bottom: 20px !important;
        break-inside: avoid;
    }

    .rc-meta-grid {
        border: 1px solid #666 !important;
        background: white !important;
        padding: 10px !important;
    }

    .step {
        border: 1px solid #ddd !important;
        border-left: 4px solid #333 !important;
        box-shadow: none !important;
        break-inside: avoid;
        margin-bottom: 12px !important;
        padding: 12px !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .step-image-container {
        display: none !important;
    }

    .ingredients-section li {
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
}
