@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500&display=swap');

:root {
    --bg: #fefaf6;
    --bg-warm: #fdf3e7;
    --text: #3d2c1e;
    --text-light: #7a6b5c;
    --accent: #d4785c;
    --accent-soft: #f0c4b0;
    --accent-dark: #b85c3e;
    --green: #7a9a6e;
    --green-soft: #d4e4ce;
    --gold: #c4a35a;
    --gold-soft: #f5ecd7;
    --white: #ffffff;
    --border: #e8ddd0;
    --shadow: 0 2px 12px rgba(61, 44, 30, 0.06);
    --radius: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.92);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem; font-weight: 700; color: var(--accent);
    text-decoration: none; letter-spacing: -0.3px;
}
.logo:hover { color: var(--accent-dark); }

.main-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.main-nav a {
    text-decoration: none; color: var(--text-light);
    padding: 6px 14px; border-radius: 20px; font-size: 0.9rem;
    font-weight: 400; transition: all 0.2s;
}
.main-nav a:hover, .main-nav a.active {
    background: var(--bg-warm); color: var(--accent);
}

.site-main { min-height: 70vh; padding: 40px 0; }

.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 0; text-align: center;
    color: var(--text-light); font-size: 0.85rem;
}

.hero {
    text-align: center; padding: 60px 24px;
    background: linear-gradient(135deg, var(--bg-warm) 0%, var(--gold-soft) 50%, var(--green-soft) 100%);
    border-radius: var(--radius); margin-bottom: 48px;
}
.hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem; font-weight: 700; color: var(--accent-dark);
    margin-bottom: 12px; line-height: 1.2;
}
.hero .subtitle {
    font-size: 1.15rem; color: var(--text-light); max-width: 500px;
    margin: 0 auto 20px; font-style: italic;
}
.hero .btn {
    display: inline-block; background: var(--accent); color: white;
    padding: 12px 28px; border-radius: 30px; text-decoration: none;
    font-weight: 500; transition: background 0.2s;
}
.hero .btn:hover { background: var(--accent-dark); }

.page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem; color: var(--accent-dark); margin-bottom: 8px;
    text-align: center;
}
.page-subtitle { text-align: center; color: var(--text-light); margin-bottom: 40px; }

.post-card {
    background: var(--white); border-radius: var(--radius);
    padding: 28px 32px; margin-bottom: 20px;
    box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(61,44,30,0.1); }
.post-card h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem; margin-bottom: 6px;
}
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-card .meta { color: var(--text-light); font-size: 0.85rem; margin-bottom: 10px; }
.post-card .excerpt { color: var(--text-light); line-height: 1.6; }
.post-card .read-more { color: var(--accent); text-decoration: none; font-weight: 500; font-size: 0.9rem; }
.post-card .read-more:hover { text-decoration: underline; }

.post-full {
    background: var(--white); border-radius: var(--radius);
    padding: 36px 40px; box-shadow: var(--shadow); max-width: 780px;
    margin: 0 auto;
}
.post-full h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem; color: var(--accent-dark); margin-bottom: 8px;
}
.post-full .meta { color: var(--text-light); font-size: 0.9rem; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.post-full .content { line-height: 1.85; font-size: 1.05rem; }
.post-full .content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem; color: var(--accent-dark); margin: 28px 0 10px;
}
.post-full .content p { margin-bottom: 16px; }
.post-full .back-link { display: inline-block; margin-top: 24px; color: var(--accent); text-decoration: none; font-weight: 500; }
.post-full .back-link:hover { text-decoration: underline; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gallery-card {
    background: var(--white); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s;
}
.gallery-card:hover { transform: translateY(-2px); }
.gallery-card .img-placeholder {
    width: 100%; height: 220px; display: flex; align-items: center;
    justify-content: center; font-size: 3rem;
    color: var(--text-light);
}
.gallery-card:nth-child(odd) .img-placeholder { background: var(--bg-warm); }
.gallery-card:nth-child(even) .img-placeholder { background: var(--green-soft); }
.gallery-card:nth-child(3n) .img-placeholder { background: var(--gold-soft); }
.gallery-card .caption { padding: 14px 18px; font-size: 0.9rem; color: var(--text-light); }

.about-section {
    background: var(--white); border-radius: var(--radius);
    padding: 36px 40px; box-shadow: var(--shadow); max-width: 780px;
    margin: 0 auto 24px;
}
.about-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem; color: var(--accent-dark); margin-bottom: 14px;
}
.about-section p { margin-bottom: 14px; line-height: 1.8; }
.about-section ul { margin: 0 0 14px 20px; line-height: 1.8; }

