/* Programs Page Styles */

/* Hero Section */
.programs-hero {
    background: linear-gradient(135deg, rgba(10, 56, 20, 0.9), rgba(45, 112, 64, 0.8)), url('/static/images/base2.jpg');
    background-size: cover;
    background-position: center;
    min-height: 500px;
    padding: 120px 0 80px 0;
    position: relative;
    margin-top: 0;
    transition: background-image 0.5s ease-in-out;
}

/* Card Layout - Default View */

/* Breadcrumbs */
.programs-breadcrumb .breadcrumb {
    background: transparent;
    margin-bottom: 0;
}

.programs-breadcrumb .breadcrumb-item a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
}

.programs-breadcrumb .breadcrumb-item.active {
    color: #ffffff;
    opacity: 0.9;
}

.programs-hero .container {
    padding-left: 15px;
    padding-right: 15px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 100%;
}

.text-gold {
    color: #d4af37 !important;
}

/* Statistics */
.stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    transition: all 0.3s ease;
}

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

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn-gold {
    background: linear-gradient(135deg, #d4af37, #e6c547);
    color: #0a3814;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #e6c547, #d4af37);
    color: #0a3814;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* News Alert Banner */
.news-alert-section {
    background: linear-gradient(135deg, #2d5a27, #4a7c59);
    padding: 1rem 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.news-alert-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.news-alert {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(45, 90, 39, 0.2);
    position: relative;
    z-index: 2;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.alert-icon {
    background: linear-gradient(135deg, #2d5a27, #4a7c59);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(45, 90, 39, 0.3);
    flex-shrink: 0;
}

.alert-text {
    flex: 1;
    min-width: 300px;
}

.alert-title {
    color: #2d5a27;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-message {
    color: #495057;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.alert-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-alert {
    background: linear-gradient(135deg, #2d5a27, #4a7c59);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-alert:hover {
    background: linear-gradient(135deg, #1e3d1a, #2d5a27);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 90, 39, 0.3);
    text-decoration: none;
}

.btn-close-alert {
    background: transparent;
    border: 2px solid #e9ecef;
    color: #6c757d;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-close-alert:hover {
    background: #f8f9fa;
    border-color: #dc3545;
    color: #dc3545;
    transform: scale(1.1);
}

/* Responsive Design for Alert */
@media (max-width: 768px) {
    .news-alert-section {
        padding: 0.75rem 0;
    }
    
    .news-alert {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .alert-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .alert-text {
        min-width: auto;
        order: 2;
    }
    
    .alert-icon {
        order: 1;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .alert-actions {
        order: 3;
        justify-content: center;
    }
    
    .alert-title {
        font-size: 1rem;
    }
    
    .alert-message {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .alert-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-alert {
        width: 100%;
        justify-content: center;
    }
}

/* Enhanced Search and Filter Section */
.programs-toolbar-enhanced {
    background: linear-gradient(135deg, #f8f9fb 0%, #e9ecef 100%);
    border-top: 1px solid #eef1f4;
    border-bottom: 1px solid #eef1f4;
    position: relative;
}

.programs-toolbar-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2d5a27, #4a7c59, #2d5a27);
}

.letter-spacing-1 {
    letter-spacing: 0.5px;
}

/* Search Section */
.search-section h6 {
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.search-box-enhanced .input-group {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.search-box-enhanced .input-group:focus-within {
    box-shadow: 0 12px 35px rgba(45, 90, 39, 0.15);
    transform: translateY(-2px);
}

.search-box-enhanced .input-group-text {
    background: linear-gradient(135deg, #2d5a27, #4a7c59);
    color: white;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
}

.search-box-enhanced .form-control {
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    background: #fff;
}

.search-box-enhanced .form-control:focus {
    box-shadow: none;
    background: #fff;
}

.search-box-enhanced .form-control::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Controls Section */
.controls-section h6 {
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Enhanced Filter Buttons */
.filter-buttons-enhanced {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-btn-enhanced {
    background: #fff;
    border: 2px solid #e9ecef;
    color: #6c757d;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-btn-enhanced:hover {
    background: #f8f9fa;
    border-color: #2d5a27;
    color: #2d5a27;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 90, 39, 0.15);
}

.filter-btn-enhanced.active {
    background: linear-gradient(135deg, #2d5a27, #4a7c59);
    color: white;
    border-color: #2d5a27;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 90, 39, 0.25);
}

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

/* Enhanced View Toggle */
.view-toggle-enhanced {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-label {
    color: #495057;
    font-size: 0.9rem;
}

.view-toggle-enhanced .btn-group .btn {
    border-radius: 12px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    color: #6c757d;
}

.view-toggle-enhanced .btn-group .btn:hover {
    background: #f8f9fa;
    border-color: #2d5a27;
    color: #2d5a27;
    transform: translateY(-1px);
}

.view-toggle-enhanced .btn-group .btn.active {
    background: linear-gradient(135deg, #2d5a27, #4a7c59);
    border-color: #2d5a27;
    color: white;
    box-shadow: 0 4px 15px rgba(45, 90, 39, 0.2);
}

.view-toggle-enhanced .btn-group .btn i {
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 991px) {
    .filter-buttons-enhanced {
        justify-content: center;
        margin-bottom: 1.5rem;
    }
    
    .view-toggle-enhanced {
        justify-content: center;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .view-label {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 768px) {
    .programs-toolbar-enhanced {
        padding: 2rem 0;
    }
    
    .search-box-enhanced .input-group-text,
    .search-box-enhanced .form-control {
        padding: 0.875rem 1rem;
    }
    
    .filter-btn-enhanced {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .view-toggle-enhanced .btn-group .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Program Cards */
.program-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0;
    cursor: pointer;
    border: 1px solid rgba(45, 90, 39, 0.08);
}

.program-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 24px 48px rgba(45, 90, 39, 0.15);
    border-color: rgba(45, 90, 39, 0.2);
}

.program-card.active-program {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(45, 90, 39, 0.3);
    border: 2px solid #2d5a27;
}

.program-card.active-program .program-image {
    position: relative;
}

.program-card.active-program .program-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 90, 39, 0.2);
    z-index: 1;
}

.program-image {
    height: 240px;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.program-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 0;
    margin: 0;
    padding: 0;
}

/* Title ribbon overlay inspired by clean badge styles */
.title-ribbon {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 60%, rgba(0,0,0,0.75) 100%);
    color: #fff;
    z-index: 2;
}

.ribbon-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

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

.program-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 56, 20, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}

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

.overlay-content {
    text-align: center;
}

.program-level-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 3;
}

.level-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #2d5a27;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


.level-1 { border-left: 4px solid #28a745; }
.level-2 { border-left: 4px solid #17a2b8; }
.level-3 { border-left: 4px solid #ffc107; }
.level-4 { border-left: 4px solid #dc3545; }

.program-body {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

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

.cert-type-badge {
    background: linear-gradient(135deg, #2d5a27, #4a7c59);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.duration-badge {
    background: #e8f5e8;
    color: #2d5a27;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.credits-badge {
    background: #fff3cd;
    color: #856404;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.program-title {
    color: #2d5a27;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.program-desc {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.program-features {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.feature-item i {
    color: #2d5a27;
    width: 16px;
}

.program-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.program-actions .btn {
    flex: 1;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.program-actions .btn-primary {
    background: #2d5a27;
    border-color: #2d5a27;
}

.program-actions .btn-primary:hover {
    background: #1e3d1a;
    border-color: #1e3d1a;
    transform: translateY(-2px);
}

.program-actions .btn-outline-primary {
    border-color: #2d5a27;
    color: #2d5a27;
}

.program-actions .btn-outline-primary:hover {
    background: #2d5a27;
    border-color: #2d5a27;
    transform: translateY(-2px);
}

/* Subtle divider and spacing for a cleaner card look */
.program-body::before {
    content: '';
    display: block;
    height: 1px;
    width: 100%;
    background: rgba(0,0,0,0.06);
    margin: -1.5rem 0 1.25rem 0;
}

/* Empty State */
.empty-state {
    padding: 3rem 1rem;
}

.empty-state i {
    opacity: 0.5;
}

/* Call to Action Section */
.bg-primary {
    background: linear-gradient(135deg, #2d5a27, #4a7c59) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .programs-hero {
        min-height: 400px;
        padding: 100px 0 60px 0;
    }
    
    .stat-item {
        padding: 1rem 0.75rem;
        margin-bottom: 1rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .filter-buttons {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .program-image {
        height: 180px;
    }
    
    .program-body {
        padding: 1.25rem;
    }
    
    .program-features {
        gap: 0.75rem;
    }
    
    .program-actions {
        flex-direction: column;
    }
    
    .program-actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .programs-hero h1 {
        font-size: 2rem;
    }
    
    .programs-hero .lead {
        font-size: 1rem;
    }
    
    .stat-item h3 {
        font-size: 1.5rem;
    }
    
    .program-title {
        font-size: 1.1rem;
    }
    
    .program-desc {
        font-size: 0.9rem;
    }
    
    .feature-item {
        font-size: 0.8rem;
    }
}

/* Animation for program items */
.program-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.program-item:nth-child(1) { animation-delay: 0.1s; }
.program-item:nth-child(2) { animation-delay: 0.2s; }
.program-item:nth-child(3) { animation-delay: 0.3s; }
.program-item:nth-child(4) { animation-delay: 0.4s; }
.program-item:nth-child(5) { animation-delay: 0.5s; }
.program-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth transitions for hero content */
.hero-content h1,
.hero-content p {
    transition: all 0.3s ease-in-out;
}

/* Program card selection feedback */
.program-card:active {
    transform: translateY(-2px) scale(0.98);
}

/* Enhanced active program styling */
.program-card.active-program .program-title {
    color: #2d5a27;
    font-weight: 800;
}

.program-card.active-program .program-meta .cert-type-badge {
    background: linear-gradient(135deg, #2d5a27, #4a7c59);
    box-shadow: 0 2px 8px rgba(45, 90, 39, 0.3);
}

/* Smooth background image transitions */
.programs-hero {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    .programs-hero {
        background-attachment: scroll;
    }
}

/* Divisions (clean grouped sections similar to category blocks) */
.programs-division {
    margin-bottom: 3rem;
}

.division-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #eef1f4;
    padding-bottom: 0.75rem;
}

.division-title {
    font-weight: 800;
    color: #2d5a27;
    font-size: 1.5rem;
    margin: 0;
}

.division-subtitle {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
}

.division-grid {
    margin-top: 0.5rem;
}