/*
Theme Name: Amish-Inspired Living
Theme URI: https://example.com/amish-inspired-living
Author: Amish-Inspired Living
Author URI: https://example.com
Description: A lightweight, SEO-friendly custom WordPress theme for the Amish-Inspired Living blog. Bringing traditional Amish wisdom into modern everyday life: frugal home, food preservation, gardening, traditional skills, simple living.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: amish-inspired-living
Tags: blog, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, right-sidebar, flexible-header
*/

/* ============================================================
   AMISH-INSPIRED LIVING — DESIGN TOKENS
   Main brown:  #6b4f38  (barn wood)
   Sage green:  #879c7b  (herb garden)
   CTA brick:   #b85c38  (terracotta)
   Background:  #f9f7f2  (warm paper)
   Body text:   #333333
============================================================ */

:root {
    --ail-brown: #6b4f38;
    --ail-brown-dark: #4e3928;
    --ail-sage: #879c7b;
    --ail-sage-light: #e8ede4;
    --ail-brick: #b85c38;
    --ail-brick-dark: #9c4a2e;
    --ail-bg: #f9f7f2;
    --ail-bg-alt: #f1ece2;
    --ail-text: #333333;
    --ail-text-light: #6b6259;
    --ail-border: #ddd2bf;
    --ail-white: #ffffff;
    --ail-radius: 6px;
    --ail-max-width: 1140px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.75;
    color: var(--ail-text);
    background-color: var(--ail-bg);
    -webkit-font-smoothing: antialiased;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--ail-brown);
    line-height: 1.3;
    margin: 1.5em 0 0.6em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

a {
    color: var(--ail-brick);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--ail-brick-dark);
    text-decoration: underline;
}

p {
    margin: 0 0 1.2em;
}

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

/* ---------- Layout wrappers ---------- */
.site-container {
    max-width: var(--ail-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.content-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-top: 40px;
}

@media (max-width: 900px) {
    .content-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   HEADER
============================================================ */
.site-header {
    background: var(--ail-white);
    border-bottom: 1px solid var(--ail-border);
    padding: 20px 0;
}

.site-header .site-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.site-branding .site-title {
    margin: 0;
    font-size: 1.9rem;
    font-weight: bold;
}

.site-branding .site-title a {
    color: var(--ail-brown);
}

.site-branding .site-description {
    margin: 4px 0 0;
    font-size: 0.95rem;
    color: var(--ail-text-light);
    font-style: italic;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.main-navigation a {
    color: var(--ail-brown);
    font-weight: bold;
    font-size: 1rem;
}

.main-navigation a:hover {
    color: var(--ail-brick);
    text-decoration: none;
}

/* ============================================================
   HERO (front-page)
============================================================ */
.hero {
    background: linear-gradient(rgba(107, 79, 56, 0.85), rgba(107, 79, 56, 0.85)),
                url('assets/images/hero-default.jpg') center/cover no-repeat;
    color: var(--ail-white);
    text-align: center;
    padding: 90px 20px;
}

.hero h1 {
    color: var(--ail-white);
    font-size: 2.8rem;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 auto 30px;
    opacity: 0.95;
}

/* ---------- Buttons ---------- */
.btn,
.wp-block-button__link,
button.wp-block-button__link {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--ail-radius);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: bold;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.btn-primary:hover {
    background: var(--ail-brick-dark);
    color: #fff;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--ail-white);
    border: 2px solid var(--ail-white);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
}

.hero .btn { margin: 0 8px; }

/* ============================================================
   SECTION BLOCKS (used on front-page)
============================================================ */
.section {
    padding: 60px 0;
}

.section-alt {
    background: var(--ail-bg-alt);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

/* Category cards grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.category-card {
    background: var(--ail-white);
    border: 1px solid var(--ail-border);
    border-radius: var(--ail-radius);
    padding: 28px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(107, 79, 56, 0.12);
}

.category-card h3 {
    margin-top: 0;
}

.category-card .card-link {
    color: var(--ail-brick);
    font-weight: bold;
}

/* ---------- Post cards (archive / latest) ---------- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.post-card {
    background: var(--ail-white);
    border: 1px solid var(--ail-border);
    border-radius: var(--ail-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-card .post-thumb {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    width: 100%;
}

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

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

.post-card .post-title a {
    color: var(--ail-brown);
}

.post-card .post-excerpt {
    color: var(--ail-text-light);
    font-size: 0.95rem;
}

.post-card .post-meta {
    font-size: 0.85rem;
    color: var(--ail-text-light);
    margin-bottom: 10px;
}

/* ---------- Lead magnet / subscribe block ---------- */
.lead-magnet {
    background: var(--ail-sage-light);
    border-radius: var(--ail-radius);
    padding: 40px;
    text-align: center;
}

.lead-magnet h2 {
    margin-top: 0;
}

.lead-magnet form {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.lead-magnet input[type="email"] {
    padding: 12px 16px;
    border: 1px solid var(--ail-border);
    border-radius: var(--ail-radius);
    min-width: 260px;
    font-size: 1rem;
}

/* ---------- Handbook (ebook) promo block ---------- */
.handbook-promo {
    background: var(--ail-brown);
    color: var(--ail-white);
    border-radius: var(--ail-radius);
    padding: 50px 40px;
    text-align: center;
}

.handbook-promo h2 { color: var(--ail-white); }
.handbook-promo p { opacity: 0.95; }

/* ============================================================
   SINGLE POST
============================================================ */
.article-content {
    background: var(--ail-white);
    padding: 40px;
    border: 1px solid var(--ail-border);
    border-radius: var(--ail-radius);
}

.article-content h1 {
    margin-top: 0;
}

.article-meta {
    color: var(--ail-text-light);
    font-size: 0.95rem;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ail-border);
}

.article-content img {
    border-radius: var(--ail-radius);
    margin: 20px 0;
}

.article-content ul, .article-content ol {
    padding-left: 28px;
}

.article-content blockquote {
    border-left: 4px solid var(--ail-sage);
    margin: 24px 0;
    padding: 12px 24px;
    background: var(--ail-sage-light);
    font-style: italic;
}

/* CTA box at end of post */
.post-cta {
    margin-top: 40px;
    padding: 30px;
    background: var(--ail-sage-light);
    border-radius: var(--ail-radius);
    text-align: center;
}

/* ---------- Sidebar ---------- */
.widget-area {
    background: var(--ail-white);
    border: 1px solid var(--ail-border);
    border-radius: var(--ail-radius);
    padding: 24px;
}

.widget-area .widget {
    margin-bottom: 32px;
}

.widget-area .widget-title {
    font-size: 1.2rem;
    border-bottom: 2px solid var(--ail-sage);
    padding-bottom: 8px;
}

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

.widget-area ul li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--ail-border);
}

/* ---------- Comments ---------- */
.comments-area {
    margin-top: 40px;
    background: var(--ail-white);
    padding: 30px;
    border: 1px solid var(--ail-border);
    border-radius: var(--ail-radius);
}

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
    background: var(--ail-brown-dark);
    color: #e9ddd0;
    margin-top: 60px;
    padding: 50px 0 20px;
}

.site-footer a { color: #f3e6d6; }

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.9rem;
}

/* ---------- Disclaimer ---------- */
.disclaimer {
    font-size: 0.85rem;
    color: var(--ail-text-light);
    font-style: italic;
    margin-top: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    body { font-size: 16px; }
    .hero h1 { font-size: 2rem; }
    .article-content { padding: 24px; }
    .lead-magnet { padding: 28px; }
}
