/*
Theme Name: Nan's Kitchen
Theme URI: https://nancyoster.com
Author: Shaun Oster
Description: A warm, clean recipe blog theme for Grandma Nan's Kitchen.
Version: 1.0.4
Text Domain: nans-kitchen
*/

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: #3d3d3d;
    background-color: #faf9f7;
}

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

a { color: #8b6fa3; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #6b4f83; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    font-weight: normal;
    line-height: 1.3;
    color: #2d2d2d;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p { margin-bottom: 1.5rem; }

blockquote {
    border-left: 4px solid #c09ee2;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #666;
}

.site-container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
.content-area { max-width: 1000px; margin: 0 auto; }

/* HEADER */
.site-header {
    background: linear-gradient(135deg, #f5f0f7 0%, #fff 100%);
    border-bottom: 1px solid #e8e4eb;
    padding: 1.5rem 0;
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.site-branding { padding: 1rem 0; text-align: center; }

.site-title {
    font-size: 2.5rem;
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    margin: 0;
    letter-spacing: 0.02em;
}

.site-title a { color: #4a3f5c; text-decoration: none; }
.site-title a:hover { color: #8b6fa3; }

.site-description { font-size: 1rem; color: #7a7a7a; font-style: italic; margin-top: 0.25rem; text-align: center; }

.header-image { width: 100%; max-height: 280px; overflow: hidden; margin-bottom: 0; }
.header-image img { width: 100%; height: auto; object-fit: cover; }

/* NAVIGATION - STICKY */
.main-navigation {
    width: 100%;
    background: #4a3f5c;
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-menu li { position: relative; }

.nav-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: #fff;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    background: #8b6fa3;
    color: #fff;
}

.menu-toggle {
    display: none;
    background: #4a3f5c;
    color: #fff;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
}

/* MAIN CONTENT */
.site-main { padding: 3rem 0; min-height: 60vh; }

/* POSTS & RECIPES */
.post, .page {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 3rem;
    overflow: hidden;
}

.entry-header { padding: 2rem 2.5rem 1rem; }
.entry-title { font-size: 2rem; margin-bottom: 0.5rem; }
.entry-title a { color: #2d2d2d; }
.entry-title a:hover { color: #8b6fa3; }

.entry-meta { font-size: 0.85rem; color: #888; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
.entry-meta a { color: #888; }
.entry-meta a:hover { color: #8b6fa3; }

.post-thumbnail { margin: 0; }
.post-thumbnail img { width: 100%; height: auto; }

.entry-content { padding: 1rem 2.5rem 2rem; }
.entry-content img { border-radius: 4px; margin: 1.5rem auto; }
.entry-content .wp-caption { max-width: 100%; margin: 1.5rem auto; }
.entry-content .wp-caption-text { font-size: 0.85rem; color: #888; text-align: center; padding: 0.5rem; font-style: italic; }
.entry-content ul, .entry-content ol { margin: 1.5rem 0; padding-left: 2rem; }
.entry-content li { margin-bottom: 0.5rem; }

.entry-footer { padding: 1rem 2.5rem 2rem; border-top: 1px solid #f0f0f0; font-size: 0.85rem; color: #888; }
.cat-links, .tags-links { display: block; margin-bottom: 0.5rem; }

/* RECIPE ACTIONS */
.recipe-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.5rem 2.5rem;
    background: #f8f6fa;
    border-top: 1px solid #e8e4eb;
}

.recipe-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border: 2px solid #c09ee2;
    border-radius: 50px;
    color: #6b4f83;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recipe-btn:hover { background: #c09ee2; color: #fff; }
.recipe-btn svg { width: 18px; height: 18px; }

/* ARCHIVE / LISTING */
.archive-header, .page-header { text-align: center; padding: 2rem 0 3rem; }
.archive-title, .page-title { font-size: 2rem; color: #4a3f5c; }
.archive-description { color: #666; font-style: italic; margin-top: 0.5rem; }

.posts-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.posts-grid .post { margin-bottom: 0; }
.posts-grid .entry-header { padding: 1.5rem 1.5rem 1rem; }
.posts-grid .entry-title { font-size: 1.5rem; }
.posts-grid .entry-content { padding: 0.5rem 1.5rem 1.5rem; }
.posts-grid .entry-content p { margin-bottom: 0; }

.read-more {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #f5f0f7;
    border-radius: 4px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    color: #6b4f83;
    transition: all 0.2s ease;
}
.read-more:hover { background: #c09ee2; color: #fff; }

/* PAGINATION */
.pagination { display: flex; justify-content: center; gap: 0.5rem; padding: 2rem 0; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #e8e4eb;
    border-radius: 4px;
    color: #6b4f83;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
}
.pagination a:hover { background: #f5f0f7; border-color: #c09ee2; }
.pagination .current { background: #c09ee2; border-color: #c09ee2; color: #fff; }

/* WIDGETS */
.widget-area { padding: 2rem 0; }
.widget { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); padding: 1.5rem; margin-bottom: 2rem; }
.widget-title { font-size: 1.1rem; color: #4a3f5c; padding-bottom: 0.75rem; border-bottom: 2px solid #c09ee2; margin-bottom: 1rem; }
.widget ul { list-style: none; padding: 0; }
.widget li { padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0; }
.widget li:last-child { border-bottom: none; }

/* FOOTER */
.site-footer { background: #4a3f5c; color: #c9c0d4; padding: 3rem 0 2rem; margin-top: 3rem; }
.footer-content { text-align: center; }
.footer-tagline { font-size: 1.25rem; font-style: italic; color: #e8e0f0; margin-bottom: 1.5rem; }
.footer-nav { margin-bottom: 1.5rem; }
.footer-nav a { color: #c9c0d4; margin: 0 1rem; font-size: 0.9rem; }
.footer-nav a:hover { color: #fff; }
.site-info { font-size: 0.85rem; color: #9a90a8; }
.site-info a { color: #c09ee2; }
.heart { color: #e07878; }

/* COMMENTS */
.comments-area { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); padding: 2rem; margin-top: 2rem; }
.comments-title { font-size: 1.5rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid #c09ee2; }
.comment-list { list-style: none; padding: 0; }
.comment { padding: 1.5rem 0; border-bottom: 1px solid #f0f0f0; }
.comment:last-child { border-bottom: none; }
.comment-author { font-weight: bold; color: #4a3f5c; }
.comment-meta { font-size: 0.85rem; color: #888; margin-bottom: 0.75rem; }
.comment-form label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%; padding: 0.75rem; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 1rem; font-family: inherit; font-size: 1rem;
}
.comment-form textarea { min-height: 150px; }
.comment-form input[type="submit"] { background: #c09ee2; color: #fff; border: none; padding: 0.75rem 2rem; border-radius: 50px; cursor: pointer; font-size: 1rem; transition: background 0.2s ease; }
.comment-form input[type="submit"]:hover { background: #a07fc4; }

/* PRINT */
@media print {
    .site-header, .main-navigation, .site-footer, .recipe-actions, .comments-area, .pagination, .widget-area { display: none !important; }
    body { font-size: 12pt; line-height: 1.5; background: #fff; }
    .post, .page { box-shadow: none; border: none; }
    .entry-content img { max-width: 400px; margin: 1rem auto; }
    a { color: #000; text-decoration: underline; }
    .entry-title { font-size: 24pt; border-bottom: 2px solid #000; padding-bottom: 0.5rem; }
}

/* MOBILE */
@media screen and (max-width: 768px) {
    html { font-size: 15px; }
    .site-title { font-size: 1.8rem; }
    .entry-header, .entry-content, .entry-footer, .recipe-actions { padding-left: 1.25rem; padding-right: 1.25rem; }
    .entry-title { font-size: 1.5rem; }
    .menu-toggle { display: block; }
    .nav-menu { display: none; flex-direction: column; width: 100%; }
    .nav-menu.active { display: flex; }
    .nav-menu a { padding: 0.875rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .recipe-actions { flex-direction: column; }
    .recipe-btn { justify-content: center; width: 100%; }
}

@media screen and (min-width: 769px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media screen and (min-width: 1200px) { .posts-grid { grid-template-columns: repeat(3, 1fr); } }

/* ACCESSIBILITY */
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
a:focus, button:focus, input:focus, textarea:focus { outline: 2px solid #c09ee2; outline-offset: 2px; }

.alignleft { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* MEGA MENU */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
}

.mega-menu.active { display: block; animation: megaSlideDown 0.25s ease; }

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

.mega-menu-inner { max-width: 1400px; margin: 0 auto; padding: 1.5rem; }

.mega-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #c09ee2;
}

.mega-menu-header h3 { margin: 0; font-size: 1.25rem; color: #4a3f5c; font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; }
.mega-menu-close { background: none; border: none; font-size: 2rem; color: #888; cursor: pointer; padding: 0; line-height: 1; transition: color 0.2s; }
.mega-menu-close:hover { color: #4a3f5c; }

.mega-menu-columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.mega-menu-column { min-width: 0; }

.mega-menu-letter {
    font-size: 0.9rem;
    font-weight: 600;
    color: #8b6fa3;
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e8e4eb;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mega-menu-column ul { list-style: none; padding: 0; margin: 0 0 1.25rem 0; }
.mega-menu-column li { margin: 0; padding: 0; }
.mega-menu-column a {
    display: block;
    padding: 0.35rem 0;
    color: #3d3d3d;
    font-size: 0.9rem;
    line-height: 1.3;
    transition: color 0.15s, padding-left 0.15s;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.mega-menu-column a:hover { color: #8b6fa3; padding-left: 0.5rem; }

@media screen and (max-width: 768px) {
    .mega-menu { position: fixed; top: 0; bottom: 0; left: 0; right: 0; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .mega-menu-inner { padding: 1rem; }
    .mega-menu-header { position: sticky; top: 0; background: #fff; margin: -1rem -1rem 1rem; padding: 1rem 1rem 0.75rem; z-index: 1; }
    .mega-menu-columns { grid-template-columns: 1fr; gap: 0.5rem; }
    .mega-menu-letter { margin-top: 1rem; }
    .mega-menu-column:first-child .mega-menu-letter:first-child { margin-top: 0; }
    .mega-menu-column a { padding: 0.6rem 0; font-size: 1rem; border-bottom: 1px solid #f5f0f7; }
    .mega-menu-column a:hover { padding-left: 0; background: #f8f6fa; }
}
