.carousel-faculty,
.carousel-ranking {
    overflow-x: hidden;
    overflow-y: hidden;
    margin: auto;
    margin-top: auto;
    margin-bottom: auto;
    border-radius: 25px;
    margin-top: 30px;
    margin-bottom: 30px;
    background-color: #eef2f7;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);

}

.carousel-faculty .faculty-container,
.carousel-ranking .ratings-container {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: start;
    padding: 25px 25px;
    margin: 0;
    gap: 30px;
}

.faculty-box,
.ratings-box {
    width: 300px;
    min-width: 300px;
    height: 190px;
    margin: 10px 20px;
    border-radius: 18px;
    border: 1px solid #e0e0e0;
    transform: perspective(1000px) rotateY(-2deg);
    box-shadow: 8px 8px 16px #c8cdd3, -8px -8px 16px #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: 0;
}

.faculty-box:hover,
.ratings-box:hover {
   box-shadow: rgb(204, 219, 232) 3px 3px 6px 0px inset, rgba(255, 255, 255, 0.5) -3px -3px 6px 1px inset;

}

.faculty-box .logo,
.ratings-box .logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faculty-box .logo span {
    color: #2c5ca9;
    font-size: 1.2rem;
    font-weight: 700;
}

.faculty-box .logo img,
.ratings-box .logo img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid #2c5ca9;
    box-shadow: 0 0 10px #2c5ca9, 0 0 20px #2c5ca9 inset;
}

.faculty-box .text h2,
.ratings-box .text h2 {
    background: linear-gradient(45deg, #2c5ca9, #001f40);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 1.5rem;
    font-weight: 900;
    margin: 10px 0 5px 0;
    line-height: 1.1;
    overflow-y: hidden;
}

.move-rankings-container,
.move-faculty-container {
    display: flex;
    gap: 40px;
    padding: 10px 0 40px 0;
    justify-content: space-around;
}

.move-rankings-container button,
.move-faculty-container button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: not-allowed;
    font-size: 1.8rem;
    font-weight: 900;
    color: #555;
    background: #eef2f7;
    box-shadow: 8px 8px 16px #c8cdd3, -8px -8px 16px #ffffff;
    transition: all 0.2s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    opacity: 0.6;
}

.rating-box {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0, 40, 80, 0.4);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}


.rating-box:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 40, 80, 0.6);
}



.rating-box>div {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    box-sizing: border-box;
}


.rating-box .logo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.rating-box .logo span {

    color: #fff;
    font-size: 0.9em;
    font-weight: 500;
    opacity: 0.9;
    letter-spacing: 0.5px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
    background-color: rgba(255, 255, 255, 0.15);
    padding: 4px 8px;
    border-radius: 5px;
    /* backdrop-filter: blur(2px); */
}

.rating-box .logo img {

    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid #63a4ff;
    box-shadow: 0 0 10px rgba(99, 164, 255, 0.8), 0 0 20px rgba(99, 164, 255, 0.3) inset;
}


.rating-box h2 {
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 1);
}

.submitButton {
    background: var(--indigoblue-font);
    color: var(--white);
    border-radius: 10px;
    width: 100%;
    padding-block: 10px;
    border: none;
}

form {
    width: 100% !important;
}

.feedback-form-container {
    display: flex;
    gap: 10px;
}

.feedback-form-container>div {
    flex: 1;
    /* все блоки одинаковой ширины */
}

.box-overlay {
    position: fixed;
    /* поверх всех элементов */
    top: 50%;
    left: 50%;
    width: 80vw;
    height: 750px;
    transform: translate(-50%, -50%);
    /* центрирование */
    background-color: var(--whiteblue);
    /* затемнение, можно изменить */
    z-index: 10000;
    /* выше других */
    display: none;
    /* по умолчанию скрыто, включай через JS */
    border-radius: 10px;
    padding: 20px;
    color: white;
    display: none;
}

/* Активный класс для отображения */
.box-overlay.active {
    display: block;
}

.blur {
    display: none;
    position: fixed;
    z-index: 9999;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    /* backdrop-filter: blur(5px); */
    /* Эффект размытия */
    background-color: rgba(0, 0, 0, 0.5);
    /* Затемнение */
}

.blur.active {
    display: block;
}

.card-text-news p span {
    color: white !important;
}

.more-events-overlay {
    display: none;
    position: fixed;
    /* поверх всех элементов */
    top: 50%;
    left: 50%;
    width: 50vw;
    height: 400px;
    transform: translate(-50%, -50%);
    /* центрирование */
    background-color: var(--whiteblue);
    /* затемнение, можно изменить */
    z-index: 10000;
    /* выше других */
    display: none;
    /* по умолчанию скрыто, включай через JS */
    border-radius: 10px;
    padding: 20px;
    color: white;

}

.more-events-overlay.active {
    display: block;

}

