/* --- ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ И СБРОС --- */
:root {
    --red: #D91D24;       
    --green: #2C9342;     
    --dark: #222222;
    --gray: #F4F4F4;
    --white: #FFFFFF;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    background-color: var(--white);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%; 
    max-width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-wrap: break-word; 
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; }

/* --- КНОПКИ --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-small {
    padding: 8px 20px;
    background-color: var(--green);
    color: var(--white);
}

.btn-small:hover { background-color: #237a35; }

.btn-primary {
    background-color: var(--red);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(217, 29, 36, 0.3);
}

.btn-primary:hover {
    background-color: #b0151b;
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--dark);
    background: transparent;
    margin-left: 15px;
}

.btn-outline:hover {
    background-color: var(--dark);
    color: var(--white);
}

/* --- ШАПКА САЙТА --- */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img { height: 50px; }

.logo-text {
    display: flex;
    flex-direction: column;
    font-weight: 900;
    line-height: 1.1;
}

.logo-text span:first-child { color: var(--red); font-size: 1.5rem; }
.college-tag { color: var(--green); font-size: 0.8rem; letter-spacing: 1px; }

.main-nav { display: flex; gap: 30px; }
.nav-link { font-weight: 600; font-size: 0.95rem; position: relative; }
.mobile-link { display: none; color: var(--red); }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--red);
    transition: var(--transition);
}

.nav-link:hover::after { width: 100%; }

.burger-menu { 
    display: none; 
    font-size: 1.5rem; 
    cursor: pointer; 
}

/* Мобильное меню */
.main-nav.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: white;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-top: 1px solid #eee;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- ГЛАВНЫЙ ЭКРАН (HERO) --- */
.hero-section {
    padding-top: 120px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFFFFF 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(44,147,66,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
}

.hero-subtitle {
    color: var(--green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
}

.text-highlight {
    color: var(--red);
    position: relative;
    z-index: 1;
}

.text-highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 15px;
    background-color: rgba(255, 215, 0, 0.4);
    z-index: -1;
    transform: rotate(-1deg);
}

.hero-desc {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-main-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 20px 20px 0px rgba(44, 147, 66, 0.2);
}

/* --- СЕКРЕТАРЬ ПЕРВИЧКИ --- */
.secretary-section {
    padding: 80px 0;
    background-color: var(--white);
}

.secretary-wrap {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    align-items: center;
}

.secretary-photo img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 20px 20px 0px var(--gray);
}

.secretary-info h2 {
    color: var(--green);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.secretary-info h3 {
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.secretary-info .position {
    color: #777;
    margin-bottom: 30px;
    font-style: italic;
}

.quote {
    border-left: 4px solid var(--red);
    padding-left: 20px;
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
    margin-bottom: 30px;
    background: #fffcfc;
    padding: 20px;
    border-radius: 0 10px 10px 0;
}

.contacts-mini {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark);
}

.contacts-mini i { color: var(--red); margin-right: 10px; }

/* --- НОВОСТИ И ОБЪЯВЛЕНИЯ --- */
.news-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.news-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.news-tab {
    background: none;
    border: 2px solid var(--dark);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: 0.3s;
    font-size: 1rem;
}

.news-tab:hover {
    background: var(--dark);
    color: white;
}

.news-tab.active {
    background: var(--red);
    color: white;
    border-color: var(--red);
    box-shadow: 0 5px 15px rgba(217, 29, 36, 0.3);
}

.news-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    animation: fadeIn 0.4s ease;
}

.news-grid.active {
    display: grid;
}

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: 0.3s;
    border: 1px solid #eee;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.news-img {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--red);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.news-content {
    padding: 20px;
}

.news-date-row {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-date-row i { color: var(--red); }

.news-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    line-height: 1.4;
}

