@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --color-primary: #00A651;
    /* Gloobobiz Green */
    --color-secondary: #2F55D4;
    /* Call to Action Blue */

    /* Netural Colors */
    --color-text-main: #1a1a1a;
    --color-text-muted: #666666;
    --color-bg-body: #ffffff;
    --color-bg-subtle: #f9f9f9;
    --color-border: #eaeaea;

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-size-base: 18px;
    --line-height-base: 1.6;

    /* Layout */
    --container-width-narrow: 720px;
    --container-width-wide: 1100px;
    --spacing-unit: 1rem;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    -webkit-font-smoothing: antialiased;
}

/* Fix for Bold and Italic */
strong,
b {
    font-weight: 700;
    color: #111;
    /* Make bold slightly darker/sharper */
}

em,
i {
    font-style: italic;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

/* --- Components --- */

/* Header */
.site-header {
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    margin-bottom: 3rem;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links .btn-cta {
    background-color: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
}

.nav-links .btn-cta:hover {
    background-color: #008f45;
    /* Darker shade */
    color: white;
}

/* Hero (Homepage) */
.hero {
    text-align: center;
    padding: 2rem 0 4rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Post List (Homepage) */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 4rem;
}

.post-item {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 3rem;
}

.post-item:last-child {
    border-bottom: none;
}

.post-meta-top {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.post-meta-top .category {
    color: var(--color-primary);
}

.post-item h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    font-weight: 700;
}

.post-item .excerpt {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.post-item .read-more {
    font-weight: 600;
    font-size: 1rem;
}

/* Single Post Specifics */
.post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.5rem;
    margin: 1rem 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.post-body {
    font-size: 1.125rem;
    /* 20px */
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.post-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-body ul,
.post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-body blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 1.5rem;
    font-style: italic;
    font-size: 1.25rem;
    color: #444;
    margin: 2rem 0;
}

.post-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.newsletter-box {
    background-color: var(--color-bg-subtle);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 2rem;
}

/* Utils */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #008f45;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--color-border);
    margin-top: auto;
    /* Push to bottom if content is short */
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.container-narrow {
    max-width: var(--container-width-narrow);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

/* --- Visuals & Search Enchancements --- */

/* Hero Section - Background Image with Overlay */
.hero-section {
    position: relative;
    margin-bottom: 2rem;
    padding: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.65) 0%,
            rgba(0, 40, 20, 0.55) 50%,
            rgba(0, 0, 0, 0.60) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 2rem;
    max-width: 800px;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.01em;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 320px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-content {
        padding: 2rem 1.5rem;
    }
}

/* Search Section */
.search-section {
    margin-bottom: 3rem;
    text-align: center;
}

.search-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.search-form input[type="text"] {
    width: 100%;
    max-width: 400px;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form input[type="text"]:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(47, 85, 212, 0.1);
}

.search-form button {
    border-radius: 50px;
    padding: 0 2rem;
}

/* Category Filter */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.cat-pill {
    padding: 6px 16px;
    background-color: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 500;
    transition: all 0.2s;
}

.cat-pill:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.cat-pill.active {
    background-color: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
}

/* Updated Post List with Thumbnails */
.post-item.has-thumbnail {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.post-thumbnail {
    flex: 0 0 220px;
    order: 1;
    /* Image on right for Substack style usually, let's put it right */
}

/* Mobile responsive for thumbnails */
@media (max-width: 768px) {
    .post-item.has-thumbnail {
        flex-direction: column;
    }

    .post-thumbnail {
        order: -1;
        /* Image on top mobile */
        width: 100%;
        flex: none;
        margin-bottom: 1rem;
    }
}

.post-thumbnail img {
    width: 100%;
    height: 150px;
    /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
}

.post-content-preview {
    flex: 1;
}

.search-results-info {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-text-muted);
}

/* Alerts */
.alert {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
}