/* ===================================================================
   CRUNCHMEAL PRO - MAIN STYLESHEET
   =================================================================== */

/* ===================================================================
   SITE HEADER
   =================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(250, 250, 248, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow var(--transition-base);
}

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

.header-inner {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    height: var(--header-height);
}

.header-logo {
    flex-shrink: 0;
}

.header-logo img,
.header-logo .custom-logo {
    height: 48px;
    width: auto;
}

.site-logo-text {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.site-logo-text .logo-icon {
    font-size: 1.5rem;
}

.site-logo-text .logo-name {
    color: var(--color-primary);
}

/* Navigation */
.primary-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current-menu-ancestor > a {
    color: var(--color-primary);
    background: rgba(230, 57, 70, 0.07);
}

.nav-menu .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: var(--space-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-base);
    z-index: 100;
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu a {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.search-toggle,
.bookmarks-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    color: var(--color-text);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.search-toggle:hover,
.bookmarks-link:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: var(--color-bg-alt);
}

.hamburger-line {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--color-text);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.mobile-menu-toggle.is-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Header Search Bar */
.header-search-bar {
    border-top: 1px solid var(--color-border);
    padding: var(--space-md) 0;
    background: var(--color-white);
    animation: slideDown 0.2s ease;
}

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

.header-search-form {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    max-width: 600px;
    margin: 0 auto;
}

.header-search-form .search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--fs-base);
    outline: none;
    background: var(--color-bg);
    transition: border-color var(--transition-fast);
}

.header-search-form .search-field:focus {
    border-color: var(--color-primary);
}

.header-search-form .search-submit,
.header-search-form .search-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.header-search-form .search-submit {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
}

.header-search-form .search-submit:hover {
    background: var(--color-primary-dark);
}

.header-search-form .search-close {
    background: var(--color-bg-alt);
    color: var(--color-text);
    border: none;
}

.header-search-form .search-close:hover {
    background: var(--color-border);
}

/* ===================================================================
   HERO SECTION
   =================================================================== */
.hero-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--color-text);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0.1) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-block: var(--space-4xl);
}

.hero-text {
    max-width: 640px;
    color: var(--color-white);
}

.hero-badge {
    margin-bottom: var(--space-md);
    font-size: 0.75rem;
}

.hero-title {
    font-size: var(--fs-4xl);
    font-family: var(--font-heading);
    color: var(--color-white);
    margin-bottom: var(--space-lg);
    line-height: 1.15;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-title a {
    color: var(--color-white);
    text-decoration: none;
}

.hero-title a:hover {
    color: var(--color-secondary);
}

.hero-desc {
    font-size: var(--fs-lg);
    color: rgba(255,255,255,0.9);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.hero-rating .star { font-size: 1.1rem; }
.hero-time, .hero-difficulty {
    color: rgba(255,255,255,0.85);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* ===================================================================
   CATEGORY PILLS
   =================================================================== */
.category-pills-section {
    padding-block: var(--space-xl);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: var(--header-height);
    z-index: 10;
}

.category-pills-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-pills-wrap::-webkit-scrollbar {
    display: none;
}

.category-pills {
    display: flex;
    gap: var(--space-sm);
    padding-bottom: 4px;
    width: max-content;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-weight: 600;
    font-family: var(--font-body);
    background: var(--color-bg-alt);
    color: var(--color-text);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.category-pill:hover {
    background: var(--color-bg);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.category-pill.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.pill-count {
    background: rgba(255,255,255,0.25);
    border-radius: var(--radius-full);
    padding: 0 6px;
    font-size: var(--fs-xs);
    min-width: 20px;
    text-align: center;
}

.category-pill.active .pill-count {
    background: rgba(255,255,255,0.2);
}

/* ===================================================================
   SECTION HEADERS
   =================================================================== */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.view-all-link {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.view-all-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* ===================================================================
   RECIPE GRIDS
   =================================================================== */
.featured-grid,
.latest-grid,
.posts-grid,
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

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

.masonry-grid {
    column-count: 3;
    column-gap: var(--space-xl);
}

.masonry-grid .recipe-card-mini {
    break-inside: avoid;
    margin-bottom: var(--space-xl);
}

@media (max-width: 1024px) {
    .featured-grid,
    .posts-grid,
    .masonry-grid { grid-template-columns: repeat(2, 1fr); column-count: 2; }
    .latest-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .featured-grid,
    .latest-grid,
    .posts-grid,
    .related-grid,
    .masonry-grid {
        grid-template-columns: 1fr;
        column-count: 1;
    }
}

/* ===================================================================
   RECIPE CARD MINI (Archive / Grid card)
   =================================================================== */
.recipe-card-mini {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
}

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

.recipe-card-mini-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: var(--color-bg-alt);
    flex-shrink: 0;
}

.recipe-card-mini-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    display: block;
}

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

.recipe-card-mini-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--color-border);
    background: var(--color-bg-alt);
    height: 100%;
}

.recipe-card-mini-image-link {
    display: block;
    height: 100%;
}

.recipe-card-category-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    z-index: 2;
    font-size: 0.65rem;
    letter-spacing: 0.8px;
    text-decoration: none;
    transition: transform var(--transition-fast);
}

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

.recipe-bookmark-btn {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.9);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(4px);
}

