/* ==========================================================================
   FUNDIVEL Theme - Main Stylesheet
   ========================================================================== */

/* CSS Custom Properties */
:root {
    --color-primary: #1B5E20;
    --color-primary-light: #2E7D32;
    --color-primary-dark: #0D3B12;
    --color-secondary: #FFC107;
    --color-secondary-dark: #FFA000;
    --color-accent: #0277BD;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-white: #FFFFFF;
    --color-bg: #FFFFFF;
    --color-bg-light: #F8F9FA;
    --color-bg-dark: #1a1a2e;
    --color-border: #E0E0E0;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --radius: 8px;
    --radius-lg: 16px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --transition: 0.3s ease;
    --container-max: 1200px;
    --header-height: 80px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover, a:focus {
    color: var(--color-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.screen-reader-text:focus {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    width: auto;
    height: auto;
    clip: auto;
    z-index: 100000;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: background var(--transition), box-shadow var(--transition);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-branding img {
    max-height: 50px;
    width: auto;
}

.site-title-link {
    text-decoration: none;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
}

.site-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.site-badge.badge-campaign {
    background: var(--color-secondary);
    color: var(--color-text);
}

/* Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.main-navigation a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: background var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    left: 0;
    transition: transform var(--transition);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
}

.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-text);
    border-color: var(--color-secondary);
}

.btn-secondary:hover, .btn-secondary:focus {
    background: var(--color-secondary-dark);
    border-color: var(--color-secondary-dark);
    color: var(--color-text);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover, .btn-outline:focus {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-outline-light {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-outline-light:hover, .btn-outline-light:focus {
    background: var(--color-white);
    color: var(--color-primary);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: var(--header-height);
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-accent) 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 3rem 1.5rem;
}

.hero-welcome {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-secondary);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 1.25rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.mission-section,
.news-section,
.newsletter-section,
.about-section,
.identity-section,
.urgency-section,
.how-help-section,
.directory-section,
.presidencia-content {
    padding: 5rem 0;
}

.mission-section {
    background: var(--color-bg-light);
}

.newsletter-section {
    background: var(--color-primary);
    color: var(--color-white);
}

.urgency-section {
    background: var(--color-bg-light);
}

.section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.05rem;
    color: var(--color-text-light);
    max-width: 700px;
    line-height: 1.8;
}

.mission-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.mission-content .section-description {
    margin: 0 auto 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-link {
    font-weight: 600;
    font-size: 0.9rem;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* ==========================================================================
   Posts Grid & Cards
   ========================================================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.post-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--color-bg-light);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.post-card-body {
    padding: 1.5rem;
}

.post-card-meta {
    margin-bottom: 0.5rem;
}

.post-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-primary);
    letter-spacing: 0.5px;
}

.post-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.post-card-date {
    color: var(--color-text-muted);
}

.post-card-readmore {
    color: var(--color-primary);
    font-weight: 600;
}

/* ==========================================================================
   Stats Grid (Ayudemosavenezuela)
   ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.stat-card {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ==========================================================================
   Help Cards (Como Ayudar)
   ========================================================================== */

.how-help-section {
    text-align: center;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.help-card {
    padding: 2.5rem 2rem;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.help-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.help-icon {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.help-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.help-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================================================
   Identity Cards (Presidencia)
   ========================================================================== */

.identity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.identity-card {
    padding: 3rem 2.5rem;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary);
}

.identity-icon {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.identity-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.identity-card p {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.8;
    font-style: italic;
}

/* ==========================================================================
   Newsletter Form
   ========================================================================== */

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-section .section-title {
    color: var(--color-white);
}

.newsletter-section .section-description {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 auto 2rem;
}

.newsletter-form .form-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input[type="text"],
.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
}

.newsletter-form input:focus {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.4);
}

.newsletter-form .btn {
    white-space: nowrap;
}

.newsletter-message {
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.newsletter-message.success { color: var(--color-secondary); }
.newsletter-message.error { color: #ff6b6b; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 0;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column .widget-title {
    color: var(--color-white);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.footer-logo img {
    max-height: 40px;
    margin-bottom: 1rem;
}

.footer-site-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-white);
    display: block;
    margin-bottom: 1rem;
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--color-white);
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-white);
    transition: background var(--transition);
}

.social-links a:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ==========================================================================
   Single Post / Page
   ========================================================================== */

.single-post-content,
.page-content {
    padding: calc(var(--header-height) + 3rem) 0 4rem;
}

.entry-header {
    margin-bottom: 2.5rem;
}

.entry-featured-image {
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.entry-featured-image img {
    width: 100%;
    height: auto;
}

.entry-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.entry-title,
.page-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.9;
}

.entry-content p { margin-bottom: 1.5rem; }
.entry-content h2 { margin: 2rem 0 1rem; font-size: 1.75rem; }
.entry-content h3 { margin: 1.5rem 0 0.75rem; font-size: 1.4rem; }
.entry-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.entry-content ul, .entry-content ol { margin: 1rem 0 1.5rem 1.5rem; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--color-bg-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.entry-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.entry-tags {
    margin-bottom: 2rem;
}

.tags-label {
    font-weight: 600;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-subtitle {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.nav-title {
    font-weight: 600;
    color: var(--color-primary);
}

/* Content area (blog listing) */
.content-area {
    padding: calc(var(--header-height) + 3rem) 0 4rem;
}

.posts-pagination {
    margin-top: 3rem;
    text-align: center;
}

/* ==========================================================================
   Directory Section
   ========================================================================== */

.directory-section {
    background: var(--color-bg-light);
    text-align: center;
}

.directory-cta {
    margin-top: 2.5rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-white);
        box-shadow: var(--shadow-lg);
        padding: 5rem 1.5rem 2rem;
        transition: right var(--transition);
        overflow-y: auto;
    }

    .main-navigation.is-active {
        right: 0;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation a {
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--color-border);
    }

    .hero-section {
        min-height: 70vh;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .identity-grid {
        grid-template-columns: 1fr;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form .form-row {
        flex-direction: column;
    }

    .newsletter-form input[type="text"],
    .newsletter-form input[type="email"] {
        min-width: 100%;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .help-grid {
        grid-template-columns: 1fr;
    }
}
