/* ==================== main.min.css — hhdi.ru ==================== */
/* Собрано из: style.css + css/base.css                            */

/* ==================== ОСНОВНЫЕ СТИЛИ ==================== */
.about, .works, .gallery, .blog-section, .faq-section, .order {
    padding: 50px 0;
    background: var(--light-color);
}

.about-text h2, .works-text h2, .section-title {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-size: 2rem;
    text-align: center;
}

.about-image {
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: block;
}

.about-text p, .works-text p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* ==================== ГАЛЕРЕЯ ==================== */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2.5rem;
}

.filter-btn {
    background: #f5f5f5;
    border: 2px solid #ddd;
    color: var(--text-color);
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s;
    font-size: 1.05rem;
    font-weight: 500;
}

.filter-btn:hover {
    background: #eaeaea;
    border-color: #ccc;
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.desktop-product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 2.5rem;
    transition: transform 0.3s;
    scroll-margin-top: calc(var(--header-height-desktop) + 24px);
}

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

.main-product-image {
    width: 100%;
    min-height: 300px;
    max-height: 600px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.main-product-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.product-info {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.product-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 0.5rem 0;
}

.price-byn {
    font-size: 1rem;
    font-weight: normal;
    color: #888;
    margin-left: 6px;
}

.dimensions {
    color: #666;
    font-size: 1.05rem;
    margin: 0.3rem 0;
}

.product-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* FIX: Кнопки нормального размера на десктопе */
@media (min-width: 769px) {
    .product-actions .contest-button,
    .product-actions .view-3d-button,
    .product-actions .blog-button {
        width: auto !important;
        min-width: 180px;
        flex: 0 1 auto;
        padding: 10px 20px;
    }
}

.contest-button, .view-3d-button, .story-button, .blog-button {
    background: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    display: inline-block;
    text-align: center;
}

.contest-button:hover, .view-3d-button:hover, .story-button:hover, .blog-button:hover {
    background: var(--dark-color);
    color: white;
    transform: translateY(-2px);
}

.additional-images {
    padding: 1rem;
    background: #f9f9f9;
}

.additional-images h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.additional-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.additional-image {
    border-radius: 4px;
    overflow: hidden;
    height: 150px;
    cursor: pointer;
    transition: transform 0.3s;
}

.additional-image:hover {
    transform: scale(1.05);
}

.additional-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==================== МОБИЛЬНАЯ ГАЛЕРЕЯ ==================== */
.mobile-gallery-container {
    display: none;
    width: 100%;
    margin-bottom: 2rem;
}

.mobile-gallery-track {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-gallery-slide {
    width: 100%;
}

.mobile-gallery-slide-inner {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    scroll-margin-top: calc(var(--header-height-desktop) + 24px);
}

.mobile-slide-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.mobile-slide-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    display: block;
}

.mobile-slide-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.mobile-slide-info h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.2rem;
    line-height: 1.3;
}

.mobile-slide-info .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 5px 0;
}

.mobile-slide-info .dimensions {
    color: #666;
    font-size: 1rem;
    margin: 3px 0;
    line-height: 1.4;
}

.mobile-additional-images {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.mobile-additional-images h4 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1.05rem;
    text-align: center;
}

.mobile-additional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.mobile-additional-image {
    border-radius: 4px;
    overflow: hidden;
    height: 70px;
    cursor: pointer;
    transition: transform 0.3s;
}

.mobile-additional-image:hover {
    transform: scale(1.05);
}