.contact-form { max-width: 600px; margin: 0 auto; }
.contact-form .form-group { margin-bottom: 18px; }
.contact-form label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 0.9rem; color: var(--text); }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border);
    border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 0.95rem;
    background: var(--white); color: var(--text); transition: border-color 0.2s;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form button {
    background: var(--accent); color: white; border: none;
    padding: 12px 32px; border-radius: 30px; font-size: 1rem;
    font-weight: 500; cursor: pointer; transition: background 0.2s;
}
.contact-form button:hover { background: var(--accent-dark); }

.alert { padding: 14px 20px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem; }
.alert-success { background: var(--green-soft); color: #3a5a2e; }
.alert-error { background: #fde8e8; color: #9b1c1c; }

.pagination { text-align: center; margin-top: 32px; }
.pagination a {
    display: inline-block; padding: 8px 18px; margin: 0 4px;
    background: var(--white); border-radius: 20px; text-decoration: none;
    color: var(--accent); font-weight: 500; box-shadow: var(--shadow);
}
.pagination a:hover { background: var(--bg-warm); }
.pagination span { display: inline-block; padding: 8px 4px; color: var(--text-light); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.3rem; margin-bottom: 6px; color: var(--text); }

/* Admin styles */
.admin-header {
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 12px 0; margin-bottom: 32px;
}
.admin-header .container { display: flex; align-items: center; justify-content: space-between; }
.admin-header .user-info { color: var(--text-light); font-size: 0.9rem; }
.admin-header .logout-link { color: var(--accent); text-decoration: none; margin-left: 12px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.admin-table th { background: var(--bg-warm); font-weight: 600; color: var(--text); }
.admin-table tr:hover td { background: var(--bg-warm); }
.admin-actions a, .admin-actions button {
    padding: 4px 12px; border-radius: 14px; font-size: 0.8rem;
    text-decoration: none; border: none; cursor: pointer; margin-right: 4px;
    font-family: 'Inter', sans-serif;
}
.btn-edit { background: var(--green-soft); color: #3a5a2e; }
.btn-delete { background: #fde8e8; color: #9b1c1c; }
.btn-add { display: inline-block; background: var(--accent); color: white; padding: 10px 22px; border-radius: 24px; text-decoration: none; font-weight: 500; font-size: 0.9rem; margin-bottom: 16px; }
.btn-add:hover { background: var(--accent-dark); }

.admin-form { max-width: 640px; }
.admin-form .form-group { margin-bottom: 18px; }
.admin-form label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 0.9rem; }
.admin-form input, .admin-form textarea, .admin-form select {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 0.95rem;
    background: var(--white); color: var(--text);
}
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.admin-form button[type="submit"] {
    background: var(--accent); color: white; border: none;
    padding: 12px 28px; border-radius: 24px; font-size: 0.95rem;
    font-weight: 500; cursor: pointer;
}
.admin-form button[type="submit"]:hover { background: var(--accent-dark); }

.login-box { max-width: 400px; margin: 80px auto; background: var(--white); padding: 36px; border-radius: var(--radius); box-shadow: var(--shadow); }
.login-box h1 { font-family: 'Playfair Display', Georgia, serif; text-align: center; color: var(--accent-dark); margin-bottom: 24px; }

.message-read { opacity: 0.7; }

.back-nav { margin-bottom: 20px; }
.back-nav a { color: var(--accent); text-decoration: none; font-weight: 500; }
.back-nav a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .hero h1 { font-size: 2rem; }
    .hero { padding: 40px 16px; }
    .post-full, .about-section { padding: 20px 18px; }
    .gallery-grid { grid-template-columns: 1fr; }
}

/* Joy Hoard */
.joy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
    margin: 24px 0;
}
.joy-card {
    padding: 22px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card);
    transition: transform 0.2s, box-shadow 0.2s;
}
.joy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.joy-card .emoji { font-size: 1.6rem; margin-bottom: 8px; }
.joy-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--accent-dark);
}
.joy-card p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.5;
}
.joy-card.giggle { background: #fff8e7; border-color: #f0e4c0; }
.joy-card.quiet { background: #f0f4ff; border-color: #d0d8f0; }
.joy-card.creative { background: #fff0f8; border-color: #f0d0e0; }
.joy-card.sisters { background: #f0fff4; border-color: #c8e8d0; }

@media (max-width: 600px) {
    .joy-grid { grid-template-columns: 1fr; }
}