.event-modal {
    background: linear-gradient(145deg, #274b7a, #2f5fa1);
    border: 2px solid #5c8ecb;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    color: white;
    font-family: 'Segoe UI', sans-serif;
}

.event-modal h2 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.event-modal button:hover {
    color: #ffdddd;
}

.form-control {
    border-radius: 10px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

/* .btn-primary {
    background: var(--indigoblue);
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3a7bd5, #5b1688);
} */


.chat-open {
    position: fixed;
    bottom: 50px;
    right: 50px;
    width: 50px;
    height: 50px;
    border-radius: 100%;
    border: none;
    background-image: url('https://cb-electronics.com/wp-content/uploads/2021/04/istockphoto-1221348467-612x612-1.jpeg');
    z-index: 1000;
    background-size: cover;
    background-repeat: no-repeat;
    animation: vibrate 0.3s infinite;
    animation: swing 1s infinite ease-in-out;
    display: none;
}

.chat-open.active {
    display: block;
}

.close_chat_bot {
    animation: swing 1s infinite ease-in-out;
}

.close_chat_bot2 {
    background: url('https://cb-electronics.com/wp-content/uploads/2021/04/istockphoto-1221348467-612x612-1.jpeg') no-repeat center;
    background-size: 100%;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 100%;
    background-color: white;
}

@keyframes swing {
    0% {
        transform: rotate(0);
    }

    10% {
        transform: rotate(15deg);
    }

    20% {
        transform: rotate(-15deg);
    }

    30% {
        transform: rotate(10deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(5deg);
    }

    60% {
        transform: rotate(-5deg);
    }

    70% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(0);
    }

}

.chat-open::before,
.chat-open::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 10px solid var(--indigoblue-font);
    top: 0;
    left: 0;
    animation: ripple 2s infinite;
    z-index: -1;
}

.chat-open::after {
    animation-delay: 1s;
    /* вторая волна с задержкой */
}

.chat-whatsapp,
.chat-phone,
.chat-bot,
.chat-bot2 {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 50px;
    right: 50px;
    background-size: cover;
    border-radius: 100%;
    opacity: 0;
    pointer-events: none;
    border: none;
    z-index: 999;
    transform: translateY(0);
    transition: all 0.5s ease-in-out;
}

.chat-whatsapp {
    background-image: url('https://cdn-icons-png.flaticon.com/512/7044/7044732.png');
}

.chat-phone {
    background-image: url('https://cdn-icons-png.flaticon.com/512/3670/3670051.png');
}

.chat-bot {
    background-image: url('https://cb-electronics.com/wp-content/uploads/2021/04/istockphoto-1221348467-612x612-1.jpeg');
}

.chat-bot2 {
    background-image: url('https://img.freepik.com/free-vector/chatbot-chat-message-vectorart_78370-4104.jpg?semt=ais_hybrid&w=740&q=80');
}

.chat-bot2.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-70px);
    z-index: 1000;
}

/* при открытии */
/* .chat-whatsapp.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-130px);
    z-index: 1000;
}

.chat-phone.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-190px);
    z-index: 1000;
} */

.chat-bot.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-130px);
    z-index: 1000;
}

/* кнопка открытия */
/* .chat-open {
    position: fixed;
    bottom: 50px;
    right: 50px;
    width: 60px;
    height: 60px;
    border-radius: 100%;
    border: none;
    background: green;
    cursor: pointer;
    z-index: 1000;
} */
.chat-box {
    width: 400px;
    height: 550px;
    background: #ffffff;
    border-radius: 20px;
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1001;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: "Segoe UI", Tahoma, sans-serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-box.active {
    display: flex;
}

.header-chat {
    width: 100%;
    height: 60px;
    background: var(--indigoblue);
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-chat button {
    background: url('https://cb-electronics.com/wp-content/uploads/2021/04/istockphoto-1221348467-612x612-1.jpeg') no-repeat center;
    background-size: 100%;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 100%;
    background-color: white;
}

.header-chat p {
    margin: 0;
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 40px;

    max-width: 100%;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
    margin: 20px;
    overflow-y: scroll;
}

.message strong,
.message li {
    color: white;
}

.message.bot {
    background: var(--indigoblue);
    padding: 20px;
    border-radius: 20px;
    color: var(--white);
    max-width: 70%;
}

.message.user {
    max-width: 70%;
    margin-left: 25%;
    border: 1px solid var(--indigoblue-font);
    background: var(--white);
    padding: 20px;
    border-radius: 20px;
    color: var(--indigoblue-font);

}

.chat-box-input {
    flex: 0 0 50px;
    /* фиксированная высота */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    border-top: 1px solid #ddd;
    background: #fff;
}

.chat-box-input input {
    width: 88%;
    height: 80%;
    border-radius: 100px;
    border: 1px solid var(--indigoblue-font);
    color: #4a90e2;
    padding-left: 20px;
}

.chat-box-input button {
    width: 10%;
    height: 80%;
    background: url('https://cdn-icons-png.freepik.com/512/3682/3682321.png') no-repeat center;
    border-radius: 100%;
    background-size: 60%;
    /* иконка будет занимать 60% кнопки */
    border: none;
    cursor: pointer;

}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        /* размер круга */
        opacity: 0;
    }
}

.chat-widget {
    width: 400px;
    height: 550px;
    background: #ffffff;
    border-radius: 20px;
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1001;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: "Segoe UI", Tahoma, sans-serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-widget.active {
    display: block;
}

/* Минимальные стили, которые нельзя сделать инлайн */
.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 15px;
}

.user-message {
    background-color: #d1e7dd;
    /* Светло-зеленый */
    align-self: flex-end;
    margin-left: 20%;
}

.bot-message {
    background-color: #f8f9fa;
    /* Светлый фон */
    align-self: flex-start;
    margin-right: 20%;
}

.menu-button:hover {
    background-color: #2c5ca9;
    box-shadow: 0 4px 10px rgba(44, 92, 169, 0.4);
}