/* ============================================
   En mode cuisine - Stylesheet
   Theme: warm amber/orange + dark teal accent
   ============================================ */

:root {
    --primary: #f4a261;
    --primary-dark: #d68a4f;
    --accent: #264653;
    --text: #333;
    --text-light: #666;
    --bg: #fdf6ec;
    --bg-white: #fff;
    --border: #ecdfd0;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --max-width: 1100px;
    --shadow-sm: 0 1px 3px rgba(38,70,83,0.08);
    --shadow-md: 0 4px 12px rgba(38,70,83,0.10);
    --shadow-lg: 0 10px 30px rgba(38,70,83,0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-primary);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--accent);
    margin-top: 0;
    line-height: 1.25;
    font-weight: 700;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============= HEADER ============= */
.site-header {
    background: var(--bg-white);
    border-bottom: 3px solid var(--primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-mid { padding: 18px 0; }

.header-mid-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
}

.site-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(244,162,97,0.3);
}

.site-titles {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.01em;
}

.site-description {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 2px;
}

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    transition: all .25s;
}

.menu-toggle.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.header-nav { background: var(--accent); }

.main-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.main-nav a {
    display: block;
    padding: 14px 18px;
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    transition: all .2s;
}

.main-nav a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ============= MAIN ============= */
.site-content {
    padding: 30px 0 50px;
    min-height: 60vh;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a { color: var(--primary-dark); }
.breadcrumb .sep { margin: 0 8px; color: var(--text-light); }

.content-area-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.content-area { flex: 1; min-width: 0; }

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* ============= HERO ============= */
.hero-section {
    background: linear-gradient(135deg, #fdf6ec 0%, #f9e9d4 100%);
    padding: 30px 0 40px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.hero-card {
    display: flex;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: inherit;
    transition: all .3s;
}

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

.hero-image {
    flex: 1;
    min-height: 360px;
    background-size: cover;
    background-position: center;
}

.hero-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-cat {
    display: inline-block;
    padding: 5px 12px;
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    margin-bottom: 16px;
    align-self: flex-start;
}

.hero-title {
    font-size: 2.2rem;
    margin: 0 0 16px;
    line-height: 1.2;
}

.hero-excerpt {
    color: var(--text-light);
    margin: 0 0 20px;
    font-size: 1.05rem;
}

.hero-cta {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    align-self: flex-start;
    transition: background .2s;
}

.hero-card:hover .hero-cta { background: var(--primary-dark); }

/* ============= HOME SECTIONS ============= */
.home-section { margin-bottom: 50px; }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-bottom: 8px;
}

.section-title {
    font-size: 1.8rem;
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.home-section > .section-title {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-bottom: 22px;
}

.section-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.section-desc {
    color: var(--text-light);
    margin: 0 0 22px;
    font-style: italic;
}

/* ============= POST GRID ============= */
.post-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.grid-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all .3s;
}

.grid-card a {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.grid-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.grid-card-img {
    width: 100%;
    padding-top: 60%;
    background-size: cover;
    background-position: center;
    background-color: var(--bg);
}

.grid-card-body { padding: 16px; }

.grid-card-cat {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--primary-dark);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.grid-card-title {
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.35;
    font-family: var(--font-heading);
    color: var(--accent);
}

.grid-card:hover .grid-card-title { color: var(--primary-dark); }

/* ============= POST LIST (CATEGORY) ============= */
.post-list { display: flex; flex-direction: column; gap: 22px; }

.post-card {
    display: flex;
    gap: 22px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all .3s;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.post-card-img {
    width: 240px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--bg);
}

.post-card-body { padding: 22px; flex: 1; }

.post-card-title {
    font-size: 1.35rem;
    margin: 0 0 10px;
}

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

.post-card-excerpt {
    color: var(--text-light);
    margin: 0 0 12px;
}

.post-card-more {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.92rem;
}

/* ============= CATEGORY HEADER ============= */
.category-header {
    background: linear-gradient(135deg, var(--accent) 0%, #1d3a45 100%);
    color: #fff;
    padding: 36px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.category-header h1 {
    color: #fff;
    margin: 0 0 10px;
    font-size: 2.2rem;
}

.category-desc {
    margin: 0 0 8px;
    font-size: 1.05rem;
    opacity: 0.92;
}

.category-count {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.75;
    color: var(--primary);
}

/* ============= ARTICLE ============= */
.single-article {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.article-header { margin-bottom: 24px; }

.article-cat {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.article-title {
    font-size: 2.2rem;
    margin: 0;
    line-height: 1.2;
}

.article-image {
    margin: 0 -40px 28px;
}

.article-image img {
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: cover;
}

.entry-content { font-size: 1.05rem; line-height: 1.75; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 1.8em;
    margin-bottom: 0.6em;
}

.entry-content h2 {
    font-size: 1.65rem;
    border-left: 4px solid var(--primary);
    padding-left: 14px;
}

.entry-content h3 { font-size: 1.3rem; color: var(--primary-dark); }
.entry-content p { margin: 0 0 1.1em; }

.entry-content img {
    border-radius: 8px;
    margin: 1.4em auto;
    box-shadow: var(--shadow-sm);
}

.entry-content ul, .entry-content ol { padding-left: 1.6em; margin: 0 0 1.1em; }
.entry-content li { margin-bottom: 0.5em; }

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--bg);
    padding: 18px 22px;
    margin: 1.4em 0;
    font-style: italic;
    color: var(--text-light);
    border-radius: 0 8px 8px 0;
}

.entry-content a {
    color: var(--primary-dark);
    text-decoration: underline;
    text-decoration-color: rgba(214,138,79,0.4);
}

.entry-content a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
}

.entry-content th,
.entry-content td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
}

.entry-content th {
    background: var(--bg);
    font-weight: 600;
    color: var(--accent);
}

/* ============= RELATED ============= */
.related-articles {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--primary);
}

.related-articles .section-title {
    font-size: 1.6rem;
    margin-bottom: 22px;
    border-bottom: none;
    padding-bottom: 0;
}

.related-articles .post-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* ============= SIDEBAR ============= */
.widget {
    background: var(--bg-white);
    padding: 22px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 22px;
}

.widget-title {
    font-size: 1.15rem;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    color: var(--accent);
}

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li {
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}

.widget-list li:last-child { border-bottom: 0; }

.widget-list a {
    color: var(--text);
    font-size: 0.95rem;
    display: block;
    transition: all .2s;
}

.widget-list a:hover {
    color: var(--primary-dark);
    padding-left: 6px;
}

/* ============= PAGINATION ============= */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 36px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-white);
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
}

