:root {
    --primary: #b71c1c;
    --primary-dark: #b71c1c;
    --secondary: #212121;
    --accent: #ff6822;
    --light: #f5f5f5;
    --dark: #333;
    --gray: #757575;
    --light-gray: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Arial', sans-serif;
}

body {
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--light);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

/* Добавьте эти стили здесь */
.logo-link {
    text-decoration: none !important;
    color: white !important;
}

.logo-link:hover {
    text-decoration: none !important;
    color: white !important;
}

.logo-link .logo,
.logo-link .logo-text,
.logo-link .logo-main,
.logo-link .logo-sub {
    color: inherit !important;
    text-decoration: none !important;
}

.logo-link:hover .logo,
.logo-link:hover .logo-text,
.logo-link:hover .logo-main,
.logo-link:hover .logo-sub {
    color: inherit !important;
}

/* Стили для ссылки логотипа */
.logo-link {
    text-decoration: none !important;
    color: white !important;
}

.logo-link:hover {
    text-decoration: none !important;
    color: white !important;
}

/* Убедитесь, что текст внутри логотипа наследует цвет */
.logo-link .logo,
.logo-link .logo-text,
.logo-link .logo-main,
.logo-link .logo-sub {
    color: inherit !important;
    text-decoration: none !important;
}

/* Убедитесь, что при наведении цвет не меняется */
.logo-link:hover .logo,
.logo-link:hover .logo-text,
.logo-link:hover .logo-main,
.logo-link:hover .logo-sub {
    color: inherit !important;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2.2rem;
    color: #ffcc00;
    img {
    width: 70px;
    height: 70px;
    }
    filter: 
        drop-shadow(0 0 2px white)
        drop-shadow(0 0 2px white)
        drop-shadow(0 0 3px rgb(0, 0, 0));
}
/* Исправления для логотипа на мобильных устройствах */
@media (max-width: 768px) {
    .logo {
        gap: 8px;
    }
    
    .logo-icon {
        font-size: 1.8rem;
        width: 40px;
        height: 40px;
    }
    
    .logo-icon img {
        width: 40px;
        height: 40px;
    }
    
    .logo-main {
        font-size: 1rem;
    }
    
    .logo-sub {
        font-size: 0.75rem;
    }
}

