/* أنماط صفحة التخصصات الجامعية */
.specializations-page {
    font-family: 'Tajawal', sans-serif;
    background-color: #f8f9fa;
}

.specializations-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/hero-student.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 20px;
}

.specializations-hero .container {
    max-width: 1200px;
    margin: 0 auto;
}

.specializations-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.specializations-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.filter-section {
    background-color: white;
    padding: 30px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 15px 50px 15px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

.filter-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.filter-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

.reset-btn {
    background-color: #f1f1f1;
    color: #333;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.reset-btn:hover {
    background-color: #e0e0e0;
}

.specializations-list {
    padding: 60px 0;
    background-color: #f8f9fa;
    position: relative;
}

.specializations-list .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.specializations-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    align-items: stretch;
}

.specialization-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.specialization-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* أنماط رأس البطاقة */
.card-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 60px;
    flex-shrink: 0;
}

.card-header h3 {
    margin: 0;
    color: #1a73e8;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(26, 115, 232, 0.1);
    line-height: 1.4;
    flex: 1;
    margin-right: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.degree-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
}

.degree-bachelor {
    background-color: #28a745;
}

.degree-master {
    background-color: #17a2b8;
}

.degree-phd,
.degree-doctorate {
    background-color: #6f42c1;
}

.degree-associate {
    background-color: #fd7e14;
}

.degree-diploma {
    background-color: #20c997;
}

.field-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.field-engineering {
    background-color: #28a745 !important;
    color: white !important;
}

.field-medical {
    background-color: #dc3545 !important;
    color: white !important;
}

.field-business {
    background-color: #fd7e14 !important;
    color: white !important;
}

.field-humanities {
    background-color: #6f42c1 !important;
    color: white !important;
}

.field-science {
    background-color: #17a2b8 !important;
    color: white !important;
}

.field-art {
    background-color: #e83e8c !important;
    color: white !important;
}

.field-computer {
    background-color: #17a2b8 !important;
    color: white !important;
}

.field-صحي {
    background-color: #28a745 !important;
    color: white !important;
}

.field-إداري {
    background-color: #007bff !important;
    color: white !important;
}

.field-إعلامي {
    background-color: #6f42c1 !important;
    color: white !important;
}

.field-إدارة الأعمال {
    background-color: #fd7e14 !important;
    color: white !important;
}

.field-العلوم الإنسانية {
    background-color: #6f42c1 !important;
    color: white !important;
}

/* إضافة كلاسات إضافية للتأكد من تطبيق الألوان */
.field-إدارة\ الأعمال {
    background-color: #fd7e14 !important;
    color: white !important;
}

.field-العلوم\ الإنسانية {
    background-color: #6f42c1 !important;
    color: white !important;
}

/* كلاسات بدون مسافات */
.field-إدارةالأعمال {
    background-color: #fd7e14 !important;
    color: white !important;
}

.field-العلومالإنسانية {
    background-color: #6f42c1 !important;
    color: white !important;
}

/* كلاسات مع شرطات */
.field-إدارة-الأعمال {
    background-color: #fd7e14 !important;
    color: white !important;
}

.field-العلوم-الإنسانية {
    background-color: #6f42c1 !important;
    color: white !important;
}

/* إضافة نمط لتخصصات الفنون والتصميم */
.field-الفنون\ والتصميم {
    background-color: #e83e8c !important;
    color: white !important;
}

/* نمط خاص لتخصص الرسوم المتحركة */
.field-رسوم\ متحركة {
    background-color: #e83e8c !important;
    color: white !important;
}

.field-الرسوم\ المتحركة {
    background-color: #e83e8c !important;
    color: white !important;
}

/* كلاسات عامة للتأكد من تطبيق الألوان */
[class*="field-إدارة"] {
    background-color: #fd7e14 !important;
    color: white !important;
}

[class*="field-العلوم"] {
    background-color: #6f42c1 !important;
    color: white !important;
}

[class*="field-الفنون"] {
    background-color: #e83e8c !important;
    color: white !important;
}

[class*="field-رسوم"] {
    background-color: #e83e8c !important;
    color: white !important;
}

/* أنماط جسم البطاقة */
.card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    min-height: 200px;
}

.card-body .description {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    font-weight: 400;
    text-align: justify;
    padding: 10px 0;
    border-left: 3px solid #e2e8f0;
    padding-left: 12px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 8px;
    padding: 12px;
    margin: 0 0 12px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    min-height: 100px;
}

