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

html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #FFF8F0;
    --second-bg-color: #F4A261;
    --text-color: #3E4C59;
    --main-color: #1A2332;
    --bg: var(--bg-color);
    --accent: #E76F51;
    --accent-dark: #d96044;
    --accent-light: #f39878;
    --border-color: #E8DCC8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.15);
    --muted: var(--text-color);
    --max-width: 1280px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-color);
    line-height: 1.65;
    background-color: white;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.page-is-loading {
    opacity: 1;
}

body.page-ready {
    opacity: 1;
    transition: opacity 0.35s ease;
}

main section[id] {
    scroll-margin-top: 110px;
}

#gallery,
#newsletter,
#about,
#contact,
#faq {
    content-visibility: auto;
    contain-intrinsic-size: 700px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--main-color);
    line-height: 1.2;
}

h1 {
    font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.75rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.25rem);
    letter-spacing: -0.015em;
    margin-bottom: 12px;
}

h3 {
    font-size: clamp(1.2rem, 1rem + 0.9vw, 1.5rem);
    letter-spacing: -0.01em;
    color: var(--main-color);
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-dark);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.site-header {
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.brand {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    color: var(--main-color);
    gap: 8px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.logo img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    object-fit: cover;
}

.logo img:hover {
    transform: scale(1.08);
}

nav .nav {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 0;
    padding: 0;
}

nav .nav li {
    margin: 0;
}

nav .nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
    transition: color 0.3s ease;
    position: relative;
}

nav .nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

nav .nav a:hover {
    color: var(--accent);
}

nav .nav a:hover::after {
    width: 100%;
}

nav .nav a[aria-current="page"] {
    color: var(--accent);
}

nav .nav a[aria-current="page"]::after {
    width: 100%;
}

nav .nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-selector {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.2s ease;
    font-family: inherit;
    min-width: 100px;
}

.language-selector:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.language-selector:hover {
    border-color: var(--accent);
}

nav .nav-actions-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

nav .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 50px;
    background: transparent;
    border: 2px solid transparent;
    color: inherit;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

nav .button-primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

nav .button-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(231, 111, 81, 0.42);
}

nav .button-secondary {
    background: white;
    color: var(--main-color);
    border-color: var(--border-color);
}

.text-link {
    background: none;
    border: none;
    color: var(--accent);
    font: inherit;
    padding: 0;
    margin: 0;
    text-decoration: underline;
    cursor: pointer;
}

.text-link:hover,
.text-link:focus {
    color: var(--accent-dark);
    outline: none;
}

nav .button-secondary:hover {
    background: var(--bg-color);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(26, 35, 50, 0.18);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    width: 32px;
    height: 32px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--main-color);
    margin: 6px 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-overlay {
    display: none;
}

.mobile-nav {
    display: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #E76F51 0%, #264653 100%);
    color: white;
    padding: 120px 20px;
    text-align: center;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white;
    font-weight: 800;
    margin-left: auto;
    margin-right: auto;
    max-width: 14ch;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    background-color: white;
    color: var(--accent);
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    font-size: 1rem;
    border: 2px solid white;
}

.cta-button:hover {
    background-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.section {
    margin-bottom: 0;
}

/* Recipes Section */
#recipes {
    padding: 80px 0;
    background-color: white;
}

#recipes .container > h2 {
    text-align: center;
    margin-bottom: 60px;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 0;
}

.recipe-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

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

.recipe-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recipe-card:hover img {
    transform: scale(1.03);
}

.card-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.recipe-card h3 {
    color: var(--main-color);
    margin-bottom: 12px;
    font-size: 1.35rem;
    min-height: 3.2rem;
}

.recipe-card p {
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    flex-wrap: wrap;
    gap: 12px;
}

.recipe-meta span {
    background-color: #f0ebe4;
    padding: 6px 12px;
    border-radius: 20px;
}

.recipe-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

.save-btn {
    flex: 1;
    min-width: 100px;
    background-color: white;
    color: var(--accent);
    padding: 10px 16px;
    border-radius: 8px;
    border: 2px solid var(--accent);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.save-btn:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(231, 111, 81, 0.35);
}

.save-btn.saved {
    background-color: var(--accent);
    color: white;
}

