/* Programs Page Specific Styles */

/* Programs Header */
.programs-header {
    background: var(--bg-light);
    padding: 120px 0 80px;
    position: relative;
}

.programs-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.programs-subtitle {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.programs-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Programs Filter */
.programs-filter {
    background: var(--white);
    border-bottom: 1px solid #E9ECEF;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    background: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 130, 31, 0.3);
}

.filter-btn i {
    font-size: 0.8rem;
}

/* Programs Grid */
.programs-grid {
    background: var(--white);
    min-height: 60vh;
}

.program-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    position: relative;
    border: 2px solid transparent;
    opacity: 0;
    transform: translateY(20px);
}

.program-card.show {
    opacity: 1;
    transform: translateY(0);
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.program-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

.program-card:hover .program-icon {
    background: var(--secondary);
    transform: scale(1.1);
}

.program-icon i {
    font-size: 1.2rem;
    color: var(--white);
}

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

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

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

.program-content {
    padding: 1.5rem;
}

.program-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.program-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.program-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.program-tag {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--white);
}

.program-tag.political {
    background: #FF6B6B;
}

.program-tag.social {
    background: #4ECDC4;
}

.program-tag.health {
    background: #45B7D1;
}

.program-tag.environment {
    background: #96CEB4;
}

.program-tag.cultural {
    background: #FFEAA7;
    color: var(--text-dark);
}

.program-tag.awareness {
    background: #DDA0DD;
}

.program-stats {
    font-size: 0.8rem;
    color: var(--text-light);
}

.program-stats i {
    color: var(--primary);
    margin-right: 5px;
}

/* Filter Animation */
.program-card.filtering {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.program-card.filtered-out {
    display: none;
}

/* Programs Statistics */
.programs-stats {
    background: var(--secondary);
    position: relative;
}

.programs-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

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

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

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

.stat-icon {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    background: var(--secondary);
    transform: scale(1.1);
}

.stat-icon i {
    font-size: 2rem;
    color: var(--white);
}

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

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Loading State */
.programs-loading {
    text-align: center;
    padding: 4rem 0;
}

.programs-loading .spinner-border {
    color: var(--primary);
}

/* Empty State */
.programs-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.programs-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.programs-empty h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .programs-title {
        font-size: 2.5rem;
    }
    
    .programs-subtitle {
        font-size: 1.1rem;
    }
    
    .programs-description {
        font-size: 1rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        justify-content: center;
    }
    
    .program-card {
        margin-bottom: 2rem;
    }
    
    .program-content {
        padding: 1rem;
    }
    
    .program-content h4 {
        font-size: 1.2rem;
    }
    
    .program-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .programs-title {
        font-size: 2rem;
    }
    
    .programs-header {
        padding: 100px 0 60px;
    }
    
    .program-icon {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }
    
    .program-icon i {
        font-size: 1rem;
    }
    
    .program-image {
        height: 150px;
    }
    
    .program-content h4 {
        font-size: 1.1rem;
    }
    
    .program-description {
        font-size: 0.9rem;
    }
    
    .stat-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
    }
    
    .stat-icon i {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.program-card:nth-child(odd) {
    animation: slideInLeft 0.6s ease forwards;
}

.program-card:nth-child(even) {
    animation: slideInRight 0.6s ease forwards;
}

/* Hover Effects */
.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 130, 31, 0.1), transparent);
    transition: all 0.5s ease;
    z-index: 1;
}

.program-card:hover::before {
    left: 100%;
}

/* Print Styles */
@media print {
    .navbar,
    .programs-filter,
    .programs-stats,
    .footer {
        display: none;
    }
    
    .program-card {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .program-image {
        height: 150px;
    }
    
    .programs-grid {
        column-count: 2;
        column-gap: 20px;
    }
}

/* Accessibility */
.program-card:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.filter-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    .program-card {
        background: #2a2a2a;
        color: #ffffff;
    }
    
    .program-content h4 {
        color: #ffffff;
    }
    
    .program-description {
        color: #cccccc;
    }
}

/* Program Images Modal Styles */
.modal-xl {
    max-width: 90vw;
}

#programImagesModal .modal-content {
    border-radius: 15px;
    overflow: hidden;
}

#programImagesModal .modal-header {
    background: var(--primary);
    color: var(--white);
    border-bottom: none;
}

#programImagesModal .modal-header .btn-close {
    filter: invert(1);
}

#programImagesModal .carousel-item img {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.program-thumbnails {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    max-height: 120px;
    overflow-y: auto;
}

.program-thumbnails .thumbnail {
    transition: all 0.3s ease;
    border-radius: 5px !important;
}

.program-thumbnails .thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.program-thumbnails .thumbnail.active {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(245, 130, 31, 0.4);
}

#programImagesModal .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.image-info h6 {
    color: var(--text-dark);
    font-weight: 600;
}

.image-info p {
    font-size: 0.9rem;
}

.image-info .badge {
    background: var(--primary) !important;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

/* Carousel Controls */
#programImagesModal .carousel-control-prev,
#programImagesModal .carousel-control-next {
    width: 5%;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 10px 10px 0;
}

#programImagesModal .carousel-control-next {
    border-radius: 10px 0 0 10px;
}

#programImagesModal .carousel-control-prev:hover,
#programImagesModal .carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Loading State */
.programs-modal-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    flex-direction: column;
}

.programs-modal-loading .spinner-border {
    color: var(--primary);
    width: 3rem;
    height: 3rem;
}

/* View Images Button Styles */
.view-images-btn {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    transition: all 0.3s ease;
}

.view-images-btn:hover {
    background: var(--primary) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 130, 31, 0.3);
}

.view-images-btn i {
    margin-right: 5px;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95vw;
        margin: 10px;
    }
    
    #programImagesModal .carousel-item img {
        height: 300px !important;
    }
    
    .program-thumbnails {
        max-height: 80px;
    }
    
    .program-thumbnails .thumbnail {
        height: 40px !important;
    }
    
    #programImagesModal .modal-footer {
        padding: 0.75rem;
    }
    
    .image-info h6 {
        font-size: 0.9rem;
    }
    
    .image-info p {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    #programImagesModal .carousel-item img {
        height: 250px !important;
    }
    
    .program-thumbnails .col-2 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    .program-thumbnails .thumbnail {
        height: 35px !important;
    }
}