/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'PT Sans Narrow', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

.container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* === 1. Верхняя полоса === */
.top-bar {
    background: #f1f1f1;
    border-bottom: 1px solid #e1e1e1;
    font-size: 14px;
    padding: 8px 0;
    color: #555;
    white-space: nowrap;
}

.top-bar .container {
    text-align: right;
}

.top-bar-phone {
    white-space: nowrap;
}

.top-bar a {
    color: red;
}

.top-bar a:hover {
    text-decoration: underline;
}

/* === 2. Header / Menu === */
.header {
    background: #292e8b;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: padding 0.3s ease;
    padding-top: 10px;
    padding-bottom: 10px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-full {
    display: block;
    max-height: 80px;
    transition: all 0.3s ease;
}

.logo-small {
    display: none;
    max-height: 40px;
    transition: all 0.3s ease;
}

.header.scrolled .logo-full {
    display: none;
}

.header.scrolled .logo-small {
    display: block;
}

.main-nav ul {
    display: flex;
    gap: 0;
}

.main-nav a {
    display: block;
    color: #fff;
    text-transform: uppercase;
    font-size: 16px;
    padding: 20px 22px;
    transition: background 0.2s;
    white-space: nowrap;
}

.main-nav a:hover {
    background: rgba(255,255,255,0.15);
}

.header.scrolled .main-nav a {
    padding: 12px 22px;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* === 3. Оффер === */
.offer {
    padding: 0;
    background: #fff;
}

.offer-inner {
    display: flex;
    align-items: stretch;
    gap: 40px;
    padding: 0;
}

.offer-text {
    flex: 0.85;
    padding-top: 16px;
}

.offer-subtitle {
    display: inline-block;
    background: #292e8b;
    color: #fff;
    font-size: 26px;
    font-weight: normal;
    padding: 4px 20px 8px;
    margin-bottom: 15px;
}

.offer-title {
    font-size: 42px;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.2;
}

.offer-text p {
    font-size: 16px;
    line-height: 1.7;
    color: #444;
}

.offer-image {
    flex: 1.15;
    display: flex;
}

.offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* === 4. Услуги === */
.uslugi {
    background: #3b3b3b url('images/escheresque_ste.png') repeat;
    color: #ccc;
    padding: 60px 0;
}

.uslugi .section-title {
    color: #fff;
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
}

.uslugi-columns {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
}

.uslugi-col {
    flex: 1;
}

.uslugi-col p {
    text-align: center;
    line-height: 1.8;
    font-size: 15px;
}

.uslugi-list li {
    padding: 4px 0;
    padding-left: 30px;
    position: relative;
    font-size: 15px;
    line-height: 1.6;
}

.check-icon {
    position: absolute;
    left: 0;
    top: 3px;
    color: #fc535b;
    font-size: 16px;
    font-weight: bold;
}

.principles-title {
    text-align: center;
    color: #fff;
    font-size: 24px;
    margin-bottom: 40px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.principles-title::before,
.principles-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #666;
}

.principles {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.principle-card {
    background: #f1f1f1;
    border-radius: 6px;
    padding: 30px 20px 20px;
    text-align: center;
    flex: 1;
    max-width: 280px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.principle-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border: 3px solid #232780;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #232780;
}

.principle-icon svg {
    width: 28px;
    height: 28px;
}

.principle-card h4 {
    color: #232780;
    font-size: 18px;
}

/* === 6. Адвокаты === */
.team {
    padding: 60px 0;
    background: #fff;
}

.team-heading {
    text-align: center;
    font-size: 20px;
    font-weight: normal;
    color: #444;
    max-width: 900px;
    margin: 0 auto 50px;
    line-height: 1.6;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.team-card {
    text-align: center;
}

.team-photo-wrap {
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 4px;
}

.team-photo {
    width: 100%;
    display: block;
    transition: opacity 0.3s;
}

.photo-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.team-photo-wrap:hover .photo-default {
    opacity: 0;
}

.team-photo-wrap:hover .photo-hover {
    opacity: 1;
}

.team-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #222;
}

.team-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.team-group {
    text-align: center;
}

.team-group img {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: block;
    border-radius: 4px;
}

.team-group-caption {
    margin-top: 15px;
    font-size: 16px;
    color: #555;
    font-style: italic;
}

/* === 7. Контакты === */
.contacts {
    padding: 60px 0;
    background: #f9f9f9;
}

.contacts .section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: #222;
}

.contacts-inner {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.contacts-map {
    flex: 2;
}

.contacts-map iframe {
    width: 100%;
    height: 450px;
    border: 1px solid #ebebeb;
    border-radius: 4px;
}

.contacts-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border: 3px solid #232780;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #232780;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
}

.contact-item h4 {
    font-size: 16px;
    color: #222;
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 15px;
    color: #555;
    line-height: 1.5;
}

.contact-item a {
    color: #232780;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* === Footer === */
.footer {
    background: #3b3b3b url('images/escheresque_ste.png') repeat;
    color: #888;
    text-align: center;
    padding: 25px 0;
    font-size: 14px;
    border-top: 1px solid #484848;
}

/* === Кнопка "Наверх" === */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #292e8b;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.scroll-top svg {
    width: 24px;
    height: 24px;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: #1a1e6b;
}

/* === Адаптив: Планшеты (768px - 1024px) === */
@media (max-width: 1024px) {
    .offer-inner {
        gap: 30px;
    }

    .offer-text {
        padding: 16px 20px 0;
    }

    .offer-title {
        font-size: 34px;
    }

    .offer-subtitle {
        font-size: 22px;
    }

    .uslugi-columns {
        gap: 30px;
    }

    .team-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    .contacts-inner {
        flex-direction: column;
    }

    .contacts-map {
        width: 100%;
    }

    .contacts-map iframe {
        height: 350px;
        width: 100%;
    }

    .contacts-info {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
        width: 100%;
    }

    .contact-item {
        flex: 1;
        min-width: 30%;
    }

    .principles {
        gap: 20px;
    }

    .principle-card {
        padding: 25px 15px 18px;
    }
}

/* === Адаптив: Мобильные (< 768px) === */
@media (max-width: 767px) {
    .top-bar .container {
        text-align: center;
        font-size: 13px;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    /* Mobile menu */
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #292e8b;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav a {
        padding: 14px 20px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .header-inner {
        position: relative;
    }

    /* Offer */
    .offer {
        padding: 0;
    }

    .offer-inner {
        flex-direction: column;
        gap: 25px;
        padding: 0;
    }

    .offer-subtitle {
        font-size: 20px;
    }

    .offer-title {
        font-size: 28px;
    }

    .offer-text {
        padding: 0 10px 20px;
    }

    .offer-image {
        order: -1;
    }

    /* Услуги */
    .uslugi {
        padding: 40px 0;
    }

    .uslugi .section-title {
        font-size: 28px;
        margin-bottom: 25px;
    }

    .uslugi-columns {
        flex-direction: column;
        gap: 20px;
    }

    .uslugi-col p {
        text-align: left;
    }

    .principles {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .principle-card {
        max-width: 100%;
        width: 100%;
    }

    .principles-title {
        font-size: 20px;
    }

    /* Team */
    .team {
        padding: 40px 0;
    }

    .team-heading {
        font-size: 17px;
        margin-bottom: 30px;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .team-card h3 {
        font-size: 18px;
    }

    /* Contacts */
    .contacts {
        padding: 40px 0;
    }

    .contacts .section-title {
        font-size: 28px;
        margin-bottom: 25px;
    }

    .contacts-inner {
        flex-direction: column;
        gap: 25px;
    }

    .contacts-map {
        width: 100%;
    }

    .contacts-map iframe {
        height: 300px;
        width: 100%;
    }

    .contacts-info {
        flex-direction: column;
        gap: 20px;
    }

    .contact-item {
        min-width: auto;
    }

    /* Footer */
    .footer {
        padding: 20px 0;
        font-size: 13px;
    }

    /* Scroll top */
    .scroll-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
    }
}