.view-recipe-btn {
    flex: 1;
    min-width: 100px;
    background-color: var(--accent);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.view-recipe-btn:hover {
    background-color: var(--accent-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(217, 96, 68, 0.42);
}

/* Gallery Section */
.gallery-section {
    background-color: #FAFAF8;
    padding: 80px 20px;
}

.gallery-section h2 {
    text-align: center;
    margin-bottom: 16px;
}

.gallery-section > .container > p {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: white;
    color: var(--text-color);
    border: 2px solid var(--accent);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filter-btn:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--accent);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    padding: 0 20px;
    margin: 0 -20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-md);
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.gallery-item figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 18px;
    color: white;
    font-weight: 600;
    background: linear-gradient(180deg, transparent 0%, rgba(26, 35, 50, 0.82) 100%);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover figcaption,
.gallery-item:focus-within figcaption {
    transform: translateY(0);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #F4A261 0%, #E76F51 100%);
    padding: 100px 20px;
    text-align: center;
    color: white;
}

.newsletter-section h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.newsletter-section > .container > p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-benefits {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.benefit {
    flex: 1;
    min-width: 240px;
    max-width: 320px;
}

.benefit h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.benefit p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 550px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input {
    flex: 1;
    min-width: 220px;
    padding: 14px 20px;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background-color: white;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.newsletter-form textarea {
    flex: 1 1 100%;
    min-width: 220px;
    min-height: 140px;
    padding: 14px 20px;
    border: 2px solid white;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background-color: white;
    color: var(--text-color);
    resize: vertical;
    transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
    color: #999;
}

.newsletter-form textarea::placeholder {
    color: #999;
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.newsletter-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.newsletter-form button {
    padding: 14px 36px;
    background-color: var(--accent);
    color: white;
    border: 2px solid var(--accent);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1rem;
    min-width: 150px;
}

.newsletter-form button:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(217, 96, 68, 0.42);
}

.contact-form {
    margin: 0 auto 28px;
}

.contact-form textarea {
    width: 100%;
}

.faq-section {
    padding: 80px 20px;
    background: #fff;
}

.faq-section > .container > h2,
.faq-section > .container > p {
    text-align: center;
}

.faq-section > .container > p {
    max-width: 680px;
    margin: 0 auto 32px;
}

.faq-list {
    max-width: 860px;
    margin: 0 auto;
    display: grid;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.faq-item h3 {
    margin: 0;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: #fff;
    color: var(--main-color);
    padding: 18px 20px;
    font-size: 1.02rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    position: relative;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 1.3rem;
    line-height: 1;
}

.faq-question[aria-expanded="true"]::after {
    content: '–';
}

.faq-answer {
    padding: 0 20px 18px;
}

.faq-answer p {
    margin: 0;
}

/* About Section */
.about-section {
    background-color: white;
    padding: 80px 20px;
}

.about-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.about-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, #FFF8F0 0%, #f0ebe4 100%);
    padding: 80px 20px;
    text-align: center;
}

.contact-section h2 {
    margin-bottom: 20px;
}

.contact-section > .container > p {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.social-btn {
    background-color: white;
    color: var(--main-color);
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    display: inline-block;
    box-shadow: var(--shadow-sm);
    border: 2px solid white;
}

.social-btn:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(231, 111, 81, 0.36);
}

/* Footer */
.site-footer {
    background-color: var(--main-color);
    color: white;
    padding: 48px 20px 28px;
}

.site-footer p {
    margin: 0;
}

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

.site-footer a:hover {
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
    text-align: left;
    align-items: start;
}

.footer-brand h3,
.footer-links h4 {
    color: white;
    margin-bottom: 14px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.78);
    max-width: 36ch;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.82);
    width: fit-content;
}

.footer-links a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

.site-footer .container {
    display: grid;
    gap: 12px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    font-weight: 700;
    line-height: 1.1;
    padding: 8px;
    text-align: center;
    white-space: pre-line;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-dark);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(231, 111, 81, 0.4);
}

/* Animations */
.fade-in {
    opacity: 1;
    transform: translateY(0);
}

body.js-animate .fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.js-animate .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

