/*
Theme Name: MWSN Advocacy
Theme URI: https://mwsn.in/
Author: Antigravity AI
Author URI: https://mwsn.in/about-us
Description: A clean, magazine-style WordPress theme foundation for NGOs and grassroots advocacy networks, focused on accessibility and urgency.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mwsn-advocacy
Tags: news, magazine, high-contrast, accessibility, responsive-layout

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

/* ==========================================================================
   CSS Variables & Design Tokens
   ========================================================================== */
:root {
    /* Colors - Grassroots NGO Palette */
    --primary-color: #d32f2f;
    --primary-dark: #9a0007;
    --secondary-color: #0d47a1;
    --accent-color: #ffc107;

    --text-dark: #1a1a1a;
    --text-muted: #4a4a4a;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;

    /* Typography - Fluid Scaling */
    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', sans-serif;

    /* Header Font Scaling fix using clamp() */
    --h1-size: clamp(1.8rem, 5vw, 3rem);
    --h2-size: clamp(1.5rem, 4vw, 2.2rem);
    --h3-size: clamp(1.2rem, 3vw, 1.6rem);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: clamp(2rem, 8vw, 5rem);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    /* Base for mobile */
    line-height: 1.65;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
    body {
        font-size: 18px;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

h1 {
    font-size: var(--h1-size);
}

h2 {
    font-size: var(--h2-size);
}

h3 {
    font-size: var(--h3-size);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.25s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.top-bar {
    background: var(--text-dark);
    color: white;
    padding: 10px 0;
    font-size: 0.8rem;
    font-weight: 600;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.language-toggle a {
    color: #bbb;
    margin: 0 5px;
}

.language-toggle a.active {
    color: white;
    text-decoration: underline;
}

.main-header {
    background: var(--bg-white);
    padding: 15px 0;
    border-bottom: 4px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.main-header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

@media (min-width: 768px) {
    .main-header .container {
        flex-direction: row;
        justify-content: space-between;
    }
}

.logo a {
    font-size: 1.4rem;
    font-weight: 950;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.main-nav ul a {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

.main-nav ul a:hover {
    border-bottom-color: var(--primary-color);
}

/* ==========================================================================
   Hero / Alert Section
   ========================================================================== */
.alert-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.alert-banner .container {
    max-width: 800px;
}

.alert-banner h2 {
    color: white;
    margin-bottom: 1rem;
}

.alert-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-button-large {
    display: inline-block;
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 1rem 2rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
    box-shadow: 0 4px 0 #c29100;
    transition: all 0.2s ease;
}

.cta-button-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #c29100;
    color: var(--text-dark);
}

/* ==========================================================================
   Content Grid & Cards
   ========================================================================== */
.section-title {
    text-align: center;
    margin: var(--spacing-lg) 0 var(--spacing-md);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: var(--spacing-lg);
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.post-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.post-card .thumbnail {
    aspect-ratio: 16/10;
    background: #f0f0f0;
    overflow: hidden;
}

.post-card .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .thumbnail img {
    transform: scale(1.05);
}

.post-card .card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.post-card .excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
    flex-grow: 1;
}

.learn-more-btn {
    align-self: flex-start;
    padding: 10px 20px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 4px;
}

.learn-more-btn:hover {
    background: var(--primary-color);
    color: white !important;
}

/* ==========================================================================
   Category Blocks
   ========================================================================== */
.category-blocks {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
    margin: var(--spacing-md) 0;
}

@media (min-width: 480px) {
    .category-blocks {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .category-blocks {
        grid-template-columns: repeat(4, 1fr);
    }
}

.category-item {
    background: var(--text-dark);
    padding: 30px 20px;
    text-align: center;
    border-top: 5px solid var(--accent-color);
    transition: all 0.3s ease;
    border-radius: 4px;
}

.category-item:hover {
    background: #000;
    transform: translateY(-3px);
}

.category-item h3 {
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.category-item a {
    color: white;
}

/* ==========================================================================
   Single Post View
   ========================================================================== */
.single-post-container {
    padding: var(--spacing-lg) 0;
}

.post-header {
    max-width: 800px;
    margin: 0 auto var(--spacing-md);
    text-align: center;
}

.post-featured-image {
    max-width: 1000px;
    margin: 0 auto var(--spacing-md);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.post-content-wrap {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    font-size: 1.1rem;
    line-height: 1.8;
}

@media (max-width: 600px) {
    .post-content-wrap {
        padding: 20px;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: #000;
    color: #999;
    padding: var(--spacing-lg) 0;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

.footer-column h4 {
    color: white;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.footer-column p {
    margin-bottom: 15px;
}

.footer-cta .cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    font-weight: 700;
    border-radius: 4px;
}