/* ==========================================================================
   Family Recipes Design System
   "One Family, Three Homelands, A Thousand Recipes"
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --fr-green-deep: #2D5F3E;
    --fr-green-light: #8FBC8F;
    --fr-gold: #D4A843;
    --fr-gold-light: #F5E6C8;
    --fr-terracotta: #C1694F;
    --fr-protea-pink: #D4838F;
    --fr-sky-blue: #6BA3C7;
    --fr-navy: #2C3E50;
    --fr-cream: #FFF8F0;
    --fr-white: #FFFFFF;
    --fr-text: #2C3E50;
    --fr-text-muted: #6c757d;
    --fr-shadow-sm: 0 2px 4px rgba(44, 62, 80, 0.08);
    --fr-shadow: 0 4px 12px rgba(44, 62, 80, 0.12);
    --fr-shadow-lg: 0 8px 24px rgba(44, 62, 80, 0.16);
    --fr-radius: 12px;
    --fr-radius-sm: 8px;
    --fr-radius-lg: 16px;
    --fr-transition: 0.2s ease;
}

/* ---------- Typography (Google Fonts loaded in _Layout) ---------- */
html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--fr-text);
    background-color: var(--fr-cream);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.font-heading {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    color: var(--fr-navy);
}

.font-handwritten {
    font-family: 'Caveat', cursive;
    font-weight: 600;
}

/* ---------- Layout ---------- */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper > main {
    flex: 1;
}

/* ---------- Navbar ---------- */
.navbar-family {
    background: linear-gradient(135deg, var(--fr-navy) 0%, var(--fr-green-deep) 100%);
    box-shadow: var(--fr-shadow);
    padding: 0.75rem 0;
}

.navbar-family .navbar-brand {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--fr-gold-light) !important;
    letter-spacing: 0.5px;
}

.navbar-family .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--fr-radius-sm);
    transition: all var(--fr-transition);
}

