﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --pri: #E85D26;
    --pri-l: #FF8A5C;
    --pri-d: #C14A1A;
    --sec: #2D6A4F;
    --acc: #F4A261;
    --dark: #1A1A2E;
    --txt: #2D2D2D;
    --txt-l: #6B7280;
    --txt-m: #9CA3AF;
    --bg: #fff;
    --bg-w: #FFF8F3;
    --bg-s: #FAFAF8;
    --brd: #E5E7EB;
    --brd-l: #F3F4F6;
    --fh: 'Playfair Display', Georgia, serif;
    --fb: 'Inter', -apple-system, sans-serif;
    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --sh-sm: 0 1px 3px rgba(0, 0, 0, .06);
    --sh-md: 0 4px 12px rgba(0, 0, 0, .08);
    --sh-lg: 0 10px 30px rgba(0, 0, 0, .1);
    --sh-xl: 0 20px 50px rgba(0, 0, 0, .12);
    --tr: .25s ease;
    --max-w: 1200px;
    --side-w: 320px;
    --hdr-h: 70px
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth
}

body {
    font-family: var(--fb);
    color: var(--txt);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color .15s
}

ul,
ol {
    list-style: none
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit
}

h1,
h2,
h3,
h4 {
    font-family: var(--fh);
    color: var(--dark);
    line-height: 1.3;
    font-weight: 700
}

h1 {
    font-size: 2rem
}

h2 {
    font-size: 1.6rem
}

h3 {
    font-size: 1.3rem
}

h4 {
    font-size: 1.1rem
}

p {
    margin-bottom: 1rem;
    color: var(--txt)
}

.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1rem
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0)
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px)
    }

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

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s, transform .6s
}

.reveal.active {
    opacity: 1;
    transform: translateY(0)
}

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--brd-l);
    transition: box-shadow var(--tr)
}

.site-header.scrolled {
    box-shadow: var(--sh-md)
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--hdr-h)
}

.logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--fh);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark)
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--pri), var(--acc));
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700
}

.logo span {
    color: var(--pri)
}

.main-nav {
    display: none
}

.main-nav ul {
    display: flex;
    gap: 2rem
}

.main-nav a {
    font-size: .95rem;
    font-weight: 500;
    color: var(--txt);
    position: relative;
    padding: 4px 0
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--pri);
    transition: width var(--tr);
    border-radius: 2px
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--pri)
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: .5rem;
    z-index: 1001
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: all var(--tr)
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px)
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px)
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 360px;
    height: 100vh;
    background: var(--bg);
    z-index: 999;
    padding: calc(var(--hdr-h) + 2rem) 2rem 2rem;
    transition: right .4s cubic-bezier(.4, 0, .2, 1);
    box-shadow: var(--sh-xl)
}

.mobile-menu.open {
    right: 0
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem
}

.mobile-menu a {
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    padding: .5rem 0;
    border-bottom: 1px solid var(--brd-l);
    transition: all .15s
}

.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--pri);
    padding-left: .5rem
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--tr)
}

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

/* AD SLOTS */
.ad-slot {
    background: var(--bg-s);
    border: 2px dashed var(--brd);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--txt-m);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 1px
}

.ad-slot-banner {
    width: 100%;
    min-height: 90px;
    margin: 1.5rem 0
}

.ad-slot-sidebar {
    width: 100%;
    min-height: 250px;
    margin: 1.5rem 0
}

.ad-slot-in-content {
    width: 100%;
    min-height: 280px;
    margin: 2rem 0
}

/* HERO */
.hero-section {
    padding: 2rem 0 3rem
}

.hero-title {
    font-size: 1.8rem;
    margin-bottom: .5rem;
    text-align: center
}

.hero-subtitle {
    color: var(--txt-l);
    text-align: center;
    font-size: 1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto
}

.featured-recipes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem
}

.featured-card {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
    box-shadow: var(--sh-md);
    transition: transform var(--tr), box-shadow var(--tr)
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-xl)
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s
}

.featured-card:hover img {
    transform: scale(1.05)
}

.featured-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, .3) 60%, transparent);
    color: #fff
}

.featured-card-category {
    display: inline-block;
    background: var(--pri);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .5rem
}

.featured-card-title {
    font-family: var(--fh);
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3
}

.featured-card-meta {
    font-size: .85rem;
    opacity: .85;
    display: flex;
    gap: 1rem
}

/* CONTENT */
.content-area {
    padding: 3rem 0
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--brd-l)
}

.section-title {
    font-size: 1.5rem;
    position: relative
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 100%;
    background: var(--pri);
    border-radius: 2px;
    margin-right: .5rem
}

.section-link {
    font-size: .9rem;
    font-weight: 600;
    color: var(--pri)
}

/* RECIPE CARDS */
.recipes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem
}

.recipe-card {
    background: #fff;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    transition: transform var(--tr), box-shadow var(--tr);
    border: 1px solid var(--brd-l)
}

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

