/* Enhanced Styles for Projects, Events, Blog, and Media Pages */

/* ======================
   PROJECTS PAGE
   ====================== */

.projects-page .hero {
    border-top: 5px solid var(--primary-red);
    position: relative;
}

.projects-page .hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-red);
}

.projects-page .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.projects-page .project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-top: 3px solid var(--primary-blue);
    position: relative;
    overflow: hidden;
}

.projects-page .project-image-wrapper {
    width: 100%;
    height: 220px;
    background: #f5f6fa;
    overflow: hidden;
}

.projects-page .project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.projects-page .project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.projects-page .project-impact {
    margin-top: auto;
}

.projects-page .project-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge-success {
    background: #e6f4ea;
    color: #1b5e20;
    border-color: rgba(27, 94, 32, 0.2);
}

.badge-info {
    background: #e3f2fd;
    color: #0d47a1;
    border-color: rgba(13, 71, 161, 0.2);
}

.badge-warning {
    background: #fff8e1;
    color: #b36b00;
    border-color: rgba(179, 107, 0, 0.2);
}

.badge-muted {
    background: #eceff1;
    color: #455a64;
    border-color: rgba(69, 90, 100, 0.2);
}

/* ======================
   EVENTS PAGE
   ====================== */

.events-hero {
    border-top: 5px solid var(--primary-red);
    position: relative;
}

.events-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-red);
}

.events-list {
    padding: 4rem 0;
    background: #f8f9fa;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
    gap: 2rem;
    justify-content: center;
}

.event-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border-top: 3px solid var(--primary-blue);
    position: relative;
    max-width: 320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 450px;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-red);
    transition: width 0.3s ease;
    z-index: 2;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.event-card:hover::before {
    width: 100%;
}

.event-card .card-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    flex-shrink: 0;
}

.event-card .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    min-height: 210px;
}

.event-card .card-content h3 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

.event-card:hover .card-content h3 {
    color: var(--primary-red);
}

.event-card .card-content .badge {
    background: var(--primary-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    align-self: flex-start;
    border: 2px solid var(--primary-blue);
}

.event-card .card-content p {
    margin-top: auto;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-gray);
}

.event-card .card-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.event-card .card-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.event-card .card-meta i {
    color: var(--primary-red);
}

/* ======================
   BLOG PAGE
   ====================== */

.blog-hero {
    border-top: 5px solid var(--primary-red);
    position: relative;
}

.blog-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-red);
}

.blog-list {
    padding: 4rem 0;
    background: white;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-red);
    border-radius: 2px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    border-top: 3px solid var(--primary-blue);
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-red);
    transition: width 0.3s ease;
    z-index: 2;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-card:hover::before {
    width: 100%;
}

