/* Адаптивная верстка < 1200px */

@media (max-width: 1199px) {
    .hero {
        flex-direction: column;
        min-height: auto;
    }

    .hero-text,
    .hero-image {
        flex: none;
        width: 100%;
    }

    .hero-image {
        display: none;
    }

    .hero-text {
        padding: 40px;
    }

    .hero-image img {
        height: auto;
    }

    .features .feature {
        flex: 1 1 calc(50% - 20px);
    }

    .new-ceramics-card,
    .popular-products-card {
        flex: 1 1 calc(50% - 20px);
    }

    .popular-products-card__long {
        flex: 1 1 100%;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-form__input {
    min-width: 200px;
    }
}


/* Адаптивная верстка < 992px */

@media (max-width: 991px) {
    
    body {
        font-size: 18px;
    }

    h2 {
        font-size: 32px;
    }
    h3 {
        font-size: 28px;
    }
    h4 {
        font-size: 24px;
    }
    p, .body-medium {
        font-size: 18px;
    }
    
    main {
        margin-top: 50px;
    }

    /* Стили для меню-оверлея */

    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .header-menu-bar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        z-index: 1000;
        transition: left 0.3s ease;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .menu-toggle { 
        visibility: inherit;
        cursor: pointer;
        align-items: center;
        justify-content: center;
    }

    .header-menu-bar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        z-index: 1000;
        transition: left 0.3s ease;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .header-menu-bar.active {
        left: 0;
    }
    
    .header-menu {
        flex-direction: column;
        gap: 20px;
    }
    
    .header-menu__link {
        display: block;
        padding: 10px 0;
        color: #333;
        text-decoration: none;
        font-size: 18px;
    }

    /* Конец стилей для меню оверлея*/

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

    .header-menu__link {
        display: block;
        padding: 10px 0;
        color: #333;
        text-decoration: none;
        font-size: 18px;
    }

    .header-menu__link:hover {
        color: #007bff;
    }

    .top-bar {
        padding: 15px 20px;
    }

    .top-bar img {
        max-width: 80px;
    }

    .header-menu {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-text__btn {
        margin-bottom: 15px;
    }

    .features .feature {
        flex: 1 1 calc(50% - 20px);
    }

    .new-ceramics-card,
    .popular-products-card {
        flex: 1 1 calc(50% - 20px);
    }

    .join-us-out-container {
        min-width: auto;
        width: 100%;
    }

    .bottom-section {
        flex-direction: column;
        min-height: auto;
    }
    .bottom-section-text,
    .bottom-section-image {
        width: 100%;
        flex: none;
    }

    .bottom-section-text {
        padding: 60px 30px;
    }

    .bottom-section-image img {
        height: auto;
    }

    .footer-form {
        flex-direction: column;
        align-items: center;
    }

    .footer-form__input {
        min-width: 300px;
        width: 100%;
        max-width: 400px;
    }
}

/* Адаптивная верстка < 576px */

@media (max-width: 575px) {
    
    body {
        font-size: 16px;
    }

    h2 {
        font-size: 24px;
    }
    h3 {
        font-size: 20px;
    }
    h4 {
        font-size: 18px;
    }
    p, .body-medium {
        font-size: 16px;
    }
    
    .header-menu {
        gap: 10px;
    }

    .hero-text {
        padding: 30px 20px;
    }
    .hero-text__title {
        font-size: 20pt;
    }

    .features .feature,
    .new-ceramics-card,
    .popular-products-card {
        flex: 1 1 100%;
    }
    
    .hero-text__btn {
        margin-bottom: 15px;
    }


    .brand-difference,
    .new-ceramics,
    .popular-products {
        padding: 0 15px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-third {
        padding: 14px 24px;
        font-size: 16px;
    }

    .join-us-container {
        padding: 40px 20px;
    }
    
    .join-us-container__title {
        font-size: 22pt;
    }

    .footer-content {
        grid-template-columns: repeat(1, 1fr);
    }

    .bottom-section-text {
        padding: 40px 20px;
    }

    .bottom-section__title {
        font-size: 22pt;
    }

    .bottom-section-text p {
        font-size: 14pt;
        padding-bottom: 20px;
    }

    .bottom-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
}