.recipe-card-image {
    position: relative;
    aspect-ratio: 16/11;
    overflow: hidden
}

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

.recipe-card:hover .recipe-card-image img {
    transform: scale(1.08)
}

.recipe-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--pri);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px
}

.recipe-card-save {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--txt-l);
    font-size: 1rem;
    transition: all .15s;
    cursor: pointer;
    border: none
}

.recipe-card-save:hover {
    background: var(--pri);
    color: #fff
}

.recipe-card-body {
    padding: 1.5rem
}

.recipe-card-category {
    font-size: .75rem;
    font-weight: 600;
    color: var(--pri);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .5rem
}

.recipe-card-title {
    font-family: var(--fh);
    font-size: 1.15rem;
    color: var(--dark);
    margin-bottom: .5rem;
    line-height: 1.35;
    transition: color .15s
}

.recipe-card:hover .recipe-card-title {
    color: var(--pri)
}

.recipe-card-excerpt {
    font-size: .9rem;
    color: var(--txt-l);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.recipe-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--brd-l);
    font-size: .8rem;
    color: var(--txt-m)
}

.recipe-card-meta-item {
    display: flex;
    align-items: center;
    gap: 4px
}

.recipe-card-meta-item svg {
    width: 15px;
    height: 15px
}

/* FIX: Contraste e Legibilidade */
.category-card {
    position: relative;
    border-radius: var(--r-md);
    overflow: hidden;
    aspect-ratio: 16/10;
    box-shadow: var(--sh-md);
    transition: transform var(--tr);
    display: block;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all .5s;
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: #fff;
}

.category-card-overlay h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.category-card-overlay span,
.category-card-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

.category-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 4rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.category-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 46, 0.75);
    /* var(--dark) com opacidade */
}

.category-hero .container {
    position: relative;
    z-index: 1;
}

.category-hero h1 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.category-hero p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

.category-hero .category-count {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* FIX: Footer e Cores */
.text-primary {
    color: var(--pri);
}

.site-footer {
    background: var(--dark);
    color: #fff;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.site-footer p {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.site-footer ul li {
    margin-bottom: 0.8rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer a:hover {
    color: var(--pri);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p {
    color: inherit;
    margin: 0;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    background: var(--dark);
    color: #fff;
    padding: 1.5rem;
    border-radius: var(--r-md);
    box-shadow: var(--sh-xl);
    z-index: 9999;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-banner.show {
    display: flex;
    animation: fadeInUp 0.5s ease;
}

.cookie-content {
    flex: 1;
}

.cookie-content p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 0.95rem;
}

.cookie-content a {
    color: #fff;
    text-decoration: underline;
}

.cookie-accept {
    background: var(--pri);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: var(--r-sm);
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.cookie-accept:hover {
    background: var(--pri-d);
}

@media (max-width: 600px) {
    .cookie-banner {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .cookie-accept {
        width: 100%;
    }
}

/* FIX: RESPONSIVIDADE GERAL */
@media (min-width: 900px) {
    .main-nav {
        display: block;
    }

    .menu-toggle {
        display: none;
    }
}

@media (max-width: 900px) {
    .header-inner {
        padding: 0;
    }

    .content-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .featured-recipes {
        grid-template-columns: 1fr;
    }

    .recipes-grid {
        grid-template-columns: 1fr;
        /* Força 1 coluna em tablets/mobile */
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    :root {
        --hdr-h: 60px;
    }

    html {
        font-size: 15px;
        /* Reduz levemente a fonte base */
    }

    h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .container {
        padding: 0 1.25rem;
        /* Margem lateral segura */
    }

    .hero-section {
        padding: 1.5rem 0 2rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .recipe-card-image {
        aspect-ratio: 16/9;
        /* Mais wide no mobile */
    }

    /* Ajuste de formulários */
    input,
    select,
    textarea {
        font-size: 16px !important;
        /* Evita zoom no iOS */
    }

    /* CORREÇÃO CRÍTICA: Logo responsivo e centralizado (Header) */
    .header-inner {
        position: relative;
        justify-content: center;
        min-height: 110px;
    }

    /* Aplica absolute APENAS no header para não quebrar o footer */
    .header-inner .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
    }

    .header-inner .logo img {
        max-height: 100px !important;
        width: auto;
    }

    /* Ajuste específico para o logo do Footer no mobile */
    .site-footer .logo {
        display: block;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .site-footer .logo img {
        max-height: 80px;
        /* Tamanho bom para o footer */
        margin: 0 auto;
    }

    .menu-toggle {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 20;
    }
}

/* Garante que o header tenha altura automática se o conteúdo for maior, mas tenta manter fixo */
.site-header {
    height: auto;
    min-height: var(--hdr-h);
}

.header-inner {
    height: auto;
    min-height: var(--hdr-h);
    padding: 0.5rem 0;
}