/* ==========================================================================
   1. VARIABLES & SETTINGS
   ========================================================================== */
:root {
    /* Colors */
    --c-black: #000000;
    --c-white: #ffffff;
    --c-gray: #f5f5f5;
    --c-text: #1a1a1a;
    --c-text-light: #757575;
    --c-border: #e0e0e0;

    /* Spacing & Layout */
    --header-height: 80px;
    --container-width: 1440px;
    --container-padding: 40px;

    /* Typography */
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;

    /* Transitions */
    --transition: 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-fast: 0.3s ease;
}

/* ==========================================================================
   2. GLOBAL STYLES
   ========================================================================== */
body {
    color: var(--c-text);
    font-size: 16px;
    font-family: var(--font-main);
    background-color: var(--c-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

a:hover {
    opacity: 0.7;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

.container-fluid {
    width: 100%;
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    padding: 0 40px;
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03);
}

.site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Logo */
.site-logo {
    z-index: 1001;
}

.site-logo img {
    max-height: 30px;
    width: auto;
}

.site-logo__text {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: var(--c-black);
}

/* Header Actions */
.site-header__actions {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Navigation */
.main-navigation .nav-list {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
}

.main-navigation .nav-list>li {
    position: relative;
    padding: 25px 0;
}

.main-navigation .nav-list>li>a {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    position: relative;
    color: var(--c-black);
}

.main-navigation .nav-list>li>a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--c-black);
    transition: width 0.4s ease;
}

.main-navigation .nav-list>li:hover>a::after {
    width: 100%;
}

/* Dropdown */
.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--c-white);
    min-width: 220px;
    padding: 20px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    list-style: none;
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.main-navigation li:hover .sub-menu,
.main-navigation li:focus-within .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.main-navigation .sub-menu a {
    display: block;
    padding: 8px 25px;
    font-size: 13px;
    color: var(--c-text);
}

/* Language Switcher */
.lang-dropdown {
    position: relative;
    padding: 25px 0;
    cursor: pointer;
}

.lang-current {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    color: var(--c-black);
}

.lang-dropdown:hover .chevron {
    transform: rotate(180deg);
}

.lang-list-dropdown {
    position: absolute;
    top: 100%;
    right: -10px;
    background: var(--c-white);
    min-width: 80px;
    padding: 15px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s ease;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.lang-dropdown:hover .lang-list-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-list-dropdown a {
    display: block;
    padding: 6px 15px;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--c-text-light);
    font-weight: 500;
}

.lang-list-dropdown a:hover {
    color: var(--c-black);
    opacity: 1;
}

/* Burger */
.burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    z-index: 1002;
}

.burger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--c-black);
}

/* ==========================================================================
   5. PERFECT PERCENTAGE GRID (10 ITEMS LOOP)
   ========================================================================== */
.site-main {
    padding-top: var(--header-height);
    min-height: 100vh;
}

.portfolio-grid {
    width: 100%;
}

.chaotic-grid {
    display: grid;
    /* 100% / 5% = 20 columns */
    grid-template-columns: repeat(20, 1fr);
    grid-auto-rows: 15vw;
    gap: 0;
    grid-auto-flow: dense;
}

.grid-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f0f0f0;
}

.grid-item__inner {
    width: 100%;
    height: 100%;
}

.grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.grid-item:hover .grid-img {
    transform: scale(1.1);
}

/* --- PATTERN (10 Items Loop) --- */

/* 1. 40% width (8 cols), 2 rows [Left Top] */
.grid-item:nth-child(10n + 1) {
    grid-column: span 8;
    grid-row: span 2;
}

/* 2. 15% width (3 cols), 1 row [Top Middle] */
.grid-item:nth-child(10n + 2) {
    grid-column: span 3;
    grid-row: span 1;
}

/* 3. 15% width (3 cols), 1 row [Top Middle-Right] */
.grid-item:nth-child(10n + 3) {
    grid-column: span 3;
    grid-row: span 1;
}

/* 4. 30% width (6 cols), 1 row [Middle under 2 and 3] */
.grid-item:nth-child(10n + 4) {
    grid-column: span 6;
    grid-row: span 1;
}