.mobile-additional-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==================== NOSCRIPT ==================== */
.noscript-gallery {
    background: #fffbe6;
    border: 1px solid #f0d060;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

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

.noscript-gallery ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.noscript-gallery li {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
}

.noscript-gallery li strong {
    color: var(--dark-color);
    display: block;
    margin-bottom: 0.3rem;
}

.noscript-gallery li span {
    color: var(--secondary-color);
    font-weight: bold;
}

/* ==================== КАТЕГОРИИ ==================== */
.category-description {
    margin-top: 3rem;
    padding: 1.8rem;
    background: #f9f5f0;
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
}

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

.category-description p {
    line-height: 1.7;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* ==================== БЛОГ ==================== */
.blog-section {
    padding: 80px 0;
    background-color: var(--light-color);
    scroll-margin-top: 100px;
}

.blog-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    color: #666;
    font-size: 1.1rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.blog-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    line-height: 1.3;
}

.blog-card-excerpt {
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 1.05rem;
    line-height: 1.5;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.blog-card-tag {
    background-color: #f0f0f0;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

/* ==================== FAQ ==================== */
.faq-section {
    padding: 50px 0;
    background: var(--light-color);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* faq-question и faq-answer — только в блоке ИСПРАВЛЕНИЕ ниже */

/* ==================== ФОРМА ЗАКАЗА ==================== */
.order-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.05rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.7rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1.05rem;
    transition: border-color 0.3s;
    font-family: Arial, sans-serif;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    font-family: Arial, sans-serif;
}

.submit-btn:hover {
    background: var(--dark-color);
}

/* ==================== ФУТЕР ==================== */
footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0 1rem;
}

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

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-size: 1.05rem;
}

.footer-section a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.4);
    transition: text-decoration-color 0.2s;
}

.footer-section a:hover {
    text-decoration-color: white;
}

.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.social-link {
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border: 1px solid white;
    border-radius: 3px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.social-link:hover {
    background: white;
    color: var(--dark-color);
    text-decoration: none;
}

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

/* ==================== МОДАЛЬНЫЕ ОКНА ==================== */
.image-modal, .contest-modal, .blog-modal, .model-3d-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.image-modal.active, .contest-modal.active, .blog-modal.active, .model-3d-modal.active {
    display: flex;
}

.image-modal .modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-modal img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.close-modal, .close-contest, .close-blog-modal, .close-3d-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    z-index: 10;
}

.close-modal:hover, .close-contest:hover, .close-blog-modal:hover, .close-3d-modal:hover {
    color: var(--accent-color);
}

.contest-modal-content, .blog-modal-content {
    position: relative;
    max-width: 800px;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    font-size: 1.1rem;
}

.contest-header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    padding: 2rem;
    text-align: center;
}

.contest-header h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.contest-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: 70vh;
}

.blog-article-content {
    padding: 40px;
    overflow-y: auto;
    max-height: 85vh;
}

.blog-article h1 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.back-to-blog {
    display: inline-block;
    margin: 30px 0;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.back-to-blog:hover {
    background: var(--secondary-color);
}

.model-3d-content {
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    background: white;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.model-3d-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==================== УВЕДОМЛЕНИЯ ==================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    transform: translateX(150%);
    transition: transform 0.3s ease;
    max-width: 300px;
    font-size: 1.05rem;
}

.notification.show {
    transform: translateX(0);
}

.spinner {
    display: none;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== МЕДИА-ЗАПРОСЫ ==================== */
@media (max-width: 768px) {
    .mobile-gallery-container {
        display: block;
    }
    .desktop-gallery-container {
        display: none;
    }
    .contest-modal-content {
        max-width: 95%;
        max-height: 95vh;
    }
    .contest-body {
        padding: 1rem;
        max-height: 60vh;
    }
    .contest-options {
        grid-template-columns: 1fr;
    }
    .contest-header {
        padding: 1.5rem;
    }
    .contest-header h2 {
        font-size: 1.7rem;
    }
    .product-actions {
        flex-direction: column;
    }
    .contest-button:not(.details-btn), .view-3d-button, .story-button, .blog-button {
        width: 100%;
        padding: 0.9rem;
    }
    .blog-section {
        padding: 60px 0;
    }
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .blog-card-content {
        padding: 20px;
    }
    .blog-card-title {
        font-size: 1.2rem;
    }
    .blog-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    .blog-article-content {
        padding: 20px;
        max-height: 90vh;
    }
    .blog-article h1 {
        font-size: 28px;
    }
    .model-3d-content {
        height: 95vh;
        border-radius: 15px;
    }
    .close-3d-modal {
        width: 50px;
        height: 50px;
        font-size: 2rem;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }
    .contest-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    .contest-body {
        max-height: 70vh;
    }
}

/* ==================== ОСНОВНЫЕ СТИЛИ ==================== */
.about, .works, .gallery, .blog-section, .faq-section, .order {
    padding: 50px 0;
    background: var(--light-color);
}

.about-text h2, .works-text h2, .section-title {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-size: 2rem;
    text-align: center;
}

.about-image {
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: block;
}

.about-text p, .works-text p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* ==================== ГАЛЕРЕЯ ==================== */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2.5rem;
}

.filter-btn {
    background: #f5f5f5;
    border: 2px solid #ddd;
    color: var(--text-color);
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    border-radius: 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #e0e0e0;
}

.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Десктопная сетка галереи */
.desktop-gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 3rem;
}