body.js-animate .fade-in.stagger-ready {
    transition-delay: var(--stagger-delay, 0ms);
}

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    max-height: min(85vh, 760px);
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideInDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.modal h2 {
    margin-bottom: 24px;
    text-align: center;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal input {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.modal input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(231, 111, 81, 0.1);
}

.modal button {
    padding: 12px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: 8px;
}

.modal button:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
}

.modal p {
    text-align: center;
    margin-top: 20px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.modal a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.modal a:hover {
    text-decoration: underline;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.form-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-options input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

#password-strength {
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}

#password-strength div {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Saved Recipes */
.saved-recipe {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.saved-recipe:hover {
    background-color: var(--bg-color);
}

.saved-recipe h3 {
    margin: 0;
    color: var(--main-color);
    font-size: 1.1rem;
}

.saved-recipe a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.saved-recipe a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.saved-empty {
    text-align: center;
    color: #999;
    padding: 20px;
}

/* Account buttons */
#logout-btn, #logout-mobile-btn {
    display: none;
}

/* Recipe Detail Page */
.recipe-detail {
    padding: 80px 20px;
    background-color: white;
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: var(--muted);
}

.breadcrumbs a {
    color: var(--accent);
}

.breadcrumbs a:hover {
    color: var(--accent-dark);
}

.recipe-detail h2 {
    color: var(--main-color);
    font-size: 2.75rem;
    margin-bottom: 24px;
    text-align: center;
}

.recipe-detail img {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: 12px;
    margin: 32px auto;
    display: block;
    box-shadow: var(--shadow-lg);
}

.recipe-detail .recipe-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.recipe-detail .recipe-meta span {
    background-color: var(--bg-color);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--main-color);
}

.recipe-detail p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 24px;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.recipe-utilities {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 6px auto 22px;
}

.related-recipes {
    margin-top: 36px;
}

.related-recipes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.related-recipes-grid a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #faf7f2;
    color: var(--main-color);
    font-weight: 600;
    text-align: center;
}

.related-recipes-grid a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.categories-section {
    padding: 78px 20px;
    background: #fff;
}

.categories-section > .container > h2,
.categories-section > .container > p {
    text-align: center;
}

.categories-section > .container > p {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

.category-links-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.category-link-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #faf7f2;
    color: var(--main-color);
    font-weight: 700;
    text-align: center;
    padding: 12px;
}

.category-link-card:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.category-hub-block {
    margin-top: 26px;
}

.category-hub-block ul {
    margin-bottom: 0;
}

.recipe-detail h3 {
    color: var(--accent);
    font-size: 1.8rem;
    margin: 48px 0 20px 0;
}

.recipe-detail ul, .recipe-detail ol {
    margin-bottom: 32px;
    padding-left: 24px;
}

.recipe-detail li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.recipe-tools {
    margin: 42px 0 18px;
}

.recipe-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.tool-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #faf7f2;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.tool-card h3 {
    margin: 0 0 10px;
    font-size: 1.32rem;
}

.tool-subtitle {
    margin: 0 0 14px;
    font-size: 0.92rem;
    color: var(--muted);
    text-align: left;
}

.tool-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.tool-btn {
    background: white;
    color: var(--main-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.tool-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.grocery-progress {
    font-size: 0.86rem;
    color: var(--accent-dark);
    margin: 0 0 10px;
    text-align: left;
    min-height: 20px;
}

.grocery-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.grocery-list li {
    margin-bottom: 8px;
}

.grocery-list label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.95rem;
}

.grocery-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 4px;
}

.macro-tool label {
    display: inline-block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--main-color);
}

.servings-range {
    width: 100%;
    accent-color: var(--accent);
    margin-bottom: 14px;
}

.macro-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.macro-pill {
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: white;
    padding: 10px 12px;
    text-align: left;
}

.macro-pill span {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
}

.macro-pill strong {
    font-size: 1.05rem;
    color: var(--main-color);
}

.macro-note {
    margin-top: 12px;
    margin-bottom: 0;
    font-size: 0.82rem;
    color: var(--muted);
    text-align: left;
}

/* Conversion section */
.conversion-section {
    background: #fff7ef;
    padding: 82px 20px;
}

.conversion-section > .container > h2,
.conversion-section > .container > p {
    text-align: center;
}

