/* ===================================
   RESET & GLOBAL STYLES
   =================================== */

html {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

:root {
    --color-primary: #00a6ff;
    --color-primary-dark: #0056b3;
    --color-text: #333;
    --color-text-light: #9ca3af;
    --color-border: #ddd;
    --color-bg: #f8f8f8;
    --color-bg-light: #f9f9f9;
    --color-white: #fff;
    --color-shadow: rgba(91, 93, 99, 0.06);
    --color-overlay: rgba(0, 0, 0, 0.35);

    --spacing-xs: 10px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 45px;
    --spacing-xl: 82px;
    --spacing-xxl: 100px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;

    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0px 4px 70px 0px var(--color-shadow);
    --shadow-button: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
}


/* ===================================
   CONTAINER & LAYOUT
   =================================== */

.container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0 156px;
}


/* ===================================
   HEADER SECTION
   =================================== */

.header {
    position: relative;
    min-height: 500px;
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    color: var(--color-white);
    background-image: url(../img/image.jpg);
    background-size: cover;
    background-position: center;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-overlay);
    z-index: 1;
    pointer-events: none;
}

.header>* {
    position: relative;
    z-index: 2;
}

.header__title {
    font-size: 56px;
    font-weight: 600;
    margin: 0 0 var(--spacing-lg) 0;
    border-radius: 20px;
}

.header__text {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    max-width: 437px;
    margin: 0 0 var(--spacing-lg) 0;
}

.header__button {
    width: 194px;
    height: 60px;
    padding: 18px 40px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    color: var(--color-white);
    background-color: var(--color-primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}

.header__button:hover {
    background-color: var(--color-primary-dark);
}


/* ===================================
   SOCIAL SECTION
   =================================== */

.social {
    padding: var(--spacing-xxl) 0;
}

.social__header {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
}

.social__links {
    display: flex;
    gap: var(--spacing-md);
    justify-content: space-between;
    max-width: 888px;
    margin: 0 auto;
    list-style: none;
    padding: 0;
}

.social__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    max-width: 280px;
    width: 100%;
    height: 120px;
    text-decoration: none;
    color: var(--color-text-light);
    transition: transform 0.3s ease;
}

.social__item:hover {
    transform: translateY(-5px);
}

.social__icon {
    height: 50px;
    width: 50px;
    object-fit: contain;
}

.social__item span {
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text-light);
}


/* ===================================
   SECTION TITLES & TEXT
   =================================== */

.section-title {
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 3.3px;
    margin: 0 0 25px 0;
    color: var(--color-text);
}

.section-subtitle {
    font-size: 16px;
    letter-spacing: 0.7px;
    line-height: 24px;
    font-weight: 400;
    color: var(--color-text-light);
    max-width: 465px;
    margin: 0 auto;
}


/* ===================================
   ABOUT SECTION
   =================================== */

.about {
    padding: var(--spacing-xxl) 0;
    text-align: center;
}


/* ===================================
   GALLERY SECTION
   =================================== */

.gallery-section {
    padding: var(--spacing-xxl) 0;
    padding-bottom: 0;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xs);
    margin-bottom: 70px;
}

.gallery__item {
    overflow: hidden;
    border-radius: var(--radius-md);
    margin: 0;
    padding: 0;
    aspect-ratio: 1;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery__item:hover img {
    transform: scale(1.05);
}


/* ===================================
   FEEDBACK & FORM SECTION
   =================================== */

.feedback {
    padding: var(--spacing-xxl) 0;
    position: relative;
}

.feedback .container {
    position: relative;
}

.form-container {
    max-width: 500px;
    margin: 0 auto var(--spacing-xxl);
    padding: 30px;
    background-color: var(--color-bg-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
}

.form-container h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: var(--color-text);
    text-align: center;
}

.form-container>p {
    color: #666;
    font-size: 14px;
    text-align: center;
    margin: 0 0 20px 0;
}

.form {
    display: flex;
    flex-direction: column;
}

.form__group {
    margin-bottom: var(--spacing-md);
}

.form__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.form__input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.form__submit {
    padding: 14px;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-white);
    background-color: var(--color-primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form__submit:hover {
    background-color: var(--color-primary-dark);
}

.privacy-text {
    margin-top: 16px;
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

.privacy-text a {
    color: var(--color-primary);
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.privacy-text a:hover {
    opacity: 0.8;
}



/* ===================================
   BUTTONS
   =================================== */

.btn-up-wrap {
    /* Делаем контейнер гибким и прижимаем содержимое к правому краю */
    display: flex;
    justify-content: flex-end;
    padding-top: 30px;
    padding-bottom: 30px;
}

.btn-up {
    position: relative;
    right: auto;
    bottom: auto;

    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--color-white);
    background-color: var(--color-primary);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: var(--shadow-button);
    transition: background-color 0.3s ease, transform 0.2s ease;
    z-index: 100;
    user-select: none;
}

.btn-up:hover {
    background-color: var(--color-primary-dark);
    transform: scale(1.1);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background-color: #d2d2d2;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: var(--color-text);
    border-top: 1px solid #e7e7e7;
}


/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media screen and (max-width: 1366px) {
    .container {
        padding: 0 15px;
    }
}

@media screen and (max-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 832px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .social__links {
        align-items: center;
    }
}

@media screen and (max-width: 768px) {
    .header__button {
        width: 160px;
        font-size: 14px;
    }

    .section-title {
        font-size: 14px;
        letter-spacing: 2.2px;
    }

    .btn-up {
        margin-bottom: 20px;
    }
}

@media screen and (max-width: 600px) {
    .gallery-section {
        padding-bottom: 20px;
    }

    .about {
        padding-top: 0;
    }

    .gallery {
        margin-bottom: 0;
    }

    .gallery-section {
        padding-top: 0;
    }


    .form-container {
        padding: 20px;
    }

    .form-container h2 {
        font-size: 20px;
    }

    .gallery {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .header__title {
        font-size: 36px;
    }

    .header__text {
        font-size: 14px;
    }

    .form-container {
        margin-bottom: 0;
    }

    .feedback {
        padding-top: 0;
    }

    .privacy-text {
        font-size: 11px;
    }
}
