/*
Theme Name: RecipeTips Pro
Theme URI: https://recipetips.net
Author: RecipeTips Culinary & Science Engineering Lab
Author URI: https://recipetips.net/about/
Description: Ultra-fast, UX-first, Google News and Recipe Schema compliant WordPress theme inspired by NYT Cooking, Serious Eats, and BBC Good Food. Features real-time serving scaling, metric/US unit toggle, Screen WakeLock cook mode, and ink-friendly print layout.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: recipetips
*/

:root {
    --rt-primary: #d9381e;
    --rt-primary-dark: #b82810;
    --rt-primary-light: #fff2f0;
    --rt-accent: #2c5e3b;
    --rt-accent-light: #eef6f0;
    --rt-dark: #1a1a1a;
    --rt-text: #2d2d2d;
    --rt-muted: #666666;
    --rt-light: #f9f8f6;
    --rt-border: #e8e5e0;
    --rt-surface: #ffffff;
    --rt-radius-sm: 6px;
    --rt-radius-md: 10px;
    --rt-radius-lg: 16px;
    --rt-shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --rt-shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --rt-shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
    --rt-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --rt-font-serif: "Charter", "Bitstream Charter", "Sitka Text", "Cambria", Georgia, serif;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--rt-font-sans);
    color: var(--rt-text);
    background-color: var(--rt-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
.site-header {
    background: var(--rt-surface);
    border-bottom: 1px solid var(--rt-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--rt-dark);
}

.brand-logo .brand-highlight {
    color: var(--rt-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-weight: 600;
    font-size: 15px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--rt-radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--rt-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--rt-primary-dark);
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--rt-border);
    color: var(--rt-dark);
}

.btn-outline:hover {
    border-color: var(--rt-primary);
    color: var(--rt-primary);
}

/* Hero Section */
.hero-section {
    padding: 40px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.featured-card {
    background: var(--rt-surface);
    border-radius: var(--rt-radius-lg);
    overflow: hidden;
    box-shadow: var(--rt-shadow-sm);
    border: 1px solid var(--rt-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--rt-shadow-md);
}

.featured-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #eee;
}

.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--rt-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-content {
    padding: 28px;
}

.recipe-title {
    font-family: var(--rt-font-serif);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 12px;
    color: var(--rt-dark);
}

.recipe-excerpt {
    font-size: 16px;
    color: var(--rt-muted);
    margin: 0 0 20px;
}

.recipe-meta-chips {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--rt-muted);
    font-weight: 600;
}

.meta-chip {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Secondary Cards Column */
.sidebar-recipe-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mini-recipe-card {
    display: flex;
    gap: 16px;
    background: var(--rt-surface);
    border-radius: var(--rt-radius-md);
    padding: 12px;
    border: 1px solid var(--rt-border);
    box-shadow: var(--rt-shadow-sm);
}

.mini-recipe-thumb {
    width: 110px;
    height: 85px;
    border-radius: var(--rt-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}

.mini-recipe-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-recipe-title {
    font-family: var(--rt-font-serif);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 6px;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--rt-dark);
}

.section-title {
    font-family: var(--rt-font-serif);
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    color: var(--rt-dark);
}

/* Grid Layouts */
.recipe-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 48px;
}

.recipe-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

/* Footer */
.site-footer {
    background: var(--rt-dark);
    color: #a0a0a0;
    padding: 60px 0 30px;
    margin-top: 80px;
    font-size: 14px;
}

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

.footer-col h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .recipe-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .recipe-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

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

/* ----------------------------------------------------
 * Category Sub-Navigation Bar
 * ---------------------------------------------------- */
.category-subnav {
    background: #fff;
    border-bottom: 1px solid var(--rt-border);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.cat-nav-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
}

.cat-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--rt-dark);
    background: var(--rt-light);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cat-pill:hover {
    background: #fff;
    border-color: var(--rt-border);
    color: var(--rt-primary);
    transform: translateY(-1px);
}

.cat-pill.active {
    background: var(--rt-primary);
    color: #fff;
}

/* ----------------------------------------------------
 * Header 25-Language Switcher
 * ---------------------------------------------------- */
.header-lang-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.header-lang-select {
    padding: 8px 12px;
    border-radius: var(--rt-radius-sm);
    border: 1px solid var(--rt-border);
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    color: var(--rt-dark);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.header-lang-select:hover, .header-lang-select:focus {
    border-color: var(--rt-primary);
}

/* ----------------------------------------------------
 * Prominent Social Share Bar & Ask AI Button
 * ---------------------------------------------------- */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--rt-light);
    border: 1px solid var(--rt-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--rt-dark);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--rt-shadow-sm);
}

.share-btn.pinterest-btn:hover {
    background: #fff0f2;
    border-color: #e60023;
    color: #e60023;
}

.share-btn.whatsapp-btn:hover {
    background: #e8fbf0;
    border-color: #25d366;
    color: #128c7e;
}

.share-btn.x-btn:hover {
    background: #f0f0f0;
    border-color: #000;
    color: #000;
}

.share-btn.fb-btn:hover {
    background: #eaf2fd;
    border-color: #1877f2;
    color: #1877f2;
}

.btn-ask-ai {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #fff;
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.btn-ask-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.45);
    color: #fff;
}
