/* Main styles for KTU website */
html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden; /* prevent horizontal scroll with full-bleed header */
}
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header and Banner styles */
.site-header {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.banner-container {
    width: 100%;
    position: relative;
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

.header-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.header-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-logo {
    padding: 20px;
    max-width: 90%;
    margin: 0 auto;
}

.header-logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.university-title {
    color: white;
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.university-subtitle {
    color: #ffcc00;
    margin: 5px 0 0 0;
    font-size: 1.5rem;
    font-weight: 400;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .university-title {
        font-size: 2rem;
    }
    
    .university-subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .university-title {
        font-size: 1.5rem;
    }
    
    .university-subtitle {
        font-size: 1rem;
    }
    
    .banner-img {
        max-height: 300px;
    }
}

@media (max-width: 576px) {
    .university-title {
        font-size: 1.2rem;
    }
    
    .university-subtitle {
        font-size: 0.9rem;
    }
    
    .header-logo {
        padding: 10px;
    }
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand img {
    max-height: 50px;
}

/* Footer */
.site-footer {
    background-color: #012E6F;  /* Same as menu color */
    color: #e0e0e0;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.site-footer h6 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-footer a {
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: none;
}

/* Social links */
.site-footer .social-links {
    margin-top: 1rem;
    display: flex;
    gap: 0.8rem;
}

.site-footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ffffff;
    transition: all 0.3s ease;
}

.site-footer .social-links a:hover {
    background-color: #ffffff;
    color: #012E6F;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Footer bottom */
.site-footer .footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.site-footer .footer-bottom p {
    margin: 0;
}

/* Contact info */
.site-footer .contact-info i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .site-footer {
        text-align: center;
    }
    
    .site-footer .social-links {
        justify-content: center;
    }
    
    .site-footer .mb-4 {
        margin-bottom: 2rem !important;
    }
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Header with Banner */
.site-header {
    position: relative;
    width: 100vw;                 /* full-bleed */
    left: 50%;
    right: 50%;
    margin-left: -50vw;           /* stretch to viewport edges */
    margin-right: -50vw;
    overflow: hidden;
    background: white;
    box-shadow: none;
}

.banner-container {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 21 / 9;   /* более панорамный баннер */
    min-height: 66px;       /* +20% высоты */
    max-height: 13.5vh;     /* +20% высоты */
    line-height: 0;         /* убираем возможные межстрочные отступы */
    overflow: hidden;
    background-color: #f8f9fa; /* Fallback color */
}

/* Мягкий градиент для повышения читабельности текста слева сверху */
 

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top; /* привязка масштабирования к левому верхнему углу */
    position: absolute;
    top: 0;
    left: 0;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0; /* убираем внутренние отступы сверху и снизу */
}

.university-name {
    color: #333; /* Changed to dark color for better visibility */
    margin: 0 auto;
    display: inline-block;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 8px 14px;
    border-radius: 6px;
    width: max-content;      /* подгон по ширине текста */
    max-width: 100%;         /* не вылезать за экран */
}

.university-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #012E6F; /* same as main menu */
}

.university-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 10px 0 0 0;
    color: #555;
}

.university-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #012E6F; /* same as main menu */
}

.university-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
    color: #666;
}

/* Main Navigation */
.main-navigation {
    background-color: #012E6F;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

.menu-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    position: relative;
}

.main-menu > li {
    position: relative;
}

.main-menu > li > a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.main-menu > li > a:hover,
.main-menu > li.menu-item-has-children:hover > a {
    background-color: #004494;
}

/* Submenu styles */
.sub-menu {
    position: absolute;
    left: 0;
    top: 100%;
    background-color: white;
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.sub-menu li:last-child {
    border-bottom: none;
}

.sub-menu a {
    color: #333 !important;
    padding: 10px 20px !important;
    display: block;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sub-menu a:hover {
    background-color: #f8f9fa;
    color: #0056b3 !important;
    padding-left: 25px !important;
}

/* Dropdown arrow */
.menu-item-has-children > a > i {
    margin-left: 5px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-item-has-children:hover > a > i {
    transform: rotate(180deg);
}

/* Language switcher */
.language-switcher {
    display: flex;
    margin-left: 20px;
}

.language-switcher .lang-button {
    color: #7FA9E6; /* slightly lighter than #012E6F menu background */
    text-decoration: none;
    padding: 5px 10px;
    font-size: 14px;
    transition: color 0.2s ease, background-color 0.2s ease;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.language-switcher .lang-button:hover,
.language-switcher .lang-button.active {
    color: #ffffff;
    text-decoration: underline;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

/* Responsive styles */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }
    
    .menu-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-menu {
        display: none;
        width: 100%;
        flex-direction: column;
    }
    
    .main-menu.active {
        display: flex;
    }
    
    .main-menu > li {
        width: 100%;
    }
    
    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        box-shadow: none;
        padding-left: 20px;
    }
    
    .menu-item-has-children.active > .sub-menu {
        display: block;
    }
    
    .menu-item-has-children > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .language-switcher {
        margin: 15px 0 0 0;
        padding: 0 20px 15px;
        width: 100%;
        justify-content: center;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Hide the old navigation */
.navbar {
    display: none;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    color: #6c757d;
    transition: color 0.2s;
}

.social-link:hover {
    color: #0056b3;
    text-decoration: none;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 5px 0;
}

.nav-button {
    color: #495057;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 3px;
    transition: all 0.2s;
}

.nav-button:hover {
    color: #0056b3;
    background-color: rgba(0, 86, 179, 0.1);
    text-decoration: none;
}

.language-switcher {
    display: flex;
    gap: 5px;
}

.lang-button {
    color: #6c757d;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.85rem;
}

.lang-button.active {
    color: #0056b3;
    font-weight: 500;
}

.lang-button:not(.active):hover {
    background-color: rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .nav-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-buttons {
        order: 1;
    }
    
    .language-switcher {
        order: 2;
    }
    
    .social-links {
        order: 3;
    }
    
    .banner-container {
        aspect-ratio: auto;
        min-height: auto;
        max-height: none;
        height: auto;
        padding: 15px 0;
    }
    
    .banner-img {
        position: relative;
        height: 100%;
        min-height: 150px;
        object-fit: cover;
    }
    
    .header-content {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-logo {
        padding: 10px;
    }
    
    .header-logo-container {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .header-logo-img {
        height: 40px;
        width: auto;
        margin: 0 auto;
    }
    
    .university-title {
        font-size: 1.1rem;
        line-height: 1.2;
        margin: 0;
    }
    
    .university-subtitle {
        font-size: 0.8rem;
        line-height: 1.2;
        margin: 2px 0 0 0;
    }
}

/* Utility classes */
.bg-primary {
    background-color: #0056b3 !important;
}

.text-primary {
    color: #0056b3 !important;
}

.btn-primary {
    background-color: #0056b3;
    border-color: #004494;
}

.btn-primary:hover {
    background-color: #004494;
    border-color: #003875;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        margin-right: 0;
    }
    
    .navbar-toggler {
        margin-left: auto;
    }
}
/*убрать подчеркивание в меню*/
.main-navigation a {
    text-decoration: none !important;
}