/* ============================================================
   Ju Receitas Fácil — Design System v3
   Apple-Inspired Minimalism • 50+ Audience • Mobile-First
   System Fonts • WhatsApp Green • WCAG AA Contrast
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
    /* Primary (WhatsApp Green) */
    --primary: #25D366;
    --primary-dark: #1DA851;
    --primary-light: #E8F5E9;

    /* Secondary (Urgency/CTA) */
    --secondary: #FF9500;
    --secondary-dark: #E68A00;

    /* Neutrals */
    --background: #FFFFFF;
    --surface: #F5F5F7;
    --cream: #FFF8E1;
    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --border: #D2D2D7;

    /* Typography */
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --text-sm: 18px;
    --text-base: 20px;
    --text-lg: 24px;
    --text-xl: 32px;
    --text-2xl: 40px;
    --line-height: 1.6;

    /* Spacing (8px grid) */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 64px;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-pill: 980px;
}

/* --- CSS Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-stack);
    font-size: var(--text-base);
    line-height: var(--line-height);
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

/* --- Accessibility --- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    z-index: 9999;
    font-weight: 600;
}

.skip-link:focus {
    top: 16px;
}

*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* --- Typography --- */
h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    line-height: 1.4;
}

p {
    margin-bottom: var(--space-sm);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-small {
    font-size: var(--text-sm);
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

/* --- Header --- */
.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--space-sm) 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.site-logo span {
    color: var(--primary-dark);
}

.site-nav {
    display: flex;
    gap: var(--space-md);
}

.site-nav a {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.site-nav a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: var(--space-xl) var(--space-sm);
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--background) 100%);
}

.hero-emoji {
    font-size: 80px;
    display: block;
    margin-bottom: var(--space-md);
    animation: bounce 2s infinite;
}

.hero h1 {
    margin-bottom: var(--space-sm);
}

.hero p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-md);
}

.social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
}

.social-proof-avatars {
    display: flex;
    gap: -8px;
}

.social-proof-avatars span {
    font-size: 28px;
}

.social-proof-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- CTA Buttons --- */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--primary);
    color: #fff;
    font-size: var(--text-base);
    font-weight: 600;
    padding: 16px 40px;
    border: none;
    border-radius: var(--radius-pill);
    min-height: 56px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
    animation: pulse 3s infinite;
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    text-decoration: none;
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    flex-shrink: 0;
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: transparent;
    color: var(--primary-dark);
    font-size: var(--text-base);
    font-weight: 600;
    padding: 16px 40px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-pill);
    min-height: 56px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background: var(--primary-light);
    text-decoration: none;
}

/* --- Clean Card --- */
.clean-card {
    background: var(--background);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: var(--space-md);
    transition: all 0.3s ease;
}

/* --- Value Props --- */
.value-props {
    padding: var(--space-xl) var(--space-sm);
    background: var(--surface);
}

.value-grid {
    display: grid;
    gap: var(--space-md);
}

.value-card {
    background: var(--background);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.value-icon {
    font-size: 48px;
    display: block;
    margin-bottom: var(--space-sm);
}

.value-card h3 {
    margin-bottom: var(--space-xs);
}

.value-card p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* --- Recipe Section --- */
.recipe-section {
    padding: var(--space-xl) 0;
}

.recipe-section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.recipe-section-header p {
    color: var(--text-secondary);
}

/* --- Recipe Grid --- */
.recipe-grid {
    display: grid;
    gap: var(--space-md);
}

/* --- Recipe Card --- */
.recipe-card {
    display: block;
    background: var(--background);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.recipe-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.recipe-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--cream);
}

.recipe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-card-image-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 64px;
    background: linear-gradient(135deg, var(--cream) 0%, #FFE0B2 100%);
}

.recipe-card-body {
    padding: var(--space-sm);
}

.recipe-card-body h3 {
    font-size: var(--text-base);
    margin-bottom: var(--space-xs);
}

.recipe-meta {
    display: flex;
    gap: var(--space-sm);
    font-size: 16px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

/* --- Category Filter --- */
.category-filter {
    padding: var(--space-lg) var(--space-sm);
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-sm);
    max-width: 1000px;
    margin: 0 auto;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    min-height: 120px;
    transition: all 0.3s ease;
}

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

.category-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.category-btn .cat-emoji {
    font-size: 48px;
}

.category-btn .cat-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.category-btn.active .cat-label {
    color: #fff;
}

/* --- Recipe Article (Individual Page) --- */
.recipe-article {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-sm) var(--space-xl);
}

.breadcrumb {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

.breadcrumb span {
    margin: 0 8px;
    color: var(--border);
}

.recipe-intro {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.recipe-hero-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-md);
    aspect-ratio: 16 / 9;
    background: var(--cream);
}

.recipe-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-hero-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 80px;
    background: linear-gradient(135deg, var(--cream) 0%, #FFE0B2 100%);
}

