/* University Partners Section Styling */

/* Section styling */
.university-partners-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.university-partners-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="grain" width="100" height="20" patternUnits="userSpaceOnUse"><circle cx="1" cy="1" r="1" fill="%23000" opacity="0.02"/></pattern></defs><rect width="100" height="20" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.university-partners-title {
    color: #2c3e50;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.university-partners-subtitle {
    color: #6c757d;
    line-height: 1.6;
}

.university-marquee-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.university-marquee-wrapper .theme-bg {
    padding: 40px 0;
}

.university-marquee-wrapper .marquee-wrapper {
    overflow: hidden;
    height: auto;
    min-height: 180px;
    display: flex;
    align-items: center;
}

/* Brand wrap adjustments - PROPERLY SPACED FOR MARQUEE */
.brand-wrap-one {
    margin: 0 12px;
    transition: all 0.4s ease;
    transform-style: preserve-3d;
    flex-shrink: 0;
}

.brand-wrap-one a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.brand-wrap-one a:hover {
    text-decoration: none;
}

/* University item container - PROPERLY SIZED FOR MARQUEE */
.university-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 25px 20px 20px 20px;
    min-height: 140px;
    min-width: 200px;
    max-width: 220px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 10px;
    backdrop-filter: blur(10px);
    position: relative;
}

.university-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 20px;
    pointer-events: none;
}

.university-item:hover,
.brand-wrap-one:hover .university-item {
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    border-color: rgba(255, 255, 255, 0.5);
}

/* University logo styling - PROPERLY SIZED */
.university-logo {
    max-width: 140px;
    max-height: 65px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: grayscale(0%);
    transition: all 0.4s ease;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.university-item:hover .university-logo,
.brand-wrap-one:hover .university-logo {
    filter: grayscale(0%) brightness(1.1) contrast(1.1);
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

/* University name styling - PROPERLY SIZED */
.university-info {
    text-align: center;
    width: 100%;
}

.university-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.4;
    margin: 0;
    padding: 0 8px;
    word-wrap: break-word;
    hyphens: auto;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

/* Icon spacing adjustment */
.brand-wrap-one .icon {
    margin-top: 8px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    max-width: 24px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.brand-wrap-one:hover .icon {
    opacity: 0.9;
}

/* Fallback for universities without logos - PROPERLY SIZED */
.university-item.no-logo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.university-item.no-logo::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
}

.university-item.no-logo .university-name {
    color: white;
    font-size: 14px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.university-item.no-logo:hover,
.brand-wrap-one:hover .university-item.no-logo {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Animation improvements */
.marquee-slide {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Additional hover effects */
.brand-wrap-one:hover {
    filter: brightness(1.02);
}

/* Responsive design */
@media (max-width: 1200px) {
    .university-item {
        min-width: 180px;
        max-width: 200px;
        min-height: 130px;
        padding: 20px 15px 15px 15px;
    }
    
    .university-logo {
        max-width: 120px;
        max-height: 55px;
        padding: 8px;
    }
    
    .university-name {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .brand-wrap-one {
        margin: 0 15px;
    }
    
    .university-item {
        min-width: 220px;
        max-width: 260px;
        min-height: 160px;
        padding: 30px 20px 20px 20px;
    }
    
    .university-logo {
        max-width: 140px;
        max-height: 70px;
        margin-bottom: 15px;
        padding: 10px;
    }
    
    .university-name {
        font-size: 14px;
    }
    
    .university-item.no-logo {
        min-height: 140px;
    }
    
    .university-item.no-logo .university-name {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .brand-wrap-one {
        margin: 0 12px;
    }
    
    .university-item {
        min-width: 180px;
        max-width: 220px;
        min-height: 140px;
        padding: 25px 15px 15px 15px;
        border-radius: 16px;
    }
    
    .university-logo {
        max-width: 120px;
        max-height: 60px;
        margin-bottom: 12px;
        padding: 8px;
        border-radius: 8px;
    }
    
    .university-name {
        font-size: 13px;
    }
    
    .university-item.no-logo {
        min-height: 120px;
    }
    
    .university-item.no-logo .university-name {
        font-size: 15px;
    }
}