/* Responsive Design */
@media (max-width: 2560px) {
    .content-overlay {
        height: 1200px;
    }    
}
@media (max-width: 2160px) {
    .content-overlay {
        height: 1000px;
    }    
}
@media (max-width: 1760px) {
    .content-overlay {
        height: 800px;
    }    
}
@media (max-width: 1440px) {
    .content-overlay {
        height: 700px;
    }    
}
@media (max-width: 1224px) {
    .content-overlay {
        height: 600px;
    }    
    .department-name{
        font-size: 20px;
    }
}
@media (max-width: 1124px) {
    
    .university-icon {
        width: 80px;
        height: 80px;

    }
    .university-left {

        gap: 5px;
    }
    .faculty-name, .university-name, .right-nav-link {
        font-size: 20px;
    }
    .right-nav-link {
        padding: 12px 10px;
    }    
    .departments-grid {
                grid-template-columns: repeat(3, 1fr);
                
            }
    
}
@media (max-width: 1024px) {
    .content-overlay {
        height: 450px;
    }  
    .university-header {
        
        padding: 10px 5px ;
        
}
    .vertical-line {
        width: 1px;
        height: 65px;
    }
    .university-icon {
        width: 60px;
        height: 60px;

    }
    .university-left {

        gap: 5px;
    }
    .faculty-name, .university-name, .right-nav-link {
        font-size: 12px;
    }
    .right-nav-link {
        padding: 12px 10px;
    }
        .slider-arrow {
        border: 3px solid white;
        width: 40px;
        height: 40px;
    }


    .news-image-container {
        position: relative;
        overflow: hidden;
        
        height: 500px;
        
        
    }
    .news-card-image {
       
        object-fit: cover;
       
        transition: transform 0.6s ease;
    }



    .departments-grid {
        
        gap: 20px;
    }

    .department-card {
        height: 200px;
        padding: 10px 10px 40px 10px;
    }

    .department-code {
        font-size: 42px;
    }

    .department-name {
        font-size: 16px;
    }
    
}
@media (max-width: 768px) {
    .main {
        height: 35vh;
    }
    .nav-menu {
        flex-direction: column;
        gap: 0;
        background: #004EA0;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    
    
    .university-icons,
    .university-info {
        display: none;
    }
    
    .university-header {
        padding-top: 120px;
    }
    
    .university-right-nav {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .right-nav-link {
        justify-content: center;
        font-size: 18px;
    }
    
    .news-header {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .modal-content {
        grid-template-columns: 1fr;
        max-height: 95vh;
    }
    
    .modal-image {
        max-height: 250px;
    }
    
    .modal-body {
        padding: 25px;
        max-height: calc(95vh - 250px);
    }
    
    .all-news-modal .modal-container.large {
        max-height: 95vh;
        height: 95vh;
        margin: 10px;
    }
    
    .all-news-header {
        padding: 25px 20px 20px;
    }
    
    .all-news-grid {
        padding: 20px;
    }

    .departments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .department-card {
        height: 200px;
        padding: 10px 10px 40px 10px;
    }

    .department-code {
        font-size: 48px;
    }

    .department-name {
        font-size: 18px;
    }
    .footer-section_2 {
        display: none;
    }
}
/* Для мобильных устройств */
@media (max-width: 768px) {
    .modal-content {
        grid-template-columns: 1fr;
        max-height: 95vh;
    }
    
    .modal-image {
        max-height: 200px;
        flex-shrink: 0;
    }
    
    .modal-image img {
        padding: 15px;
        max-height: 180px;
        object-fit: contain;
    }
    
    .modal-body {
        padding: 25px;
        max-height: calc(95vh - 200px);
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .modal-content-wrapper {
        max-height: calc(95vh - 300px);
    }
    
}

@media (max-width: 480px) {
    .news-title {
        font-size: 36px;
    }
    
    .all-news-btn {
        padding: 15px 25px;
        font-size: 16px;
    }
    
    .slider-arrow {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .prev { left: 15px; }
    .next { right: 15px; }

    .departments-grid {
        grid-template-columns: 1fr;
    }

    .departments-title {
        font-size: 32px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-section {
        text-align: center;
    }

    .footer-icons {
        justify-content: center;
    }
}