/* --- Quick Summary --- */
.quick-summary {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.quick-summary h3 {
    margin-bottom: var(--space-sm);
}

.quick-summary ul {
    display: grid;
    gap: var(--space-xs);
}

.quick-summary li {
    font-size: var(--text-sm);
}

/* --- Ingredients --- */
.recipe-ingredients {
    margin-bottom: var(--space-lg);
}

.recipe-ingredients h2 {
    margin-bottom: var(--space-sm);
}

.recipe-ingredients ul {
    display: grid;
    gap: 12px;
}

.recipe-ingredients li {
    font-size: var(--text-sm);
    padding: 12px var(--space-sm);
    background: var(--surface);
    border-radius: var(--radius-sm);
}

.recipe-ingredients li::before {
    content: "🥄 ";
}

/* --- Instructions --- */
.recipe-instructions {
    margin-bottom: var(--space-lg);
}

.recipe-instructions h2 {
    margin-bottom: var(--space-sm);
}

.recipe-instructions ol {
    counter-reset: step-counter;
    display: grid;
    gap: var(--space-sm);
}

.recipe-instructions li {
    counter-increment: step-counter;
    font-size: var(--text-sm);
    padding: var(--space-sm) var(--space-sm) var(--space-sm) 56px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    position: relative;
    line-height: 1.7;
}

.recipe-instructions li::before {
    content: counter(step-counter);
    position: absolute;
    left: var(--space-sm);
    top: var(--space-sm);
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.recipe-instructions li strong {
    color: var(--primary-dark);
}

/* --- Conversion Box (Mid-content, Orange) --- */
.conversion-box {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: #fff;
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-md);
    text-align: center;
    margin: var(--space-lg) 0;
}

.conversion-box h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
    color: #fff;
}

.conversion-box p {
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
    opacity: 0.95;
}

.conversion-box .cta-button {
    background: #fff;
    color: var(--secondary-dark);
    animation: none;
}

.conversion-box .cta-button:hover {
    background: #f0f0f0;
}

/* --- Conversion Box (End, Green) --- */
.conversion-box-green {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-md);
    text-align: center;
    margin: var(--space-lg) 0;
}

.conversion-box-green h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
    color: #fff;
}

.conversion-box-green p {
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
    opacity: 0.95;
}

.conversion-box-green .cta-button {
    background: #fff;
    color: var(--primary-dark);
    animation: none;
}

.conversion-box-green .cta-button:hover {
    background: #f0f0f0;
}

.benefits-list {
    text-align: left;
    max-width: 320px;
    margin: 0 auto var(--space-md);
}

.benefits-list li {
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
}

.conversion-reassurance {
    font-size: 16px;
    opacity: 0.8;
    margin-top: var(--space-sm);
}

/* --- FAQ Section --- */
.faq-section {
    margin-bottom: var(--space-lg);
}

.faq-item {
    background: var(--background);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.faq-question {
    font-weight: 700;
    font-size: var(--text-base);
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.faq-answer {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.7;
}

/* --- Share Section --- */
.share-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, #F1F8F4 100%);
    padding: var(--space-lg) var(--space-md);
    margin: var(--space-lg) 0;
    border-radius: var(--radius-md);
    text-align: center;
}

.share-section h3 {
    font-size: var(--text-lg);
    margin-bottom: 12px;
}

.share-section p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--primary);
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 600;
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.share-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* --- Related Recipes --- */
.related-section {
    margin: var(--space-lg) 0;
}

.related-section h3 {
    text-align: center;
    margin-bottom: var(--space-md);
}

/* --- CTA Section (Homepage) --- */
.cta-section {
    text-align: center;
    padding: var(--space-xl) var(--space-sm);
    background: var(--surface);
}

.cta-section h2 {
    margin-bottom: var(--space-sm);
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Sticky Bottom Bar (Mobile Only) --- */
.sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: var(--space-sm);
    padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.sticky-bar.visible {
    transform: translateY(0);
    animation: slideUp 0.4s ease;
}

.sticky-bar p {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.sticky-bar .cta-button {
    padding: 12px 24px;
    font-size: 16px;
    min-height: 48px;
    white-space: nowrap;
    animation: none;
}

.has-sticky-bar {
    padding-bottom: 80px;
}

/* --- Footer --- */
.site-footer {
    background: var(--text-primary);
    color: #fff;
    padding: var(--space-lg) var(--space-sm);
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-copy {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Recipe Archive Layout --- */
.recipe-archive-layout {
    display: grid;
    gap: var(--space-lg);
}

.sidebar {
    display: none;
}

.sidebar-categories h3 {
    margin-bottom: var(--space-sm);
}

.sidebar-categories ul {
    display: grid;
    gap: var(--space-xs);
}

.sidebar-categories a {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.sidebar-cta {
    background: var(--primary-light);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-md);
}

/* --- Animations --- */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes pulse {

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

    50% {
        transform: scale(1.03);
    }
}

/* --- View All Link --- */
.view-all-link {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
    padding: 12px 32px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-pill);
    transition: all 0.3s ease;
}

.view-all-link:hover {
    background: var(--primary-light);
    text-decoration: none;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* --- Tablet (768px+) --- */
@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }

    .value-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .recipe-archive-layout {
        grid-template-columns: 1fr 280px;
    }

    .sidebar {
        display: block;
    }

    .share-btn {
        width: auto;
    }
}

/* --- Desktop (1024px+) --- */
@media (min-width: 1024px) {
    .recipe-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero {
        padding: var(--space-xl) var(--space-md) calc(var(--space-xl) + 20px);
    }

    .hero h1 {
        font-size: 48px;
    }

    .sticky-bar {
        display: none !important;
    }

    .has-sticky-bar {
        padding-bottom: 0;
    }
}