/* ---  style.css --- */
/* Global styles for the entire website */

/* 1. Global Styles & Variables */
:root {
    --primary-color: #4A6A5C;
    --secondary-color: #F3EFEA;
    --accent-color: #B99C83;
    --text-color: #333333;
    --light-text: #FFFFFF;
    --border-color: #d8d2ca;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lora', serif;
}

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

body {
    font-family: var(--font-body);
    line-height: 1.7;
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-size: 16px;
}

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

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; margin-bottom: 1rem; color: var(--primary-color); }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; margin-top: 3rem; }
h3 { font-size: 1.3rem; }
p { margin-bottom: 1.5rem; }
a { color: var(--primary-color); text-decoration: none; }

/* 2. Navigation Bar */
.navbar { background: #ffffff; padding: 1rem 0; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100; }
.navbar .container { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.site-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--primary-color); }
.navbar nav ul { list-style: none; display: flex; gap: 20px; }
.navbar nav a { color: var(--text-color); font-weight: 700; padding-bottom: 5px; border-bottom: 2px solid transparent; transition: border-color 0.3s ease; }
.navbar nav a:hover { border-bottom-color: var(--primary-color); }

/* 3. Hero Section */
.hero { height: 60vh; background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1567401893414-76b7b1e5a7a5?auto=format&fit=crop&w=1200&q=80'); background-size: cover; background-position: center; display: flex; justify-content: center; align-items: center; text-align: center; color: var(--light-text); padding: 0 20px; }
.hero-content { max-width: 600px; }
.hero h1 { color: var(--light-text); }
.hero p { font-size: 1.1rem; margin-bottom: 2rem; }
.cta-button { display: inline-block; background: var(--primary-color); color: var(--light-text); padding: 12px 25px; border-radius: 5px; font-family: var(--font-heading); font-weight: 700; transition: background-color 0.3s ease; }
.cta-button:hover { background: #3a5448; }

/* 4. Content Sections */
.intro, .latest-posts { padding: 3rem 0; text-align: center; }
.latest-posts { background-color: #fff; }

/* 5. Post Grid (Used on multiple pages) */
.post-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; text-align: left; margin-top: 2rem; }
.post-card { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.post-card img { width: 100%; height: 220px; object-fit: cover; }
.post-card .card-content { padding: 1.5rem; }
.post-category { display: inline-block; background: var(--secondary-color); color: var(--accent-color); padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-family: var(--font-heading); font-weight: 700; margin-bottom: 1rem; }
.read-more { font-family: var(--font-heading); font-weight: 700; }

/* 6. Footer */
.site-footer { background: var(--primary-color); color: var(--light-text); text-align: center; padding: 2rem 1rem; font-size: 0.9rem; }
.site-footer p { margin: 0; opacity: 0.8; }

/* 7. Fade-in Animation */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.is-visible { opacity: 1; transform: translateY(0); }

/* 8. DESKTOP Styles (for screens larger than 768px) */
@media (min-width: 768px) {
    body { font-size: 18px; }
    .container { padding: 0 20px; }
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.5rem; }

    .navbar .container { flex-direction: row; }
    .navbar nav ul { gap: 25px; }

    .hero { height: 70vh; }
    .hero p { font-size: 1.2rem; }

    .intro, .latest-posts { padding: 4rem 0; }
    
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .post-grid { grid-template-columns: repeat(3, 1fr); }
}