:root {
    /* --main-color: #25285e;
    --color-header: #25285eb1; */
    --main-color: #090f72;
    --color-header: rgba(9, 14, 114, 0.573);

    --font-size: 20px;
    --font-size-phones: 16px;
    --font-color-light: white;
    --font-color-dark: black;

    --color-light-gray: rgb(225, 225, 225);
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--main-color);
    font-family: "Roboto";
    font-optical-sizing: auto;
    font-weight: 300;

    font-size: var(--font-size);

    margin: 0;
    padding: 0;

}


.roboto {
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
}


h1 {
    color: var(--main-color);
    font-size: 2em;
    padding: 0;
    margin: 0.6em 0 0.6em 0;
    font-weight: 300;
}

h3 {
    color: var(--main-color);
    font-size: 1.6em;
    padding: 0;
    margin: 0.3em 0 0.3em 0;

    font-weight: 300;
}

p {
    font-size: 1.2em;
    padding: 0;
    margin: 0;
}

ul {
    list-style-type: disc;
    font-size: 1.2em;
}

ul li {
    margin-bottom: 0.3em;
}

ul li::marker {
    color: var(--main-color);
}

.main-block {
    padding: 40px;
}

/* ----------------------------------------- */
/* Шапка */
/* ----------------------------------------- */

header {
    position: fixed;
    top: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: end;

    height: 60px;
    width: 100%;
    padding-right: 40px;
    background-color: var(--color-header);
    backdrop-filter: blur(20px);
}

/* Бургер-кнопка */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--font-color-light);
    transition: 0.3s;
}

/* Навигация по умолчанию */
header nav {
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
}

header nav a {
    color: var(--font-color-light);
    text-decoration: none;
    margin-left: 20px;
    white-space: nowrap;
}

/* Мобильные стили */
@media (max-width: 768px) {

    header {
        padding-right: 20px;
        background-color: var(--main-color);
    }

    .menu-toggle {
        display: flex;
        margin-left: auto;
    }

    header nav {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--main-color);

        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 16px;

        /* Анимация: изначально скрыто */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition:
            opacity 0.3s ease,
            visibility 0.3s ease,
            transform 0.3s ease;

        pointer-events: none;
        /* отключаем клики пока скрыто */
    }

    header nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
        /* включаем клики */
    }

    header nav a {
        font-size: 1.2em;
        margin: 0;
        padding: 12px 0;
        display: block;
        width: 100%;
        text-align: center;
        color: var(--font-color-light);
        text-decoration: none;
    }
}

/* ----------------------------------------- */
/* Подвал */
/* ----------------------------------------- */

footer {
    background-color: var(--main-color);
    color: var(--font-color-light);
    padding: 2% 5% 5% 10%;
}

footer h1 {
    color: var(--font-color-light);
}

footer a {
    color: var(--font-color-light);
}


/* ----------------------------------------- */
/* Самый первый блок */
/* ----------------------------------------- */

#blooming {
    text-align: center;
    align-content: center;
    background-color: var(--main-color);
    background-image: url("/images/advokat_bg2.jpg");
    background-size: cover;
    height: 85vh;
}

#blooming-consultation {
    width: max-content;
    height: max-content;
    padding: 7px 14px;
    margin: 40px auto auto auto;
    border-radius: 6px;
    background-color: var(--font-color-light);
    filter: drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.674));
    z-index: 10;

    transition: all 0.4s ease;
}

#blooming-consultation:hover {
    transform: scale(1.05);
    background-color: var(--color-light-gray);
}

#blooming h1 {
    color: var(--font-color-light);
    font-size: 2.5em;

    font-weight: 300;
}

#blooming h3 {
    color: var(--font-color-light);
    font-size: 1.5em;

    font-weight: 200;
}

#blooming h3 a {
    color: var(--font-color-light);
}

#blooming a {
    color: var(--main-color);
    font-size: 1.5em;
    text-decoration: none;

    font-weight: 300;
}

#blooming-contacts {
    display: flex;
    background-color: var(--main-color);
    height: 100px;
    padding: 0 35% 0 35%;

    justify-content: space-evenly;
    align-items: center;
}

#blooming-contacts svg {
    filter: drop-shadow(0px 0px 15px black);
    transition: all 0.4s ease;
}

#blooming-contacts svg:hover {
    transform: scale(1.15);
}

#blooming-contacts p {
    color: var(--font-color-light);
}

/* ----------------------------------------- */
/* О нас */
/* ----------------------------------------- */

#about-us {
    padding: 4% 0 0 10%;
    background-color: white;
}

#about-us h1 {
    font-size: 2.2em;
    color: var(--main-color);
}

#about-us p {
    width: 75%;
}

/* ----------------------------------------- */
/* Добро пожаловать в юридическое бюро  */
/* ----------------------------------------- */

#welcome {
    padding: 4% 0 0 10%;
    color: var(--font-color-light);
    background-color: white;
}

#welcome p {
    width: 85%;
}

#welcome h1 {
    color: var(--font-color-light);
    width: 85%;
}

#bg-for-welcome {
    background-color: var(--main-color);
    padding: 3%;
}

/* ----------------------------------------- */
/* Преимущества */
/* ----------------------------------------- */

#advantages {
    padding: 4% 5% 5% 10%;
    color: var(--font-color-dark);
    background-color: white;
}

#advantages h1 {
    color: var(--main-color);
}

/* ----------------------------------------- */
/* О компании */
/* ----------------------------------------- */