.pagination a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination .page-current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ============= 404 ============= */
.error-404 {
    text-align: center;
    padding: 50px 20px;
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.error-404 h1 {
    font-size: 6rem;
    margin: 0;
    color: var(--primary);
    line-height: 1;
}

.error-404 h2 { margin: 14px 0; }

.error-404 .btn {
    display: inline-block;
    padding: 12px 26px;
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    margin: 14px 0 26px;
}

.error-404 .btn:hover { background: var(--primary-dark); }

.error-cats {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.error-cats a {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.9rem;
}

.error-cats a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============= FOOTER ============= */
.site-footer {
    background: var(--accent);
    color: #c9d6db;
    margin-top: 50px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 40px 20px 30px;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.15rem;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.footer-col p {
    color: #c9d6db;
    margin: 0 0 10px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li { padding: 5px 0; }

.footer-col a {
    color: #c9d6db;
    font-size: 0.92rem;
    transition: color .2s;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 18px 0;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: #99a8ad;
    font-size: 0.88rem;
}

/* ============= BACK TO TOP ============= */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: 0;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
    z-index: 99;
}

#back-to-top.visible { opacity: 1; visibility: visible; }

#back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ============= RESPONSIVE ============= */
@media (max-width: 900px) {
    .content-area-wrapper { flex-direction: column; }
    .sidebar { width: 100%; }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .related-articles .post-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-card { flex-direction: column; }
    .hero-image { min-height: 240px; width: 100%; }
    .hero-content { padding: 28px; }
    .hero-title { font-size: 1.7rem; }
    .footer-inner { grid-template-columns: repeat(2, 1fr); }
    .article-image { margin: 0 -20px 22px; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .header-nav { display: none; }
    .header-nav.is-open,
    #primary-nav.is-open { display: block; }
    .main-nav { flex-direction: column; gap: 0; }
    .main-nav a {
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .post-card { flex-direction: column; }
    .post-card-img { width: 100%; height: 200px; }
    .single-article { padding: 24px; }
    .article-image { margin: 0 -24px 22px; }
    .article-title { font-size: 1.65rem; }
    .site-title { font-size: 1.35rem; }
    .site-description { font-size: 0.78rem; }
    .site-logo { width: 50px; height: 50px; }
    .category-header { padding: 26px 20px; }
    .category-header h1 { font-size: 1.65rem; }
    .footer-inner { grid-template-columns: 1fr; gap: 26px; }
    .section-title { font-size: 1.4rem; }
}

@media (max-width: 480px) {
    .post-grid { grid-template-columns: 1fr; }
    .related-articles .post-grid { grid-template-columns: 1fr; }
    .hero-content { padding: 22px; }
    .hero-title { font-size: 1.4rem; }
    .single-article { padding: 18px; }
    .article-image { margin: 0 -18px 20px; }
    .article-title { font-size: 1.4rem; }
    .error-404 h1 { font-size: 4rem; }
    .site-title { font-size: 1.2rem; }
    .site-description { display: none; }
    .pagination a, .pagination span { padding: 7px 11px; font-size: 0.9rem; }
    #back-to-top { bottom: 18px; right: 18px; width: 40px; height: 40px; }
}