.card-body .description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    border-radius: 2px;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    background: #ffffff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    font-size: 0.9rem;
    padding: 6px 10px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 6px;
    border-left: 3px solid #1a73e8;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.15);
}

.detail-item i {
    color: #1a73e8;
    width: 18px;
    font-size: 1rem;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-item:last-child i {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* أنماط تذييل البطاقة */
.card-footer {
    padding: 12px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
    flex-shrink: 0;
}

.view-details-btn {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.view-details-btn:hover {
    background-color: #0d5bba;
}

/* أنماط النافذة المنبثقة */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    color: #1a73e8;
    margin: 0;
    font-size: 1.5rem;
}

.english-name {
    color: #666;
    font-size: 1rem;
    font-style: italic;
}

.info-section {
    margin-bottom: 25px;
}

.info-section h3 {
    color: #1a73e8;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.features-list,
.requirements-list,
.career-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-item,
.requirement-item,
.career-item {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-right: 3px solid #1a73e8;
}

/* أنماط تفاصيل الدراسة المحسنة */
.study-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.study-detail-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.study-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1a73e8, #34a853, #ea4335);
}

.study-detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #1a73e8;
}

.detail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    border-radius: 50%;
    margin-bottom: 15px;
    color: white;
    font-size: 1.2rem;
}

.detail-content h4 {
    color: #1a73e8;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.detail-content p {
    color: #555;
    margin: 0;
    line-height: 1.5;
}

.degree-badges,
.language-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.degree-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white !important;
    transition: all 0.3s ease;
    background-color: #28a745;
}

.degree-bachelor {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
}