#about-company {
    background-image: url(/images/book_darker.jpg);
    background-size: cover;
    background-position: center;
    padding: 4% 5% 5% 10%;
    color: var(--font-color-darklight);
}

#about-company h1 {
    color: var(--font-color-light);
}

#about-company p {
    color: var(--font-color-light);
}

/* ----------------------------------------- */
/* Продукты и услуги */
/* ----------------------------------------- */

#products-and-services {
    background-color: white;
    padding: 4% 5% 5% 10%;
    color: var(--font-color-dark);

}

/* ----------------------------------------- */
/* Продукты */
/* ----------------------------------------- */

#products {
    background-color: white;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding-left: 10%;
    padding-right: 10%;
    color: var(--font-color-dark);
}

.product {
    align-content: center;
    width: 400px;
    height: 150px;
    padding: 20px;
    margin: 30px;
    cursor: pointer;

    background-color: var(--main-color);

    transition: all 0.4s ease;
}

.product:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.61));
}

.product p {
    color: var(--font-color-light);
}

/* ----------------------------------------- */
/* Модальные окна для продуктов*/
/* ----------------------------------------- */

.modal {
    position: fixed;
    align-content: center;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.288);
    backdrop-filter: blur(5px);

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    margin: 8% auto;
    padding: 25px;
    width: 65%;
    max-width: 85%;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);

    max-height: 70vh;
    overflow-y: auto;

    opacity: 0;
    transform: translateY(-20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}


.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: #000;
}

.modal h1 {
    margin-top: 0;
    color: var(--main-color);
}

.modal p {
    color: var(--font-color-dark);
    font-size: 1em;
}

.modal li {
    font-size: 0.8em;
}

/* ----------------------------------------- */
/* Pro bono */
/* ----------------------------------------- */

#pro-bono {
    padding: 4% 5% 5% 10%;
    color: var(--font-color-dark);
    background-color: white;
}


/* ----------------------------------------- */
/* Форма */
/* ----------------------------------------- */

/* #form {
    padding: 5% 0 8% 0;
    text-align: center;
    background-color: #090f72;
    color: var(--font-color-light);
}   

#form h1 {
    color: var(--font-color-light);
    margin-bottom: 3%;
}   */

#form {
    background-color: white;
    max-width: 700px;
    margin: 8% auto 8% auto;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#form h1 {
    margin-top: 0;
    text-align: center;
    margin-bottom: 1.8rem;
}

#form label {
    margin: 10px 0 30px 0;
    display: block;
    color: var(--font-color-dark);
}

#form label input[type="text"],
#form label input[type="tel"] {
    width: 100%;
    padding: 0.85rem 1rem;
    margin-top: 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#form label input[type="text"]:focus,
#form label input[type="tel"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

#form-consent {
    margin-top: 0.5rem;
}

#form-consent input[type="checkbox"] {
    transform: scale(1.2);
    vertical-align: middle;
    margin-right: 0.6rem;
    margin-top: -0.15rem;
}

#form-consent a {
    color: #3b82f6;
    text-decoration: none;
}

#form-consent a:hover {
    text-decoration: underline;
}

/* Кнопка отправки */
#form button[type="submit"] {
    width: 100%;
    padding: 0.95rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#form button[type="submit"]:hover {
    background: #2563eb;
}

#form button[type="submit"]:active {
    transform: translateY(1px);
}

/* #form-iframe {
    margin: auto;
    width: 650px;
    background-color: white;
} */

/* ----------------------------------------- */
/* Расположение */
/* ----------------------------------------- */

#location {
    padding: 1% 5% 2% 10%;
    background-color: white;
}

#location h1 {
    margin-bottom: 0;
}

/* ----------------------------------------- */
/* Карта */
/* ----------------------------------------- */

#map-block {
    position: relative;
    width: 100%;
    background-color: white;
}

#map-title {
    position: absolute;
    padding: 10px;
    top: 50px;
    left: 300px;
    font-size: 0.7em;


    background-color: white;
    border: 2px var(--main-color) solid;
    border-radius: 6px;

    width: 200px;
    height: 220px;
}

#map-title-phone {
    display: none;
}

/* ----------------------------------------- */
/* Адаптивность */
/* ----------------------------------------- */




@media (max-width: 768px) {

    body {
        font-size: var(--font-size-phones);
    }

    #blooming-contacts {
        padding: 0 10% 0 10%;

    }

    .modal-content {

        margin: 8% auto;
        padding: 25px;
        width: 90%;
        max-width: 85%;
        border-radius: 8px;

        max-height: 70vh;

    }

    #about-us,
    #welcome,
    #advantages,
    #about-company,
    #products-and-services,
    #products,
    #pro-bono,
    #location,
    footer {
        padding: 6% 5% 6% 5%;
    }

    #about-us p,
    #welcome p,
    #advantages p,
    #about-company p,
    #products-and-services p,
    #products p,
    #pro-bono p,
    #contacts p {
        width: 100%;
    }

    h1 {
        font-size: 1.6em;
    }

    h3 {
        font-size: 1.4em;
    }


    .product {
        width: 350px;
        height: 150px;
        padding: 20px;
        margin: 10px;
    }

    #form {
        max-width: 100%;
        margin: 0;
        padding: 10% 4% 10% 4%;
        border-top: solid var(--main-color) 8px;
        border-bottom: solid var(--main-color) 8px;
        border-radius: 0;
        box-shadow: none;
    }

    #location h1 {
    margin-bottom: 1em;
    }

    #map-title {
        display: none;
    }

    #map-title-phone {
        display: block;
    }


}