:root {
    --primary-color: #21b57b;
    --primary-dark: #1a8f62;
    --text-color: #333333;
    --text-color-two: #ffffff;
    --text-light: #666666;
    --background: #ffffff;
    --gray-light: #f8f9fa;
    --border-radius: 8px;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.5s ease;
}

ol, ul, dl {
  margin-top: 0;
  margin-bottom: 20px;
  text-align: justify;
}

li {
  margin-bottom: 5px;
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
a {
    text-decoration: none;
    color: var(--text-color);
}
body {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background);
    margin: 0;
    padding: 0;
}

.btn-default {
    color: var(--text-color-two);
    background: var(--primary-color);
    padding: 5px 10px;
    border: none;
}

.input-default { 
    width: 40%; 
    padding: 8px;
    margin-bottom: 10px;
    box-sizing: border-box; 
}

.auth-container {
    text-align: center;
    padding: 15% 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin: 1rem;
    text-align: center;
    text-transform: uppercase;
    color: var(--primary-color);
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Главная акцент */
.text_selection {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary-color);
}

p {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: justify;
    text-justify: inter-word;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* ===== HEADER ===== */
header {
    background: var(--primary-color);
    color: var(--text-color-two);
    padding: 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
/* ===== MAIN NAVIGATION ===== */
.main-nav {
    flex: 1;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding-left: 0;
}

.main-nav ul li {
    flex: 0 0 auto;
    height: 100%;
}

.main-nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 0.6rem 1rem;
    transition: var(--transition);
    font-weight: 500;
    font-size: 1rem;
    display: block;
    white-space: normal;
    overflow-wrap: break-word;
}

.main-nav ul li a:hover {
    background: var(--primary-dark);
}

/* ===== DROPDOWN MENU ===== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: -5px;
    background: var(--primary-color);
    min-width: 385px;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid #eee;
    display: block;
    width: 100%;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li a {
    padding: 0.3rem 0.7rem;
    text-transform: none;
    font-size: 1rem;
    white-space: normal;
    overflow-wrap: break-word;
    display: block; /* ссылка как блок */
    width: 100%;
}

/* ===== MAIN CONTENT ===== */
main {
    min-height: 100vh;
}

#kontakty {
    scroll-margin-top: 70px;
}

.otdeleniya {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.otdeleniya p {
    padding: 0;
    margin: 0;
}

.otdeleniya img {
    width: 80px;
    height: 74px;
    padding:0 10px 0 0;
}

.schedule {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

.schedule table {
    width: 100%; 
    border-collapse: collapse; 
    text-align: center;
}

.schedule table tr td {
    padding: 15px;
    border: 1px solid #333333;
}
/* ===== FOOTER ===== */
footer {
    background: var(--primary-color);
    color: var(--text-color-two);
    text-align: center;
    width: 100%;
    /*margin-bottom: -1rem;*/
}

footer p {
    padding: 0.5rem;
    margin: 0;
    text-align: justify;
    
}

footer .container a {
    color: var(--text-color-two);
}

footer .container {
    display: flex;
    padding: 0;
}

footer .footer-1 { flex-basis: 70%; }

footer .footer-2 { flex-basis: 30%; }

.map {
    height: 500px;
}

.custom-carousel {
    width: 70%;
    margin: 20px auto;
}

/* ===== MOBILE MENU TOGGLE ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: var(--transition);
}

.close-menu {
    display: none;
}

/* News */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pagination ul {
    list-style: none;
    padding: 0;
    display: inline-flex;
    gap: 6px;
}

.pagination li {
    padding: 6px 10px;
    min-width: 32px;
    text-align: center;
}

.pagination li a {
    text-decoration: none;
    color: inherit;
}

.pagination li.active {
    background: var(--primary-color);
    color: var(--text-color-two);
    font-weight: bold;
}

.pagination li.disabled {
    opacity: 0.4;
    cursor: default;
    background: rgba(0, 0, 0, 0.1);
}

.arrow {
    background: rgba(0, 0, 0, 0.1);
}

#smfc_form label {
    display: block;
}

#smfc_form input[type="text"],
#smfc_form input[type="tel"],
#smfc_form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 10px;
}
.news{
    margin-bottom: 20px;
}
/*ПД*/
.privacy-ol {
    padding-bottom: 230px;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    color: var(--text-color-two);
    background: var(--primary-color);
    padding: 15px;
    z-index: 9999;
    display: none;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    text-align: center;
}

.btn-cookie {
    color: var(--text-color-two);
    background: var(--primary-color);
    border: 2px solid var(--text-color-two);
    padding: 8px 15px;
    margin: 20px 10px 5px 10px;
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.btn-cookie::before,
.btn-cookie::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-color-two);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.btn-cookie::before {
    top: -6px;
}

.btn-cookie::after {
    bottom: -6px;
}

.btn-cookie:hover::before,
.btn-cookie:hover::after {
    transform: scaleX(1);
}

#cookie-close {
    /*margin-right: 20px;*/
}

@media (max-width: 1100px) {
    
    footer p { text-align: center; }
    
    footer .container { flex-direction: column; }


}

/* ===== MOBILE STYLES ===== */
@media (max-width: 768px) {
    h1 { font-size: 1rem; }
    h2 { font-size: 1rem; }
    h3 { font-size: 1rem; }
    h4 { font-size: 1rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 1rem; }
    
    header{
        padding: 0.5rem 0;
    }
    .menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--primary-color);
        transition: var(--transition);
        z-index: 1001;
        padding: 2rem 1rem;
        overflow-y: auto;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: flex-start;
        height: auto;
    }
    
    .main-nav ul li {
        width: 100%;
        height: auto;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    
    .main-nav ul li a {
        padding: 1rem 0.5rem;
        white-space: normal;
        font-size: 1.1rem;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0,0,0,0.1);
        min-width: auto;
        display: none;
    }
    
    .dropdown-menu li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .dropdown-menu li a {
        padding: 0.8rem 0.5rem;
        font-size: 1rem;
    }
    
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        display: none;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    .close-menu {
        display: block;
        position: fixed;
        top: 1.5rem;
        right: 1.5rem;
        background: rgba(255, 255, 255, 0.7);
        border: none;
        border-radius: 10%;
        color: #FF0000;
        font-size: 2.5rem;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1002;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .close-menu.active {
        opacity: 1;
        visibility: visible;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .map {
        height: 300px;
    }
    
    .custom-carousel {
        width: 100%;
        margin: 0 auto 15px;
    }
    
    .cookie-content {
        flex-direction: column;
    }
    .btn-cookie {
        margin: 20px 0 0 0;
    }
}