/* ===== ОРИГІНАЛЬНИЙ СТИЛЬ ===== */

:root {
    --color-btn-bg: #c0eaac;
    --color-btn-hover: #ebc6c6;
    --color-text: rgb(41, 36, 36);
}

html {
    font-size: 16px;
}

body {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    background-color: rgb(238, 183, 115);
    font-family: 'Franklin Gothic Medium', sans-serif;
    overflow-x: hidden;
}

#auth-options {
    display: none;
    flex-direction: column;
    gap: 0.9rem;
    padding-top: 0.5rem;
}

/* Фон під вікном */
#auth-modal {
    display: none;
    /* Приховано за замовчуванням */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Затемнення */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
    /* Щоб було вище всього */
}

/* Саме вікно */
.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}


#google-btn {
    background-color: #db4437;
    color: white;
    cursor: pointer;
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
    border: none;
    border-radius: 0.3rem;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

#facebook-btn {
    background-color: #4267B2;
    color: white;
    cursor: pointer;
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
    border: none;
    border-radius: 0.3rem;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

#google-btn:hover,
#facebook-btn:hover {
    opacity: 0.8;
   
}

.top-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
}

.search-box {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: start;
}

.email {
    padding: 0.9rem;
    background-color: #c0eaac;
    color: rgb(41, 36, 36);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, background-color 0.3s;
}

.email:hover {
    background-color: #d16666;
    transform: translateY(-2px);
}

.email:active {
    transform: translateY(0);
}

.topic {
    width: 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.topic h1,
.topic h2 {
    color: rgb(30, 28, 28);
    margin: 0;
    line-height: 2.5rem;
}

.topic h1 {
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;
}

.topic h2 {
    font-size: 2rem;
    font-weight: normal;
}

.main-nav {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10rem;
    box-sizing: border-box;
}

.nav-block,
.menu-dropdown {
    margin: 0;
    position: relative;
}

.menu-dropdown .menu-list {
    right: 0;
    left: auto;
}

.dropdown-list,
.menu-list {
    display: none;
    position: absolute;
    left: 0;
    margin: 0;
    padding: 0.5rem;
    list-style: none;
    background-color: #fff;
    border: 0.3rem solid #c0eaac;
    border-radius: 0.5rem;
    min-width: 9rem;
    box-shadow: 0 0.3rem 0.5rem rgba(0, 0, 0, 0.1);
}

.btn-main,
.btn-menu {
    padding: 0.5rem 1rem;
    background-color: #c0eaac;
    color: rgb(28, 27, 27);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    font-style: italic;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    transition: background-color 0.3s, transform 0.2s;
    position: relative;
    margin: 0;
    border: none;
}

.btn-main:hover,
.btn-menu:hover {
    background-color: #ebc6c6;
    transform: translateY(-2px);
}

.btn-main:active,
.btn-menu:active {
    transform: scale(0.95);
    background-color: #a8d595;
}

.collection-grid {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    gap: 1rem;
    padding: 1rem;
}

.brick-card {
    width: 100%;
    max-width: 30rem;
    background-color: #f0caca;
    border: 0.3rem solid #c0eaac;
    border-radius: 3rem;
    box-shadow: 0 0.3rem 0.5rem rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    box-sizing: border-box;
}

.brick-card img {
    width: 100%;
    height: 15rem;
    object-fit: cover;
    border-radius: 2rem;
    cursor: pointer;
}

.brick-card p {
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 1rem;
    text-align: center;
}

.nav-block:hover .dropdown-list,
.menu-dropdown:hover .menu-list {
    display: block;
}

.factory-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 3rem;
}

.factory-item h3 {
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 1.2rem;
    text-align: center;
    cursor: pointer;
}

.factory-item img {
    width: 25rem;
    height: auto;
    overflow: hidden;
    border-radius: 1rem;
    cursor: zoom-in;
}

.factory-item h3 a {
    text-decoration: none;
    color: #000;
    transition: 0.3s;
}

.factory-item h3 a:hover {
    color: #ff0000;
    text-decoration: underline;
}

.zoom-img:hover {
    transform: scale(1.05);
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 1rem;
    margin-top: 3rem;
    padding-bottom: 2rem;
}

