/*
Theme Name: Tofu For U Child
Theme URI: https://tofuforu.com
Description: Child theme of Twenty Twenty-Five. Styles single recipe posts to match the Tofu For U look, with a cute recipe card and built-in Recipe schema.
Author: Tofu For U
Template: twentytwentyfive
Version: 1.0
*/

/* ================= PALETTE ================= */
:root {
    --bg-cream: #FFFDF9; --primary: #FFA69E; --primary-hover: #FF8A80;
    --matcha: #A3C4BC; --butter: #F6E288; --sky: #A8DADC; --cork: #D4BAA5;
    --text-main: #5D4A46; --text-light: #8C7A76; --white: #FFFFFF;
    --font-heading: 'Baloo 2', cursive; --font-body: 'Nunito', sans-serif; --font-hand: 'Caveat', cursive;
    --shadow-cute: 0 12px 25px rgba(93, 74, 70, 0.06);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* These rules only load on single posts (gated in functions.php) */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style="font-size:22px"><text y="20">✨</text></svg>'), auto;
    font-family: var(--font-body); color: var(--text-main);
    background-color: var(--bg-cream); line-height: 1.7; font-size: 1.1rem;
    background-image: radial-gradient(rgba(255, 166, 158, 0.3) 2px, transparent 2px);
    background-size: 30px 30px;
}
a, button, .btn-cute, input { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style="font-size:22px"><text y="20">🌸</text></svg>'), pointer !important; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg-cream); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; border: 3px solid var(--bg-cream); }
h1,h2,h3,h4 { font-family: var(--font-heading); color: var(--text-main); line-height: 1.3; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ================= HEADER ================= */
header#header { position: fixed; top: 0; width: 100%; padding: 15px 5%; display: flex; justify-content: space-between; align-items: center; z-index: 1000; background: rgba(255,253,249,0.95); backdrop-filter: blur(8px); border-bottom: 3px dashed #F1E5E3; transition: 0.3s; }
header#header.scrolled { padding: 10px 5%; box-shadow: var(--shadow-cute); border-bottom: none; }
.logo { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.logo span { color: var(--matcha); }
.header-right { display: flex; align-items: center; gap: 30px; }
nav ul { display: flex; gap: 20px; list-style: none; }
nav ul li a { font-family: var(--font-heading); font-weight: 600; font-size: 1.15rem; color: var(--text-light); position: relative; padding: 5px; transition: 0.3s; }
nav ul li a:hover { color: var(--primary); }
nav ul li a::after { content: '✿'; position: absolute; top: -15px; right: -5px; font-size: 0.8rem; color: var(--butter); transform: scale(0); transition: var(--transition); }
nav ul li a:hover::after { transform: scale(1) rotate(15deg); }
.search-box { display: flex; align-items: center; background: var(--white); border: 2px dashed var(--matcha); border-radius: 30px; padding: 5px 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); }
.search-box input { border: none; outline: none; font-family: var(--font-body); background: transparent; width: 140px; font-size: 0.95rem; color: var(--text-main); }
.search-box button { background: transparent; border: none; padding: 0; outline: none; display: flex; align-items: center; cursor: pointer; }
.search-box i { color: var(--matcha); font-size: 1.1rem; transition: 0.3s; }
.search-box button:hover i { transform: scale(1.1); color: var(--primary); }
.menu-toggle { display: none; font-size: 2rem; color: var(--primary); cursor: pointer; }

/* ================= SINGLE POST LAYOUT ================= */
.single-wrap { max-width: 780px; margin: 0 auto; padding: 140px 20px 60px; }
.single-head { text-align: center; margin-bottom: 30px; }
.post-cat { display: inline-block; background: var(--white); color: var(--primary); padding: 6px 18px; border-radius: 30px; font-family: var(--font-heading); font-weight: 800; font-size: 1rem; box-shadow: 0 4px 10px rgba(0,0,0,0.05); border: 2px dashed rgba(255,166,158,0.4); margin-bottom: 18px; transition: 0.3s; }
.post-cat:hover { background: var(--butter); border-color: var(--butter); color: var(--text-main); }
.single-title { font-size: 3rem; line-height: 1.15; margin-bottom: 16px; }
.single-meta { color: var(--text-light); font-weight: 600; font-size: 1rem; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.single-meta i { color: var(--matcha); margin-right: 4px; }
.single-thumb { margin: 10px 0 40px; position: relative; }
.single-thumb img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 24px; border: 10px solid var(--white); box-shadow: var(--shadow-cute); }

/* ================= POST CONTENT (blocks from editor) ================= */
.post-content { font-size: 1.15rem; color: var(--text-main); }
.post-content > * { margin-bottom: 22px; }
.post-content h2 { font-size: 2rem; margin: 40px 0 14px; position: relative; display: inline-block; }
.post-content h2::after { content: ''; position: absolute; bottom: 2px; left: -2%; width: 104%; height: 10px; background: var(--butter); z-index: -1; border-radius: 10px; transform: rotate(-1deg); opacity: 0.75; }
.post-content h3 { font-size: 1.5rem; margin: 30px 0 10px; color: var(--primary); }
.post-content p { line-height: 1.8; }
.post-content a { color: var(--primary); font-weight: 700; border-bottom: 2px dotted var(--primary); }
.post-content ul, .post-content ol { padding-left: 28px; }
.post-content li { margin-bottom: 10px; }
.post-content img { border-radius: 18px; box-shadow: var(--shadow-cute); margin: 10px auto; }
.post-content blockquote { background: #FEF9C3; padding: 25px 30px; border-radius: 4px; border-bottom-right-radius: 40px 8px; font-family: var(--font-hand); font-size: 1.6rem; color: var(--text-main); box-shadow: 3px 8px 18px rgba(0,0,0,0.05); }

/* ================= RECIPE CARD ================= */
.recipe-card { background: var(--white); border: 2px dashed var(--matcha); border-radius: 26px; padding: 45px 38px 40px; margin: 55px 0; position: relative; box-shadow: var(--shadow-cute); }
.recipe-card::before { content: ''; position: absolute; top: -16px; left: 50%; width: 120px; height: 34px; background: repeating-linear-gradient(45deg, var(--primary), var(--primary) 10px, #ffb5af 10px, #ffb5af 20px); transform: translateX(-50%) rotate(-3deg); opacity: 0.9; box-shadow: 1px 2px 4px rgba(0,0,0,0.05); }
.recipe-card-title { text-align: center; font-size: 2.2rem; margin-bottom: 8px; }
.recipe-card-sub { text-align: center; font-family: var(--font-hand); font-size: 1.5rem; color: var(--text-light); margin-bottom: 25px; }
.recipe-meta-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
.recipe-chip { background: var(--bg-cream); border: 2px dashed rgba(93,74,70,0.12); border-radius: 50px; padding: 10px 22px; font-family: var(--font-heading); font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.recipe-chip span { color: var(--text-light); font-weight: 600; }
.recipe-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; }
.recipe-col h3 { font-family: var(--font-heading); font-size: 1.6rem; margin-bottom: 16px; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
.ingredients { list-style: none; }
.ingredients li { position: relative; padding: 10px 0 10px 34px; border-bottom: 1px dashed #F0EAE8; font-size: 1.08rem; line-height: 1.5; }
.ingredients li::before { content: '🌿'; position: absolute; left: 0; top: 9px; font-size: 1.1rem; }
.steps { list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 4px 0 24px 56px; font-size: 1.08rem; line-height: 1.6; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 38px; height: 38px; background: var(--primary); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 800; font-size: 1.2rem; box-shadow: 0 5px 12px rgba(255,166,158,0.4); }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 18px; top: 40px; bottom: 4px; width: 2px; background: repeating-linear-gradient(var(--matcha) 0 4px, transparent 4px 9px); }

/* ================= BACK TO SCRAPBOOK ================= */
.btn-cute { display: inline-flex; align-items: center; gap: 8px; justify-content: center; padding: 12px 30px; background-color: var(--primary); color: var(--white); border-radius: 50px; font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; border: 2px dashed var(--white); box-shadow: 0 8px 20px rgba(255,166,158,0.4); transition: var(--transition); }
.btn-cute:hover { transform: translateY(-4px) scale(1.04); box-shadow: 0 12px 25px rgba(255,166,158,0.5); }
.post-foot-nav { text-align: center; margin-top: 50px; }

/* ================= FOOTER ================= */
footer { text-align: center; padding: 60px 8% 40px; border-top: 3px dashed #EAE1DF; background: var(--white); margin-top: 40px; }
.footer-logo { font-family: var(--font-heading); font-size: 2.5rem; color: var(--primary); font-weight: 800; margin-bottom: 15px; display: inline-block; }
.socials { display: flex; justify-content: center; gap: 20px; margin: 25px 0; }
.socials a { width: 50px; height: 50px; background: var(--bg-cream); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--matcha); transition: var(--transition); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.socials a:hover { background: var(--matcha); color: var(--white); transform: translateY(-5px) rotate(15deg); }
.back-to-top { position: fixed; bottom: -80px; right: 30px; background: var(--white); color: var(--primary); width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; box-shadow: 0 10px 20px rgba(0,0,0,0.1); border: 3px dashed var(--primary); transition: 0.4s cubic-bezier(0.25,0.8,0.25,1); z-index: 1000; }
.back-to-top.show { bottom: 30px; }
.back-to-top:hover { background: var(--primary); color: var(--white); transform: translateY(-8px); }

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .search-box { display: none; }
    nav { position: absolute; top: 100%; left: 0; width: 100%; background: rgba(255,253,249,0.98); padding: 20px 0; border-bottom: 2px dashed #E5D6D3; display: none; box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
    nav.active { display: block; }
    nav ul { flex-direction: column; text-align: center; gap: 15px; }
    .single-title { font-size: 2.1rem; }
    .single-wrap { padding: 120px 18px 50px; }
    .recipe-card { padding: 40px 22px 30px; }
    .recipe-cols { grid-template-columns: 1fr; gap: 25px; }
}