.conversion-section > .container > p {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 34px;
}

.premium-preview-card {
    background: linear-gradient(135deg, #1f2b3d 0%, #264653 100%);
    border-radius: 14px;
    color: white;
    padding: 26px;
    box-shadow: var(--shadow-lg);
}

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

.preview-badge {
    background: rgba(255, 255, 255, 0.16);
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.preview-lock {
    font-size: 1.25rem;
}

.premium-preview-card h3 {
    color: white;
    margin-bottom: 10px;
}

.premium-preview-card ul {
    margin: 0 0 18px;
    padding-left: 20px;
}

.premium-preview-card li {
    margin-bottom: 8px;
}

.offer-modal-content {
    max-width: 460px;
}

.offer-modal-content p {
    text-align: center;
}

.offer-modal-content .offer-note {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 8px;
}

/* Responsive Design */
@media (max-width: 900px) {
    nav .nav {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .nav-overlay {
        transition: all 0.3s ease;
    }

    .nav-overlay.open {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: white;
        backdrop-filter: blur(10px);
        z-index: 999;
        padding: 20px;
    }

    .nav-overlay.open .mobile-nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .nav-overlay.open .mobile-nav li {
        margin: 16px 0;
    }

    .nav-overlay.open .mobile-nav a {
        font-size: 1.3rem;
        color: var(--main-color);
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .nav-overlay.open .mobile-nav .button {
        font-size: 0.98rem;
        width: min(280px, 88vw);
        justify-content: center;
    }

    .nav-overlay.open .mobile-nav li.nav-actions-mobile {
        margin-top: 10px;
    }

    .nav-overlay.open .mobile-nav a:hover {
        color: var(--accent);
    }

    .nav-close {
        display: none;
        position: absolute;
        top: 20px;
        right: 24px;
        background: none;
        border: none;
        font-size: 2.5rem;
        color: var(--main-color);
        cursor: pointer;
        z-index: 1001;
    }

    .nav-overlay.open .nav-close {
        display: block;
    }

    .hero {
        padding: 80px 20px;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .brand {
        font-size: 1.4rem;
    }

    .logo img {
        width: 50px;
        height: 50px;
    }

    nav .nav-actions {
        display: none;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero h2 {
        font-size: 1.8rem;
        margin-bottom: 16px;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .cta-button {
        padding: 12px 32px;
        font-size: 0.9rem;
    }

    #recipes {
        padding: 60px 20px;
    }

    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .recipe-card {
        max-width: 100%;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0;
        margin: 0;
    }

    .gallery-grid img {
        height: 220px;
    }

    .gallery-item figcaption {
        transform: translateY(0);
        font-size: 0.85rem;
    }

    .gallery-filters {
        gap: 8px;
        margin-bottom: 32px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .newsletter-section {
        padding: 60px 20px;
    }

    .newsletter-section h2 {
        font-size: 1.8rem;
    }

    .newsletter-benefits {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 32px;
    }

    .benefit {
        min-width: auto;
        max-width: none;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form textarea,
    .newsletter-form button {
        width: 100%;
        min-width: unset;
    }

    .about-section,
    .contact-section {
        padding: 60px 20px;
    }

    .social-links {
        gap: 12px;
    }

    .social-btn {
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    .modal-content {
        margin: 16% auto;
        padding: 28px;
        width: 90%;
        max-width: 90%;
    }

    .save-btn,
    .view-recipe-btn {
        font-size: 0.75rem;
        padding: 8px 12px;
    }

    .recipe-detail {
        padding: 40px 20px;
    }

    .recipe-detail h2 {
        font-size: 1.8rem;
    }

    .recipe-detail h3 {
        font-size: 1.4rem;
    }

    .back-to-top {
        width: 52px;
        height: 52px;
        bottom: 20px;
        right: 20px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 12px 0;
    }

    .brand {
        font-size: 1.2rem;
    }

    .logo img {
        width: 45px;
        height: 45px;
        margin-right: 8px;
    }

    .hero {
        padding: 50px 16px;
    }

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

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .cta-button {
        padding: 11px 28px;
        font-size: 0.85rem;
    }

    #recipes {
        padding: 40px 16px;
    }

    .recipes-grid {
        gap: 16px;
    }

    .card-content {
        padding: 20px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid img {
        height: 200px;
    }

    .newsletter-section {
        padding: 40px 16px;
    }

    .newsletter-section h2 {
        font-size: 1.6rem;
    }

    .social-links {
        flex-direction: column;
    }

    .social-btn {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p,
    .footer-links a {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .modal-content {
        margin: 18% auto;
        padding: 20px;
    }

    .back-to-top {
        width: 48px;
        height: 48px;
        bottom: 16px;
        right: 16px;
        font-size: 0.65rem;
    }
}

@media (min-width: 769px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 100;
    }
}

@media (min-width: 1025px) {
    .container {
        max-width: var(--max-width);
    }

    .hero h2 {
        font-size: 3.5rem;
    }

    .recipes-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }

}

/* Image Lazy Loading */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

img.loaded,
img.is-fallback {
    animation: none;
    background: none;
}

img.is-fallback {
    object-fit: contain;
    background-color: #f6f1ea;
    padding: 20px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Shared utility and accessibility styles */
.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;
}

.legal-note {
    text-align: center;
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 3000;
    background: var(--main-color);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: top 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 12px;
    color: white;
}

:focus-visible {
    outline: 3px solid var(--accent-light);
    outline-offset: 3px;
    box-shadow: 0 0 0 2px rgba(26, 35, 50, 0.3);
}

.form-status {
    min-height: 22px;
    width: 100%;
    font-size: 0.85rem;
    margin: 2px 0 0;
    text-align: left;
}

.form-status.error {
    color: #b42318;
}

.form-status.success {
    color: #157347;
}

.input-invalid {
    border-color: #b42318 !important;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12) !important;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.06);
    z-index: 2500;
}

.reading-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--second-bg-color));
    transition: width 0.15s ease;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--main-color);
    cursor: pointer;
    transition: all 0.25s ease;
    margin-left: 12px;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent);
}

.cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 2200;
    background: rgba(26, 35, 50, 0.96);
    color: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 18px 20px;
    opacity: 0;
    transform: translateY(24px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-banner.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1 1 360px;
}

.cookie-text strong {
    display: block;
    margin-bottom: 4px;
    font-family: 'Playfair Display', serif;
}

.cookie-text p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.cookie-text a {
    color: var(--accent-light);
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.cookie-btn-accept {
    background: var(--accent);
    color: white;
}

.cookie-btn-decline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.cookie-btn:hover {
    transform: translateY(-2px);
}

.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2600;
}

.toast {
    min-width: 260px;
    max-width: 360px;
    background: white;
    color: var(--main-color);
    border-left: 4px solid var(--accent);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 14px 16px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    border-left-color: #157347;
}

.toast.error {
    border-left-color: #b42318;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 30px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2400;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: min(92vw, 960px);
    width: 100%;
}

.lightbox img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    background: white;
}

.lightbox-caption {
    color: white;
    margin-top: 12px;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
}

.gallery-grid img,
.button,
.cta-button,
.filter-btn,
.save-btn,
.view-recipe-btn,
.social-btn,
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, 0.45);
    animation: ripple-effect 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-page-inner {
    max-width: 720px;
}

.error-code {
    font-size: clamp(4rem, 12vw, 8rem);
    line-height: 1;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 16px;
    font-family: 'Playfair Display', serif;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.error-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 999px;
    background: white;
    color: var(--main-color);
    border: 2px solid var(--border-color);
    font-weight: 600;
}

.error-secondary-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

body[data-theme="dark"] {
    --bg-color: #141a24;
    --second-bg-color: #f4a261;
    --text-color: #d9e1ea;
    --main-color: #f8fafc;
    --border-color: #2c3646;
    --muted: #b0becf;
    background-color: #0f1722;
    color: var(--text-color);
}

body[data-theme="dark"] .site-header,
body[data-theme="dark"] .recipe-card,
body[data-theme="dark"] .modal-content,
body[data-theme="dark"] .social-btn,
body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .gallery-grid img,
body[data-theme="dark"] .saved-recipe:hover,
body[data-theme="dark"] .error-secondary-btn {
    background-color: #182131;
    color: var(--text-color);
}

body[data-theme="dark"] .about-section,
body[data-theme="dark"] .recipe-detail,
body[data-theme="dark"] #recipes,
body[data-theme="dark"] .gallery-section,
body[data-theme="dark"] .conversion-section,
body[data-theme="dark"] .faq-section,
body[data-theme="dark"] .categories-section {
    background-color: #111926;
}

body[data-theme="dark"] .contact-section {
    background: linear-gradient(135deg, #111926 0%, #182131 100%);
}

body[data-theme="dark"] .newsletter-form input,
body[data-theme="dark"] .newsletter-form textarea,
body[data-theme="dark"] .modal input,
body[data-theme="dark"] .contact-form input,
body[data-theme="dark"] .contact-form textarea {
    background-color: #0f1722;
    color: var(--text-color);
    border-color: var(--border-color);
}

body[data-theme="dark"] .recipe-meta span,
body[data-theme="dark"] .recipe-detail .recipe-meta span {
    background-color: #223047;
    color: var(--text-color);
}

body[data-theme="dark"] .site-footer {
    background-color: #0b1220;
}

body[data-theme="dark"] .tool-card,
body[data-theme="dark"] .macro-pill,
body[data-theme="dark"] .faq-item,
body[data-theme="dark"] .faq-question,
body[data-theme="dark"] .related-recipes-grid a,
body[data-theme="dark"] .category-link-card {
    background-color: #182131;
    border-color: #2c3646;
}

body[data-theme="dark"] .premium-preview-card {
    background: linear-gradient(135deg, #141f2f 0%, #1e3441 100%);
}

body[data-theme="dark"] .tool-btn {
    background: #121b29;
    color: var(--text-color);
    border-color: #2c3646;
}

body[data-theme="dark"] .grocery-progress,
body[data-theme="dark"] .preview-badge {
    color: #ffd7ca;
}

body[data-theme="dark"] .gallery-item figcaption {
    background: linear-gradient(180deg, transparent 0%, rgba(9, 14, 22, 0.88) 100%);
}

body[data-theme="dark"] .nav-overlay.open {
    background: rgba(15, 23, 34, 0.98);
}

body[data-theme="dark"] .nav-overlay.open .mobile-nav .button-secondary {
    background: #182131;
    color: #f8fafc;
    border-color: #2c3646;
}

body[data-theme="dark"] .nav-overlay.open .mobile-nav .button-secondary:hover {
    background: #1f2b3d;
    color: #ffffff;
    border-color: var(--accent);
}

body[data-theme="dark"] .nav-overlay.open .mobile-nav .button-primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

body[data-theme="dark"] .nav-overlay.open .mobile-nav .button-primary:hover {
    background: var(--accent-dark);
    color: #ffffff;
    border-color: var(--accent-dark);
}

body[data-theme="dark"] .nav-overlay.open .mobile-nav a,
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] h4,
body[data-theme="dark"] h5,
body[data-theme="dark"] h6 {
    color: #f8fafc;
}

body[data-theme="dark"] nav .nav a,
body[data-theme="dark"] p,
body[data-theme="dark"] li,
body[data-theme="dark"] .macro-note,
body[data-theme="dark"] .tool-subtitle,
body[data-theme="dark"] .social-btn,
body[data-theme="dark"] .theme-toggle {
    color: var(--text-color);
}

@media (max-width: 768px) {
    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .toast-container {
        left: 12px;
        right: 12px;
        top: 76px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }

    .recipe-tools-grid {
        grid-template-columns: 1fr;
    }

    .related-recipes-grid,
    .category-links-grid {
        grid-template-columns: 1fr;
    }

    .macro-grid {
        grid-template-columns: 1fr;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto !important;
    }
}

@media (prefers-contrast: more) {
    :focus-visible {
        outline-width: 4px;
        outline-color: #ff8a65;
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.4);
    }

    .button,
    .cta-button,
    .filter-btn,
    .save-btn,
    .view-recipe-btn,
    .tool-btn,
    .newsletter-form button,
    .social-btn {
        border-width: 2px;
    }

    .recipe-card,
    .tool-card,
    .macro-pill,
    .modal-content {
        border-width: 2px;
    }
}