.recipe-bookmark-btn:hover,
.recipe-bookmark-btn.is-bookmarked {
    color: var(--color-primary);
    background: var(--color-white);
    transform: scale(1.1);
}

.recipe-card-mini-body {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.recipe-card-mini-rating {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

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

.recipe-card-mini-title {
    font-size: var(--fs-md);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.recipe-card-mini-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.recipe-card-mini-title a:hover {
    color: var(--color-primary);
}

.recipe-card-mini-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.recipe-card-mini-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-xs);
    color: var(--color-text-light);
    font-weight: 600;
}

.meta-icon { font-size: 0.85em; }

.recipe-card-mini-excerpt {
    font-size: var(--fs-sm);
    color: var(--color-text-light);
    line-height: 1.5;
    margin-bottom: var(--space-md);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-card-mini-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.recipe-card-mini-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.author-avatar-sm {
    width: 28px !important;
    height: 28px !important;
    border-radius: var(--radius-full) !important;
    object-fit: cover;
}

.author-name-sm {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-text-light);
}

.recipe-card-mini-cta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    transition: gap var(--transition-fast);
}

.recipe-card-mini-cta:hover {
    gap: 8px;
    color: var(--color-primary);
}

/* ===================================================================
   POST CARD
   =================================================================== */
.post-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
}

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

.post-card-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: var(--color-bg-alt);
}

.post-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.post-card-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--color-border);
    background: var(--color-bg-alt);
    height: 100%;
}

.post-card-category-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    text-decoration: none;
    font-size: 0.65rem;
    letter-spacing: 0.8px;
    transition: transform var(--transition-fast);
}

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

.post-card-body {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-size: var(--fs-md);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.post-card-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.post-card-title a:hover {
    color: var(--color-primary);
}

.post-card-excerpt {
    font-size: var(--fs-sm);
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: var(--space-md);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.post-card-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.post-card-author-info {
    display: flex;
    flex-direction: column;
}

.post-card-date {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.post-card-cta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    transition: gap var(--transition-fast);
}

.post-card-cta:hover { gap: 8px; color: var(--color-primary); }

/* ===================================================================
   SINGLE POST / RECIPE
   =================================================================== */
.single-hero {
    background: var(--color-bg-alt);
}

.single-hero-image {
    position: relative;
    max-height: 560px;
    overflow: hidden;
}

.single-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 560px;
}

.single-header {
    margin-bottom: var(--space-xl);
    padding-top: var(--space-xl);
}

.single-course-badge {
    margin-bottom: var(--space-md);
}

.single-title {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-lg);
    line-height: 1.2;
}

.single-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    font-size: var(--fs-sm);
    color: var(--color-text-light);
}

.single-meta-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.author-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: var(--radius-full) !important;
    object-fit: cover;
}

.author-name { font-weight: 700; color: var(--color-text); }

.single-meta-date,
.single-meta-cuisine {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.single-rating {
    margin-bottom: var(--space-lg);
}

/* ===================================================================
   RECIPE STATS BAR
   =================================================================== */
.recipe-stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.stat-item {
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-md);
    background: var(--color-white);
    text-align: left;
}

.stat-item--total {
    background: var(--color-bg-alt);
}

.stat-item .stat-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}

.stat-value {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--color-text);
    font-family: var(--font-heading);
}

/* ===================================================================
   SINGLE RECIPE CONTENT
   =================================================================== */
.single-intro.entry-content {
    font-size: var(--fs-base);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
}

.entry-content h2 { font-size: var(--fs-2xl); margin: var(--space-2xl) 0 var(--space-md); }
.entry-content h3 { font-size: var(--fs-xl); margin: var(--space-xl) 0 var(--space-md); }
.entry-content p  { margin-bottom: var(--space-md); }
.entry-content ul,
.entry-content ol { margin-bottom: var(--space-md); padding-left: var(--space-xl); }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: var(--space-xs); }
.entry-content a  { color: var(--color-primary); text-decoration: underline; }
.entry-content a:hover { color: var(--color-primary-dark); }