/* 5. 30% width (6 cols), 2 rows [Right Top & Middle] */
.grid-item:nth-child(10n + 5) {
    grid-column: 15 / span 6;
    grid-row: span 2;
}

/* 6. 30% width (6 cols), 2 rows [Left Bottom] */
.grid-item:nth-child(10n + 6) {
    grid-column: span 6;
    grid-row: span 2;
}

/* 7. 25% width (5 cols), 1 row [Middle-Left Bottom] */
.grid-item:nth-child(10n + 7) {
    grid-column: span 5;
    grid-row: span 1;
}

/* 8. 10% width (2 cols), 1 row [Under 7 Left] */
.grid-item:nth-child(10n + 8) {
    grid-column: 6 / span 3;
    grid-row: span 1;
}

/* 9. 15% width (3 cols), 1 row [Under 7 Right] */
.grid-item:nth-child(10n + 9) {
    grid-column: 9 / span 3;
    grid-row: span 1;
}

/* 10. 45% width (9 cols), 2 rows [Right Bottom] */
.grid-item:nth-child(10n + 10) {
    grid-column: 12 / span 9;
    grid-row: span 2;
}


/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.site-footer {
    padding: 60px 40px;
    background: var(--c-black);
    color: var(--c-white);
    text-align: center;
}

.site-footer p {
    font-size: 14px;
    opacity: 0.5;
}

/* ==========================================================================
   7. GRID RESPONSIVE (GLOBAL)
   ========================================================================== */
@media (max-width: 1024px) {
    :root {
        --header-height: 70px;
        --container-padding: 20px;
    }

    .site-header {
        padding: 0 20px;
    }

    /* Tablet: Simplify to 2 columns */
    .chaotic-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 50vw;
    }

    /* Reset complex spans */
    .grid-item:nth-child(n) {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    /* Chess pattern */
    .grid-item:nth-child(3n + 1) {
        grid-column: span 2 !important;
        grid-row: span 2 !important;
    }
}

@media (max-width: 768px) {

    /* Mobile Header */
    .site-header__actions {
        gap: 20px;
    }

    .burger-btn {
        display: flex;
    }

    .main-navigation {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--c-white);
        padding: 40px 20px;
        overflow-y: auto;
        border-top: 1px solid var(--c-border);
    }

    .main-navigation.is-open {
        display: block;
    }

    .main-navigation .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .main-navigation .nav-list>li {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .main-navigation .nav-list>li>a {
        font-size: 18px;
    }

    /* Mobile Grid: 1 Column */
    .chaotic-grid {
        grid-template-columns: repeat(1, 1fr);
        grid-auto-rows: 100vw;
    }

    .grid-item:nth-child(n) {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}

/* ==========================================================================
   8. LIGHTBOX (GALLERY POPUP)
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

.lightbox-container {
    position: relative;
    z-index: 10;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
}

#lightbox-img.visible {
    transform: scale(1);
    opacity: 1;
}

/* Nav Buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 20;
    color: var(--c-black);
    transition: opacity 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 40px;
    line-height: 1;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.6;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-close:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {

    .lightbox-prev,
    .lightbox-next {
        display: none;
    }

    #lightbox-img {
        max-width: 95vw;
        max-height: 80vh;
    }
}

/* ==========================================================================
   9. SERVICES SECTION
   ========================================================================== */
.services-section {
    padding: 100px 0;
    background-color: var(--c-white);
}

.section-title {
    font-size: 32px;
    margin-bottom: 60px;
    font-weight: 300;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 250px;
    row-gap: 150px;
}

.service-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 30px;
}

.service-media {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

.service-media img,
.service-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
}

.service-media:hover img,
.service-media:hover video {
    transform: scale(1.08);
    opacity: 0.85;
}

.service-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.service-title {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 15px;
    line-height: 1.2;
    min-height: 2.4em;
    /* Height reserve for 2 lines */
}

.service-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--c-text-light);
    margin-bottom: 25px;
    max-width: 95%;
}

.service-btn {
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    display: inline-block;
    position: relative;
    padding-bottom: 5px;
    margin-top: auto;
    /* Push to bottom */
    align-self: flex-start;
}

.service-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--c-black);
    transition: width 0.3s;
}

.service-btn:hover::after {
    width: 50%;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .service-media {
        aspect-ratio: 4 / 5;
    }

    .service-title {
        min-height: auto;
    }
}

