/* Posts Page Specific Styles */

/* Hero Section */
.posts-hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                url('https://images.unsplash.com/photo-1504711434969-e33886168f5c?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 80px;
    position: relative;
}

.posts-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
}

.posts-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.posts-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.posts-hero .highlight {
    color: #ffc107;
    font-weight: 600;
}

.posts-hero p {
    font-size: 1.2rem;
    margin-bottom: 0;
    opacity: 0.95;
}

/* Navigation active state */
.nav-links a.active {
    background: #2c5aa0;
    color: white !important;
}

/* Featured Post Section */
.featured-post {
    padding: 80px 0;
    background: white;
}

.featured-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-image {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.featured-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-info h2 {
    font-size: 2.2rem;
    color: #2c5aa0;
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.featured-info p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 25px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.category {
    background: #17a2b8;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.date, .author {
    color: #666;
    font-weight: 500;
}

.author::before {
    content: "by ";
    opacity: 0.7;
}

.post-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.stat {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.read-more-btn {
    display: inline-block;
    background: #2c5aa0;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: #1e3f73;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.3);
    text-decoration: none;
    color: white;
}

/* Filter Section */
.filter-section {
    padding: 40px 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 30px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    position: relative;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #2c5aa0;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #2c5aa0;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #1e3f73;
}

.category-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #2c5aa0;
    background: #f0f7ff;
}

.filter-btn.active {
    background: #2c5aa0;
    color: white;
    border-color: #2c5aa0;
}

.sort-options select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

/* Posts Grid Section */
.posts-grid-section {
    padding: 60px 0;
    background: white;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.post-card.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.post-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

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

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

.post-category {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: capitalize;
}

.post-category.events {
    background: #17a2b8;
}

.post-category.success-stories {
    background: #28a745;
}

.post-category.awareness {
    background: #ffc107;
    color: #333;
}

.post-category.research {
    background: #6f42c1;
}

.post-category.fundraising {
    background: #e74c3c;
}

.post-content {
    padding: 25px;
}

.post-content .post-meta {
    margin-bottom: 12px;
    font-size: 13px;
}

.post-content .post-meta .date,
.post-content .post-meta .author {
    color: #888;
}

.post-content h3 {
    font-size: 1.2rem;
    color: #2c5aa0;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.post-content p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-content .post-stats {
    margin-bottom: 15px;
    font-size: 12px;
}

.read-more {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #1e3f73;
    text-decoration: none;
}

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

.load-more-btn {
    background: #2c5aa0;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #1e3f73;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.3);
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    color: #666;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Newsletter Section */
.newsletter-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #2c5aa0, #17a2b8);
    color: white;
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.newsletter-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.newsletter-info p {
    font-size: 1.1rem;
    opacity: 0.95;
    line-height: 1.6;
}

.newsletter-form {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.form-group {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
}

.form-group input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
}

.subscribe-btn {
    padding: 15px 25px;
    background: #ffc107;
    color: #333;
    border: none;
    border-radius: 0 25px 25px 0;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.subscribe-btn:hover {
    background: #ffb300;
}

.form-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #ffc107;
    border-color: #ffc107;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-size: 12px;
    font-weight: bold;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.modal-header h2 {
    color: #2c5aa0;
    margin: 0;
    font-weight: 600;
}

.modal-body {
    padding: 30px;
    text-align: center;
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 15px;
    color: #666;
}

.modal-footer {
    padding: 20px 30px 30px;
    text-align: center;
}

.modal-footer .btn-primary {
    background: #2c5aa0;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-footer .btn-primary:hover {
    background: #1e3f73;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .featured-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-filters {
        justify-content: center;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .posts-hero h1 {
        font-size: 2.2rem;
    }
    
    .posts-hero p {
        font-size: 1.1rem;
    }
    
    .featured-info h2 {
        font-size: 1.8rem;
    }
    
    .featured-info p {
        font-size: 1rem;
    }
    
    .filter-controls {
        padding: 0 20px;
    }
    
    .category-filters {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .filter-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 20px;
    }
    
    .form-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group input {
        border-radius: 25px;
    }
    
    .subscribe-btn {
        border-radius: 25px;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
}

@media (max-width: 480px) {
    .posts-grid-section {
        padding: 40px 0;
    }
    
    .post-content {
        padding: 20px;
    }
    
    .newsletter-section {
        padding: 60px 0;
    }
    
    .newsletter-info h2 {
        font-size: 2rem;
    }
    
    .newsletter-form {
        padding: 25px;
    }
}