.entry-content img {
    border-radius: var(--radius-lg);
    margin-block: var(--space-lg);
}

.entry-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: var(--space-lg);
    margin: var(--space-xl) 0;
    font-style: italic;
    color: var(--color-text-light);
}

/* ===================================================================
   RECIPE VIDEO
   =================================================================== */
.recipe-video-section {
    margin-bottom: var(--space-2xl);
}

.section-heading {
    font-size: var(--fs-xl);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border);
}

.recipe-video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.recipe-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===================================================================
   TAGS
   =================================================================== */
.post-tags {
    margin-block: var(--space-xl);
    padding-block: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

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

.tag-label {
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--color-text-light);
}

.tag-link {
    display: inline-block;
    padding: 0.35rem 0.875rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.tag-link:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* ===================================================================
   INTERACTIVE STAR RATING
   =================================================================== */
.recipe-rate-section {
    background: var(--color-bg-alt);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    margin-block: var(--space-2xl);
}

.recipe-rate-section h3 {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-lg);
}

.interactive-rating {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.rate-star {
    color: var(--color-border);
    cursor: pointer;
    transition: color var(--transition-fast), transform var(--transition-fast);
    background: none;
    border: none;
    padding: 4px;
}

.rate-star:hover,
.rate-star.is-highlighted {
    color: var(--color-star);
    transform: scale(1.2);
}

.rate-star.is-highlighted svg {
    fill: var(--color-star);
}

.rating-message {
    font-size: var(--fs-sm);
    color: var(--color-accent);
    font-weight: 600;
    min-height: 1.5em;
}

/* ===================================================================
   RELATED RECIPES
   =================================================================== */
.related-recipes {
    margin-top: var(--space-3xl);
    padding-top: var(--space-3xl);
    border-top: 2px solid var(--color-border);
}

.related-recipes .section-title { margin-bottom: var(--space-xl); }

/* ===================================================================
   JUMP TO RECIPE (FIXED)
   =================================================================== */
.jump-to-recipe-fixed {
    position: fixed;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.jump-to-recipe-btn {
    box-shadow: var(--shadow-lg);
}

/* ===================================================================
   SIDEBAR
   =================================================================== */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-xl));
}

.sidebar .widget {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.sidebar .widget-title {
    font-size: var(--fs-md);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-primary);
}

.popular-recipes-widget-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.popular-recipe-item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.popular-recipe-thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.popular-recipe-info {
    flex: 1;
    min-width: 0;
}

.popular-recipe-title {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.3;
    transition: color var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popular-recipe-title:hover { color: var(--color-primary); }

.popular-recipe-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--color-text-light);
    margin-bottom: 2px;
}

.popular-recipe-time {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.recipe-categories-widget-list li {
    border-bottom: 1px solid var(--color-border);
}

.recipe-categories-widget-list li:last-child {
    border-bottom: none;
}

.recipe-categories-widget-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: var(--fs-sm);
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.recipe-categories-widget-list a:hover { color: var(--color-primary); }

.cat-count {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    border-radius: var(--radius-full);
    padding: 0 6px;
}

/* ===================================================================
   NEWSLETTER SECTION
   =================================================================== */
.newsletter-section {
    background: linear-gradient(135deg, #fff5f5 0%, #fff9f0 100%);
}

.newsletter-wrap {
    max-width: 580px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-icon {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
}

.newsletter-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-md);
}

.newsletter-subtitle {
    font-size: var(--fs-base);
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.newsletter-form-inner {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.newsletter-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--fs-base);
    outline: none;
    background: var(--color-white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.newsletter-privacy {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.newsletter-message {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.newsletter-message.is-success {
    background: #e8faf0;
    color: #064e3b;
}

.newsletter-message.is-error {
    background: #fef2f2;
    color: #7f1d1d;
}

.newsletter-perks {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text-light);
}

.newsletter-perks span { color: var(--color-accent); }

/* ===================================================================
   ABOUT TEASER
   =================================================================== */
.about-teaser-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.about-teaser-image {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
}

.about-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-border) 100%);
}

.about-teaser-text .badge {
    margin-bottom: var(--space-md);
}

.about-teaser-text h2 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-md);
}

