/* Programmes catalogue.
   Extracted from templates/admissions/programmes.html so the Django page and
   the React page at /programmes render from one stylesheet rather than two
   copies that drift apart. Edit here; both pick it up. */

.programmes-hero {
        background: linear-gradient(135deg, #000 0%, #2c2c2c 100%);
        color: white;
        padding: 2.5rem 0 2rem;
        margin-bottom: 2rem;
        text-align: center;
    }

    .programmes-hero h1 {
        color: #d1aa66;
        font-weight: 700;
        font-size: 1.75rem;
        margin-bottom: 0.6rem;
    }

    .programmes-hero p {
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.95rem;
        max-width: 640px;
        margin: 0 auto 1.5rem;
    }

    .level-tabs {
        display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
        margin: 0 0 34px;
    }
    .level-tab {
        display: inline-flex; align-items: center; gap: 8px;
        padding: 10px 20px; border-radius: 30px; text-decoration: none;
        border: 1.5px solid #e2dbce; background: #fff; color: #1a1a1a;
        font-weight: 600; font-size: 14.5px; transition: all .18s ease;
    }
    .level-tab:hover { border-color: #d1aa66; color: #1a1a1a; }
    .level-tab.active { background: #1a1a1a; border-color: #1a1a1a; color: #fff; }
    .level-count {
        font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 20px;
        background: #f1ece2; color: #6b5c3e;
    }
    .level-tab.active .level-count { background: rgba(255,255,255,.18); color: #f3e7cf; }
    .level-tab-external { border-style: dashed; color: #6b5c3e; }
    .level-tab-external i { font-size: 11px; }
    @media (max-width: 575px) {
        .level-tabs { gap: 8px; }
        .level-tab { padding: 8px 14px; font-size: 13.5px; }
    }

    .programme-search-wrap {
        position: relative;
        max-width: 560px;
        margin: 0 auto;
    }

    .programme-search-wrap i.fa-search {
        position: absolute;
        left: 1.1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #d1aa66;
        pointer-events: none;
    }

    .programme-search-wrap input {
        width: 100%;
        padding: 0.85rem 1rem 0.85rem 2.75rem;
        border-radius: 2rem;
        border: none;
        font-size: 0.98rem;
    }

    .programme-search-wrap input:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(209, 170, 102, 0.45);
    }

    .programme-search-spinner {
        position: absolute;
        right: 1.1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #d1aa66;
    }

    #programmes-grid.is-loading {
        opacity: 0.5;
        pointer-events: none;
        transition: opacity 0.15s ease;
    }

    .category-section {
        margin-bottom: 2.5rem;
    }

    .category-header {
        background: #f8f9fa;
        border-left: 5px solid #d1aa66;
        padding: 1rem 1.25rem;
        margin-bottom: 1.25rem;
        border-radius: 0.5rem;
    }

    .category-header h2 {
        color: #2c2c2c;
        font-weight: 700;
        margin-bottom: 0.25rem;
        font-size: 1.3rem;
    }

    .category-header p {
        color: #6c757d;
        margin: 0;
        font-size: 0.9rem;
    }

    .programme-card {
        background: white;
        border: 2px solid #e9ecef;
        border-radius: 0.85rem;
        padding: 1.25rem;
        margin-bottom: 1.25rem;
        transition: all 0.3s ease;
        height: 100%;
    }

    .programme-card:hover {
        border-color: #d1aa66;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        transform: translateY(-5px);
    }

    .programme-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        margin-bottom: 1rem;
    }

    .programme-title {
        flex: 1;
    }

    .programme-title h3 {
        color: #2c2c2c;
        font-weight: 700;
        margin-bottom: 0.35rem;
        font-size: 1.15rem;
    }

    .programme-code {
        background: #e9ecef;
        color: #495057;
        padding: 0.2rem 0.6rem;
        border-radius: 0.3rem;
        font-size: 0.75rem;
        font-weight: 600;
        display: inline-block;
        margin-bottom: 0.35rem;
    }

    .programme-badge {
        background: linear-gradient(135deg, #d1aa66 0%, #c19955 100%);
        color: #000;
        padding: 0.35rem 0.75rem;
        border-radius: 0.5rem;
        font-size: 0.75rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .programme-description {
        color: #6c757d;
        line-height: 1.55;
        margin-bottom: 1rem;
        font-size: 0.92rem;
    }

    .programme-details {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
        margin-bottom: 1rem;
        padding: 0.75rem;
        background: #f8f9fa;
        border-radius: 0.5rem;
    }

    .detail-item {
        text-align: center;
    }

    .detail-item i {
        color: #d1aa66;
        font-size: 1.15rem;
        margin-bottom: 0.35rem;
    }

    .detail-label {
        display: block;
        color: #6c757d;
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }

    .detail-value {
        display: block;
        color: #2c2c2c;
        font-weight: 600;
        font-size: 0.9rem;
    }

    .specializations-section {
        margin-bottom: 1rem;
    }

    .specializations-section h5 {
        color: #2c2c2c;
        font-weight: 600;
        margin-bottom: 0.6rem;
        font-size: 0.95rem;
    }

    .specialization-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .specialization-tag {
        background: #e7f3ff;
        color: #0066cc;
        padding: 0.3rem 0.65rem;
        border-radius: 0.3rem;
        font-size: 0.8rem;
        border: 1px solid #b3d9ff;
    }

    .programme-actions {
        display: flex;
        gap: 0.75rem;
        padding-top: 1rem;
        border-top: 2px solid #e9ecef;
    }

    .btn-apply {
        background: linear-gradient(135deg, #d1aa66 0%, #c19955 100%);
        color: #000;
        font-weight: 600;
        padding: 0.55rem 1.4rem;
        font-size: 0.9rem;
        border: none;
        border-radius: 0.5rem;
        text-decoration: none;
        transition: all 0.3s ease;
        text-align: center;
        flex: 1;
    }

    .btn-apply:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(209, 170, 102, 0.4);
        color: #000;
    }

    .btn-learn-more {
        background: white;
        color: #495057;
        font-weight: 600;
        font-size: 0.9rem;
        padding: 0.55rem 1.4rem;
        border: 2px solid #dee2e6;
        border-radius: 0.5rem;
        text-decoration: none;
        transition: all 0.3s ease;
        text-align: center;
    }

    .btn-learn-more:hover {
        background: #f8f9fa;
        border-color: #adb5bd;
        color: #495057;
    }

    .no-programmes {
        text-align: center;
        padding: 4rem 2rem;
        background: #f8f9fa;
        border-radius: 1rem;
        margin: 2rem 0;
    }

    /* Direct child only: the large empty-state graduation-cap glyph.
       As a descendant selector this also hit the small icons inside the
       "Clear Search" button and the "Return to Homepage" link, blowing them up
       to 4rem of gold-on-gold and pushing the label out of place. */
    .no-programmes > i {
        font-size: 4rem;
        color: #d1aa66;
        margin-bottom: 1rem;
    }

    /* Buttons in the empty state keep normal, inherited icon sizing. */
    .no-programmes .btn-apply i {
        font-size: 1em;
        color: inherit;
        margin-bottom: 0;
        vertical-align: -0.05em;
    }

    .no-programmes h3 {
        color: #2c2c2c;
        margin-bottom: 1rem;
    }

    .no-programmes p {
        color: #6c757d;
    }

    @media (max-width: 768px) {
        .programmes-hero h1 {
            font-size: 2rem;
        }

        .programme-header {
            flex-direction: column;
        }

        .programme-badge {
            margin-top: 1rem;
        }

        .programme-details {
            grid-template-columns: 1fr 1fr;
        }

        .programme-actions {
            flex-direction: column;
        }
    }
