/* Stories Page Styles - MPFoundation Branding */

/* Variables - MPFoundation Color Scheme */
:root {
    --mpf-primary: #207dad;
    --mpf-secondary: #dc3545;
    --mpf-dark: #2c3e50;
    --mpf-light: #f8f9fa;
    --mpf-white: #ffffff;
    --mpf-gray: #6c757d;
    --mpf-accent: #007bff;
    --mpf-gradient: linear-gradient(135deg, #207dad 0%, #1e6aa0 100%);
}

.stories-page {
    background: var(--mpf-white);
    overflow-x: hidden;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Hero Section */
.stories-hero {
    background: var(--mpf-gradient);
    position: relative;
    padding: 60px 0 100px;
    color: var(--mpf-white);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.1;
    color: var(--mpf-white);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin: 0 0 40px;
    opacity: 0.9;
    line-height: 1.6;
    color: var(--mpf-white);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--mpf-white);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    color: var(--mpf-white);
}

.hero-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--mpf-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.image-overlay i {
    font-size: 4rem;
    color: var(--mpf-white);
    opacity: 0.9;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

/* Filter Section */
.stories-filter {
    padding: 60px 0;
    background: var(--mpf-white);
    border-bottom: 1px solid #e5e7eb;
}

.filter-header {
    text-align: center;
    margin-bottom: 40px;
}

.filter-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mpf-dark);
    margin: 0 0 15px;
}

.filter-subtitle {
    font-size: 1.2rem;
    color: var(--mpf-gray);
    margin: 0;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--mpf-light);
    border: 2px solid transparent;
    border-radius: 25px;
    color: var(--mpf-gray);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--mpf-primary);
    color: var(--mpf-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.search-sort {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box,
.sort-dropdown {
    position: relative;
}

.search-box input,
.sort-dropdown select {
    padding: 12px 45px 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 1rem;
    min-width: 250px;
    background: var(--mpf-white);
    transition: all 0.3s ease;
}

.search-box input:focus,
.sort-dropdown select:focus {
    outline: none;
    border-color: var(--mpf-primary);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.search-box i,
.sort-dropdown i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mpf-gray);
    pointer-events: none;
}

/* Featured Story Section */
.featured-story {
    padding: 80px 0;
    background: var(--mpf-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mpf-dark);
    margin: 0 0 15px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--mpf-gray);
    margin: 0;
}

.featured-story-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: var(--mpf-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    align-items: center;
}

.featured-image {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--mpf-primary);
    color: var(--mpf-white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.play-button:hover {
    background: var(--mpf-white);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button i {
    font-size: 2rem;
    color: var(--mpf-primary);
    margin-left: 4px;
}

.featured-content {
    padding: 40px;
}

.story-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.story-category {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.story-category.education {
    background: #e3f2fd;
    color: #1565c0;
}

.story-category.healthcare {
    background: #e8f5e8;
    color: #2e7d32;
}

.story-category.poverty {
    background: #fff3e0;
    color: #ef6c00;
}

.story-category.environment {
    background: #e8f5e8;
    color: #2e7d32;
}

.story-category.emergency {
    background: #ffebee;
    color: #c62828;
}

.story-date,
.story-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--mpf-gray);
    font-size: 0.9rem;
}

.story-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--mpf-dark);
    margin: 0 0 20px;
    line-height: 1.3;
}

.story-excerpt {
    font-size: 1.1rem;
    color: var(--mpf-gray);
    line-height: 1.6;
    margin: 0 0 30px;
}

.story-impact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--mpf-light);
    border-radius: 15px;
}

.impact-item {
    text-align: center;
}

.impact-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mpf-primary);
    margin-bottom: 5px;
}

.impact-label {
    font-size: 0.9rem;
    color: var(--mpf-gray);
}

.story-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--mpf-gradient);
    color: var(--mpf-white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--mpf-primary);
    border-color: var(--mpf-primary);
}

.btn-secondary:hover {
    background: var(--mpf-primary);
    color: var(--mpf-white);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--mpf-gray);
    border-color: var(--mpf-gray);
}

.btn-outline:hover {
    background: var(--mpf-gray);
    color: var(--mpf-white);
    transform: translateY(-2px);
}

/* Stories Grid Section */
.stories-grid {
    padding: 80px 0;
    background: var(--mpf-white);
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.grid-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mpf-dark);
    margin: 0;
}

.view-toggle {
    display: flex;
    gap: 5px;
    background: var(--mpf-light);
    padding: 5px;
    border-radius: 25px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 20px;
    color: var(--mpf-gray);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    background: var(--mpf-primary);
    color: var(--mpf-white);
}

.stories-container {
    display: grid;
    gap: 30px;
    margin-bottom: 60px;
}

.stories-container.grid-view {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.stories-container.list-view {
    grid-template-columns: 1fr;
}

.stories-container.list-view .story-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: center;
}