.news-content p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.telegram-promo {
    margin-top: 50px;
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.tg-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tg-btn {
    display: inline-block;
    background: #0088cc;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
}

.tg-btn:hover {
    background: #0077b5;
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- НАПРАВЛЕНИЯ ДЕЯТЕЛЬНОСТИ --- */
.directions-interactive {
    padding: 80px 0;
    background-color: #fff;
}

.directions-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: start;
}

.dir-image-box {
    position: sticky;
    top: 100px;
    height: 600px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.dir-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.dir-main-title {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 40px;
    text-transform: uppercase;
    font-weight: 900;
}

.dynamic-text {
    min-height: 150px;
    margin-bottom: 40px;
}

.dynamic-text h3 {
    color: var(--dark);
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 4px solid var(--red);
    padding-left: 15px;
}

.dynamic-text p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.dir-grid-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.dir-nav-item {
    cursor: pointer;
    position: relative;
    padding-bottom: 10px;
    transition: 0.3s;
}

.nav-number {
    display: block;
    font-weight: 900;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #333;
}

.dir-nav-item i {
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: block;
    color: #555;
    transition: 0.3s;
}

.nav-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
    color: #222;
}

.dir-nav-item::after {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #ddd;
    transition: 0.3s;
}

.dir-nav-item.active i { color: var(--green); }
.dir-nav-item.active .nav-number { color: var(--green); }
.dir-nav-item.active::after {
    width: 100%;
    background-color: var(--green);
}

.dir-nav-item:hover i { color: var(--red); }

/* --- ГАЛЕРЕЯ --- */
.gallery-section {
    padding: 50px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 40px;
}

.color-accent { color: var(--red); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
}

.gallery-item {
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* --- СИМВОЛИКА --- */
.symbols-section {
    padding: 80px 0;
    background-color: var(--white);
}

.symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.symbol-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.symbol-visual {
    background-color: #f8f9fa;
    padding: 20px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.real-symbol-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

.symbol-info { padding: 25px; }
.symbol-info h3 { font-size: 1.4rem; margin-bottom: 10px; color: var(--dark); }
.symbol-info p { font-size: 0.95rem; color: #666; margin-bottom: 15px; }
.reg-number { font-size: 0.8rem; color: #999; text-transform: uppercase; font-weight: 700; }

.statute-download {
    text-align: center;
    background: var(--gray);
    padding: 40px;
    border-radius: 20px;
}

.statute-download p { margin-bottom: 20px; font-weight: 600; }

/* --- ФУТЕР --- */
.site-footer {
    background-color: #1a1a1a;
    color: #fff;
    padding-top: 60px;
    margin-top: auto; 
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--white);
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--red);
}

.footer-contacts li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
}

.footer-contacts i { color: var(--green); }

.disk-link {
    display: inline-block;
    margin-top: 15px;
    background: #333;
    padding: 10px 15px;
    border-radius: 5px;
    color: #fff;
    transition: 0.3s;
}

.disk-link:hover { background: #e32636; }

.social-links { display: flex; gap: 10px; }

.social-btn {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    font-size: 1.2rem;
}

.social-btn:hover { background: var(--green); transform: translateY(-3px); }

.college-link {
    display: block;
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 15px;
    transition: 0.3s;
    line-height: 1.4;
}

.college-link:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Ссылка на карту в футере */
.map-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    transition: 0.3s;
    text-decoration: none;
    cursor: pointer;
}

.map-link:hover {
    color: var(--red);
    transform: translateX(5px);
}

.map-link i {
    color: var(--green);
    transition: 0.3s;
}

.map-link:hover i {
    color: var(--red);
}

.footer-bottom {
    background-color: #111;
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: #666;
    border-top: 1px solid #222;
}

/* Анимация телефона при наведении */
a[href^="tel:"] {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.1s ease, color 0.2s;
    cursor: pointer;
}

a[href^="tel:"]:active {
    transform: scale(0.95);
    opacity: 0.8;
}

@media (hover: hover) {
    a[href^="tel:"]:hover i {
        animation: phoneRing 0.5s infinite alternate;
    }
}

@keyframes phoneRing {
    from { transform: rotate(-10deg); }
    to { transform: rotate(10deg); }
}

/* Кнопка наверх */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--red);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0; 
    visibility: hidden;
    transition: 0.3s;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background-color: var(--dark);
    transform: translateY(-5px);
}

/* --- СТИЛИ ДЛЯ ОТДЕЛЬНЫХ СТРАНИЦ (USTAV, HISTORY, INFO) --- */
.page-text {
    background-color: #f9f9f9;
}

.text-content-section {
    padding: 60px 0;
}

.text-content-section h1 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 40px;
    color: var(--red);
}

.document-body {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    max-width: 900px;
    margin: 0 auto;
}

.document-body h3 {
    color: var(--green);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.document-body h3:first-child {
    margin-top: 0;
}

.document-body p {
    margin-bottom: 15px;
    line-height: 1.8;
    text-align: justify;
    color: #444;
}

.document-body ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
    color: #444;
}

.document-body li {
    margin-bottom: 10px;
}

/* --- МОДАЛЬНОЕ ОКНО (ФОРМА ЗАЯВКИ) --- */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); 
    z-index: 2000; 
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    padding: 20px;
}

.modal-overlay.active {
    display: flex; 
    animation: fadeInModal 0.3s ease;
}

.modal-window {
    background-color: #fff;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: white;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--dark);
    font-weight: 800;
}

