/* ==========================================================================
   1. GLOBAL RESET & BASE STYLES
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.8;
    color: #4a4a4a;
    background-color: #fcfbf7;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    margin-bottom: 20px;
}

a { color: #6b8e23; text-decoration: none; transition: 0.3s; }
a:hover { color: #556b2f; text-decoration: underline; }

/* ==========================================================================
   2. SITE STRUCTURE (Nav & Layout)
   ========================================================================== */
.main-nav {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: bold; color: #2c3e50; }
.nav-links a { margin-left: 20px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; color: #666; }
.nav-links a:hover { color: #a8b892; }

/* Layout Logic */
.container {
    max-width: 1100px;
    margin: 40px auto;
    display: flex; /* This is the engine for the sidebar layout */
    gap: 40px;
    padding: 0 20px;
}

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

.sidebar { 
    flex: 1; 
    background: #ffffff; 
    padding: 25px; 
    border-radius: 8px;
    border-left: 4px solid #a8b892;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    height: fit-content;
}

/* Homepage Overrides - Use this class on <body> or the container for full-width pages */
.full-width-layout {
    display: block !important; 
    max-width: 900px;
    margin: 40px auto;
}

/* ==========================================================================
   3. FOOTER ALIGNMENT (The "Zen" Anchor)
   ========================================================================== */
.site-footer {
    display: block !important;
    clear: both !important;
    width: 100% !important;
    background-color: #2c3e50;
    color: #ffffff;
    text-align: center !important; 
    padding: 60px 0;
    margin-top: 80px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto !important;
    padding: 0 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.footer-links a { color: #a8b892; }
.footer-links a:hover { color: #fff; }

/* ==========================================================================
   4. BRANDING, CARDS & INTERACTIVE (Remaining Styles)
   ========================================================================== */
.brand-header { text-align: center; padding: 50px 0 30px 0; }
.brand-header p::before, .brand-header p::after { content: " — "; color: #a8b892; }

.glowing-luopan {
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.5s ease;
    animation: qiPulse 3s infinite ease-in-out;
}

@keyframes qiPulse {
    0% { box-shadow: 0 5px 15px rgba(168, 184, 146, 0.4); }
    50% { box-shadow: 0 10px 30px rgba(212, 175, 55, 0.6); }
    100% { box-shadow: 0 5px 15px rgba(168, 184, 146, 0.4); }
}

.article-card {
    margin-bottom: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.cat-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

.cat-wealth { background: #d4af37; }
.cat-health { background: #2ecc71; }
.cat-relationships, .cat-love { background: #e74c3c; }

.share-container { margin-top: 50px; padding: 30px 0; border-top: 1px dashed #e0e4cc; text-align: center; }
.share-buttons { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.share-btn { padding: 10px 25px; border-radius: 50px; color: #fff !important; font-weight: bold; font-size: 0.85rem; }
.fb { background-color: #3b5998; }
.pin { background-color: #bd081c; }
.x-tweet { background-color: #000; }

/* ==========================================================================
   5. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 850px) {
    .container { flex-direction: column; }
    .sidebar { order: 2; width: 100%; border-left: none; border-top: 4px solid #a8b892; }
    .content-area { order: 1; }
}
.btn-edit, .btn-del {
    margin-right: 4px;
    margin-bottom: 4px; /* Stack nicely on smaller screens */
    display: inline-block;
}

body {
    font-family: Arial;
}

/* Floating CTA */
.floating-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

/* Button */
.cta-btn {
    background: linear-gradient(135deg, #caa64b, #f5e6b3);
    color: #000;
    padding: 12px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
}

/* Popup */
.cta-popup {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
}

.cta-popup-content {
    background: #111;
    color: #fff;
    padding: 30px;
    margin: 10% auto;
    max-width: 400px;
    border-radius: 10px;
    text-align: center;
}

/* Input */
.input-field {
    width: 90%;
    padding: 10px;
}

/* Close */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
}