.stories-container.list-view .story-image {
    height: 200px;
}

.story-card {
    background: var(--mpf-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.story-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.story-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-card:hover .story-image img {
    transform: scale(1.05);
}

.story-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.story-card:hover .story-overlay {
    opacity: 1;
}

.read-more-btn {
    width: 60px;
    height: 60px;
    background: var(--mpf-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: var(--mpf-primary);
    color: var(--mpf-white);
    transform: scale(1.1);
}

.read-more-btn i {
    font-size: 1.2rem;
    color: var(--mpf-primary);
}

.read-more-btn:hover i {
    color: var(--mpf-white);
}

.story-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.story-category-badge.education {
    background: #1565c0;
    color: var(--mpf-white);
}

.story-category-badge.healthcare {
    background: #2e7d32;
    color: var(--mpf-white);
}

.story-category-badge.poverty {
    background: #ef6c00;
    color: var(--mpf-white);
}

.story-category-badge.environment {
    background: #2e7d32;
    color: var(--mpf-white);
}

.story-category-badge.emergency {
    background: #c62828;
    color: var(--mpf-white);
}

.story-content {
    padding: 30px;
}

.story-content .story-meta {
    margin-bottom: 15px;
}

.story-content .story-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.story-content .story-excerpt {
    font-size: 1rem;
    margin-bottom: 20px;
}

.story-stats {
    display: flex;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--mpf-gray);
    font-size: 0.9rem;
}

.stat i {
    color: var(--mpf-primary);
}

/* Load More Section */
.load-more-section {
    text-align: center;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--mpf-gradient);
    color: var(--mpf-white);
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.stories-count {
    color: var(--mpf-gray);
    margin: 0;
}

/* Impact Statistics */
.impact-statistics {
    padding: 80px 0;
    background: var(--mpf-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.stat-card {
    background: var(--mpf-white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: var(--mpf-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--mpf-white);
}

.stat-content .stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--mpf-primary);
    margin-bottom: 10px;
}

.stat-content .stat-label {
    font-size: 1.1rem;
    color: var(--mpf-gray);
    font-weight: 500;
}

/* Newsletter Section */
.stories-newsletter {
    padding: 80px 0;
    background: var(--mpf-white);
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mpf-dark);
    margin: 0 0 15px;
}

.newsletter-subtitle {
    font-size: 1.2rem;
    color: var(--mpf-gray);
    margin: 0 0 40px;
    line-height: 1.6;
}

.newsletter-form .form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 1rem;
    background: var(--mpf-white);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--mpf-primary);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.newsletter-btn {
    padding: 15px 30px;
    background: var(--mpf-gradient);
    color: var(--mpf-white);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.newsletter-privacy {
    font-size: 0.9rem;
    color: var(--mpf-gray);
    margin: 0;
}

/* CTA Section */
.stories-cta {
    padding: 80px 0;
    background: var(--mpf-gradient);
    color: var(--mpf-white);
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin: 0 0 40px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.stories-cta .btn-primary {
    background: var(--mpf-white);
    color: var(--mpf-primary);
}

.stories-cta .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

.stories-cta .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--mpf-white);
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.stories-cta .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.stories-cta .btn-outline {
    background: transparent;
    color: var(--mpf-white);
    border-color: rgba(255, 255, 255, 0.5);
}

.stories-cta .btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Story Modal */
.story-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.story-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--mpf-white);
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.story-modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--mpf-dark);
    margin: 0;
}

.modal-close {
    width: 40px;
    height: 40px;
    background: var(--mpf-light);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--mpf-secondary);
    color: var(--mpf-white);
}

.modal-body {
    padding: 20px 40px 40px;
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 20px;
}

.story-full-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--mpf-gray);
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .search-sort {
        flex-direction: column;
        align-items: center;
    }
    
    .search-box input,
    .sort-dropdown select {
        min-width: 100%;
    }
    
    .featured-story-card {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .featured-image {
        height: 300px;
    }
    
    .featured-content {
        padding: 30px 20px;
    }
    
    .story-impact {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .grid-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .stories-container.grid-view {
        grid-template-columns: 1fr;
    }
    
    .stories-container.list-view .story-card {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .stories-container.list-view .story-image {
        height: 250px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        justify-content: center;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .stories-hero {
        padding: 40px 0 80px;
    }
    
    .stories-filter,
    .featured-story,
    .stories-grid,
    .impact-statistics,
    .stories-newsletter,
    .stories-cta {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .filter-title,
    .section-title,
    .grid-title,
    .newsletter-title,
    .cta-title {
        font-size: 2rem;
    }
    
    .story-card {
        margin-bottom: 20px;
    }
    
    .story-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 30px 20px;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .cta-subtitle {
        font-size: 1.1rem;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s infinite;
}