.close-join {
    cursor: pointer;
    font-size: 1.5rem;
    color: #999;
    transition: 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-join:hover {
    background-color: #eee;
    color: var(--red);
}

.small-modal {
    max-width: 500px;
}

.form-body {
    padding: 30px;
}

.form-desc {
    text-align: center;
    margin-bottom: 25px;
    color: #666;
    font-size: 0.9rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
    outline: none;
    box-sizing: border-box;
}

.input-group input:focus {
    border-color: var(--green);
}

.full-width {
    width: 100%;
    margin-top: 10px;
}

#successMessage h3 {
    color: var(--dark);
}

/* --- АДАПТИВ (Планшеты) --- */
@media (max-width: 992px) {
    .header-wrap { padding: 0 15px; }

    .hero-content, .secretary-wrap {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .hero-title { font-size: 2.8rem; }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
        width: 100%;
    }
    .btn-outline { margin: 0; }

    .secretary-photo { max-width: 350px; margin: 0 auto; }
    .quote { margin: 20px auto; text-align: left; }

    .main-nav { display: none; }
    .mobile-link { display: block; margin-top: 10px; font-weight: 700; }
    
    .burger-menu { 
        display: flex;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
        color: var(--dark);
        border: 2px solid rgba(0,0,0,0.05);
        border-radius: 8px;
        transition: 0.2s;
    }
    
    .burger-menu:active {
        background-color: var(--gray);
        color: var(--red);
    }
    
    .directions-wrapper { grid-template-columns: 1fr; }
    .dir-image-box { 
        height: 250px; 
        position: relative; 
        top: 0; 
        margin-bottom: 20px;
    }
    .dir-grid-nav { grid-template-columns: repeat(2, 1fr); }
}

