/* Basic Reset and Variables */
:root {
    --color-primary: #0077b6; /* A clean blue */
    --color-secondary: #00b4d8; /* A lighter blue/teal */
    --color-text: #333;
    --color-bg: #f8f9fa; /* Light grey background */
    --color-white: #fff;
    --color-border: #e0e0e0;
    --font-heading: 'Georgia', serif;
    --font-body: 'Helvetica Neue', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
}

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

/* Header & Navigation */
.header {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: none;
}

.nav a {
    text-decoration: none;
    color: var(--color-text);
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--color-primary);
}

/* Hero Section (Home View) */
.hero-section {
    display: flex;
    align-items: center;
    padding: 80px 0;
    min-height: 60vh;
}

.hero-content {
    flex: 2;
    padding-right: 50px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.hero-text {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 30px;
    color: var(--color-text);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 50%;
    border: 5px solid var(--color-secondary);
}

/* Newsletter CTA */
.newsletter-cta {
    background-color: var(--color-bg);
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid var(--color-secondary);
}

.newsletter-cta h3 {
    margin-top: 0;
    color: var(--color-primary);
}

#newsletter-form input[type="email"],
#newsletter-form button {
    padding: 10px 15px;
    margin-right: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

#newsletter-form button {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

#newsletter-form button:hover {
    background-color: var(--color-secondary);
}

.small-print {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 10px;
}

/* My Scribbles/Blog List Section */
.scribbles-list {
    padding: 50px 0;
}

.scribbles-list h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 40px;
}

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

/* Single Post Card Style (Like the "How Can I Help You?" boxes) */
.post-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
}

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

.post-card-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-card-content {
    padding: 20px;
    flex-grow: 1;
}

.post-card-content h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.post-card-content p {
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.post-meta {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
}

.post-tag {
    display: inline-block;
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 5px;
}

/* Single Post View */
.single-post {
    padding: 50px 0;
}

#post-content h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

#post-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-secondary);
    margin-top: 30px;
    margin-bottom: 15px;
}

#post-content p {
    margin-bottom: 20px;
}

#post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Related Posts */
.related-posts h3 {
    font-family: var(--font-heading);
    color: var(--color-text);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination button {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 10px 15px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.pagination button:hover:not(:disabled) {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

/* View Control (JS logic) */
.view {
    display: none;
}

.active-view {
    display: block;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 40px 0;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 30px;
    }

    .hero-image {
        order: -1; /* Move image above content on mobile */
    }

    .hero-image img {
        max-width: 200px;
    }

    .nav a {
        margin-left: 15px;
    }
}