/* ==========================================================================
   1. GLOBAL STYLES & VARIABLES
   ========================================================================== */
:root {
    /* Color Palette */
    --primary-color: #2c3e50;    /* Deep slate/navy for structure and authority */
    --accent-color: #8e44ad;     /* Subtle purple accent for highlights/links */
    --text-color: #333333;       /* Off-black for optimal reading contrast */
    --light-bg: #f8f9fa;         /* Soft grey background for sections */
    --white: #ffffff;
    
    /* Typography */
    --font-sans: 'Helvetica Neue', Arial, sans-serif; /* For menus, buttons, headings */
    --font-serif: 'Georgia', Times, serif;             /* For deep reading (articles/reflections) */
}

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures footer stays at the bottom */
}

/* ==========================================================================
   2. SITE LAYOUT & CONTAINERS
   ========================================================================== */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

main {
    flex: 1; /* Pushes footer down if content is short */
    padding: 40px 0;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px 0;
    border-bottom: 4px solid var(--accent-color);
}

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

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

nav a {
    color: #e0e0e0;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover, nav a.active {
    color: var(--white);
    text-shadow: 0 0 5px rgba(255,255,255,0.3);
}

/* ==========================================================================
   4. CONTENT CARDS & GRIDS (Reflections, Books, Gallery)
   ========================================================================== */
/* Grid setup for listing books, media, or articles */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Universal Card Design */
.card {
    background: var(--white);
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.card-padding {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Typography for long-form reading (Reflections/Articles) */
.article-text {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 750px;
    margin: 0 auto;
}

/* ==========================================================================
   5. FORMS & BUTTONS (For both Contact and Admin Panel)
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-sans);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.btn:hover {
    background-color: #1a252f;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
footer {
    background-color: #1a252f;
    color: #95a5a6;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    border-top: 1px solid #2c3e50;
}

/* ==========================================================================
   7. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    nav {
        margin-top: 15px;
    }
    
    nav a {
        margin: 0 10px;
        display: inline-block;
    }
}

/* Add elegant breathing room above headers inside full article views */
    .article-text h1, 
    .article-text h2, 
    .article-text h3, 
    .article-text h4 {
        margin-top: 2rem !important;
        margin-bottom: 1rem !important;
}