/* --- АДАПТИВ (Телефоны) --- */
@media (max-width: 576px) {
    
    .hero-section { padding-top: 100px; padding-bottom: 40px; }
    .secretary-section, .directions-interactive, .symbols-section, .gallery-section, .news-section {
        padding: 40px 0;
    }
    .section-title { font-size: 2rem; margin-bottom: 30px; }

    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .hero-desc { font-size: 1rem; }

    .dir-main-title {
        font-size: 1.8rem; 
        line-height: 1.2;
        margin-bottom: 25px;
        word-wrap: break-word; 
        hyphens: auto; 
    }

    .dynamic-text h3 {
        font-size: 1.1rem;
        word-wrap: break-word;
    }

    .logo-img { height: 40px; }
    .logo-text span:first-child { font-size: 1.2rem; }
    .logo-text .college-tag { font-size: 0.65rem; }

    /* Показываем кнопку "Вступить" на телефоне рядом с меню */
    .header-btn { 
        display: inline-block; 
        font-size: 0.7rem;     
        padding: 6px 12px;     
        margin-left: auto;     
        margin-right: 15px;    
    }

    .burger-menu {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .dir-grid-nav { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    
    .dir-nav-item {
        background: #fdfdfd;
        padding: 15px 5px;
        border-radius: 10px;
        border: 1px solid #eee;
        display: flex; 
        flex-direction: column;
        align-items: center;    
        justify-content: center;
        text-align: center;
        min-height: 120px;
        position: relative;
    }
    
    .dir-nav-item i { margin-bottom: 10px; font-size: 2rem; }

    .nav-label {
        font-size: 0.75rem;     
        line-height: 1.2;
        width: 100%;
        word-wrap: break-word;
        word-break: break-word; 
        hyphens: auto;
        padding: 0 5px;
    }
    
    .nav-number { display: none; }
    .dir-nav-item::after { display: none; }
    
    .dir-nav-item.active {
        border-color: var(--green);
        background: #f0fff4;
        box-shadow: 0 4px 10px rgba(44, 147, 66, 0.1);
    }
    
    .footer-content { text-align: center; }
    .footer-col h4::after { left: 50%; transform: translateX(-50%); }
    .footer-contacts li { justify-content: center; flex-direction: column; }
    .social-links { justify-content: center; }
    
    .gallery-item { height: 200px; }
    .symbol-visual { height: 180px; }
    .news-tab { width: 100%; }

    /* Адаптив новостей (сетка 2x2) */
    .news-grid,
    .news-hidden-block { 
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .news-img { height: 120px; }

    .news-tag {
        font-size: 0.6rem;
        padding: 2px 6px;
        bottom: 5px;
        left: 5px;
    }

    .news-content { padding: 10px; }

    .news-date-row {
        font-size: 0.65rem;
        margin-bottom: 5px;
    }

    .news-content h3 {
        font-size: 0.8rem;
        line-height: 1.3;
        margin-bottom: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .news-content p { display: none; }

    .news-content .btn {
        width: 100%;
        padding: 6px 0;
        font-size: 0.65rem;
        text-align: center;
        margin-left: 0;
    }

    .news-tab {
        padding: 8px 15px;
        font-size: 0.85rem;
        flex: 1;
        text-align: center;
    }
    
    .news-tabs { gap: 10px; }

    /* Адаптив для текстовых страниц */
    .document-body { padding: 20px; }
    .text-content-section h1 { font-size: 1.8rem; }

    /* Адаптив модального окна */
    .small-modal {
        position: relative !important; 
        left: auto !important;
        top: auto !important;
        transform: none !important;

        width: 90% !important; 
        max-width: 400px !important;
        margin: auto !important; 
        box-sizing: border-box !important;
    }

    .form-body { padding: 20px 15px !important; }
    .modal-header { padding: 15px 20px; }
    .modal-header h2 { font-size: 1.2rem; }
    .form-desc { font-size: 0.8rem; margin-bottom: 15px; }
    .input-group input { font-size: 0.9rem; padding: 10px 12px; }
    .input-group { margin-bottom: 15px; }
}

/* --- ЛАЙТБОКС (ПРОСМОТР ФОТО) --- */
.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 3000; /* Самый верхний слой */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Почти черный фон */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: var(--red);
    transform: rotate(90deg);
}

/* --- СТРАНИЦА ОШИБКИ 404 --- */
.error-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 0;
    margin-top: 80px;
}

.error-code {
    font-size: 10rem;
    font-weight: 900;
    color: var(--red);
    line-height: 1;
    margin: 0;
    text-shadow: 5px 5px 0px rgba(0,0,0,0.1);
}

.error-title {
    font-size: 2rem;
    color: var(--dark);
    margin-top: 10px;
    margin-bottom: 20px;
}

.error-desc {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Адаптив для ошибки */
@media (max-width: 576px) {
    .error-code {
        font-size: 6rem;
    }
    .error-title {
        font-size: 1.5rem;
    }
}

/* --- ПРЕЛОАДЕР (СТИЛЬ ДВОЙНАЯ ОРБИТА) --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-circle-box {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-logo-img {
    width: 50px;
    height: auto;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1)); 
    animation: calmPulse 3s infinite ease-in-out;
}

.circle-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--red);
    border-right-color: var(--red);
    animation: spinCommon 1.5s linear infinite;
    box-shadow: 0 0 15px rgba(217, 29, 36, 0.1);
}

.circle-inner {
    position: absolute;
    width: 75%;
    height: 75%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-bottom-color: var(--green);
    border-left-color: var(--green);
    animation: spinCommonReverse 1.2s linear infinite;
    box-shadow: 0 0 15px rgba(44, 147, 66, 0.1);
}

.loader-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--dark);
    display: flex;
    gap: 10px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.2s;
}

.loader-text span:first-child { color: var(--red); }
.loader-text span:last-child { color: var(--green); }
.divider { color: #ccc !important; font-weight: 300; }

@keyframes spinCommon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spinCommonReverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes calmPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.preloader-hide {
    opacity: 0;
    visibility: hidden;
}

/* --- ПРОМО БАННЕР (АКЦИЯ) --- */
.promo-section {
    padding-top: 60px;
    padding-bottom: 60px; 
    background-color: #f9f9f9;
}

.promo-banner {
    background: linear-gradient(135deg, #e0f2f1 0%, #ffffff 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 15px 40px rgba(44, 147, 66, 0.2); 
    border: 1px solid rgba(44, 147, 66, 0.2);
}

.promo-img {
    flex: 0 0 40%;
    height: 350px;
    margin: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    
    overflow: hidden;
}

.promo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promo-content {
    padding: 40px;
    flex: 1;
}

.promo-label {
    display: inline-block;
    background-color: var(--red);
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.promo-banner h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 10px;
    line-height: 1.1;
    font-weight: 900;
}

.promo-dates {
    color: var(--green);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.promo-desc {
    color: #555;
    margin-bottom: 30px;
    max-width: 600px;
}

/* Адаптив баннера для телефонов */
@media (max-width: 768px) {
    .promo-banner {
        flex-direction: column;
        height: auto;
    }

    .promo-img {
        width: 100%;
        flex: none;
        height: 250px;
        margin: 0;
        
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .promo-content {
        padding: 30px 20px;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .promo-dates {
        justify-content: center;
        flex-wrap: wrap;
    }

    .promo-banner h2 {
        font-size: 1.8rem;
        margin-top: 10px;
    }
    
    .promo-label {
        font-size: 0.7rem;
        white-space: normal;
    }
}