/* ================================
   Beautiful University Cards - Large Image Design
================================ */
.university-card-beautiful {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.university-card-beautiful:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.25);
}

/* Large Image Section */
.university-image-large {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.university-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: brightness(0.95);
}

.university-card-beautiful:hover .university-image-large img {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(1.05);
}

/* Gradient Overlay for Text Readability */
.image-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
    transition: opacity 0.4s;
}

.university-card-beautiful:hover .image-gradient-overlay {
    background: linear-gradient(
        to bottom,
        rgba(99, 102, 241, 0.2) 0%,
        rgba(99, 102, 241, 0.4) 50%,
        rgba(99, 102, 241, 0.8) 100%
    );
}

/* Floating Rank Badge */
.rank-badge-floating {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a1a;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    z-index: 3;
    backdrop-filter: blur(10px);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.rank-badge-floating i {
    font-size: 0.75rem;
    animation: trophy-spin 3s linear infinite;
}

@keyframes trophy-spin {
    0%, 90%, 100% { transform: rotate(0deg); }
    95% { transform: rotate(15deg); }
}

/* University Name on Image */
.university-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 18px;
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.4s;
}

.university-name-overlay h5 {
    color: white;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.university-card-beautiful:hover .university-name-overlay {
    transform: translateY(-5px);
}

/* Minimal Info Section */
.university-details-minimal {
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    border-radius: 12px;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
    width: fit-content;
}

.location-badge i {
    color: var(--primary);
    font-size: 0.8rem;
}

.students-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.students-count i {
    color: var(--primary);
    font-size: 0.8rem;
}

/* Beautiful Apply Button */
.btn-apply-beautiful {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient-1);
    color: white;
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.btn-apply-beautiful::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.btn-apply-beautiful span,
.btn-apply-beautiful i {
    position: relative;
    z-index: 1;
}

.btn-apply-beautiful i {
    transition: transform 0.4s;
}

.btn-apply-beautiful:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.45);
    color: white;
}

.btn-apply-beautiful:hover::before {
    opacity: 1;
}

.btn-apply-beautiful:hover i {
    transform: translateX(6px);
}

/* Shimmer Effect on Hover */
.btn-apply-beautiful::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.6s;
}

.btn-apply-beautiful:hover::after {
    left: 150%;
}

/* ================================
   Responsive Design
================================ */
@media (max-width: 1199px) {
    .university-image-large {
        height: 260px;
    }
}

@media (max-width: 991px) {
    .university-image-large {
        height: 240px;
    }
    
    .university-name-overlay h5 {
        font-size: 1.05rem;
    }
}

@media (max-width: 767px) {
    .university-image-large {
        height: 280px;
    }
    
    .university-card-beautiful {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 575px) {
    .university-image-large {
        height: 260px;
    }
    
    .university-name-overlay {
        padding: 16px 14px;
    }
    
    .university-details-minimal {
        padding: 18px 16px;
    }
}

/* ================================
   Optional: Premium Variant with Accent Border
================================ */
.university-card-beautiful.premium {
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.university-card-beautiful.premium::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: var(--gradient-1);
    border-radius: 20px;
    z-index: -1;
}
