/* Blog / Resource Page Styles */
:root {
    --primary: #2f5d50;
    --primary-variant: #39a78a;
    --secondary: #e8f5f1;
    --bg-light: #f6faf9;
    --white: #ffffff;
    --text-dark: #0d1f1a;
    --text-medium: #40524d;
    --text-light: #6c757d;
    --border-color: #e0ece7;

    --font-base: 'Roboto', sans-serif;

    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 30px rgba(47, 93, 80, 0.1);

    --radius-sm: 12px;
    --radius-md: 20px;
}

body {
    font-family: var(--font-base);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    margin: 0;
}

/* --- Utilities --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--secondary);
    color: var(--primary);
    margin-bottom: 12px;
}

/* --- Hero Section --- */
.blog-hero {
    background: white;
    padding: 100px 0 60px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.blog-hero .lead {
    font-size: 1.25rem;
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto;
}

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 40px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-medium);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- Grid Layout --- */
.blog-grid-section {
    padding: 40px 0 100px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

/* --- Article Card with Author --- */
.article-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    /* Clickable */
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.article-content {
    padding: 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.3;
    color: var(--text-dark);
}

.article-content p {
    color: var(--text-medium);
    font-size: 1rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Author Section */
.author-block {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.author-role {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.read-btn {
    margin-top: 16px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.read-btn:hover {
    text-decoration: underline;
}

/* --- Featured (Leader) --- */
.featured-card {
    display: grid;
    grid-template-columns: 1fr;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
    margin-bottom: 60px;
    cursor: pointer;
}

@media (min-width: 900px) {
    .featured-card {
        grid-template-columns: 1fr 1fr;
        min-height: 400px;
    }
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-visual {
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Abstract pattern for featured visual */
.featured-visual::before {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    top: -50%;
    left: -50%;
}

.featured-visual i {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.2);
}

/* --- Newsletter --- */
.newsletter-section {
    background: var(--primary);
    color: white;
    padding: 80px 0;
    text-align: center;
    border-radius: var(--radius-md);
    margin-bottom: 80px;
    /* Added spacing from footer */
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    flex-direction: column;
    margin-top: 24px;
}

@media (min-width: 600px) {
    .newsletter-form {
        flex-direction: row;
    }
}

.newsletter-input {
    flex: 1;
    padding: 14px 20px;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
}

.newsletter-btn {
    background: #0d1f1a;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
}

.newsletter-btn:hover {
    background: #1a332a;
}

/* --- PIP Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent backdrop */
    backdrop-filter: blur(4px);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    z-index: 10;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--secondary);
    color: var(--primary);
}

.modal-body {
    padding: 32px 40px;
    overflow-y: auto;
    /* Scrollable content */
    line-height: 1.7;
    color: var(--text-dark);
}

.modal-body h1 {
    font-size: 2rem;
    margin-top: 0;
    color: var(--primary);
}

.modal-meta {
    display: flex;
    gap: 16px;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-body h2 {
    font-size: 1.4rem;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.modal-body p {
    margin-bottom: 16px;
}

.modal-body ul {
    margin-bottom: 24px;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
}