/* ===== БАЗОВЫЕ СТИЛИ И СБРОС ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #5a6c7d;
    --accent-color: #667eea;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --background-light: #f8f9fa;
    --page-background: #F3E2C6; /* ИЗМЕНЕНО: был #CED2C2 */
    --white: #ffffff;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 40px rgba(0,0,0,0.15);
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--primary-color);
    background-color: var(--page-background);
    overflow-x: hidden;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===== СОВРЕМЕННАЯ ШАПКА ===== */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
    min-height: 80px;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    margin-right: auto;
    flex-shrink: 0;
}

.logo-image {
    height: 70px; /* Немного уменьшил для компактности */
    width: auto;
    border-radius: 8px;
    transition: var(--transition);
    object-fit: contain;
}

.logo:hover .logo-image {
    transform: scale(1.05);
}

.logo h1 {
    font-size: 1.6rem; /* Немного уменьшил */
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
    white-space: nowrap;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

/* Навигация */
.nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0.8rem; /* Уменьшил gap */
    margin: 0;
    padding: 0;
    align-items: center;
    height: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-list a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem; /* Немного уменьшил шрифт */
    padding: 0.5rem 0.7rem; /* Немного уменьшил отступы */
    position: relative;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.4px; /* Немного уменьшил */
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    border-radius: 8px;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--accent-gradient);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-list a:hover {
    color: var(--accent-color);
    background: rgba(102, 126, 234, 0.05);
}

.nav-list a:hover::after {
    width: 80%;
}

/* ===== ИСПРАВЛЕННОЕ БУРГЕР-МЕНЮ ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 8px;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active {
    border-color: var(--accent-color);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: var(--accent-color);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    background: var(--accent-color);
}

/* Overlay для мобильного меню */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.nav-overlay.active {
    display: block;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .nav-list {
        gap: 0.7rem;
    }
    
    .nav-list a {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    .logo-image {
        height: 65px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .header-inner {
        flex-wrap: wrap;
        padding: 1rem 0;
        min-height: 70px;
    }
    
    .logo {
        gap: 0.8rem;
        margin-right: 60px;
    }
    
    .logo-image {
        height: 50px;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    /* Бургер-меню для мобильных */
    .nav-toggle {
        display: flex;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        z-index: 1000;
        transition: var(--transition);
        box-shadow: -5px 0 25px rgba(0,0,0,0.1);
        padding: 80px 20px 20px;
        overflow-y: auto;
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-list li {
        width: 100%;
        margin: 0;
    }
    
    .nav-list a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid var(--background-light);
        font-size: 1.1rem;
        text-align: left;
        border-radius: 0;
    }
    
    .nav-list a:hover {
        background: var(--accent-color);
        color: var(--white);
    }
    
    .main {
        margin-top: 70px;
    }
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МАЛЕНЬКИХ МОБИЛЬНЫХ ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header-inner {
        padding: 0.8rem 0;
    }
    
    .logo {
        gap: 0.6rem;
    }
    
    .logo-image {
        height: 45px;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .nav-toggle {
        width: 40px;
        height: 40px;
        padding: 6px;
    }
    
    .nav-toggle span {
        width: 18px;
    }
    
    .nav {
        width: 250px;
    }
    
    .nav-list a {
        padding: 12px 15px;
        font-size: 1rem;
    }
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main {
    margin-top: 80px;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

/* Герой секция */
.hero-banner {
    background: var(--accent-gradient);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Секции контента */
.content-section {
    padding: 4rem 0;
    flex: 1;
}

.content-section:nth-child(even) {
    background: rgba(255, 255, 255, 0.7);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Карточки */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--accent-gradient);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.card p {
    color: var(--secondary-color);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.card-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: #0056b3;
}

/* ===== УЛУЧШЕННЫЕ СТИЛИ ДЛЯ КОНТЕНТА ИЗ РЕДАКТОРА ===== */
.content-container {
    max-width: 100%;
    overflow: hidden;
    width: 100%;
    line-height: 1.8;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    margin: 0 auto;
}

/* Блоки для разделения контента */
.content-block {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid var(--accent-color);
}

.content-block h2, .content-block h3 {
    color: var(--accent-color);
    margin-top: 0;
}

/* Адаптивные таблицы */
.content-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.content-container table, 
.content-container th, 
.content-container td {
    border: 1px solid #e9ecef;
}

.content-container th {
    background: var(--accent-gradient);
    color: var(--white);
    padding: 1.2rem;
    text-align: left;
    font-weight: 600;
    font-size: 1.1rem;
}

.content-container td {
    padding: 1rem 1.2rem;
    background: var(--white);
    color: var(--secondary-color);
}

.content-container tr:nth-child(even) td {
    background: var(--background-light);
}

/* Адаптация таблиц для мобильных */
@media (max-width: 768px) {
    .content-container table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .content-container table thead {
        display: none;
    }
    
    .content-container table tbody {
        display: block;
        width: 100%;
    }
    
    .content-container table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        background: var(--white);
    }
    
    .content-container table td {
        display: block;
        text-align: right;
        padding: 0.8rem 1rem;
        border: none;
        border-bottom: 1px solid #e9ecef;
        position: relative;
        white-space: normal;
    }
    
    .content-container table td:last-child {
        border-bottom: none;
    }
    
    .content-container table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        width: 45%;
        padding-right: 1rem;
        text-align: left;
        font-weight: 600;
        color: var(--primary-color);
    }
}

.content-container img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    display: block;
    object-fit: contain;
}

/* Специальные стили для больших изображений на мобильных */
@media (max-width: 768px) {
    .content-container img {
        max-width: 100% !important;
        max-height: 400px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        margin: 1.5rem auto !important;
        display: block !important;
    }
}

.content-container p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.15rem;
    color: var(--secondary-color);
}

.content-container h1 {
    font-size: 2.5rem;
    margin: 0 0 2rem 0;
    color: var(--primary-color);
    line-height: 1.2;
    text-align: center;
    font-weight: 800;
}

.content-container h2 {
    font-size: 2rem;
    margin: 2.5rem 0 1.5rem 0;
    color: var(--primary-color);
    line-height: 1.3;
    font-weight: 700;
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
}

.content-container h3 {
    font-size: 1.6rem;
    margin: 2rem 0 1rem 0;
    color: var(--primary-color);
    line-height: 1.4;
    font-weight: 600;
}

.content-container ul, 
.content-container ol {
    margin: 1.5rem 0;
    padding-left: 2.5rem;
}

.content-container li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.content-container blockquote {
    background: linear-gradient(135deg, var(--accent-color) 0%, #764ba2 100%);
    color: var(--white);
    padding: 2.5rem;
    margin: 2.5rem 0;
    border-radius: 15px;
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.6;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* Галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    background: var(--white);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* Упрощенный подвал */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    flex-shrink: 0;
    margin-top: auto;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Кнопки */
.btn-primary {
    background: var(--accent-color);
    color: var(--white);
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: var(--white);
    text-decoration: none;
}

/* ===== СТИЛИ ДЛЯ КОНТАКТОВ ===== */
.contacts-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9) 0%, rgba(233, 236, 239, 0.9) 100%);
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
    margin-top: 3rem;
}

.contact-card, .form-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.2);
}

