/* Universities Grid Container */
.view-universities .view-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 40px 0;
    padding: 0;
    list-style: none;
}

/* Remove default list styling if using unformatted list */
.view-universities .view-content .views-row {
    margin: 0;
    padding: 0;
}

/* University Card */
.university-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.university-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* University Link - Wraps entire card */
.university-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.university-link:hover {
    text-decoration: none;
}

/* University Image */
.university-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    position: relative;
}

.university-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.university-card:hover .university-image img {
    transform: scale(1.05);
}

/* If image is missing, show placeholder */
.university-image:empty:before {
    content: "\f19c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 48px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* University Content */
.university-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* University Name */
.university-name {
    font-size: 20px;
    font-weight: bold;
    color: #2d3748;
    margin: 0 0 15px 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.university-card:hover .university-name {
    color: #f59e0b;
}

/* University Meta Section */
.university-meta {
    margin-bottom: 15px;
}

/* University Type Badge */
.university-type {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    background: #f7fafc;
    color: #4a5568;
}

/* Government Badge - Green */
.university-type-391,
.university-type:contains("حكومية") {
    background: #d4edda !important;
    color: #155724 !important;
}

/* Private Badge - Blue */
.university-type-392,
.university-type:contains("خاصة") {
    background: #cce5ff !important;
    color: #004085 !important;
}

/* University Info */
.university-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #718096;
}

.info-item i {
    color: #f59e0b;
    font-size: 14px;
}

/* University CTA Button */
.university-cta {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-align: center;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    transition: all 0.3s ease;
}

.university-cta i {
    transition: transform 0.3s ease;
}

.university-card:hover .university-cta {
    opacity: 0.95;
}

.university-card:hover .university-cta i {
    transform: translateX(-3px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .view-universities .view-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .university-name {
        font-size: 18px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .view-universities .view-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Remove any table styling if it was previously a table */
.view-universities table {
    display: block;
}

.view-universities thead,
.view-universities tbody,
.view-universities tr {
    display: block;
}