.blog-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-content h3 {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-content h3 {
    color: var(--primary-red);
}

.blog-content h3 a {
    color: inherit;
    text-decoration: none;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.blog-meta i {
    color: var(--primary-red);
}

.blog-category {
    background: var(--primary-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid var(--primary-blue);
}

.blog-excerpt {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.blog-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.blog-tag {
    background: #ffebee;
    color: var(--primary-red);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(211, 47, 47, 0.2);
}

.blog-read-more {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.blog-read-more:hover {
    gap: 0.75rem;
}

/* ======================
   MEDIA PAGE
   ====================== */

.media-hero {
    border-top: 5px solid var(--primary-red);
    position: relative;
}

.media-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-red);
}

.media-gallery {
    padding: 4rem 0 5rem;
    background: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.gallery-item {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.gallery-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    cursor: pointer;
}

.gallery-image img,
.gallery-item .media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.gallery-item:hover .gallery-image img,
.gallery-item.video-item:hover .media-video {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0,0,0,0.75), rgba(25,118,210,0.5));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: #fff;
    padding: 1rem 1.5rem;
}

.overlay-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.overlay-content p {
    font-size: 0.95rem;
    opacity: 0.9;
}

.overlay-content i {
    font-size: 1.7rem;
    margin-top: 0.5rem;
}

.video-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD54F, #FFCA28);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1E1E1E;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
    pointer-events: none;
}

.media-caption {
    padding: 1.25rem;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.media-caption-title {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.media-caption-description {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    color: var(--text-gray);
}

.media-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    padding: 1.5rem;
}

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

.media-modal-content {
    position: relative;
    background: #111;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 900px;
    width: 100%;
    box-shadow: var(--shadow-hover);
}

.media-modal-content img {
    width: 100%;
    border-radius: 8px;
    display: block;
    margin-bottom: 1rem;
}

.media-modal-content p {
    color: #f1f1f1;
    font-size: 1rem;
    margin: 0;
    text-align: center;
}

.media-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.media-modal-close:hover {
    background: rgba(255,255,255,0.35);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}

/* CTA Section for all pages */
.cta {
    background: var(--primary-red);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    position: relative;
    z-index: 1;
}

.cta p {
    color: #FFCDD2;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.cta .btn {
    position: relative;
    z-index: 1;
    font-weight: 600;
    padding: 15px 35px;
}

.cta .btn-primary {
    background: var(--primary-blue);
    border: 2px solid white;
}

.cta .btn-primary:hover {
background: white;
color: var(--primary-red);
}

/* ======================
   VOLUNTEER PAGE
   ====================== */

.volunteer-page .volunteer-hero {
position: relative;
min-height: 320px;
background: linear-gradient(135deg, rgba(15,23,42,0.85), rgba(211,47,47,0.75)), url('../images/volunteer-hero.jpg') center/cover;
border-top: 5px solid var(--primary-red);
}

.volunteer-page .hero-content {
position: relative;
z-index: 1;
}

.volunteer-page .hero-title {
font-size: clamp(2.25rem, 4vw, 3rem);
margin-bottom: 1rem;
}

.volunteer-page .volunteer-overview {
padding: 4rem 0;
}

.volunteer-benefits {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 1.5rem;
margin-top: 2.5rem;
}

.benefit-card {
background: #fff;
border-radius: 18px;
padding: 2rem;
box-shadow: var(--shadow);
text-align: center;
border-top: 4px solid var(--primary-blue);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card i {
font-size: 2rem;
color: var(--primary-red);
margin-bottom: 1rem;
}

.benefit-card:hover {
transform: translateY(-6px);
box-shadow: var(--shadow-hover);
}

.volunteer-impact {
background: #f8f9fb;
padding: 4rem 0;
}

.impact-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 1.25rem;
}

.impact-card {
background: #fff;
border-radius: 16px;
padding: 1.75rem;
box-shadow: var(--shadow);
border: 1px solid rgba(15,23,42,0.08);
}

.impact-card h3 {
font-size: 2rem;
color: var(--primary-blue);
margin: 0.35rem 0 0.75rem;
}

.impact-label {
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-gray);
}

.volunteer-steps {
padding: 4rem 0;
}

.steps-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 1.5rem;
}

.step-card {
background: #fff;
padding: 2rem;
border-radius: 18px;
box-shadow: var(--shadow);
border: 1px solid rgba(15,23,42,0.05);
position: relative;
overflow: hidden;
}

.step-number {
font-size: 1.15rem;
font-weight: 700;
color: var(--primary-red);
margin-bottom: 1rem;
}

.volunteer-testimonials {
padding: 4rem 0;
background: #0f172a;
color: #e2e8f0;
}

.volunteer-testimonials .section-header h2,
.volunteer-testimonials .section-header p {
color: #e2e8f0;
}

.testimonial-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1.5rem;
margin-top: 2.5rem;
}

.testimonial-card {
background: rgba(255,255,255,0.05);
border-radius: 16px;
padding: 2rem;
border: 1px solid rgba(255,255,255,0.08);
box-shadow: 0 20px 45px rgba(15,23,42,0.55);
}

.testimonial-card p {
font-size: 1.05rem;
line-height: 1.7;
margin-bottom: 1.5rem;
}

.testimonial-author strong {
display: block;
font-size: 1rem;
color: #fff;
}