.social-links img {
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.social-links img:hover {
    transform: scale(1.2);
}


/* ============================================
   МЕДІАЗАПИТИ — БЕЗ JAVASCRIPT
   ============================================ */

/* --- Планшет горизонтальний (≤1024px) --- */
@media (max-width: 1024px) {
    .topic h1 {
        font-size: 2.2rem;
    }

    .topic h2 {
        font-size: 1.5rem;
    }

    .main-nav {
        gap: 4rem;
    }

    .factory-item img {
        width: 18rem;
    }

    .collection-grid {
        flex-wrap: wrap;
    }

    .brick-card {
        max-width: 45%;
    }
}

/* --- Планшет вертикальний (≤768px) --- */
@media (max-width: 768px) {
    .topic h1 {
        font-size: 1.6rem;
        line-height: 2rem;
        text-align: center;
        padding: 0 0.5rem;
    }

    .topic h2 {
        font-size: 1.1rem;
        line-height: 1.6rem;
        text-align: center;
        padding: 0 0.5rem;
    }

    /* Меню — вертикально по центру */
    .main-nav {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 0.6rem 0;
    }

    /* Дропдаун не виходить за межі */
    .menu-dropdown .menu-list {
        right: auto;
        left: 0;
    }

    /* Картки — 2 в ряд */
    .collection-grid {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .brick-card {
        max-width: 48%;
        border-radius: 1.5rem;
    }

    .brick-card img {
        height: 10rem;
        border-radius: 1rem;
    }

    /* Заводи — по центру, адаптивна ширина */
    .factory-container {
        flex-direction: column;
        align-items: center;
        margin-top: 1.5rem;
        gap: 1.5rem;
    }

    .factory-item {
        width: 100%;
        max-width: 28rem;
        text-align: center;
    }

    .factory-item img {
        width: 100%;
        max-width: 28rem;
    }

    /* Auth кнопки */
    .search-box {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .social-links {
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .social-links img {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* --- Смартфон (≤480px) --- */
@media (max-width: 480px) {
    .topic h1 {
        font-size: 1.2rem;
        line-height: 1.6rem;
    }

    .topic h2 {
        font-size: 0.95rem;
        line-height: 1.4rem;
    }

    /* Картки — 1 в ряд */
    .collection-grid {
        flex-direction: column;
        align-items: center;
        padding: 0.3rem;
        padding: 0.5rem;
        box-sizing: border-box;
        overflow: hidden;
    }


    .brick-card {
        max-width: 100%;
        border-radius: 1.2rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .brick-card img {
        height: 12rem;
        border-radius: 0.8rem;
    }

    .brick-card p {
        font-size: 0.9rem;
    }

  
    #auth-btn {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
        width: auto !important;
        align-self: flex-start !important;
        
    }

    .email {
        padding: 0.6rem 0.9rem;
        font-size: 0.5rem;
    }
    


    /* Кнопки nav — ширші для пальця */
    .btn-main,
    .btn-menu {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }

    .email {
        padding: 1.5rem 0.3rem;
        font-size: 0.85rem;
    }

    /* Auth кнопки — колонка */
    .search-box {
        flex-direction: row;
        align-items: flex-start;
        padding: 0.4rem 0.5rem;
    }

    .auth-options {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Заводи */
    .factory-item img {
        max-width: 100%;
        width: 100%;
    }

    .factory-item h3 {
        font-size: 1rem;
    }

    /* Футер */
    .social-links {
        gap: 0.6rem;
        margin-top: 1rem;
        padding-bottom: 1.5rem;
    }

    .social-links img {
        width: 2rem;
        height: 2rem;
    }
}

/* --- Дуже малий екран (≤360px) --- */
@media (max-width: 360px) {
    .topic h1 {
        font-size: 1rem;
        line-height: 1.4rem;
    }

    .topic h2 {
        font-size: 0.85rem;
    }

    .main-nav {
        gap: 0.5rem;
    }

    .btn-main,
    .btn-menu {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .brick-card img {
        height: 9rem;
    }

    .social-links img {
        width: 1.8rem;
        height: 1.8rem;
    }
}