/* ==========================================================================
   10. QUOTE SECTION
   ========================================================================== */
.quote-section {
    background-color: var(--c-black);
    color: var(--c-white);
    padding: 60px 0;
    text-align: center;
}

.quote-content {
    max-width: 1024px;
    margin: 0 auto;
    font-size: 40px;
    line-height: 1.6;
    font-weight: 300;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .quote-section {
        padding: 80px 0;
    }

    .quote-content {
        font-size: 18px;
        padding: 0 20px;
    }
}

/* ==========================================================================
   11. EXPERTISE SECTION
   ========================================================================== */
.expertise-section {
    padding: 120px 0;
    background-color: var(--c-white);
    color: var(--c-text);
}

.expertise-header {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.expertise-tagline {
    font-size: 28px;
    font-weight: 500;
    color: var(--c-text);
    margin-bottom: 20px;
    display: block;
    max-width: 1024px;
    margin-inline: auto;
    width: 100%;
}

.expertise-main-title {
    text-align: center;
    display: flex;
    flex-direction: column;
    line-height: 1;
    width: 100%;
}

.title-top {
    font-size: 72px;
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.title-bottom {
    font-size: 160px;
    font-weight: 500;
    letter-spacing: -3px;
    display: block;
}

.expertise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 100px;
    row-gap: 60px;
    max-width: 800px;
    margin: 0 auto;
}

.expertise-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.exp-item-title {
    font-size: 20px;
    font-weight: 600;
}

.exp-item-desc {
    font-size: 18px;
    line-height: 1.6;
    color: var(--c-text);
}

@media (max-width: 1024px) {
    .title-top {
        font-size: 40px;
    }

    .title-bottom {
        font-size: 80px;
    }

    .expertise-grid {
        column-gap: 40px;
    }
}

@media (max-width: 768px) {
    .expertise-section {
        padding: 80px 0;
    }

    .expertise-header {
        margin-bottom: 60px;
        text-align: left;
    }

    .expertise-main-title {
        text-align: left;
        align-items: flex-start;
    }

    .title-top {
        font-size: 32px;
    }

    .title-bottom {
        font-size: 60px;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }
}

/* ==========================================================================
   12. ABOUT SECTION
   ========================================================================== */
.about-section {
    padding: 150px 0;
    background-color: var(--c-white);
    overflow: hidden;
    /* На случай, если элементы будут вылетать на анимациях */
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    /* Левая колонка чуть шире, правая уже */
    gap: 80px;
    align-items: center;
    /* Центрируем фото и текст по вертикали относительно друг друга */
}

/* --- Typography --- */
.about-tagline {
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    display: block;
    margin-bottom: 30px;
    color: var(--c-text);
}

.about-name {
    font-size: 100px;
    /* Огромный шрифт */
    font-weight: 700;
    line-height: 0.9;
    text-transform: uppercase;
    margin-bottom: 40px;
    letter-spacing: -2px;
    color: var(--c-black);
}

.about-subheading {
    font-size: 18px;
    font-weight: 700;
    font-style: italic;
    /* Курсив как на референсе */
    text-transform: uppercase;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

.about-bio {
    font-size: 16px;
    line-height: 1.8;
    color: var(--c-text-light);
    max-width: 90%;
}

/* --- Image --- */
.about-image-wrapper {
    position: relative;
    width: 100%;
}

.about-img {
    width: 100%;
    height: auto;
    display: block;
    /* Можно добавить легкую тень или эффект */
    box-shadow: 20px 20px 0px var(--c-gray);
    /* Декоративная подложка */
}

/* Responsive */
@media (max-width: 1024px) {
    .about-name {
        font-size: 80px;
    }

    .about-grid {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .about-section {
        padding: 80px 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        /* Одна колонка */
        gap: 60px;
    }

    .about-image-wrapper {
        order: -1;
        /* На мобилке фото ставим ПЕРЕД текстом (опционально) */
        max-width: 80%;
        /* Чуть меньше на весь экран */
        margin: 0 auto;
    }

    .about-name {
        font-size: 60px;
    }

    .about-tagline {
        margin-bottom: 20px;
    }
}

/* ==========================================================================
   13. CLIENTS SECTION
   ========================================================================== */
.clients-section {
    background-color: var(--c-black);
    color: var(--c-white);
    padding: 120px 0;
}

.clients-header {
    margin-bottom: 80px;
}

.clients-tagline {
    font-size: 28px;
    /* Чуть крупнее, как на референсе */
    font-weight: 400;
    /* Тонкий шрифт */
    color: var(--c-white);
    display: block;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 колонки */
    column-gap: 60px;
    row-gap: 80px;
    align-items: center;
    justify-items: center;
}

.client-item {
    width: 100%;
    display: flex;
    justify-content: center;
}

.client-link,
.client-logo-wrapper {
    display: block;
    width: 100%;
    text-align: center;
}

.client-logo {
    max-width: 160px;
    /* Ограничиваем размер лого, чтобы не рвало сетку */
    width: auto;
    height: auto;
    max-height: 80px;
    /* Ограничение по высоте для горизонтальных лого */
    object-fit: contain;

    /* Эффекты */
    opacity: 0.7;
    /* В покое чуть приглушены */
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;

    /* Опционально: Если загружают цветные лого, а нужны белые, можно раскомментировать: */
    /* filter: brightness(0) invert(1); */
    margin: 0 auto;
}

/* Hover Effects */
.client-link:hover .client-logo,
.client-logo-wrapper:hover .client-logo {
    transform: scale(1.15);
    /* Плавное увеличение */
    opacity: 1;
    /* Полная яркость */
}

/* Responsive */
@media (max-width: 1024px) {
    .clients-grid {
        gap: 40px;
    }

    .client-logo {
        max-width: 120px;
    }
}

@media (max-width: 768px) {
    .clients-section {
        padding: 80px 0;
    }

    .clients-header {
        margin-bottom: 40px;
    }

    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 колонки на мобилке */
        column-gap: 30px;
        row-gap: 50px;
    }
}

/* ==========================================================================
   14. PORTFOLIO PAGE HERO
   ========================================================================== */
.portfolio-hero {
    padding: 180px 0 100px; /* Большой отступ сверху (под хедер + воздух) */
    background-color: var(--c-white);
    text-align: center;
}

.port-hero-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.port-hero-title {
    font-size: 80px; /* Крупный заголовок */
    line-height: 1;
    font-weight: 500;
    letter-spacing: -2px;
    margin-bottom: 10px;
    color: var(--c-black);
}

.port-hero-desc {
    font-size: 20px;
    line-height: 1.6;
    color: var(--c-text-light);
    max-width: 600px;
}

/* CTA Button */
.hero-cta-btn {
    display: inline-block;
    background-color: var(--c-black);
    color: var(--c-white);
    padding: 18px 40px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    border-radius: 50px; /* Овальная кнопка */
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s;
    margin-top: 20px;
}

.hero-cta-btn:hover {
    background-color: #333;
    transform: translateY(-5px); /* Легкий подъем при наведении */
    opacity: 1; /* Перебиваем глобальный a:hover opacity */
}

/* Responsive */
@media (max-width: 768px) {
    .portfolio-hero {
        padding: 140px 0 60px;
    }

    .port-hero-title {
        font-size: 48px;
    }

    .port-hero-desc {
        font-size: 16px;
    }
}

/* ==========================================================================
   15. CONTACT PAGE
   ========================================================================== */
.contact-section {
    padding: 180px 0 100px;
    min-height: 100vh;
    background-color: var(--c-white);
    display: flex;
    align-items: center; /* Центруем по вертикали, если экран высокий */
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr; /* Картинка чуть уже, форма шире */
    gap: 80px;
    align-items: flex-start;
}

/* --- Left: Animated Chevron --- */
.contact-visual {
    position: relative;
    width: 100%;
    /* Фильтр-тень для всего блока (так как clip-path обрезает обычную тень, используем drop-shadow) */
    filter: drop-shadow(20px 20px 0px rgba(0,0,0,0.05)); 
}

.contact-image-shape {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    
    /* Форма шеврона (стрелка вправо) */
    clip-path: polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%);
    
    background: var(--c-black);
    transform: translateZ(0); /* Фикс для Safari */
}

.c-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Ховер эффект: картинка чуть зумится, а анимация ускоряется (опционально) */
.contact-image-shape:hover .c-img {
    transform: scale(1.05);
}

/* --- Right: Content --- */
.contact-info {
    padding-top: 20px;
}

.contact-title {
    font-size: 60px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1;
    letter-spacing: -1px;
}

.contact-desc {
    font-size: 18px;
    color: var(--c-text-light);
    margin-bottom: 50px;
    max-width: 500px;
    line-height: 1.6;
}

/* --- CF7 Minimalist Styling --- */
.cf7-custom-form .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.cf7-custom-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    position: relative;
}