.navbar-family .nav-link:hover,
.navbar-family .nav-link:focus {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* ---------- Buttons ---------- */
.btn-warm {
    background: linear-gradient(135deg, var(--fr-gold), #e6b84d);
    color: var(--fr-navy);
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: var(--fr-radius-sm);
    transition: all var(--fr-transition);
    box-shadow: var(--fr-shadow-sm);
}

.btn-warm:hover {
    background: linear-gradient(135deg, #e6b84d, var(--fr-gold));
    transform: translateY(-1px);
    box-shadow: var(--fr-shadow);
    color: var(--fr-navy);
}

.btn-green {
    background: linear-gradient(135deg, var(--fr-green-deep), #3a7a50);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: var(--fr-radius-sm);
    transition: all var(--fr-transition);
}

.btn-green:hover {
    background: linear-gradient(135deg, #3a7a50, var(--fr-green-deep));
    transform: translateY(-1px);
    box-shadow: var(--fr-shadow);
    color: #fff;
}

/* ---------- Cards ---------- */
.card-recipe {
    background: var(--fr-white);
    border: none;
    border-radius: var(--fr-radius);
    box-shadow: var(--fr-shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.card-recipe:hover {
    transform: translateY(-4px);
    box-shadow: var(--fr-shadow-lg);
}

.card-recipe .card-img-top {
    height: 220px;
    object-fit: cover;
}

.card-recipe .card-body {
    padding: 1.25rem;
}

.card-recipe .card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fr-navy);
    margin-bottom: 0.5rem;
}

.card-recipe .recipe-meta {
    font-size: 0.85rem;
    color: var(--fr-text-muted);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-recipe .recipe-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Placeholder for recipes without photos — letter avatar by category */
.recipe-img-placeholder {
    height: 220px;
    background: linear-gradient(135deg, var(--fr-green-light), var(--fr-gold-light));
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-letter {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255,255,255, 0.25);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Category colour palettes */
.recipe-img-placeholder[data-category="British Classics"] {
    background: linear-gradient(135deg, var(--fr-navy), #4a6b82);
}
.recipe-img-placeholder[data-category="South African"] {
    background: linear-gradient(135deg, var(--fr-terracotta), #d98a72);
}
.recipe-img-placeholder[data-category="New Zealand"] {
    background: linear-gradient(135deg, var(--fr-sky-blue), #8fc1db);
}
.recipe-img-placeholder[data-category="Baking"] {
    background: linear-gradient(135deg, var(--fr-gold), #e6c76b);
}
.recipe-img-placeholder[data-category="Desserts"] {
    background: linear-gradient(135deg, var(--fr-protea-pink), #e2a5ae);
}
.recipe-img-placeholder[data-category="Soups and Stews"] {
    background: linear-gradient(135deg, var(--fr-green-deep), #4a8a62);
}
.recipe-img-placeholder[data-category="Salads"] {
    background: linear-gradient(135deg, var(--fr-green-light), #b5d8b5);
}
.recipe-img-placeholder[data-category="Breakfast"] {
    background: linear-gradient(135deg, #E8913A, #f0b06a);
}

/* ---------- Badge ---------- */
.badge-category {
    background-color: var(--fr-green-deep);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3em 0.7em;
    border-radius: 50px;
}

.badge-dish {
    background-color: var(--fr-terracotta);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3em 0.7em;
    border-radius: 50px;
}

/* ---------- Hero Section ---------- */
.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 3rem 1rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(44, 62, 80, 0.6) 0%, rgba(45, 95, 62, 0.7) 100%);
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 0.5rem;
}

.hero-section .hero-tagline {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--fr-gold-light);
}

/* ---------- Section Headings ---------- */
.section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    color: var(--fr-navy);
    margin-bottom: 0.25rem;
}

.section-subheading {
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    color: var(--fr-terracotta);
    margin-bottom: 2rem;
}

/* ---------- Filter Bar ---------- */
.filter-bar {
    background: var(--fr-white);
    border-radius: var(--fr-radius);
    padding: 1.25rem;
    box-shadow: var(--fr-shadow-sm);
    margin-bottom: 2rem;
}

.filter-bar .form-control,
.filter-bar .form-select {
    border-radius: var(--fr-radius-sm);
    border-color: #dee2e6;
}

.filter-bar .form-control:focus,
.filter-bar .form-select:focus {
    border-color: var(--fr-green-deep);
    box-shadow: 0 0 0 0.2rem rgba(45, 95, 62, 0.15);
}

/* ---------- Recipe Detail Page ---------- */
.recipe-hero-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--fr-radius-lg);
    box-shadow: var(--fr-shadow);
}

.recipe-at-a-glance {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    border-bottom: 2px solid var(--fr-gold-light);
    margin-bottom: 1.5rem;
}

.recipe-at-a-glance .glance-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--fr-text-muted);
}

.recipe-at-a-glance .glance-item strong {
    color: var(--fr-text);
}

.recipe-story {
    background: var(--fr-gold-light);
    border-left: 4px solid var(--fr-gold);
    border-radius: 0 var(--fr-radius-sm) var(--fr-radius-sm) 0;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.recipe-story .story-label {
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    color: var(--fr-terracotta);
    font-style: normal;
    margin-bottom: 0.5rem;
}

.recipe-ingredients {
    background: var(--fr-white);
    border-radius: var(--fr-radius);
    padding: 1.5rem;
    box-shadow: var(--fr-shadow-sm);
}

.recipe-ingredients h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--fr-green-deep);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.recipe-ingredients ul {
    list-style: none;
    padding: 0;
}

.recipe-ingredients ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-left: 1.5rem;
    position: relative;
}

.recipe-ingredients ul li::before {
    content: '\2022';
    color: var(--fr-green-deep);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.recipe-method ol {
    padding-left: 0;
    counter-reset: step-counter;
    list-style: none;
}

.recipe-method ol li {
    counter-increment: step-counter;
    padding: 0.75rem 0 0.75rem 3rem;
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.recipe-method ol li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 2rem;
    height: 2rem;
    background: var(--fr-green-deep);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.recipe-notes {
    background: linear-gradient(135deg, #FFF8F0, #FEF3E2);
    border-radius: var(--fr-radius);
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px dashed var(--fr-gold);
}

.recipe-notes .notes-label {
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    color: var(--fr-terracotta);
    margin-bottom: 0.5rem;
}

/* ---------- Latest Recipes - Rotating Flag Background ---------- */
.latest-recipes-section {
    position: relative;
    overflow: hidden;
}

.flag-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.flag-bg-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.flag-bg-img--active {
    opacity: 0.08;
}

/* ---------- Family Photo Banner ---------- */
.family-banner {
    background: var(--fr-gold-light);
    padding: 1rem 0 1.25rem;
    text-align: center;
    overflow: hidden;
}

.family-banner-label {
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    color: var(--fr-terracotta);
    margin-bottom: 0.75rem;
}

.family-banner-strip {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0 1rem;
}

.family-banner-slot {
    position: relative;
    width: 140px;
    height: 105px;
    flex-shrink: 0;
    border-radius: var(--fr-radius-sm);
    overflow: hidden;
    box-shadow: var(--fr-shadow-sm);
}

.family-banner-slot img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 1.2s ease;
}

.family-banner-slot img.banner-fade-out {
    opacity: 0;
}

/* ---------- Heritage Footer ---------- */
.heritage-footer {
    background: linear-gradient(135deg, var(--fr-navy) 0%, var(--fr-green-deep) 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: 2rem 0 1rem;
}

.heritage-footer .flag-strip {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.heritage-footer .flag-item {
    text-align: center;
    flex: 0 1 auto;
}

.heritage-footer .flag-item img {
    width: 80px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    margin-bottom: 0.5rem;
}

.heritage-footer .footer-mascot {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.4rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

.heritage-footer .flag-item:hover .footer-mascot {
    transform: scale(1.15) rotate(-5deg);
}

.heritage-footer .flag-phrase {
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    color: var(--fr-gold-light);
}

.heritage-footer .footer-tagline {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    color: var(--fr-gold);
    text-align: center;
    margin: 1rem 0;
}

.heritage-footer .footer-copy {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* ---------- Heritage Page Background ---------- */
.heritage-bg {
    position: relative;
    min-height: calc(100vh - 70px);
    overflow: hidden;
}

.heritage-bg::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        /* NZ Fern - left side accent */
        radial-gradient(ellipse 300px 600px at 5% 30%, rgba(45, 95, 62, 0.06) 0%, transparent 70%),
        /* SA Gold - right side accent */
        radial-gradient(ellipse 300px 600px at 95% 50%, rgba(212, 168, 67, 0.08) 0%, transparent 70%),
        /* UK Terracotta - bottom left */
        radial-gradient(ellipse 400px 400px at 10% 85%, rgba(193, 105, 79, 0.05) 0%, transparent 70%),
        /* Protea pink - top right */
        radial-gradient(ellipse 250px 350px at 90% 15%, rgba(212, 131, 143, 0.04) 0%, transparent 70%),
        /* Base cream */
        var(--fr-cream);
}

/* Decorative country stripe accents on the sides (visible in wide viewports) */
.heritage-bg::after {
    content: '';
    position: fixed;
    top: 70px;
    left: 0;
    width: 4px;
    height: calc(100vh - 70px);
    z-index: -1;
    background:
        linear-gradient(
            180deg,
            var(--fr-green-deep) 0%, var(--fr-green-deep) 33%,
            var(--fr-gold) 33%, var(--fr-gold) 66%,
            var(--fr-terracotta) 66%, var(--fr-terracotta) 100%
        );
    opacity: 0.5;
    border-radius: 0 2px 2px 0;
}

/* ---------- Forms ---------- */
.form-section {
    background: var(--fr-white);
    border-radius: var(--fr-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--fr-shadow-sm);
}

.form-section-title {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    color: var(--fr-green-deep);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--fr-gold-light);
}

.form-section .form-label {
    display: block;
    margin-bottom: 0.35rem;
}

.form-section .form-control,
.form-section .form-select {
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--fr-green-deep);
    box-shadow: 0 0 0 0.2rem rgba(45, 95, 62, 0.15);
}

/* ---------- Admin Dashboard ---------- */
.admin-card {
    background: var(--fr-white);
    border-radius: var(--fr-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--fr-shadow-sm);
    transition: all var(--fr-transition);
    text-decoration: none;
    color: var(--fr-text);
    display: block;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--fr-shadow);
    color: var(--fr-text);
}

.admin-card .admin-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ---------- Help Centre ---------- */
.help-card {
    background: var(--fr-white);
    border-radius: var(--fr-radius);
    padding: 1.75rem 1.25rem;
    text-align: center;
    box-shadow: var(--fr-shadow-sm);
    transition: all var(--fr-transition);
    text-decoration: none;
    color: var(--fr-text);
    display: block;
    height: 100%;
    border: 2px solid transparent;
}

.help-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fr-shadow-lg);
    color: var(--fr-text);
    border-color: var(--fr-gold-light);
}

.help-card .help-card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

/* Numbered step list with green circles */
.help-steps {
    list-style: none;
    padding: 0;
    counter-reset: help-step;
}

.help-steps li {
    counter-increment: help-step;
    padding: 0.75rem 0 0.75rem 3.5rem;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    line-height: 1.7;
}

.help-steps li:last-child {
    border-bottom: none;
}

.help-steps li::before {
    content: counter(help-step);
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 2.2rem;
    height: 2.2rem;
    background: var(--fr-green-deep);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Tip/callout box */
.help-tip {
    background: var(--fr-gold-light);
    border-left: 4px solid var(--fr-gold);
    border-radius: 0 var(--fr-radius-sm) var(--fr-radius-sm) 0;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.help-tip i {
    color: var(--fr-gold);
    margin-right: 0.4rem;
}

/* Help breadcrumb */
.help-breadcrumb .breadcrumb-item a {
    color: var(--fr-green-deep);
    text-decoration: none;
}

.help-breadcrumb .breadcrumb-item a:hover {
    text-decoration: underline;
}

.help-breadcrumb .breadcrumb-item.active {
    color: var(--fr-text-muted);
}

/* Help feature list (checkmarks) */
.help-features {
    list-style: none;
    padding: 0;
}

.help-features li {
    padding: 0.4rem 0 0.4rem 1.8rem;
    position: relative;
    line-height: 1.6;
}

.help-features li::before {
    content: "\F26A";
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    color: var(--fr-green-deep);
    font-weight: 700;
}

@media (max-width: 768px) {
    .help-steps li {
        padding-left: 3rem;
    }

    .help-steps li::before {
        width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
    }

    .help-card .help-card-icon {
        font-size: 2rem;
    }

    .help-card {
        padding: 1.25rem 1rem;
    }
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--fr-text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* ---------- Utilities ---------- */
.bg-cream { background-color: var(--fr-cream); }
.bg-gold-light { background-color: var(--fr-gold-light); }
.text-green-deep { color: var(--fr-green-deep); }
.text-gold { color: var(--fr-gold); }
.text-terracotta { color: var(--fr-terracotta); }

/* ---------- Table Styles ---------- */
.table-family {
    border-radius: var(--fr-radius);
    overflow: hidden;
}

.table-family thead {
    background: var(--fr-green-deep);
    color: #fff;
}

.table-family thead th {
    font-weight: 600;
    border: none;
    padding: 0.75rem 1rem;
}

.table-family tbody tr {
    transition: background-color var(--fr-transition);
}

.table-family tbody tr:hover {
    background-color: var(--fr-gold-light);
}

.table-family td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* ---------- Photo Upload ---------- */
.photo-upload-area {
    border: 2px dashed var(--fr-green-light);
    border-radius: var(--fr-radius);
    padding: 2rem;
    text-align: center;
    transition: all var(--fr-transition);
    cursor: pointer;
    background: rgba(143, 188, 143, 0.05);
}

.photo-upload-area:hover,
.photo-upload-area.dragover {
    border-color: var(--fr-green-deep);
    background: rgba(143, 188, 143, 0.1);
}

.photo-upload-area .upload-icon {
    font-size: 2.5rem;
    color: var(--fr-green-light);
    margin-bottom: 0.5rem;
}

.photo-preview {
    max-width: 300px;
    border-radius: var(--fr-radius);
    box-shadow: var(--fr-shadow-sm);
}

/* ---------- Auth Pages ---------- */
.auth-card {
    max-width: 450px;
    margin: 3rem auto;
    background: var(--fr-white);
    border-radius: var(--fr-radius-lg);
    box-shadow: var(--fr-shadow);
    padding: 2.5rem;
}

.auth-card h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--fr-navy);
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card .auth-subtitle {
    font-family: 'Caveat', cursive;
    color: var(--fr-terracotta);
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* ---------- Heritage Sayings Toast ---------- */
.heritage-toast {
    position: fixed;
    z-index: 1080;
    background: var(--fr-white);
    border-radius: var(--fr-radius);
    box-shadow: var(--fr-shadow-lg);
    padding: 0.75rem 1.25rem;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    border-left: 4px solid var(--fr-gold);
}

.heritage-toast--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Country colour variants */
.heritage-toast--uk { border-left-color: var(--fr-terracotta); }
.heritage-toast--za { border-left-color: var(--fr-gold); }
.heritage-toast--nz { border-left-color: var(--fr-green-deep); }

/* Position variants */
.heritage-toast[data-position="bottom-right"] {
    bottom: 1.5rem;
    right: 1.5rem;
}

.heritage-toast[data-position="bottom-left"] {
    bottom: 1.5rem;
    left: 1.5rem;
}

.heritage-toast[data-position="top-right"] {
    top: 5rem;
    right: 1.5rem;
}

.heritage-toast .toast-mascot {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    object-fit: contain;
}

.heritage-toast .toast-saying {
    font-family: 'Caveat', cursive;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--fr-navy);
    line-height: 1.3;
}

.heritage-toast--uk .toast-saying { color: var(--fr-terracotta); }
.heritage-toast--za .toast-saying { color: #B8860B; }
.heritage-toast--nz .toast-saying { color: var(--fr-green-deep); }

.heritage-toast .toast-country {
    font-size: 0.7rem;
    color: var(--fr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ---------- Weather Banner ---------- */
.weather-banner {
    background: linear-gradient(135deg, var(--fr-navy) 0%, var(--fr-green-deep) 100%);
    padding: 0.75rem 0;
}

.weather-strip {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.weather-city {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--fr-radius-sm);
    border-left: 3px solid var(--fr-gold);
    min-width: 200px;
}

.weather-city--uk { border-left-color: var(--fr-terracotta); }
.weather-city--za { border-left-color: var(--fr-gold); }
.weather-city--nz { border-left-color: var(--fr-green-light); }

.weather-mascot {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.weather-info {
    flex: 1;
}

.weather-city-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--fr-gold-light);
    line-height: 1.2;
}

.weather-condition {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.weather-condition i {
    font-size: 0.85rem;
}

.weather-temp {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* ---------- Did You Know? Fun Facts Banner ---------- */
.fun-fact-banner {
    position: relative;
    overflow: hidden;
    padding: 1.5rem 0;
    border-top: 3px solid var(--fr-gold);
    border-bottom: 3px solid var(--fr-gold);
}

.fun-fact-flag-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.fun-fact-flag {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
}

.fun-fact-flag--active {
    opacity: 0.07;
}

.fun-fact-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.fun-fact-icon {
    font-size: 2rem;
    color: var(--fr-gold);
    flex-shrink: 0;
}

.fun-fact-text {
    flex: 1;
}

.fun-fact-question {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--fr-navy);
    line-height: 1.3;
}

.fun-fact-detail {
    font-size: 0.9rem;
    color: var(--fr-text);
    line-height: 1.5;
    margin-top: 0.25rem;
}

.fun-fact-mascot {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    transition: transform 0.3s ease;
}

.fun-fact-mascot:hover {
    transform: scale(1.1) rotate(-5deg);
}

/* Country accent colours for the banner */
.fun-fact-banner--uk { border-top-color: var(--fr-terracotta); border-bottom-color: var(--fr-terracotta); }
.fun-fact-banner--za { border-top-color: var(--fr-gold); border-bottom-color: var(--fr-gold); }
.fun-fact-banner--nz { border-top-color: var(--fr-green-deep); border-bottom-color: var(--fr-green-deep); }

.fun-fact-banner--uk .fun-fact-question { color: var(--fr-terracotta); }
.fun-fact-banner--za .fun-fact-question { color: #B8860B; }
.fun-fact-banner--nz .fun-fact-question { color: var(--fr-green-deep); }

.fun-fact-banner--uk .fun-fact-icon { color: var(--fr-terracotta); }
.fun-fact-banner--za .fun-fact-icon { color: var(--fr-gold); }
.fun-fact-banner--nz .fun-fact-icon { color: var(--fr-green-deep); }

/* ---------- Print ---------- */
@media print {
    .navbar-family,
    .heritage-footer,
    .heritage-toast,
    .family-banner,
    .fun-fact-banner,
    .weather-banner,
    .filter-bar,
    .btn,
    .no-print { display: none !important; }

    body { background: #fff; color: #000; }

    .recipe-hero-image { max-height: 300px; }

    .recipe-method ol li::before {
        background: #000;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ---------- Navbar Tweaks ---------- */
.navbar-family .navbar-collapse {
    align-items: center;
}

.navbar-family .navbar-nav {
    align-items: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hero-section {
        min-height: 300px;
        padding: 2rem 1rem;
    }

    .family-banner-slot {
        width: 110px;
        height: 82px;
    }

    .family-banner-strip {
        gap: 0.5rem;
    }

    .heritage-footer .flag-strip {
        gap: 1.5rem;
    }

    .recipe-at-a-glance {
        gap: 0.75rem;
    }

    .form-section {
        padding: 1.25rem;
    }

    /* Navbar stacks vertically on mobile */
    .navbar-family .navbar-nav {
        align-items: stretch;
    }

    .weather-strip {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .weather-city {
        min-width: auto;
    }

    .heritage-bg::after {
        display: none;
    }

    .fun-fact-content {
        gap: 0.75rem;
    }

    .fun-fact-mascot {
        width: 44px;
        height: 44px;
    }

    .fun-fact-question {
        font-size: 1.2rem;
    }

    .fun-fact-detail {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .recipe-method ol li {
        padding-left: 2.5rem;
    }

    .family-banner-slot {
        width: 90px;
        height: 68px;
    }

    .family-banner-strip {
        gap: 0.4rem;
        padding: 0 0.5rem;
    }

    .family-banner-label {
        font-size: 1.1rem;
    }

    .heritage-footer .flag-strip {
        gap: 1rem;
    }

    .heritage-toast {
        max-width: 250px;
        padding: 0.6rem 1rem;
        /* Always bottom-right on mobile */
        bottom: 1rem !important;
        right: 1rem !important;
        left: auto !important;
        top: auto !important;
    }

    .heritage-toast .toast-saying {
        font-size: 1.1rem;
    }
}

/* ---------- PWA Install Banner ---------- */
.pwa-install-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--fr-green-deep);
    color: white;
    padding: 0.8rem 1rem;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
    box-shadow: var(--fr-shadow-lg);
}

.pwa-install-banner--visible {
    transform: translateY(0);
}

.pwa-install-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    max-width: 700px;
    margin: 0 auto;
}

.pwa-install-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.pwa-install-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.pwa-install-text strong {
    font-size: 1rem;
}

.pwa-install-text span {
    font-size: 0.85rem;
    opacity: 0.9;
}

.pwa-install-btn {
    background: var(--fr-gold);
    color: var(--fr-navy);
    border: none;
    border-radius: var(--fr-radius-sm);
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--fr-transition);
    flex-shrink: 0;
}

.pwa-install-btn:hover {
    background: #c49935;
}

.pwa-install-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 0.3rem;
    line-height: 1;
    flex-shrink: 0;
}

.pwa-install-close:hover {
    opacity: 1;
}

@media (max-width: 576px) {
    .pwa-install-content {
        gap: 0.5rem;
    }

    .pwa-install-icon {
        font-size: 1.4rem;
    }

    .pwa-install-text strong {
        font-size: 0.9rem;
    }

    .pwa-install-text span {
        font-size: 0.78rem;
    }

    .pwa-install-btn {
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
    }
}