.degree-master {
    background: linear-gradient(135deg, #17a2b8, #6f42c1) !important;
    color: white !important;
}

.degree-phd {
    background: linear-gradient(135deg, #6f42c1, #e83e8c) !important;
    color: white !important;
}

.degree-doctorate {
    background: linear-gradient(135deg, #6f42c1, #e83e8c) !important;
    color: white !important;
}

.language-badge {
    background: linear-gradient(135deg, #fd7e14, #ffc107);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.degree-badge:hover,
.language-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.subjects-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.subject-item {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #90caf9;
    transition: all 0.3s ease;
}

.subject-item:hover {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
    transform: scale(1.02);
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .card-body {
        padding: 20px;
    }

    .card-body .description {
        font-size: 0.9rem;
        line-height: 1.7;
        padding: 12px;
        -webkit-line-clamp: 3;
    }

    .card-details {
        padding: 12px;
        gap: 10px;
    }

    .detail-item {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .study-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .study-detail-card {
        padding: 15px;
    }

    .detail-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .detail-content h4 {
        font-size: 1rem;
    }

    .degree-badges,
    .language-badges,
    .subjects-list {
        gap: 6px;
    }

    .degree-badge,
    .language-badge,
    .subject-item {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .feature-item,
    .requirement-item,
    .career-item {
        padding: 12px 15px;
        gap: 12px;
    }

    .check-icon {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    .feature-text,
    .requirement-text,
    .career-text {
        font-size: 0.9rem;
    }
}

.modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.apply-btn,
.close-btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.apply-btn {
    background-color: #28a745;
    color: white;
}

.apply-btn:hover {
    background-color: #218838;
}

.close-btn {
    background-color: #6c757d;
    color: white;
}

.close-btn:hover {
    background-color: #5a6268;
}

/* أنماط الترويسة */
.specialization-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #f9f9f9;
}

.specialization-header h3 {
    margin: 0;
    color: #1a73e8;
    font-size: 1.3rem;
    font-weight: 700;
}

/* أنماط محتوى التخصص */
.specialization-body {
    padding: 20px;
}

.specialization-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #555;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 10px;
}

.specialization-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.specialization-meta i {
    color: #1a73e8;
    font-size: 0.9em;
}

.specialization-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.specialization-description::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}

.read-more {
    display: inline-block;
    color: #1a73e8;
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
}

/* أنماط التذييل */
.specialization-footer {
    padding: 0 20px 20px;
    text-align: left;
}

.view-specialization {
    display: inline-block;
    background-color: #1a73e8;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.view-specialization:hover {
    background-color: #0d5bba;
    transform: translateY(-2px);
}

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

/* أنماط الترقيم الصفحي */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination button {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pagination button:hover:not(:disabled) {
    background-color: #0d5bba;
    transform: translateY(-2px);
}

.pagination button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.pagination button i {
    font-size: 0.8em;
}

#page-info {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
    padding: 0 15px;
}

/* تحسين أنماط النافذة المنبثقة */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
    content-visibility: auto;
    contain: content;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

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

.close-modal {
    position: absolute;
    left: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.close-modal:hover {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.modal-header {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    padding: 30px 40px 25px 70px;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.modal-header h2 {
    color: white;
    margin: 0 0 5px 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.english-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 300;
}

.modal-body {
    padding: 30px 40px;
    background-color: #fafbfc;
}

.modal-body .specialty-info {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.info-section {
    margin-bottom: 35px;
    position: relative;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h3 {
    color: #1a73e8;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3f2fd;
    position: relative;
}

.info-section h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #1a73e8, #4285f4);
}

.info-section p {
    color: #555;
    line-height: 1.7;
    margin: 0;
    font-size: 1rem;
}

.features-list,
.requirements-list,
.career-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item,
.requirement-item,
.career-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 4px solid #1a73e8;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.feature-item:hover,
.requirement-item:hover,
.career-item:hover {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.15);
}

.check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
}

.feature-item:hover .check-icon,
.requirement-item:hover .check-icon,
.career-item:hover .check-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.feature-text,
.requirement-text,
.career-text {
    flex: 1;
    line-height: 1.6;
    color: #333;
    font-size: 0.95rem;
    margin: 0;
}

.modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding: 25px 40px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

.apply-btn,
.close-btn {
    padding: 12px 25px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.apply-btn::before,
.close-btn::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;
}

.apply-btn:hover::before,
.close-btn:hover::before {
    left: 100%;
}

.apply-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.apply-btn:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.close-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.close-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.university-list {
    margin-top: 20px;
}

.university-item {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.university-item:hover {
    background-color: #f8f9fa;
}

.university-name {
    font-weight: 500;
    color: #333;
}

.view-university {
    background-color: #1a73e8;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}

.view-university:hover {
    background-color: #0d5bba;
}

.featured-specializations {
    padding: 60px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #1a73e8;
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-card {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.featured-card:hover::before {
    transform: scaleX(1);
}

.featured-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.featured-card:hover .featured-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.featured-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.featured-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid transparent;
}

.view-btn:hover {
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

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

.view-btn:hover i {
    transform: translateX(-3px);
}

.consultation-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.consultation-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    padding: 50px;
    border-radius: 15px;
    color: white;
}

.consultation-content {
    flex: 1;
    min-width: 300px;
}

.consultation-content h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.consultation-content p {
    line-height: 1.6;
    margin-bottom: 30px;
}

.consultation-btn {
    display: inline-block;
    background-color: white;
    color: #1a73e8;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.consultation-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
}

.consultation-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.consultation-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .consultation-container {
        flex-direction: column;
        text-align: center;
    }

    .filter-options {
        flex-direction: column;
        gap: 15px;
    }

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

    .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 85vh;
        border-radius: 12px;
    }

    .close-modal {
        left: 15px;
        top: 15px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }

    .modal-header {
        padding: 20px 25px 15px 60px;
        border-radius: 12px 12px 0 0;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .english-name {
        font-size: 1rem;
    }

    .modal-body {
        padding: 20px 25px;
    }

    .modal-body .specialty-info {
        padding: 20px;
    }

    .info-section {
        margin-bottom: 25px;
    }

    .info-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .modal-footer {
        padding: 20px 25px;
        flex-direction: column;
        gap: 10px;
    }

    .apply-btn,
    .close-btn {
        width: 100%;
        padding: 15px;
        font-size: 1rem;
    }

    .university-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .university-stats {
        justify-content: flex-start;
    }

    .program-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .study-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .study-detail-card {
        padding: 15px;
    }

    .detail-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .detail-content h4 {
        font-size: 1rem;
    }

    .degree-badges,
    .language-badges,
    .subjects-list {
        gap: 6px;
    }

    .degree-badge,
    .language-badge,
    .subject-item {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
}

/* أنماط قسم الجامعات المتاحة - عرض محسن */
.universities-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 25px;
}

.university-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.university-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #1a73e8;
}

.university-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.university-header h4 {
    color: #1a73e8;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.university-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.university-stats .stat {
    background: #f8f9fa;
    color: #333;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e0e0e0;
}

.university-stats .stat:last-child {
    background: #e8f5e8;
    color: #2e7d32;
    font-weight: 600;
    border-color: #4caf50;
}

.university-programs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.program-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 18px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
}

.program-item:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #1a73e8;
}

.program-info {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.program-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.program-name {
    margin-bottom: 4px;
}

.university-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.university-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 0.85rem;
}

.university-meta .meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 4px 8px;
    border-radius: 9999px;
}

.university-meta .meta i {
    color: #9ca3af;
}

.university-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a73e8, #0d5bba);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(26, 115, 232, 0.25);
    transition: transform .2s ease, box-shadow .2s ease;
}

.university-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(26, 115, 232, 0.35);
}

.program-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.program-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    color: #4338ca;
    border: 1px solid #c7d2fe;
    cursor: pointer;
    transition: all .2s ease;
    font-weight: 600;
    font-size: .9rem;
}

.program-chip:hover {
    background: linear-gradient(135deg, #e0e7ff, #ede9fe);
    color: #3730a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
}

.more-programs-note {
    color: #6b7280;
    font-size: .9rem;
    align-self: center;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .university-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .university-stats {
        justify-content: flex-start;
    }

    .program-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .program-price {
        text-align: left;
    }

    .program-name strong {
        font-size: 1rem;
    }

    .program-name strong i {
        font-size: 0.7rem;
    }

    .university-item {
        padding: 15px;
    }

    .program-item {
        padding: 12px;
    }

    .university-stats .stat {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .program-language,
    .program-degree {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
}

/* تحسينات للشاشات المتوسطة */
@media (min-width: 769px) and (max-width: 1024px) {
    .university-header {
        gap: 15px;
    }

    .university-stats {
        gap: 8px;
    }

    .program-info {
        gap: 12px;
    }
}

.program-name strong:active {
    transform: scale(0.95) translateY(0px);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.program-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.program-language,
.program-degree,
.program-scholarship {
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.program-language {
    background: #4caf50;
}

.program-degree {
    background: #ff9800;
}

.program-scholarship {
    background: #ff5722;
}

.program-price {
    color: #1a73e8;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: right;
    white-space: nowrap;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .university-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .university-stats {
        justify-content: flex-start;
    }

    .program-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .program-price {
        text-align: left;
    }

    .program-name strong {
        font-size: 1rem;
    }

    .program-name strong i {
        font-size: 0.7rem;
    }

    .university-item {
        padding: 15px;
    }

    .program-item {
        padding: 12px;
    }

    .university-stats .stat {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}

/* تحسينات للشاشات المتوسطة */
@media (min-width: 769px) and (max-width: 1024px) {
    .universities-list {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 18px;
    }

    .university-item {
        padding: 22px;
    }
}

/* تأثيرات إضافية للتفاعل */
.university-item:active {
    transform: scale(0.98);
}

.program-item:active {
    transform: translateX(3px) scale(0.98);
}

/* تحسين قابلية القراءة */
.university-header h4 {
    text-shadow: 0 1px 2px rgba(26, 115, 232, 0.1);
}

.program-price {
    text-shadow: 0 1px 2px rgba(26, 115, 232, 0.1);
}

/* تأثيرات التحميل */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.university-item {
    animation: fadeInUp 0.6s ease-out;
}

.university-item:nth-child(2) {
    animation-delay: 0.1s;
}

.university-item:nth-child(3) {
    animation-delay: 0.2s;
}

.university-item:nth-child(4) {
    animation-delay: 0.3s;
}

/* رسالة عدم وجود جامعات متاحة */
.no-universities-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    margin: 20px 0;
}

.no-universities-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.no-universities-message h4 {
    color: #495057;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.no-universities-message p {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.no-universities-message ul {
    text-align: right;
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.no-universities-message li {
    color: #6c757d;
    margin: 10px 0;
    padding: 8px 0;
    position: relative;
    padding-right: 25px;
}

.no-universities-message li::before {
    content: '•';
    color: #667eea;
    font-weight: bold;
    position: absolute;
    right: 0;
    top: 8px;
}

.contact-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.contact-btn:hover {
    background: #4a5fd1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* عداد الجامعات المتاحة */
.universities-count {
    text-align: center;
    margin-bottom: 20px;
}

.count-badge {
    background: #667eea;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
}

/* تحسين مظهر اسم التخصص في الجامعات المتاحة */
.program-name strong {
    position: relative;
    z-index: 10;
    display: inline-block;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: underline;
    user-select: none;
}

.program-name strong:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #4a5fd1;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
    border-color: rgba(102, 126, 234, 0.3);
}

.program-name strong:active {
    transform: scale(0.95) translateY(0px);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.program-name strong i {
    opacity: 0.7;
    transition: all 0.3s ease;
    margin-right: 5px;
    font-size: 0.8rem;
    color: #667eea;
    display: inline-block;
}

.program-name strong:hover i {
    opacity: 1;
    transform: translateX(-2px);
    color: #4a5fd1;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: translateX(-2px) scale(1);
    }

    50% {
        transform: translateX(-2px) scale(1.1);
    }

    100% {
        transform: translateX(-2px) scale(1);
    }
}

.program-name strong::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.program-name strong:hover::after {
    width: 100%;
}

/* تحسين مظهر الجامعات المتاحة */
.universities-list {
    margin-top: 20px;
}

.university-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.university-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.university-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.university-header h4 {
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.university-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.university-stats .stat {
    background: #f8f9fa;
    color: #666;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

.university-programs {
    margin-top: 15px;
}

.program-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.program-item:hover {
    background: #f0f4ff;
    border-color: #667eea;
    transform: translateX(5px);
}

.program-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.program-details {
    flex: 1;
}

.program-badges {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.program-language,
.program-degree {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.program-language {
    background: #4caf50;
}

.program-degree {
    background: #ff9800;
}

.program-price {
    color: #1a73e8;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: right;
    white-space: nowrap;
}

.university-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}

.university-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #eee;
    padding: 4px;
}

/* تحسين أداء قوائم الجامعات داخل النافذة */
.universities-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    content-visibility: auto;
    contain: content;
}

/* تقليل تكلفة الخلفية الضبابية على الأجهزة الضعيفة */
@media (prefers-reduced-transparency: reduce) {
    .modal {
        backdrop-filter: none;
        background-color: rgba(0, 0, 0, 0.6);
    }
}

/* =========================================================================
   Premium Universities List in Specializations Modal
   ========================================================================= */
.universities-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.university-premium-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.university-premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.university-premium-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #2563eb, #3b82f6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.university-premium-card:hover::after {
    opacity: 1;
}

/* Header Section */
.upc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.upc-brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.upc-logo-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    flex-shrink: 0;
}

.upc-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.upc-logo-placeholder {
    font-size: 24px;
    color: #94a3b8;
}

.upc-title-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upc-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.upc-location {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.upc-location i {
    color: #ef4444;
}

.upc-rating-badge {
    background: #fffbeb;
    color: #d97706;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #fde68a;
}

.upc-star {
    color: #f59e0b;
}

.upc-new-badge {
    background: #eff6ff;
    color: #2563eb;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* Body Section */
.upc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upc-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
}

.upc-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.upc-stat-icon {
    font-size: 1.1rem;
    color: #3b82f6;
    margin-bottom: 2px;
}

.upc-stat-data {
    display: flex;
    flex-direction: column;
}

.upc-stat-val {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.upc-stat-lbl {
    font-size: 0.7rem;
    color: #64748b;
}

/* Programs Section */
.upc-programs-section {
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.upc-programs-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 10px 0;
}

.upc-programs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.upc-program-tag {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.upc-program-tag:hover {
    border-color: #3b82f6;
    color: #2563eb;
    background: #eff6ff;
}

.upc-program-more {
    font-size: 0.8rem;
    color: #64748b;
    padding: 4px 6px;
    font-weight: 500;
}

/* Footer Section */
.upc-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.upc-action-btn {
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    padding: 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.upc-action-btn i {
    transition: transform 0.2s;
}

.university-premium-card:hover .upc-action-btn {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.university-premium-card:hover .upc-action-btn i {
    transform: translateX(-4px);
}

@media (max-width: 640px) {
    .universities-items {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   Mobile UI Adjustments for Specialization Cards
   ========================================================================= */
@media (max-width: 768px) {
    .specializations-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .specialization-card {
        min-height: auto;
    }

    .card-header {
        padding: 12px 15px;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .card-header h3 {
        font-size: 1.1rem;
    }

    .degree-badge,
    .field-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .card-body {
        padding: 15px;
    }

    .card-body .description {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
        min-height: auto;
        padding: 10px;
    }

    .detail-item {
        font-size: 0.85rem;
        padding: 5px 8px;
    }

    .card-footer {
        padding: 10px 15px;
    }

    .view-details-btn {
        padding: 10px;
    }

    /* Adjust filters layout for mobile */
    .filter-options {
        flex-direction: column;
        gap: 15px;
    }

    .filter-group {
        width: 100%;
    }

    /* Show top pagination only on mobile */
    .mobile-top-pagination {
        display: flex !important;
    }
}