.testimonial-author span {
font-size: 0.9rem;
color: #cbd5f5;
}

.volunteer-form-section {
padding: 4rem 0 5rem;
background: linear-gradient(180deg, #f8f9fb 0%, #ffffff 50%);
}

.embedded-form {
max-width: 960px;
margin: 0 auto;
}

.contact-page .section-eyebrow {
display: inline-flex;
align-items: center;
gap: 0.45rem;
text-transform: uppercase;
letter-spacing: 0.12em;
font-size: 0.78rem;
color: var(--primary-red);
font-weight: 600;
margin-bottom: 1rem;
}

.contact-highlights {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 1rem;
margin-top: 2rem;
}

.contact-highlight {
background: rgba(15,23,42,0.04);
border-radius: 14px;
padding: 1.5rem;
border-left: 4px solid var(--primary-blue);
}

.contact-highlight h3 {
font-size: 1rem;
margin-bottom: 0.65rem;
color: var(--primary-blue);
}

.contact-highlight p {
color: var(--text-gray);
line-height: 1.5;
}

.contact-overview {
    padding: 4rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 60%);
}

.contact-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.85fr);
    gap: 2.5rem;
    align-items: start;
}

.contact-overview-copy h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.contact-overview-copy p {
    color: var(--text-gray);
    line-height: 1.7;
}

.contact-overview-list {
    list-style: none;
    padding: 0;
    margin: 1.75rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.contact-overview-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 500;
    color: #0f172a;
}

.contact-overview-list i {
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.contact-overview-cta {
    border-left: 4px solid var(--primary-red);
    background: rgba(239,68,68,0.08);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
}

.contact-overview-cta strong {
    display: block;
    margin-bottom: 0.35rem;
}

.contact-overview-details {
    display: grid;
    gap: 1rem;
}

.overview-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid rgba(15,23,42,0.08);
    box-shadow: 0 15px 35px rgba(15,23,42,0.07);
}

.overview-card h3 {
    margin-bottom: 0.4rem;
    color: var(--primary-blue);
}

.overview-card p {
    margin: 0;
    color: var(--text-gray);
}

.contact-lede-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
    align-items: start;
}

.contact-support-card {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 30px 60px rgba(15,23,42,0.35);
}

.contact-support-card h3 {
    margin-bottom: 1.25rem;
    color: #fff;
}

.contact-detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-detail-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    line-height: 1.5;
}

.contact-detail-list i {
    color: var(--primary-red);
    font-size: 1.1rem;
    margin-top: 0.2rem;
}

.contact-response-note {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: rgba(226,232,240,0.1);
    border: 1px solid rgba(226,232,240,0.3);
}

.contact-response-note strong {
    display: block;
    margin-bottom: 0.35rem;
}

/* ======================
   RESPONSIVE DESIGN
   ====================== */

@media (max-width: 768px) {
.grid {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

    .contact-overview-grid,
    .contact-lede-grid {
        grid-template-columns: 1fr;
    }

    .contact-overview {
        padding: 3rem 0;
    }

    .contact-overview-copy h2 {
        font-size: 1.85rem;
    }

    .contact-support-card {
        padding: 1.6rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .event-card .card-img {
        height: 180px;
    }
    
    .event-card .card-content {
        min-height: 180px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        gap: 1rem;
    }
    
    .media-img, .media-video {
        max-width: 100%;
        height: 120px;
    }
    
    .media-caption {
        font-size: 0.95rem;
        padding: 0.7rem 0.3rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .cta h2 {
        font-size: 2rem;
    }

    .benefit-card,
    .step-card,
    .testimonial-card,
    .impact-card {
        padding: 1.5rem;
    }

    .impact-card h3 {
        font-size: 1.75rem;
    }

    .testimonial-card p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .cta h2 {
        font-size: 1.75rem;
    }
    
    .event-card .card-content h3,
    .blog-content h3 {
        font-size: 1rem;
    }

    .contact-overview-list li,
    .contact-detail-list li {
        flex-direction: column;
        align-items: flex-start;
    }
}