.about-teaser-text p {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.about-teaser-text .btn {
    margin-top: var(--space-md);
}

@media (max-width: 768px) {
    .about-teaser-grid {
        grid-template-columns: 1fr;
    }
    .about-teaser-image {
        max-width: 300px;
        margin: 0 auto;
    }
}

/* ===================================================================
   SITE FOOTER
   =================================================================== */
.site-footer {
    background: #1a1a1a;
    color: rgba(255,255,255,0.8);
}

.footer-widgets {
    padding: var(--space-4xl) 0 var(--space-2xl);
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
}

.footer-brand .footer-logo img,
.footer-brand .footer-logo .custom-logo {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: var(--space-md);
}

.footer-logo-text {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.footer-tagline {
    color: rgba(255,255,255,0.5);
    font-size: var(--fs-sm);
    margin-bottom: var(--space-lg);
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    transition: all var(--transition-fast);
    text-decoration: none;
}

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

.footer-widget-title {
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    color: var(--color-white);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-widget-default ul li {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.footer-widget-default ul li:last-child {
    border-bottom: none;
}

.footer-widget-default ul li a {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: var(--fs-sm);
    transition: color var(--transition-fast);
}

.footer-widget-default ul li a:hover {
    color: var(--color-secondary);
}

.footer-widget-default .cat-count {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.4);
}

.footer-widget-default p {
    color: rgba(255,255,255,0.6);
    font-size: var(--fs-sm);
    margin-bottom: var(--space-md);
}

.footer-newsletter-input-wrap {
    display: flex;
    gap: var(--space-sm);
}

.footer-newsletter-input-wrap input {
    flex: 1;
    padding: 0.6rem 0.875rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.05);
    color: var(--color-white);
    font-size: var(--fs-sm);
    outline: none;
    transition: border-color var(--transition-fast);
    min-width: 0;
}

.footer-newsletter-input-wrap input:focus {
    border-color: var(--color-primary);
}

.footer-newsletter-input-wrap input::placeholder {
    color: rgba(255,255,255,0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: var(--space-lg) 0;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-copyright {
    font-size: var(--fs-xs);
    color: rgba(255,255,255,0.4);
    margin: 0;
}

.footer-menu {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.footer-menu a {
    font-size: var(--fs-xs);
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-menu a:hover {
    color: rgba(255,255,255,0.8);
}

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

@media (max-width: 640px) {
    .footer-widgets-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ===================================================================
   ARCHIVE PAGE
   =================================================================== */
.archive-header {
    margin-bottom: var(--space-2xl);
}

.archive-title {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-md);
}

.archive-description {
    font-size: var(--fs-base);
    color: var(--color-text-light);
    max-width: 680px;
}

/* ===================================================================
   SEARCH PAGE
   =================================================================== */
.search-header {
    margin-bottom: var(--space-xl);
}

.search-title em {
    color: var(--color-primary);
    font-style: normal;
}

.search-count {
    color: var(--color-text-light);
    font-size: var(--fs-sm);
    margin-top: var(--space-sm);
}

.search-bar-section {
    margin-bottom: var(--space-2xl);
}

.search-bar-section .search-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 560px;
}

.search-bar-section .search-field {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--fs-base);
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-bar-section .search-field:focus {
    border-color: var(--color-primary);
}

.search-bar-section .search-submit {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: var(--fs-sm);
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-bar-section .search-submit:hover {
    background: var(--color-primary-dark);
}

.no-results {
    text-align: center;
    padding: var(--space-4xl);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
}

.no-results h2 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-md);
}

.no-results p {
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.search-suggestions ul {
    list-style: disc;
    display: inline-block;
    text-align: left;
    padding-left: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.search-suggestions li {
    color: var(--color-text-light);
    font-size: var(--fs-sm);
    margin-bottom: var(--space-xs);
}

/* ===================================================================
   404 PAGE
   =================================================================== */
.error-404-wrap {
    text-align: center;
    padding: var(--space-4xl) 0;
    max-width: 680px;
    margin: 0 auto;
}

.error-404-visual {
    position: relative;
    margin-bottom: var(--space-2xl);
}

.error-number {
    font-size: clamp(6rem, 15vw, 10rem);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-bg-alt);
    line-height: 1;
}

.error-emoji {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
}

.error-404-content h1 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-md);
}

.error-404-content p {
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-2xl);
}

.error-search, .error-popular {
    margin-top: var(--space-3xl);
    text-align: left;
}

.error-search h2, .error-popular h2 {
    font-size: var(--fs-xl);
    margin-bottom: var(--space-lg);
}

/* ===================================================================
   PAGE TEMPLATES
   =================================================================== */
.page-header { margin-bottom: var(--space-xl); }
.page-title  { font-size: var(--fs-3xl); }

/* About page */
.about-page-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    margin-bottom: var(--space-4xl);
}

.about-hero-image img {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.about-hero-text h1 {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-lg);
}

/* Contact page */
.contact-page-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-3xl);
    align-items: start;
}