/* Дополнительные исправления для очень маленьких экранов */
@media (max-width: 480px) {
    .logo-icon {
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
    
    .logo-icon img {
        width: 35px;
        height: 35px;
    }
    
    .logo-main {
        font-size: 0.9rem;
    }
    
    .logo-sub {
        font-size: 0.7rem;
    }
    
    /* Уменьшаем отступы в хедере для экономии места */
    .header-container {
        padding: 0 10px;
    }
}

/* Для экстремально маленьких экранов */
@media (max-width: 360px) {
    .logo {
        gap: 5px;
    }
    
    .logo-icon {
        font-size: 1.3rem;
        width: 30px;
        height: 30px;
    }
    
    .logo-icon img {
        width: 30px;
        height: 30px;
    }
    
    .logo-text {
        min-width: 120px; /* Защита от переноса */
    }
    
    .logo-main {
        font-size: 0.85rem;
    }
    
    .logo-sub {
        font-size: 0.65rem;
    }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.logo-sub {
    font-size: 0.9rem;
    opacity: 0.9;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

nav ul li a:hover:after {
    width: 100%;
}

.contact-header {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.phone {
    font-size: 1.2rem;
    font-weight: 700;
}

.work-time {
    font-size: 0.85rem;
    opacity: 0.9;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1582058091505-6b8c3a6c9a3f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background-color: #e64a19;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* Features section */
.features {
    padding: 5rem 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    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);
}

.section-title p {
    color: var(--gray);
    max-width: 700px;
    margin: 1.5rem auto 0;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: var(--light);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--primary);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1.2rem;
    color: var(--dark);
    font-size: 1.4rem;
}

.feature-card p {
    color: var(--gray);
    line-height: 1.7;
}

/* Products section */
.products {
    padding: 5rem 0;
    background: linear-gradient(to bottom, #f9f9f9, #f0f0f0);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
}

.product-img {
    height: 200px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 3rem;
}

.product-content {
    padding: 1.8rem;
}

.product-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.product-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.product-price {
    font-weight: 700;
    color: var(--dark);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* About section */
.about {
    padding: 5rem 0;
    background-color: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-features {
    margin-top: 2rem;
}

.about-feature {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
}

.about-feature i {
    color: var(--primary);
    font-size: 1.5rem;
    margin-right: 1rem;
}

.about-img {
    background: linear-gradient(145deg, #e6e6e6, #ffffff);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 350px;
    font-size: 5rem;
    color: var(--primary);
}

/* Contact section */
.contact {
    padding: 5rem 0;
    background: linear-gradient(to bottom, #2c3e50, #1a2530);
    color: white;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.8rem;
    color: #ffcc00;
}

.contact-details {
    margin-bottom: 2.5rem;
}

.contact-details p {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.contact-details i {
    margin-right: 1rem;
    color: var(--accent);
    font-size: 1.3rem;
    width: 25px;
}

.map {
    margin-top: 2rem;
    border-radius: 8px;
    overflow: hidden;
    height: 250px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-weight: 600;
}

/* Стили для Яндекс.Карты */
.map .ymaps-2-1-79-map {
    border-radius: 8px;
}

.map .ymaps-2-1-79-inner-panes {
    border-radius: 8px;
}

.contact-form {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.contact-form h3 {
    font-size: 1.8rem;
    margin-bottom: 1.8rem;
    color: #ffcc00;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--secondary);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-col h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #ffcc00;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 992px) {
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-img {
        height: 300px;
        order: -1;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary-dark);
        padding: 1rem 0;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 0.7rem 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .contact-header {
        display: none;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .feature-card,
    .product-card {
        padding: 2rem 1.5rem;
    }
}

/* ... существующие стили ... */

/* Articles Page Styles */
.articles-page {
    padding: 5rem 0;
    background-color: white;
}

.news-grid,
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.news-card,
.article-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover,
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.news-image,
.article-image {
    height: 200px;
    overflow: hidden;
}

.news-image img,
.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img,
.article-card:hover .article-image img {
    transform: scale(1.05);
}

.news-content,
.article-content {
    padding: 1.5rem;
}

.news-meta,
.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.news-meta i,
.article-meta i {
    margin-right: 0.3rem;
}

.news-content h3,
.article-content h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.news-content h3 a,
.article-content h3 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-content h3 a:hover,
.article-content h3 a:hover {
    color: var(--primary);
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--primary-dark);
}

.no-articles {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
    grid-column: 1 / -1;
}

/* Article Detail Styles */
.article-detail {
    padding: 5rem 0;
    background-color: white;
}

.article-full {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.article-type {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-image-main {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
}

.article-image-main img {
    width: 100%;
    height: auto;
    display: block;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-tags,
.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-tags a {
    background: var(--light);
    color: var(--dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.article-tags a:hover {
    background: var(--light-gray);
}

.article-share a {
    color: var(--gray);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.article-share a:hover {
    color: var(--primary);
}

/* Similar Articles */
.similar-articles {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--light-gray);
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.similar-card {
    background: var(--light);
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.similar-card:hover {
    transform: translateY(-3px);
}

.similar-image {
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.similar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.similar-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.similar-content h3 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.similar-content h3 a:hover {
    color: var(--primary);
}

/* Active menu item */
nav ul li a.active {
    color: #ffcc00;
    font-weight: 600;
}

nav ul li a.active:after {
    width: 100%;
    background: #ffcc00;
}

/* Responsive styles for articles */
@media (max-width: 768px) {
    .news-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-footer {
        flex-direction: column;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .similar-grid {
        grid-template-columns: 1fr;
    }
}

/* Article Detail Styles */
.article-detail {
    padding: 5rem 0;
    background-color: white;
}

.article-full {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2rem;
    text-align: center;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    color: var(--gray);
    font-size: 0.9rem;
}

.article-meta i {
    margin-right: 0.3rem;
}

.article-type {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 2rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark);
    margin-bottom: 3rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-tags,
.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-tags a {
    background: var(--light);
    color: var(--dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.article-tags a:hover {
    background: var(--light-gray);
}

.article-share a {
    color: var(--gray);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.article-share a:hover {
    color: var(--primary);
}

/* Similar Articles */
.similar-articles {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--light-gray);
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.similar-card {
    background: var(--light);
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.similar-card:hover {
    transform: translateY(-3px);
}

.similar-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.similar-content h3 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.similar-content h3 a:hover {
    color: var(--primary);
}

/* Responsive styles for article detail */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .article-footer {
        flex-direction: column;
        text-align: center;
    }

    .article-tags,
    .article-share {
        justify-content: center;
    }

    .similar-grid {
        grid-template-columns: 1fr;
    }
}

/* Добавьте эти стили в конец файла style.css */

/* Исправления для мобильных устройств */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .map-container {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
    
    .map {
        height: 300px;
        margin-bottom: 1rem;
    }
    
    .contact-info,
    .contact-form {
        width: 100%;
        max-width: 100%;
    }
    
    /* Исправление для формы на мобильных */
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Убирает масштабирование на iOS */
    }
}

/* Дополнительные исправления для очень маленьких экранов */
@media (max-width: 480px) {
    .contact-details p {
        font-size: 1rem;
    }
    
    .map {
        height: 250px;
    }
    
    .contact-form h3 {
        font-size: 1.5rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Исправление для предотвращения выхода за экран */
.container {
    overflow-x: hidden;
}

.contact-container {
    overflow: hidden;
}

/* Улучшение отображения карты */
.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.map {
    min-height: 300px;
}

/* Исправление для мета-информации в карточках */
.news-meta,
.article-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-type {
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Улучшение отображения на очень маленьких экранах */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .feature-card,
    .product-card {
        padding: 1.5rem;
    }
    
    .news-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* Предотвращение масштабирования при фокусе на мобильных */
@media (max-width: 768px) {
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Улучшение скролла на мобильных */
html {
    -webkit-overflow-scrolling: touch;
}

/* Исправление для кнопок на iOS */
button,
input[type="submit"],
input[type="button"] {
    -webkit-appearance: none;
    border-radius: 0;
}

/* Products Page Styles */
/* Исправляем стили для карточек продуктов */
.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--light-gray);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-content h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    min-height: 3rem;
}

.product-content p {
    flex-grow: 1;
    margin-bottom: 1rem;
    min-height: 4rem;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1rem 0;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto; /* Это заставляет кнопки быть внизу */
    flex-wrap: wrap;
}

.product-actions .btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 0.7rem 0.5rem;
    font-size: 0.9rem;
}

/* Исправляем изображения продуктов */
.product-img {
    height: 150px;
    background: linear-gradient(45deg, var(--light), #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

/* Стили для реальных изображений из базы */
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-img .fa-icon {
    position: absolute;
    opacity: 0.3;
    font-size: 4rem;
}

/* Если есть реальное изображение - скрываем иконку */
.product-img:has(img) .fa-icon {
    display: none;
}

/* Заглушка если нет изображения */
.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Выравнивание карточек по высоте */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch; /* Это выравнивает высоту карточек */
}

/* Гарантируем одинаковую высоту для всех карточек */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Фиксируем минимальную высоту для описания */
.product-content p {
    min-height: 60px;
}

/* Делаем кнопки одинаковой ширины */
.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

/* Products Page Specific Styles */
.products-page {
    padding: 5rem 0;
    background-color: white;
    min-height: calc(100vh - 400px); /* Минимальная высота чтобы подвал был внизу */
}

.product-category-section {
    margin-bottom: 4rem;
}

.product-category-section:last-child {
    margin-bottom: 0;
}

.no-products {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
    grid-column: 1 / -1;
}

/* Product Detail Specific Styles */
.product-detail {
    padding: 5rem 0;
    background-color: white;
    min-height: calc(100vh - 400px);
}

.product-full {
    max-width: 1000px;
    margin: 0 auto;
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.product-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.product-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.product-category {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.product-availability.in-stock {
    background: #4caf50;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.product-availability.out-of-stock {
    background: #ff9800;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.product-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.product-image {
    background: linear-gradient(45deg, var(--light), #f0f0f0);
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.product-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.product-icon {
    color: var(--primary);
    font-size: 5rem;
    opacity: 0.3;
    position: absolute;
}

.product-image:has(.product-main-image) .product-icon {
    display: none;
}

.product-price-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
}

.product-description {
    margin-bottom: 2rem;
}

.product-description h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.product-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Similar Products */
.similar-products {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--light-gray);
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.similar-card {
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.similar-card:hover {
    transform: translateY(-3px);
}

.similar-img {
    height: 150px;
    background: linear-gradient(45deg, var(--light), #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.similar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.similar-img .fa {
    color: var(--primary);
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
}

.similar-img:has(img) .fa {
    display: none;
}

.similar-content {
    padding: 1.5rem;
}

.similar-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.similar-content h3 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.similar-content h3 a:hover {
    color: var(--primary);
}

/* Responsive styles */
@media (max-width: 768px) {
    .product-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-icon {
        font-size: 3rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .similar-grid {
        grid-template-columns: 1fr;
    }
    
    .products-page,
    .product-detail {
        padding: 3rem 0;
    }
}

/* Добавьте в конец style.css */
.messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.consent-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 0.3rem;
}

.consent-checkbox label {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Vacancies Styles */
.vacancies-page {
    padding: 5rem 0;
    background-color: white;
    min-height: calc(100vh - 400px);
}

.vacancies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.vacancy-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary);
    transition: transform 0.3s ease;
}

.vacancy-card:hover {
    transform: translateY(-5px);
}

.vacancy-content h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.vacancy-salary {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin: 1rem 0;
}

.vacancy-meta {
    margin: 1rem 0;
}

.status.active {
    background: #4caf50;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.status.inactive {
    background: #ff9800;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.vacancy-contact {
    text-align: center;
    padding: 3rem;
    background: var(--light);
    border-radius: 10px;
    margin-top: 3rem;
}

/* Vacancy Detail Styles */
.vacancy-detail {
    padding: 5rem 0;
    background-color: white;
    min-height: calc(100vh - 400px);
}

.vacancy-full {
    max-width: 800px;
    margin: 0 auto;
}

.vacancy-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.vacancy-salary-main {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 2rem;
}

.vacancy-content h3 {
    color: var(--primary);
    margin: 2rem 0 1rem 0;
    font-size: 1.4rem;
}

.vacancy-actions {
    margin-top: 3rem;
    text-align: center;
}

.no-items {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
    grid-column: 1 / -1;
}

/* Services Styles */
.services-page {
    padding: 5rem 0;
    background-color: white;
    min-height: calc(100vh - 400px);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.service-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--light-gray);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-image {
    height: 200px;
    background: linear-gradient(45deg, var(--light), #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-image .fa {
    color: var(--primary);
    font-size: 4rem;
    opacity: 0.3;
}

.service-image:has(img) .fa {
    display: none;
}

.service-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.service-content h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--primary);
    min-height: 3rem;
}

.service-content p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
    color: var(--gray);
    line-height: 1.6;
}

.service-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    margin: 1rem 0;
}

.service-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.service-actions .btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 0.7rem 0.5rem;
    font-size: 0.9rem;
}

.no-services {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
    grid-column: 1 / -1;
}

/* Service Detail Styles */
.service-detail {
    padding: 5rem 0;
    background-color: white;
    min-height: calc(100vh - 400px);
}

.service-full {
    max-width: 1000px;
    margin: 0 auto;
}

.service-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.service-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.service-availability.in-stock {
    background: #4caf50;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.service-availability.out-of-stock {
    background: #ff9800;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.service-content-detail {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.service-image-detail {
    background: linear-gradient(45deg, var(--light), #f0f0f0);
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.service-image-detail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.service-image-detail .fa {
    color: var(--primary);
    font-size: 5rem;
    opacity: 0.3;
    position: absolute;
}

.service-image-detail:has(img) .fa {
    display: none;
}

.service-info {
    display: flex;
    flex-direction: column;
}

.service-price-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
}

.service-description h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-size: 1.4rem;
}

.service-actions-detail {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Similar Services */
.similar-services {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--light-gray);
}

.similar-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.similar-service-card {
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.similar-service-card:hover {
    transform: translateY(-3px);
}

.similar-service-img {
    height: 150px;
    background: linear-gradient(45deg, var(--light), #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.similar-service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.similar-service-img .fa {
    color: var(--primary);
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
}

.similar-service-img:has(img) .fa {
    display: none;
}

.similar-service-content {
    padding: 1.5rem;
}

.similar-service-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.similar-service-content h3 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.similar-service-content h3 a:hover {
    color: var(--primary);
}

.similar-service-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0.5rem 0;
}

/* Service Contact Section */
.service-contact {
    text-align: center;
    padding: 3rem;
    background: var(--light);
    border-radius: 10px;
    margin-top: 3rem;
}

.service-contact h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Responsive styles for services */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-content-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-image-detail {
        height: 200px;
    }
    
    .service-actions-detail {
        flex-direction: column;
    }
    
    .service-actions-detail .btn {
        width: 100%;
        text-align: center;
    }
    
    .similar-services-grid {
        grid-template-columns: 1fr;
    }
    
    .services-page,
    .service-detail {
        padding: 3rem 0;
    }
}

/* Service Features */
.service-features {
    margin: 2rem 0;
}

.service-feature {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
}

.service-feature i {
    color: var(--primary);
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 30px;
}

.service-feature span {
    font-weight: 500;
}

/* Service Benefits */
.service-benefits {
    background: linear-gradient(135deg, var(--light) 0%, #f8f9fa 100%);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.service-benefits h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.benefit-item {
    text-align: center;
    padding: 1rem;
}

.benefit-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.benefit-item h4 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.benefit-item p {
    color: var(--gray);
    font-size: 0.9rem;
}

.services-accordion {
    margin: 30px 0;
}

.accordion-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-header {
    background: #f8f9fa;
}

.accordion-button {
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.3s ease;
    font-size: 16px;
    position: relative;
}

.accordion-button:hover {
    background: #e9ecef;
}

.accordion-icon {
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.3s ease;
    min-width: 16px;
    color: var(--primary);
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-button h3 {
    margin: 0;
    font-size: 18px;
    color: var(--dark);
    flex-grow: 1;
}

.services-count {
    color: #666;
    font-size: 13px;
    margin-left: auto;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    display: block !important;
    max-height: 90000px;
}

.accordion-item:not(.active) .accordion-content {
    display: none !important;
}

.services-table {
    padding: 15px;
    overflow-x: auto;
}

.service-repair-price {
    color: #b71c1c;
    font-weight: bold;
}

.services-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed; /* Добавляем фиксированную раскладку */
}

.services-table th,
.services-table td {
    padding: 3px 10px;
    text-align: left;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Фиксированные ширины столбцов */
.services-table th:nth-child(1),
.services-table td:nth-child(1) {
    width: 50%; /* Наименование */
    font-weight: bold;
    min-width: 150px;
}

.services-table th:nth-child(2),
.services-table td:nth-child(2) {
    width: 35%; /* Описание */
    min-width: 200px;
    white-space: normal; /* Разрешаем перенос текста */
}

.services-table th:nth-child(3),
.services-table td:nth-child(3) {
    width: 15%; /* Цена */
    min-width: 100px;
    text-align: right;
}

.services-table th:nth-child(4),
.services-table td:nth-child(4) {
    width: 15%; /* В наличии */
    min-width: 100px;
    text-align: center;
}

.services-table th:nth-child(5),
.services-table td:nth-child(5) {
    width: 10%; /* Действия */
    min-width: 80px;
    text-align: center;
}

.services-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.service-thumb {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
}

.service-name {
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 14px;
}

.service-description {
    font-size: 13px;
    color: #666;
    line-height: 1.3;
    white-space: normal; /* Разрешаем перенос текста */
    word-wrap: break-word;
}

.service-price {
    font-weight: 600;
    color: var(--primary);
    font-size: 14px;
}

.service-availability .available {
    color: #28a745;
    font-weight: 500;
    font-size: 13px;
}

.service-availability .not-available {
    color: #dc3545;
    font-weight: 500;
    font-size: 13px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    text-decoration: none;
    background: var(--primary);
    color: white;
    border-radius: 3px;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.btn-small:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
}

.service-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.no-services {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .services-table {
        padding: 10px;
    }
    
    .services-table table {
        font-size: 12px;
        table-layout: auto; /* На мобильных возвращаем авто-раскладку */
    }
    
    .services-table th,
    .services-table td {
        padding: 6px 4px;
        white-space: nowrap;
    }
    
    .service-thumb {
        width: 25px;
        height: 25px;
        margin-right: 5px;
    }
    
    .service-name {
        font-size: 12px;
    }
    
    .service-description {
        font-size: 11px;
        display: none; /* Скрываем описание на мобильных */
    }
    
    .service-price {
        font-size: 12px;
    }
    
    .btn-small {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .accordion-button {
        padding: 12px 15px;
    }
    
    .accordion-button h3 {
        font-size: 16px;
    }
    
    /* Скрываем столбец описания на мобильных */
    .services-table th:nth-child(2),
    .services-table td:nth-child(2) {
        display: none;
    }
    
    /* Перераспределяем ширину оставшихся столбцов */
    .services-table th:nth-child(1),
    .services-table td:nth-child(1) {
        width: 40%;
    }
    
    .services-table th:nth-child(3),
    .services-table td:nth-child(3) {
        width: 25%;
    }
    
    .services-table th:nth-child(4),
    .services-table td:nth-child(4) {
        width: 20%;
    }
    
    .services-table th:nth-child(5),
    .services-table td:nth-child(5) {
        width: 15%;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .services-table th:nth-child(2),
    .services-table td:nth-child(2) {
        display: none;
    }
    
    .services-table {
        font-size: 11px;
    }
}

/* Исправленные стили для мобильного меню */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        position: fixed; /* Меняем absolute на fixed */
        top: 70px; /* Отступ от верха */
        left: 0;
        width: 100%;
        height: calc(100vh - 70px); /* Высота на весь экран минус хедер */
        background: var(--primary-dark);
        padding: 1rem 0;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        overflow-y: auto; /* Добавляем скролл если меню слишком длинное */
    }

    nav ul.show {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    nav ul li {
        margin: 0;
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 1rem 1.5rem;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 1.1rem;
    }

    nav ul li a:after {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1001;
    }

    /* Анимация для плавного появления */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Скрываем контакты в хедере на мобильных */
    .contact-header {
        display: none;
    }
}

/* Дополнительные исправления для очень маленьких экранов */
@media (max-width: 480px) {
    nav ul {
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    nav ul li a {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
}

/* Стили для сортируемых заголовков */
.sortable-header {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    transition: color 0.3s ease;
    position: relative;
    z-index: 100;
}

.sortable-header:hover {
    color: #007bff;
    text-decoration: none;
}

/* Стрелки сортировки */
.sortable-header::after {
    content: "↕";
    font-size: 12px;
    opacity: 0.5;
}

.sortable-header:hover::after {
    opacity: 1;
}