* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f2;
    color: #17283b;
    line-height: 1.6;
}

a {
    text-decoration: none;
}

/* ===== HEADER ===== */

.header {
    position: relative;
    z-index: 20;
    background: #0b2034;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.header-inner {
    max-width: 1450px;
    min-height: 92px;
    margin: auto;
    padding: 0 50px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

.logo {
    color: #fff;
    font-family: Georgia, serif;
    font-size: 27px;
    font-weight: 700;
    white-space: nowrap;
}

.logo::first-letter {
    color: #c9ad68;
}

.nav {
    display: flex;
    align-items: center;
    gap: 45px;
}

.nav a {
    color: #fff;
    font-size: 16px;
    transition: .25s;
}

.nav a:hover {
    color: #d5ba72;
}

.header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;
    padding: 0 27px;

    color: #fff;
    background: linear-gradient(135deg, #a88d4d, #c6aa63);
    border-radius: 10px;
    font-weight: 600;
    transition: .25s;
}

.header-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

/* ===== HERO ===== */

.hero {
    min-height: 710px;

    display: flex;
    align-items: center;

    padding: 80px max(6vw, 35px);

    color: #fff;

    background:
        linear-gradient(
            90deg,
            rgba(7,27,45,.98) 0%,
            rgba(10,35,57,.94) 43%,
            rgba(10,35,57,.68) 67%,
            rgba(10,35,57,.25) 100%
        ),
        url("/lawyer.jpg") center right / cover no-repeat;
}

.hero-content {
    width: 100%;
    max-width: 760px;
}

.hero-label {
    display: block;
    margin-bottom: 24px;

    color: #d7c07e;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 6px;
    text-transform: uppercase;
}

.hero h1 {
    margin-bottom: 25px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(48px, 5.3vw, 82px);
    line-height: 1.02;
    font-weight: 500;
    letter-spacing: -1px;
}

.hero p {
    max-width: 680px;
    margin-bottom: 32px;

    color: rgba(255,255,255,.87);
    font-size: 21px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.primary-button,
.secondary-button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 58px;
    padding: 0 30px;

    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    transition: .25s;
}

.primary-button,
.btn-gold {
    color: #142538;
    background: linear-gradient(135deg, #d4b458, #b99a4d);
}

.primary-button:hover,
.btn-gold:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.secondary-button,
.btn-outline-light {
    color: #fff;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.55);
}

.secondary-button:hover,
.btn-outline-light:hover {
    background: rgba(255,255,255,.12);
}

/* ===== SECTIONS ===== */

.services,
.about,
.reviews {
    padding: 90px 6%;
}

.services {
    background: #f7f7f5;
}

.section-heading,
.section-inner,
.about-content {
    max-width: 1250px;
    margin-left: auto;
    margin-right: auto;
}

.section-label {
    display: block;
    margin-bottom: 12px;

    color: #b4923f;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.section-heading h2,
.about-content h2,
.section-inner h2,
.contact-inner h2 {
    margin-bottom: 18px;

    color: #102943;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    line-height: 1.15;
}

.section-heading > p,
.about-content > p,
.section-inner > p {
    max-width: 700px;
    color: #63707d;
    font-size: 18px;
}

/* ===== SERVICES ===== */

.service-grid {
    max-width: 1250px;
    margin: 45px auto 0;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.service-card {
    min-height: 250px;
    padding: 32px 28px;

    background: #fff;
    border: 1px solid #e2e4e6;
    border-radius: 12px;

    box-shadow: 0 10px 35px rgba(17,40,63,.06);
    transition: .25s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 45px rgba(17,40,63,.12);
}

.service-icon {
    margin-bottom: 20px;
    font-size: 35px;
}

.service-card h3 {
    margin-bottom: 12px;

    color: #102943;
    font-family: Georgia, serif;
    font-size: 22px;
}

.service-card p {
    color: #687480;
    font-size: 16px;
}

/* ===== ABOUT ===== */

.about {
    background: #fff;
}

.about-content {
    padding: 55px;

    background: #f3f3ef;
    border-left: 5px solid #b99a4d;
    border-radius: 8px;
}

/* ===== REVIEWS ===== */

.reviews {
    background: #f7f7f5;
}

/* ===== CONTACT ===== */

.contact {
    padding: 85px 6%;

    color: #fff;
    background:
        linear-gradient(120deg, #081e33, #123c60);
}

.contact-inner {
    max-width: 1250px;
    margin: auto;
}

.contact .section-label {
    color: #d4b765;
}

.contact-inner h2 {
    color: #fff;
}

.contact-inner > p {
    max-width: 650px;
    margin-bottom: 30px;

    color: rgba(255,255,255,.8);
    font-size: 18px;
}

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* ===== FOOTER ===== */

.footer {
    padding: 35px 6%;
    color: rgba(255,255,255,.75);
    background: #061728;
}

.footer-inner {
    max-width: 1250px;
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer strong {
    display: block;
    color: #fff;
    font-family: Georgia, serif;
    font-size: 20px;
}

.footer span {
    font-size: 14px;
}

/* ===== TABLET ===== */

@media (max-width: 1000px) {

    .header-inner {
        padding: 0 25px;
    }

    .nav {
        gap: 20px;
    }

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

    .hero {
        min-height: 650px;
    }
}

/* ===== MOBILE ===== */

@media (max-width: 760px) {

    .header-inner {
        min-height: 75px;
        padding: 0 20px;
    }

    .logo {
        font-size: 21px;
    }

    .nav,
    .header-button {
        display: none;
    }

    .hero {
        min-height: 720px;
        padding: 75px 24px;

        align-items: flex-end;

        background:
            linear-gradient(
                180deg,
                rgba(7,27,45,.28) 0%,
                rgba(7,27,45,.65) 38%,
                rgba(7,27,45,.98) 76%,
                #071b2d 100%
            ),
            url("/lawyer.jpg") 70% center / cover no-repeat;
    }

    .hero-label {
        margin-bottom: 18px;
        font-size: 12px;
        letter-spacing: 3px;
    }

    .hero h1 {
        font-size: 43px;
        line-height: 1.05;
    }

    .hero p {
        font-size: 17px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .services,
    .about,
    .reviews,
    .contact {
        padding: 65px 22px;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .section-heading h2,
    .about-content h2,
    .section-inner h2,
    .contact-inner h2 {
        font-size: 32px;
    }

    .about-content {
        padding: 32px 24px;
    }

    .contact-buttons {
        flex-direction: column;
    }

    .contact-buttons .btn {
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* Фото у головному блоці */
.hero {
    background:
        linear-gradient(
            90deg,
            rgba(8, 27, 45, 0.97) 0%,
            rgba(8, 27, 45, 0.90) 38%,
            rgba(8, 27, 45, 0.45) 62%,
            rgba(8, 27, 45, 0.08) 100%
        ),
        url('/hero.jpg');

    background-size: cover;
    background-position: right 35%;
    background-repeat: no-repeat;
}
/* Новий юридичний фон */
.hero {
    background:
        linear-gradient(
            90deg,
            rgba(8, 27, 45, 0.96) 0%,
            rgba(8, 27, 45, 0.82) 45%,
            rgba(8, 27, 45, 0.35) 100%
        ),
        url('/legal-bg.png');

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* Фото юриста праворуч */
.hero-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 55%;
}

.hero-photo {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 42%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    overflow: hidden;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right bottom;
    display: block;
}
/* Плавне злиття фото з фоном */
.hero-photo {
    right: -3%;
    bottom: 0;
    width: 48%;
    height: 100%;
    overflow: hidden;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;

    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(0,0,0,0.35) 10%,
        black 25%,
        black 85%,
        transparent 100%
    );

    mask-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(0,0,0,0.35) 10%,
        black 25%,
        black 85%,
        transparent 100%
    );
}
/* Фінальне позиціонування фото справа */
.hero-photo {
    right: -10%;
    bottom: -2%;
    width: 52%;
    height: 105%;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% top;

    -webkit-mask-image:
        linear-gradient(to right,
            transparent 0%,
            rgba(0,0,0,0.5) 12%,
            black 28%,
            black 100%
        ),
        linear-gradient(to bottom,
            black 0%,
            black 75%,
            transparent 100%
        );

    -webkit-mask-composite: source-in;

    mask-image:
        linear-gradient(to right,
            transparent 0%,
            rgba(0,0,0,0.5) 12%,
            black 28%,
            black 100%
        ),
        linear-gradient(to bottom,
            black 0%,
            black 75%,
            transparent 100%
        );

    mask-composite: intersect;
}
/* Фото біля правого краю екрана */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-inner {
    max-width: none;
    width: 100%;
    position: relative;
}

.hero-photo {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 45vw;
    height: 100%;
    overflow: hidden;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right top;
}
/* Фото на весь правий край + природне злиття */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-inner {
    width: 100%;
    max-width: none;
    position: relative;
}

.hero-photo {
    position: absolute;
    top: -5%;
    right: 0;
    bottom: auto;
    width: 48vw;
    height: 110%;
    z-index: 1;
    overflow: hidden;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 20%;

    -webkit-mask-image:
        linear-gradient(to right,
            transparent 0%,
            rgba(0,0,0,0.35) 8%,
            black 25%,
            black 100%
        ),
        linear-gradient(to bottom,
            transparent 0%,
            black 12%,
            black 85%,
            transparent 100%
        );

    -webkit-mask-composite: source-in;

    mask-image:
        linear-gradient(to right,
            transparent 0%,
            rgba(0,0,0,0.35) 8%,
            black 25%,
            black 100%
        ),
        linear-gradient(to bottom,
            transparent 0%,
            black 12%,
            black 85%,
            transparent 100%
        );

    mask-composite: intersect;
}