.cf7-custom-form label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--c-black);
}

.cf7-custom-form input[type="text"],
.cf7-custom-form input[type="email"],
.cf7-custom-form input[type="tel"],
.cf7-custom-form textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--c-border);
    background: transparent;
    padding: 15px 0;
    font-family: inherit;
    font-size: 18px;
    color: var(--c-black);
    transition: border-color 0.3s;
    border-radius: 0;
    appearance: none;
}

/* Активное состояние поля */
.cf7-custom-form input:focus,
.cf7-custom-form textarea:focus {
    outline: none;
    border-bottom-color: var(--c-black);
}

.cf7-custom-form input[type="submit"] {
    background: var(--c-black);
    color: var(--c-white);
    border: none;
    padding: 20px 60px;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 50px;
    margin-top: 20px;
}

.cf7-custom-form input[type="submit"]:hover {
    background-color: #333;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Ошибки валидации CF7 (стилизация) */
.wpcf7-not-valid-tip {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .contact-image-shape {
        max-width: 100%;
        aspect-ratio: 16/9;
        /* На мобилке форма попроще, чтобы влезла контент */
        clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%); 
    }
    
    .contact-title { font-size: 40px; }
    
    .cf7-custom-form .form-row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ==========================================================================
   16. TEXT PAGE (LEGAL / INFO)
   ========================================================================== */
.text-page-section {
    padding: 180px 0 100px; /* Отступ под хедер */
    background-color: var(--c-white);
    min-height: 80vh;
}

.text-page-wrapper {
    max-width: 800px; /* Узкая колонка для читабельности */
    margin: 0 auto;
}

.page-main-title {
    font-size: 60px;
    font-weight: 500;
    margin-bottom: 60px;
    line-height: 1.1;
    letter-spacing: -1px;
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 40px;
}

/* Стилизация контента из редактора */
.text-content-area {
    font-size: 16px;
    line-height: 1.8; /* Чуть больше воздуха между строками */
    color: var(--c-text);
}

.text-content-area h2 {
    font-size: 28px;
    margin-top: 50px;
    margin-bottom: 20px;
    font-weight: 600;
}

.text-content-area h3 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.text-content-area p {
    margin-bottom: 20px;
}

.text-content-area ul, 
.text-content-area ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.text-content-area li {
    margin-bottom: 10px;
}

.text-content-area a {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.text-content-area a:hover {
    color: var(--c-text-light);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .text-page-section {
        padding: 140px 0 60px;
    }
    
    .page-main-title {
        font-size: 40px;
        margin-bottom: 40px;
        padding-bottom: 20px;
    }
    
    .text-content-area h2 {
        font-size: 24px;
    }
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.site-footer {
    padding: 40px 0;
    background: var(--c-white);
    /* Белый фон */
    color: var(--c-black);
    /* Черный текст */
    border-top: 1px solid var(--c-gray);
    /* Легкая линия сверху для разделения */
}

/* Socials (Center or Top) */
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.social-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: opacity 0.3s ease;
    /* Если иконки черные, можно оставить так. Если цветные - можно обесцветить */
    /* filter: grayscale(100%); */
}

.social-item:hover .social-icon {
    opacity: 0.6;
}

/* Bottom Bar */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
}

/* Left */
.footer-link {
    text-transform: none;
    color: var(--c-black);
}

/* Right */
.footer-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo-icon {
    width: 20px;
    height: auto;
    display: block;
}

.copyright-text {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.author-name {
    text-transform: uppercase;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 20px;
    }

    .footer-bottom {
        flex-direction: column-reverse;
        /* На мобилке копирайт снизу, ссылки сверху */
        gap: 20px;
    }

    .footer-right {
        flex-direction: column;
        gap: 10px;
    }
}