/* Programs and Projects Page Styles */
.programs-hero {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}


.programs-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/static/images/programs_and_projects/home4.jpg') center/cover;
    opacity: 0.15;
    z-index: 1;
}

.programs-hero .container {
    position: relative;
    z-index: 2;
}

.programs-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.programs-hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-stats {
    margin-top: 50px;
}

.hero-stat {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
    transition: var(--transition);
}

.hero-stat:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-gold);
    margin-bottom: 10px;
}

.hero-stat-label {
    font-size: 1rem;
    font-weight: 600;
}

.filter-section {
    background: var(--light-bg);
    padding: 60px 0;
    border-bottom: 1px solid rgba(178, 34, 34, 0.1);
}

.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-btn {
    background: white;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-red);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(178, 34, 34, 0.3);
    text-decoration: none;
}

.filter-btn.active {
    background: var(--primary-red);
    color: white;
}

.projects-section {
    padding: 80px 0;
    background: white;
}

.projects-section .section-title h2 {
    font-size: 2.5rem;
}

.project-card {
    display: flex;
    flex-direction: column; 
    min-height: 450px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    height: 100%;
    position: relative;
    margin-bottom: 30px;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(178, 34, 34, 0.15);
}

.project-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(178, 34, 34, 0.7) 0%, rgba(139, 0, 0, 0.5) 100%);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-image::before {
    opacity: 1;
}

.status-active {
    background: #28a745;
    color: white;
}

.status-completed {
    background: var(--primary-gold)!important;
    color: white;
}

.status-upcoming {
    background: #17a2b8;
    color: white;
}

.project-content {
    display: flex;
        flex-direction: column;
        flex: 1;
        /* Takes up remaining space */
        padding: 25px;
        position: relative;
}

.project-title {
    font-size: 1.3rem;
        font-weight: 700;
        color: var(--dark-red);
        margin-bottom: 15px;
        line-height: 1.3;
}

.project-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    flex: 1;
}

.project-meta {
     display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #888;
}

.project-meta i {
    color: var(--primary-red);
    margin-right: 5px;
}


.stats-overview {
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
    color: white;
    padding: 80px 0;
}

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

.stat-item {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-gold);
    margin-bottom: 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
}

.load-more-section {
    text-align: center;
    margin-top: 50px;
}

.btn-load-more {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    font-size: 1.1rem;
}

.btn-load-more:hover {
    background: var(--primary-red);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(178, 34, 34, 0.3);
}

.project-item {
    transition: all 0.5s ease;
}

.project-item.hide {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    margin: 0;
    height: 0;
    overflow: hidden;
}

.project-item.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(212,175,55,0.1)" points="0,0 1000,0 800,1000 0,1000"/></svg>') center/cover;
    animation: float 6s ease-in-out infinite;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.btn-cta {
    background: var(--primary-gold);
    color: var(--dark-red);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.btn-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-cta:hover {
    background: var(--light-gold);
    color: var(--dark-red);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.3);
}

.btn-cta:hover::before {
    transform: translateX(100%);
}

.btn-cta i {
    transition: transform 0.3s ease;
}

.btn-cta:hover i {
    transform: translateX(5px);
}

/* === END of CTA Section === */

@media (max-width: 992px) {
    .programs-hero h1 {
        font-size: 2.5rem;
    }

    .filter-container {
        justify-content: center;
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .programs-hero {
        padding: 100px 0 60px;
    }

    .programs-hero h1 {
        font-size: 2rem;
    }

    .programs-hero p {
        font-size: 1.1rem;
    }

    .hero-stats {
        margin-top: 30px;
    }

    .projects-section .section-title h2 {
        font-size: 2rem;
    }

    .project-card {
        margin-bottom: 25px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .filter-container {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 200px;
        text-align: center;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Status and Category Styling */
/* Ensure project-image is positioned relative for absolute children */
.project-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

/* Optional: Add some hover effect for the category badge */
.project-card:hover .project-category-bottom {
    background: var(--dark-red);
    transform: translateX(5px);
    transition: var(--transition);
}

.project-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    gap: 10px;
}

/* Category styling - left side */
.project-category-bottom {
    display: inline-block;
    background: var(--primary-red);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Status styling - right side */
.project-status-bottom {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Status color variations */
.project-status-bottom.status-active {
    background: #28a745;
    color: white;
}

.project-status-bottom.status-completed {
    background: var(--primary-gold)!important;
    color: white;
}

.project-status-bottom.status-upcoming {
    background: #17a2b8;
    color: white;
}

/* Optional: Add hover effects */
.project-card:hover .project-category-bottom {
    background: var(--dark-red);
    transition: var(--transition);
}

.project-card:hover .project-status-bottom {
    transform: scale(1.05);
    transition: var(--transition);
}

.projects-section .row {
    display: flex;
    flex-wrap: wrap;
}

.projects-section .row>[class*='col-'] {
    display: flex;
    margin-bottom: 30px;
}

/* Responsive adjustments - also scope to projects section */
@media (max-width: 576px) {
    .project-labels {
        flex-wrap: wrap;
        gap: 8px;
    }

    .project-category-bottom,
    .project-status-bottom {
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    .project-card {
        min-height: 380px;
    }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .project-labels {
        flex-wrap: wrap;
        gap: 8px;
    }

    .project-category-bottom,
    .project-status-bottom {
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    .project-card {
             min-height: 380px;
     }
}

/* End of Status and Category Styling */


/* === Button Styling === */

.project-btn {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: white;
    border: none;
    padding: 5px;
    margin-top: 5px;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: inline-block;
        /* Important for <a> tags */
        text-decoration: none;
        /* Remove underline */
        text-align: center;
        /* Center the text */
        box-sizing: border-box;
}

.project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(178, 34, 34, 0.3);
    color: white;
}
.project-btn i {
    display: inline-block;
    vertical-align: middle;
}

/* === END of Button Styling === */