/* ===================================================================
   ARCHIVE RECIPE WITH FILTERS
   =================================================================== */
.archive-recipe-wrap {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.recipe-filters {
    position: sticky;
    top: calc(var(--header-height) + var(--space-xl));
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    border: 1px solid var(--color-border);
}

.filter-group {
    margin-bottom: var(--space-xl);
}

.filter-group:last-child { margin-bottom: 0; }

.filter-group-title {
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--color-text);
    cursor: pointer;
    padding: var(--space-xs) 0;
    transition: color var(--transition-fast);
}

.filter-option:hover { color: var(--color-primary); }

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* ===================================================================
   TAXONOMY ARCHIVE
   =================================================================== */
.taxonomy-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    padding: var(--space-4xl) 0;
    margin-bottom: var(--space-3xl);
    text-align: center;
}

.taxonomy-hero .archive-title { color: var(--color-white); }
.taxonomy-hero .archive-title::after { background: rgba(255,255,255,0.5); }
.taxonomy-hero .archive-description { color: rgba(255,255,255,0.8); margin: 0 auto; }

/* ===================================================================
   COMMENTS
   =================================================================== */
.comments-section {
    margin-top: var(--space-3xl);
    padding-top: var(--space-3xl);
    border-top: 2px solid var(--color-border);
}

.comments-title {
    font-size: var(--fs-xl);
    margin-bottom: var(--space-xl);
}

.comment-list { margin: 0; }

.comment {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
}

.comment:last-child { border-bottom: none; }

.comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.comment-content { flex: 1; }

.comment-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.comment-author-name { font-weight: 700; font-size: var(--fs-sm); }
.comment-date { font-size: var(--fs-xs); color: var(--color-text-muted); }

.comment-text {
    font-size: var(--fs-sm);
    line-height: 1.7;
    color: var(--color-text);
}

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

.reply a {
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

.comment-respond {
    margin-top: var(--space-xl);
    padding: var(--space-xl);
    background: var(--color-bg-alt);
    border-radius: var(--radius-xl);
}

.comment-reply-title {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-xl);
}

.comment-form-fields,
.comment-form > p { margin-bottom: var(--space-lg); }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--fs-base);
    background: var(--color-white);
    color: var(--color-text);
    font-family: var(--font-body);
    transition: border-color var(--transition-fast);
    outline: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--color-primary);
}

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

.comment-form .form-submit input {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    width: auto;
}

.comment-form .form-submit input:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ===================================================================
   AD SLOTS
   =================================================================== */
.ad-slot {
    background: var(--color-bg-alt);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===================================================================
   MOBILE RESPONSIVE
   =================================================================== */
@media (max-width: 1024px) {
    .primary-nav { display: none; }
    .mobile-menu-toggle { display: flex; }

    .primary-nav.is-open {
        display: block;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-white);
        z-index: 999;
        overflow-y: auto;
        padding: var(--space-xl);
        animation: slideIn 0.3s ease;
    }

    @keyframes slideIn {
        from { opacity: 0; transform: translateX(-20px); }
        to   { opacity: 1; transform: translateX(0); }
    }

    .primary-nav.is-open .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-xs);
    }

    .primary-nav.is-open .nav-menu > li > a {
        padding: var(--space-md);
        font-size: var(--fs-md);
        border-bottom: 1px solid var(--color-border);
    }

    .primary-nav.is-open .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: var(--space-lg);
        background: var(--color-bg-alt);
        border-radius: var(--radius-md);
        margin-top: var(--space-xs);
    }

    .hero-title { font-size: var(--fs-3xl); }
    .hero-section { min-height: 60vh; }

    .about-teaser-grid { grid-template-columns: 1fr; }
    .about-page-hero { grid-template-columns: 1fr; }
    .contact-page-grid { grid-template-columns: 1fr; }
    .archive-recipe-wrap { grid-template-columns: 1fr; }
    .recipe-filters { position: static; }
}

@media (max-width: 768px) {
    .site-main { padding-top: var(--space-xl); }
    .recipe-stats-bar { grid-template-columns: repeat(3, 1fr); }
    .stat-item { min-width: unset; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .newsletter-form-inner { flex-direction: column; }
    .footer-bottom-inner { text-align: center; }
}

@media (max-width: 480px) {
    :root { --header-height: 64px; }
    .container { padding-inline: var(--space-md); }
    .recipe-stats-bar { display: grid; grid-template-columns: 1fr 1fr; }
    .hero-title { font-size: var(--fs-2xl); }
    .single-title { font-size: var(--fs-2xl); }
}