.gallery-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.gallery-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.gallery-info {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gallery-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.gallery-info .price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.price-byn {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.gallery-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-view, .btn-3d {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
    text-align: center;
    text-decoration: none;
}

.btn-view {
    background: var(--secondary-color);
    color: #fff;
}

.btn-3d {
    background: var(--accent-color);
    color: var(--dark-color);
}

.btn-view:hover { background: var(--primary-color); }
.btn-3d:hover { opacity: 0.9; }

/* Категории (SEO тексты) */
.category-description {
    margin-top: 3rem;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    border-left: 5px solid var(--primary-color);
}

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

/* ==================== БЛОГ ==================== */
.blog-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-card-content h3 { margin-bottom: 0.8rem; color: var(--primary-color); }
.blog-card-content p {
    font-size: 0.95rem;
    color: #555;
    flex: 1;
    margin-bottom: 0;
}

/* ── Кнопка «Читать далее» ── */
.blog-read-more {
    display: inline-block;
    width: auto;
    margin-top: 1rem;
    padding: 10px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s, transform 0.2s;
    align-self: flex-start;
}
.blog-read-more:hover {
    background: var(--dark-color);
    color: #fff;
    transform: translateY(-2px);
}

/* ==================== ФОРМА ЗАКАЗА ==================== */
.order-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

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

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus { border-color: var(--primary-color); outline: none; }

.submit-btn {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover { background: var(--dark-color); }

/* ==================== FOOTER ==================== */
footer {
    background: var(--dark-color);
    color: #fff;
    padding: 4rem 0 2rem;
}

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

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.footer-section a { color: #fff; text-decoration: none; }
.social-links { display: flex; gap: 15px; }

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* ==================== МОДАЛЬНЫЕ ОКНА ==================== */
.image-modal, .model-3d-modal, .blog-modal, .contest-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.image-modal.active, .model-3d-modal.active, .blog-modal.active, .contest-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    border: 3px solid #fff;
}

.model-3d-content, .blog-modal-content {
    background: #fff;
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.model-3d-iframe { width: 100%; height: 100%; border: none; }

.blog-article-content {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
}

.blog-article-content h1 { color: var(--primary-color); margin-bottom: 1.5rem; }
.blog-article-content img { border-radius: 8px; margin: 1.5rem 0; }

/* unified close buttons below */

.back-to-blog {
    margin: 1rem 2rem;
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* ==================== КОНКУРС ==================== */
.contest-modal-content {
    background: #fff;
    width: 95%;
    max-width: 700px;
    max-height: 90vh;
    border-radius: 15px;
    position: relative;
    overflow-y: auto;
    padding: 2rem;
}

.contest-header { text-align: center; margin-bottom: 2rem; }
.contest-header h2 { color: #fff !important; margin-bottom: 0.5rem; }
.contest-info {
    background: #fdfaf5;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--accent-color);
}

.contest-options {
    display: grid;
    gap: 10px;
    margin: 1.5rem 0;
}

.contest-option {
    padding: 1rem;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.option-number {
    flex-shrink: 0;
    font-weight: bold;
    color: var(--primary-color);
}

.option-title {
    font-weight: 600;
    color: #222;
    display: block;
    margin-bottom: 2px;
}

.option-description {
    font-size: 0.9rem;
    color: #555;
}

.contest-option:hover { border-color: var(--accent-color); background: #fffcf9; }
.contest-option.selected { border-color: var(--primary-color); background: #fdf5f0; }

.contest-submit-btn {
    width: 100%;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1rem;
}

/* ==================== УВЕДОМЛЕНИЯ ==================== */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 8px;
    color: #fff;
    transform: translateY(150%);
    transition: transform 0.3s ease;
    z-index: 3000;
}

.notification.success { background: #4CAF50; }
.notification.error { background: #f44336; }
.notification.active { transform: translateY(0); }

.spinner {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
.spinner.active { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== FAQ (ИСПРАВЛЕНИЕ) ==================== */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-answer {
    display: none !important;
    padding: 0 1.5rem 1.5rem;
    background: #fff;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 8px 8px;
    line-height: 1.6;
    color: #555;
}

.faq-answer.is-open {
    display: block !important;
}

.faq-question {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: bold;
    color: var(--dark-color);
    transition: all 0.3s ease;
    text-align: left;
}

.faq-question-text {
    flex: 1;
    min-width: 0;
    padding-right: 1.5rem;
}

.faq-question:hover { background: #fdfaf5; }

.faq-question.active {
    background: #fdfaf5;
    border-bottom: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    color: var(--primary-color);
}

.faq-icon {
    font-size: 1.4rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-question.active .faq-icon { transform: rotate(45deg); }

/* ==================== АДАПТИВНОСТЬ ==================== */

/* Хедер и Логотип (Десктоп) */
.hamburger {
    display: none; /* Скрыт на десктопе, показывается только в мобильном медиазапросе */
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-quotes {
    display: flex;
    gap: 3rem;
    margin-top: 1.5rem;
}

.quote {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.95);
    flex: 1;
    font-style: italic;
}

.quote-author {
    color: var(--accent-color);
    font-weight: bold;
    font-style: normal;
}

@media (max-width: 1024px) {
    .hero-content { gap: 1.5rem; }
    .header-quotes { gap: 1.5rem; }
}

@media (max-width: 768px) {
    header { 
        height: auto !important; /* Позволяем хедеру расти вниз */
        min-height: 60px;
        padding: 10px 0;
    }

    .header-content { gap: 8px; }

    .header-top-row {
        flex-wrap: wrap; /* Позволяем элементам переноситься на новую строку */
        gap: 10px;
    }

    .logo { 
        font-size: 1rem !important; 
        flex: 1 1 100%; /* Занимает всю ширину на узких экранах */
        text-align: center;
        order: 1;
    }

    .header-right {
        flex: 1 1 100%;
        justify-content: center; /* Центрируем переключатель и гамбургер */
        order: 2;
        gap: 20px;
    }

    /* Навигация */
    .nav-container {
        display: none;
        width: 100%;
        background: var(--dark-color);
        padding: 0;
        margin-top: 10px;
        order: 3;
    }
    .nav-container.open { display: block; }

    nav ul {
        flex-direction: column;
        gap: 0;
    }
    nav ul li a {
        display: block;
        padding: 12px 20px;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255,255,255,.08);
        text-align: center;
    }

    /* Гамбургер */
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: transparent;
        border: none;
        width: 30px;
    }
    .hamburger span {
        height: 3px;
        background-color: #fff;
        width: 100%;
    }

    /* Hero секция */
    .hero { 
        padding-top: 140px; /* Увеличиваем отступ сверху, т.к. хедер стал выше */
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-logo { 
        max-width: 160px; 
        margin-bottom: 20px;
    }

    .hero-text h1 { 
        font-size: 1.3rem !important; 
        line-height: 1.4;
    }

    .header-quotes {
        flex-direction: column;
        gap: 20px;
    }

    /* Галерея */
    .desktop-gallery-container { display: none; }
    .mobile-gallery-container {
        display: block !important;
        overflow-x: auto;
    }
    .gallery-item {
        min-width: 85vw;
    }
}

/* Фикс для совсем узких экранов */
@media (max-width: 480px) {
    .logo { font-size: 0.9rem !important; }
    .hero-text h1 { font-size: 1.1rem !important; }
}
/* ==================== ФИНАЛЬНЫЕ ПРАВКИ АДАПТАЦИИ ==================== */

@media (max-width: 768px) {
    /* Исправляем шапку, чтобы элементы не налезали друг на друга */
    header {
        height: auto !important;
        padding: 10px 0 !important;
    }

    .header-top-row {
        flex-direction: column !important; /* На мобильных логотип будет над кнопками */
        align-items: center !important;
        gap: 12px !important;
    }

    /* Уменьшаем шрифты, как вы просили */
    .logo {
        font-size: 0.95rem !important; /* "HHDI - мастерская деревянного декора" */
        text-align: center;
        max-width: 90%;
        line-height: 1.3;
    }

    .header-right {
        width: 100%;
        justify-content: center !important; /* Центрируем язык и меню */
        gap: 25px !important;
    }

    /* Уменьшаем главный заголовок (Зеркала, панно...) */
    .hero-text h1 {
        font-size: 1.25rem !important;
        padding: 0 10px;
        line-height: 1.4;
    }

    /* Уменьшаем картинку логотипа */
    .hero-logo {
        max-width: 150px !important;
        margin-bottom: 15px !important;
    }

    /* Чтобы контент не прятался под высокой шапкой */
    .hero {
        padding-top: 150px !important;
    }

    /* Цитаты ставим в столбик */
    .header-quotes {
        flex-direction: column !important;
        gap: 15px !important;
        text-align: center !important;
    }
    
    .quote {
        font-size: 1rem !important;
        border-left: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 10px;
    }
}

/* Фикс для очень маленьких экранов */
@media (max-width: 380px) {
    .logo { font-size: 0.85rem !important; }
    .hero-text h1 { font-size: 1.1rem !important; }
}


/* ── Мобильная версия: кнопка «Подробнее» меньше, изображение крупнее ── */
@media (max-width: 768px) {
    .details-btn {
        width: auto !important;
        padding: 6px 16px !important;
        font-size: 0.82rem !important;
        align-self: flex-start;
    }

    .mobile-slide-image {
        height: 280px !important;
    }

    .mobile-slide-image img {
        max-height: 260px !important;
    }

    /* Fix 8: blog-card images smaller than product slides on mobile */
    .blog-card-image {
        height: 160px !important;
    }
}

/* ==================== ЭТАП 1: ЕДИНЫЙ СТИЛЬ КНОПОК ЗАКРЫТИЯ ==================== */

.close-blog-modal,
.close-3d-modal,
.close-contest,
.image-modal .close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    left: auto !important;
    bottom: auto !important;

    width: 36px !important;
    height: 36px !important;

    background: rgba(255,255,255,0.95) !important;
    border-radius: 50% !important;
    border: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    cursor: pointer !important;
    z-index: 2500 !important;

    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;

    color: #333 !important;
    font-size: 22px !important;
    line-height: 1 !important;

    transition: all .2s ease !important;
}

.close-blog-modal:hover,
.close-3d-modal:hover,
.close-contest:hover,
.image-modal .close:hover {
    background: rgba(255,255,255,1) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25) !important;
    transform: scale(1.1) !important;
}

/* Контейнеры должны быть position:relative для корректного позиционирования кнопок */
.blog-modal-content,
.model-3d-content,
.contest-modal-content,
.image-modal-content {
    position: relative !important;
}

/* Адаптив кнопок закрытия */
@media (max-width: 768px) {
    .close-blog-modal,
    .close-3d-modal,
    .close-contest,
    .image-modal .close {
        top: 10px !important;
        right: 10px !important;
        width: 30px !important;
        height: 30px !important;
        font-size: 20px !important;
    }
}