.contact-card:hover, .form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.contact-card h2, .form-card h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

/* Контактная информация */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: 15px;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.contact-item:hover {
    transform: translateX(10px);
    border-left-color: var(--accent-color);
    background: var(--white);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    color: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.contact-details h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-details p {
    color: var(--secondary-color);
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

/* Форма обратной связи */
.contact-form {
    margin-top: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
    font-family: inherit;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: var(--white);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 2.5rem;
    appearance: none;
}

.submit-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    background: var(--accent-gradient);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

.form-note {
    text-align: center;
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Карта */
.map-section {
    background: var(--white);
    padding: 4rem 0;
}

.map-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.map-wrapper {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.map-wrapper iframe {
    display: block;
    border: none;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .nav-list {
        gap: 1rem;
    }
    
    .nav-list a {
        font-size: 0.9rem;
        padding: 0.5rem 0.6rem;
    }
    
    .logo-image {
        height: 70px;
    }
    
    .logo h1 {
        font-size: 1.6rem;
    }
    
    .hero-banner {
        padding: 3rem 0;
    }
    
    .content-section {
        padding: 3rem 0;
    }
    
    .cards-grid {
        gap: 1.5rem;
    }
    
    .card {
        padding: 2rem;
    }
    
    .contacts-grid {
        gap: 2rem;
    }
    
    .contact-card, .form-card {
        padding: 2rem;
    }
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .header-inner {
        flex-wrap: wrap;
        padding: 1rem 0;
        min-height: 70px;
    }
    
    .logo {
        gap: 0.8rem;
        margin-right: 60px;
    }
    
    .logo-image {
        height: 50px;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    /* Бургер-меню для мобильных */
    .nav-toggle {
        display: flex;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        z-index: 1000;
        transition: var(--transition);
        box-shadow: -5px 0 25px rgba(0,0,0,0.1);
        padding: 80px 20px 20px;
        overflow-y: auto;
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-list li {
        width: 100%;
        margin: 0;
    }
    
    .nav-list a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid var(--background-light);
        font-size: 1.1rem;
        text-align: left;
        border-radius: 0;
    }
    
    .nav-list a:hover {
        background: var(--accent-color);
        color: var(--white);
    }
    
    .main {
        margin-top: 70px;
    }
    
    .hero-banner {
        padding: 2.5rem 0;
    }
    
    .content-section {
        padding: 2rem 0;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
        margin: 0 auto;
        max-width: 400px;
        width: 100%;
    }
    
    .content-container {
        padding: 2rem;
        border-radius: 12px;
    }
    
    .content-container h1 {
        font-size: 1.8rem;
    }
    
    .content-container h2 {
        font-size: 1.5rem;
    }
    
    .content-container h3 {
        font-size: 1.3rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Адаптивность контактов */
    .contacts-section {
        padding: 2rem 0;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .contact-card, .form-card {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.2rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .map-container {
        padding: 1rem;
    }
    
    .map-wrapper iframe {
        height: 300px;
    }
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МАЛЕНЬКИХ МОБИЛЬНЫХ ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header-inner {
        padding: 0.8rem 0;
    }
    
    .logo {
        gap: 0.6rem;
    }
    
    .logo-image {
        height: 45px;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .nav-toggle {
        width: 40px;
        height: 40px;
        padding: 6px;
    }
    
    .nav-toggle span {
        width: 18px;
    }
    
    .hero-banner {
        padding: 2rem 0;
    }
    
    .content-section {
        padding: 1.5rem 0;
    }
    
    .section-title {
        margin-bottom: 1.5rem;
    }
    
    .card {
        padding: 1.2rem;
        border-radius: 12px;
    }
    
    .cards-grid {
        gap: 1rem;
    }
    
    .content-container {
        padding: 1.5rem;
        border-radius: 10px;
    }
    
    .content-container h1 {
        font-size: 1.6rem;
    }
    
    .content-container h2 {
        font-size: 1.4rem;
    }
    
    .content-container p,
    .content-container li {
        font-size: 1rem;
    }
    
    .footer {
        padding: 1.5rem 0 1rem;
    }
    
    /* Контакты для маленьких экранов */
    .contacts-section {
        padding: 1.5rem 0;
    }
    
    .contact-card, .form-card {
        padding: 1.2rem;
    }
    
    .contact-item {
        padding: 1rem;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .submit-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

/* ===== ОСОБЫЕ СТИЛИ ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ ===== */
@media (max-width: 360px) {
    .logo h1 {
        font-size: 1.1rem;
    }
    
    .logo-image {
        height: 40px;
    }
    
    .nav-list a {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .content-section {
        padding: 1rem 0;
    }
    
    .content-container {
        padding: 1rem;
    }
    
    .contact-card, .form-card {
        padding: 1rem;
    }
}

/* ===== УЛУЧШЕНИЯ ДЛЯ TOUCH УСТРОЙСТВ ===== */
@media (hover: none) and (pointer: coarse) {
    .nav-list a:hover {
        background: transparent;
        color: var(--primary-color);
    }
    
    .nav-list a:hover::after {
        width: 0;
    }
    
    .card:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
    
    .contact-item:hover {
        transform: none;
    }
}

/* ===== ПОДДЕРЖКА LANDSCAPE РЕЖИМА ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .header-inner {
        min-height: 60px;
    }
    
    .main {
        margin-top: 60px;
    }
    
    .hero-banner {
        padding: 1.5rem 0;
    }
    
    .nav-list a {
        padding: 0.6rem 1rem;
    }
}

/* ===== ФИКС ДЛЯ ИЗОБРАЖЕНИЙ В РЕДАКТОРЕ ===== */
.note-editable img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 10px !important;
    margin: 1rem 0 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    display: block !important;
    object-fit: contain !important;
}

/* Улучшенная оптимизация изображений в Summernote для мобильных */
@media (max-width: 768px) {
    .note-editable img {
        max-width: 100% !important;
        max-height: 400px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }
}

/* ===== ГАРАНТИЯ ЧТО КОНТЕНТ НЕ ВЫХОДИТ ЗА ГРАНИЦЫ ===== */
.content-section .container {
    overflow: hidden;
}

.content-container * {
    max-width: 100%;
}

/* ===== УЛУЧШЕННЫЕ АНИМАЦИИ ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== ФИКС ДЛЯ 100VH НА МОБИЛЬНЫХ ===== */
:root {
    --vh: 1vh;
}

.min-h-screen {
    min-height: calc(var(--vh, 1vh) * 100);
}

/* ===== ФИКС ДЛЯ ОТСТУПОВ ===== */
.main {
    padding-top: 50px; /* Подберите под высоту вашего меню */
}

.content-section {
    padding-top: 2rem !important; /* У вас уже есть, оставьте */
}

/* ЭКСТРЕННЫЙ ФИКС - поднимаем меню выше всех */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 1000; /* ДОБАВЬ ЭТУ СТРОКУ */
}

.section-action {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1001; /* ДОБАВЬ ЭТУ СТРОКУ */
}

.articles-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1002; /* ДОБАВЬ ЭТУ СТРОКУ */
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    padding: 8px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10003; /* УВЕЛИЧИВАЕМ ЕЩЁ */
    border: 1px solid rgba(0,0,0,0.08);
}

/* ОГРАНИЧИВАЕМ z-index карточек */
.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
    z-index: 1; /* ФИКСИРУЕМ НИЗКИЙ z-index */
}

@media (max-width: 768px) {
    /* Дополнительные исправления для центрирования */
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .section-action {
        justify-content: center;
        width: 100%;
    }
    
    /* Исправление для выпадающего меню */
    .articles-dropdown {
        position: relative;
        display: inline-block;
    }
    
    .dropdown-menu {
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-10px);
    }
    
    .articles-dropdown.active .dropdown-menu {
        transform: translateX(-50%) translateY(5px);
    }
    
    .dropdown-item {
        justify-content: center;
        text-align: center;
    }
}


