/*
Theme Name: CrunchMeal Pro
Theme URI: https://crunchmeal.com
Author: CrunchMeal
Author URI: https://crunchmeal.com

Description: A premium food and recipe blog theme built for Pinterest-driven traffic, SEO, and Core Web Vitals. Features custom recipe cards with schema.org markup, Pinterest portrait images and Rich Pins, threaded comments, related posts, share buttons, author bios, breadcrumb schema, Open Graph and Twitter Cards, full block editor support, and a unified categories/tags system that works for both regular posts and recipes. Compatible with Yoast, Rank Math, SEOPress, AIOSEO, and WooCommerce.
Version: 1.1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crunchmeal-pro
Tags: food-and-drink, blog, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, editor-style, post-formats
*/

/* ===================================================================
   CSS CUSTOM PROPERTIES
   =================================================================== */
:root {
    --color-primary: #E63946;
    --color-primary-dark: #c1121f;
    --color-primary-light: #ff6b6b;
    --color-secondary: #F4A261;
    --color-secondary-dark: #e07b3a;
    --color-accent: #2A9D8F;
    --color-accent-dark: #1f7a6e;
    --color-bg: #FAFAF8;
    --color-bg-alt: #F0EFEC;
    --color-text: #2D2D2D;
    --color-text-light: #6B6B6B;
    --color-text-muted: #9B9B9B;
    --color-white: #FFFFFF;
    --color-border: #E5E5E0;
    --color-pinterest: #E60023;
    --color-star: #F4A261;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --fs-xs: clamp(0.75rem, 1.5vw, 0.875rem);
    --fs-sm: clamp(0.875rem, 1.8vw, 1rem);
    --fs-base: clamp(1rem, 2vw, 1.125rem);
    --fs-md: clamp(1.125rem, 2.2vw, 1.25rem);
    --fs-lg: clamp(1.25rem, 2.5vw, 1.5rem);
    --fs-xl: clamp(1.5rem, 3vw, 2rem);
    --fs-2xl: clamp(2rem, 4vw, 2.75rem);
    --fs-3xl: clamp(2.5rem, 5vw, 3.5rem);
    --fs-4xl: clamp(3rem, 6vw, 4.5rem);

    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.15), 0 8px 20px rgba(0,0,0,0.1);

    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;

    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1200px;
    --container-2xl: 1400px;

    --header-height: 72px;
    --sidebar-width: 340px;
}

/* ===================================================================
   RESET & BASE
   =================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

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

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

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

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

ul, ol { list-style: none; }

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font-body);
}

input, textarea, select {
    font-family: var(--font-body);
    font-size: var(--fs-base);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
}

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

/* ===================================================================
   LAYOUT
   =================================================================== */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-inline: auto;
    padding-inline: var(--space-lg);
}

.container--wide { max-width: var(--container-2xl); }
.container--narrow { max-width: var(--container-md); }

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-4xl);
}

.content-sidebar-wrap {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--space-3xl);
    align-items: start;
}

@media (max-width: 1024px) {
    .content-sidebar-wrap {
        grid-template-columns: 1fr;
    }
}

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

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.section-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-xl);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
}

.section-title.centered::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ===================================================================
   BUTTONS
   =================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-weight: 700;
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all var(--transition-base);
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

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

.btn--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.35);
}

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

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

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

.btn--accent:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 157, 143, 0.35);
}

.btn--pinterest {
    background: var(--color-pinterest);
    color: var(--color-white);
    border-color: var(--color-pinterest);
}

.btn--pinterest:hover {
    background: #c0001d;
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 0, 35, 0.35);
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: var(--fs-xs);
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: var(--fs-md);
}

/* ===================================================================
   BADGES
   =================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge--primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.badge--secondary {
    background: var(--color-secondary);
    color: var(--color-white);
}

.badge--accent {
    background: var(--color-accent);
    color: var(--color-white);
}

/* ===================================================================
   STAR RATING
   =================================================================== */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating .star {
    color: #DDD;
    font-size: 1rem;
    line-height: 1;
}

.star-rating .star.filled { color: var(--color-star); }
.star-rating .star.half { color: var(--color-star); }

.rating-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.rating-count {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

/* ===================================================================
   FORMS
   =================================================================== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--color-text);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    color: var(--color-text);
    font-size: var(--fs-base);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ===================================================================
   BREADCRUMBS
   =================================================================== */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.breadcrumbs a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

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

.breadcrumbs .separator {
    color: var(--color-border);
    font-size: 0.7rem;
}

/* ===================================================================
   PAGINATION
   =================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-3xl);
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: 600;
    border: 2px solid var(--color-border);
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.pagination a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(230, 57, 70, 0.05);
}

.pagination .current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* ===================================================================
   SECTION SPACING
   =================================================================== */
.section {
    padding-block: var(--space-4xl);
}

.section--alt {
    background: var(--color-bg-alt);
}

.section--dark {
    background: var(--color-text);
    color: var(--color-white);
}

/* ===================================================================
   SKELETON LOADING
   =================================================================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

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

/* ===================================================================
   NOTICES & ALERTS
   =================================================================== */
.notice {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid;
    margin-bottom: var(--space-lg);
}

.notice--info { background: #e8f4fd; border-color: #3b82f6; color: #1e3a5f; }
.notice--success { background: #e8faf0; border-color: #10b981; color: #064e3b; }
.notice--warning { background: #fff8e6; border-color: var(--color-secondary); color: #7c5a00; }
.notice--error { background: #fef2f2; border-color: var(--color-primary); color: #7f1d1d; }

/* ===================================================================
   PRINT STYLES
   =================================================================== */
@media print {
    .site-header, .site-footer, .sidebar, .pinterest-overlay,
    .jump-to-recipe-fixed, .comments-section, .related-recipes,
    .ad-slot, .btn--pinterest { display: none !important; }

    body { background: white; color: black; font-size: 12pt; }

    .recipe-card { box-shadow: none; border: 1px solid #ccc; }

    a { color: black; text-decoration: underline; }
}
