/* Programs Page Specific Styles */

/* Page Header */
.page-header {
    background: linear-gradient(rgba(10, 33, 71, 0.9), rgba(10, 33, 71, 0.9)), url('../images/programs-hero.jpg');
    background-size: cover;
    background-position: center;
    color: var(--light-text);
    padding: 1.5rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.page-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Programs Navigation */
.programs-nav {
    background: var(--background-light);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.program-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.program-tab {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.7rem;
}

.program-tab:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.program-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Programs Content */
.programs-content {
    padding: 1rem 0;
}

.program-details {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.program-details.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.program-header {
    text-align: center;
    margin-bottom: 2rem;
}

.program-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.program-subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: 500;
}

.program-description {
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Key Initiatives */
.key-initiatives {
    margin-bottom: 2rem;
}

.key-initiatives h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.initiative-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.initiative-item:hover {
    transform: translateY(-5px);
}

.initiative-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.initiative-item h4 {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.initiative-item p {
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Program Impact */
.program-impact {
    background: var(--background-light);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: center;
    border-left: 4px solid var(--secondary-color);
}

.program-impact p {
    margin: 0;
    font-size: 1.1rem;
}

/* Program CTA */
.program-cta {
    text-align: center;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .program-tabs {
        gap: 0.25rem;
    }
    
    .program-tab {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .program-header h2 {
        font-size: 1.5rem;
    }
    
    .program-subtitle {
        font-size: 1rem;
    }
    
    .initiatives-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .initiative-item {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .program-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .program-tab {
        flex-shrink: 0;
    }
    
    .page-header {
        padding: 2.5rem 0;
    }
    
    .programs-content {
        padding: 2rem 0;
    }
}

/* Key Initiatives */
.key-initiatives {
    margin-bottom: 2rem;
}

.key-initiatives h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.initiatives-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Force 2 columns */
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.initiative-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid var(--secondary-color);
}

.initiative-item:hover {
    transform: translateY(-5px);
}

.initiative-item i {
    font-size: 2.5rem;
    color: #006823;
    margin-bottom: 1rem;
}

.initiative-item h4 {
    color: #946500;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.initiative-item p {
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .initiatives-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
        gap: 1rem;
    }
    
    .initiative-item {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .initiatives-grid {
        gap: 0.75rem;
    }
    
    .initiative-item {
        padding: 1rem;
    }
    
    .initiative-item i {
        font-size: 2rem;
    }
    
    .initiative-item h4 {
        font-size: 1.1rem;
    }
}

.bbtn-primary{
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.bbtn-primary:hover {
    transform: translateY(-5px);
}

.bbtn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    transform: translateY(-2px);
}

.bbtn-primary:hover::before {
    left: 100%;
}

.bbtn-primary {
    padding: 0.75rem;
    background: rgb(255, 255, 255);
    border: 3px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: rgb(0, 0, 0);
    border-color:rgb(212, 145, 19);
}

/* ============================================
   PROGRAMS PAGE MOBILE RESPONSIVE STYLES
   ============================================ */

/* Base Mobile Styles */
@media (max-width: 992px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .program-header h2 {
        font-size: 1.75rem;
    }
}

/* Tablet & Large Mobile (768px - 992px) */
@media (max-width: 992px) and (min-width: 768px) {
    .initiatives-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .program-tabs {
        gap: 0.5rem;
    }
    
    .program-tab {
        padding: 0.8rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Mobile Devices (up to 767px) */
@media (max-width: 767px) {
    /* Page Header */
    .page-header {
        padding: 2.5rem 0;
        min-height: auto;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
        padding: 0 15px;
        line-height: 1.3;
    }
    
    .page-header p {
        font-size: 0.95rem;
        line-height: 1.5;
        padding: 0 20px;
    }
    
    /* Programs Navigation */
    .programs-nav {
        padding: 1rem 0;
        position: sticky;
        top: 70px;
        z-index: 900;
        background: var(--background-light);
    }
    
    .program-tabs {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 0.5rem 15px 0.75rem;
        margin: 0 -15px;
        gap: 0.5rem;
        justify-content: flex-start;
        scroll-behavior: smooth;
    }
    
    .program-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .program-tab {
        flex: 0 0 auto;
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
        white-space: nowrap;
        border-radius: 20px;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Active tab indicator */
    .program-tabs-container {
        position: relative;
    }
    
    /* Programs Content */
    .programs-content {
        padding: 1.5rem 0;
    }
    
    .program-header {
        margin-bottom: 1.5rem;
        padding: 0 15px;
    }
    
    .program-header h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .program-subtitle {
        font-size: 1rem;
        font-weight: 500;
    }
    
    .program-description {
        font-size: 1rem;
        line-height: 1.5;
        padding: 0 15px;
        margin-bottom: 1.5rem;
    }
    
    /* Key Initiatives */
    .key-initiatives {
        margin-bottom: 1.5rem;
        padding: 0 15px;
    }
    
    .key-initiatives h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .initiatives-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .initiative-item {
        padding: 1.25rem;
        margin-bottom: 0;
        border-top-width: 3px;
    }
    
    .initiative-item i {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .initiative-item h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .initiative-item p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Program Impact */
    .program-impact {
        padding: 1.25rem;
        margin: 0 15px 1.5rem;
        text-align: left;
    }
    
    .program-impact p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* Program CTA */
    .program-cta {
        margin-top: 1.5rem;
        padding: 0 15px;
    }
    
    .bbtn-primary {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
        display: block;
    }
    
    /* Fade animation optimization */
    @keyframes fadeIn {
        from { 
            opacity: 0; 
            transform: translateY(10px); 
        }
        to { 
            opacity: 1; 
            transform: translateY(0); 
        }
    }
}

/* Small Mobile Devices (up to 480px) */
@media (max-width: 480px) {
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
        padding: 0 15px;
    }
    
    .program-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-radius: 18px;
        min-height: 34px;
    }
    
    .program-header h2 {
        font-size: 1.3rem;
    }
    
    .program-subtitle {
        font-size: 0.95rem;
    }
    
    .program-description {
        font-size: 0.9rem;
        padding: 0 10px;
    }
    
    .initiative-item {
        padding: 1rem;
    }
    
    .initiative-item i {
        font-size: 1.75rem;
    }
    
    .initiative-item h4 {
        font-size: 1rem;
    }
    
    .initiative-item p {
        font-size: 0.85rem;
    }
    
    .program-impact {
        padding: 1rem;
        margin: 0 10px 1.25rem;
    }
    
    .program-impact p {
        font-size: 0.9rem;
    }
    
    .bbtn-primary {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        max-width: 250px;
    }
}

/* Landscape Mode Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .page-header {
        padding: 1.5rem 0;
    }
    
    .program-tabs {
        padding-bottom: 0.5rem;
    }
    
    .program-tab {
        padding: 0.4rem 0.9rem;
        min-height: 32px;
    }
    
    .initiative-item {
        padding: 1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .program-tab:hover {
        transform: none;
        background: white;
        color: var(--primary-color);
    }
    
    .program-tab:active {
        background: var(--primary-color);
        color: white;
        transform: scale(0.98);
    }
    
    .program-tab.active:hover {
        background: var(--primary-color);
        color: white;
    }
    
    .initiative-item:hover {
        transform: none;
    }
    
    .initiative-item:active {
        transform: scale(0.98);
    }
    
    .bbtn-primary:hover {
        transform: none;
    }
    
    .bbtn-primary:active {
        transform: scale(0.98);
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .page-header {
        background: linear-gradient(rgba(10, 33, 71, 0.92), rgba(10, 33, 71, 0.92)), url('../images/programs-hero.jpg');
        background-size: cover;
        background-position: center;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .program-tab,
    .initiative-item,
    .bbtn-primary {
        transition: none;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .initiative-item {
        background: #ffffff;
        color: #000000;
        border-top-color: var(--secondary-color);
    }
    
    .program-impact {
        background: #ffffff;
        color: #000000;
    }
    
    .bbtn-primary {
        background: #ffffffcc;
        color: rgb(151, 129, 0);
        border-color: rgb(143, 0, 0);
    }
}

/* JavaScript Helper Classes */
.program-tabs.scrolling {
    cursor: grab;
}

.program-tabs.scrolling:active {
    cursor: grabbing;
}

/* Loading States */
.program-details.loading {
    position: relative;
    min-height: 200px;
}

.program-details.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Print Styles */
@media print {
    .programs-nav,
    .bbtn-primary {
        display: none !important;
    }
    
    .program-tabs {
        display: none !important;
    }
    
    .program-details {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .initiatives-grid {
        grid-template-columns: 1fr !important;
    }
    
    .initiative-item {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}