/* Переменные дизайн-системы */
:root {
    --bg-white: #FFFFFF;
    --bg-beige: #F2EBE1;
    --bg-dark: #363B40;
    --color-gold: #C6A47E;
    --color-gold-hover: #b08d65;
    --text-dark: #363B40;
    --text-light: #FFFFFF;
    --border-color: #E0DCD6;
    
    --font-main: 'Montserrat', sans-serif;
    --container-width: 1400px;
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    font-size: 16px;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Кнопки (Строгие, без скруглений) */
.btn {
    display: inline-block;
    padding: 16px 32px;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 0 !important;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-primary {
    background-color: var(--color-gold);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--color-gold-hover);
}

.btn-inline {
    margin-right: 20px;
}

.full-width {
    width: 100%;
}

/* Типографика */
h1 {
    font-size: 5rem;
    font-weight: 300;
    line-height: 1.1;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

h2.section-title {
    font-size: 3rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 30px;
}

.gold-text {
    color: var(--color-gold);
}

.right-align {
    text-align: right;
}

/* Шапка (Header) */
.site-header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-width: 100%;
    z-index: 100;
}

.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 40px;
    filter: invert(21%) sepia(12%) saturate(464%) hue-rotate(170deg) brightness(97%) contrast(92%); /* Окраска SVG в dark */
}

.brand-descriptor {
    font-size: 11px;
    color: var(--text-dark);
    opacity: 0.7;
    line-height: 1.3;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
}

.header-nav {
    display: flex;
    gap: 40px;
}

.header-nav a {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.header-nav a:hover {
    color: var(--color-gold);
}

.header-contacts {
    border: 1px solid var(--text-dark);
    padding: 10px 20px;
}

.header-phone {
    font-size: 14px;
    font-weight: 500;
}

/* Герой блок (Hero) */
.hero-section {
    background-color: var(--bg-white);
    padding-top: 80px;
}

.hero-text-grid {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px 80px 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.hero-action-col {
    max-width: 450px;
    text-align: right;
}

.hero-description {
    font-size: 16px;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.hero-image-wrapper {
    width: 100%;
    height: 60vh;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Разделенный фон (Split Layout) */
.split-bg {
    position: relative;
    background: linear-gradient(to right, var(--bg-dark) 0%, var(--bg-dark) 60%, var(--bg-beige) 60%, var(--bg-beige) 100%);
}

.split-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    position: relative;
    z-index: 2;
}

/* Блок 3: Agile */
.agile-section {
    padding: 120px 0;
}

.split-left {
    width: 60%;
    padding: 40px 80px 40px 40px;
    color: var(--text-light);
}

.split-left .section-text {
    font-size: 18px;
    margin-bottom: 50px;
    opacity: 0.9;
}

.file-note {
    font-size: 12px;
    opacity: 0.5;
}

.thin-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 60px 0;
}

.stats-grid {
    display: flex;
    gap: 60px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 4rem;
    font-weight: 300;
    color: var(--color-gold);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-desc {
    font-size: 14px;
    opacity: 0.7;
    max-width: 200px;
}

.split-right {
    width: 40%;
    position: relative;
}

.overlap-image {
    position: absolute;
    top: 50%;
    left: -100px;
    transform: translateY(-50%);
    width: calc(100% + 100px - 40px);
    height: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

/* Блок 4: Видео */
.video-section {
    padding: 0 0 120px 0;
}

.video-container {
    flex-direction: column;
    align-items: center;
}

.video-title-wrapper {
    width: 100%;
    padding: 0 40px;
    margin-bottom: 60px;
}

.video-player-wrapper {
    position: relative;
    width: calc(100% - 80px);
    height: 600px;
    background-color: var(--bg-white);
    cursor: pointer;
    overflow: hidden;
}

.video-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: transform 0.7s ease;
}

.video-player-wrapper:hover .video-poster {
    transform: scale(1.05);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background-color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.video-player-wrapper:hover .play-btn {
    background-color: var(--color-gold);
}

.play-icon {
    width: 30px;
    height: 30px;
    fill: var(--text-dark);
}

.video-player-wrapper:hover .play-icon {
    fill: var(--bg-white);
}

/* Блок 5: Услуги (Zigzag) */
.services-section {
    background-color: var(--bg-beige);
    padding: 120px 0;
}

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

.zigzag-wrapper {
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-top: 80px;
}

.zigzag-item {
    display: flex;
    align-items: center;
    gap: 60px;
}

.zigzag-item.reverse {
    flex-direction: row-reverse;
}

.zigzag-image {
    flex: 1;
    height: 450px;
}

.zigzag-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zigzag-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.zigzag-content.full-width {
    flex-direction: column;
    align-items: flex-start;
    border-top: 1px solid var(--color-gold);
    padding-top: 60px;
}

.header-row {
    display: flex;
    align-items: center;
    gap: 30px;
}

.num-circle {
    width: 60px;
    height: 60px;
    border: 1px solid var(--color-gold);
    border-radius: 50% !important; /* Единственное исключение для круга с цифрой по ТЗ */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--color-gold);
    flex-shrink: 0;
}

.text-block h3, .header-row h3 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 20px;
}

.text-block p {
    font-size: 16px;
    opacity: 0.8;
}

.service-stats {
    display: flex;
    gap: 80px;
    margin-top: 40px;
    margin-left: 90px;
}

.s-stat {
    display: flex;
    flex-direction: column;
}

.s-num {
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--color-gold);
    line-height: 1;
}

.s-text {
    font-size: 14px;
    margin-top: 10px;
    opacity: 0.7;
}

/* Блок 6: База знаний */
.knowledge-base {
    background-color: var(--bg-white);
    padding: 120px 0;
}

.kb-header {
    text-align: center;
    margin-bottom: 80px;
}

.kb-subtitle {
    font-size: 16px;
    color: var(--color-gold);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.article-card {
    background-color: var(--bg-beige);
    display: flex;
    flex-direction: column;
}

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-date {
    font-size: 12px;
    color: var(--text-dark);
    opacity: 0.5;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 30px;
    line-height: 1.4;
}

.card-link {
    margin-top: auto;
    color: var(--color-gold);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

/* Pre-footer */
.pre-footer-img-wrapper {
    height: 500px;
    width: 100%;
    margin-bottom: -150px; /* Overlap footer */
    position: relative;
    z-index: 10;
}

.pre-footer-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 250px 40px 60px 40px; /* Padding top accounts for overlap */
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.footer-descriptor {
    font-size: 13px;
    opacity: 0.5;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-nav a {
    font-size: 14px;
    opacity: 0.8;
}

.footer-nav a:hover {
    color: var(--color-gold);
    opacity: 1;
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 14px;
    opacity: 0.8;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.5;
}

/* Стили для Inner Page Layout */
.page-inner {
    background-color: var(--bg-beige);
}

.inner-layout-wrapper {
    width: 100%;
    padding: 80px 20px 120px 20px;
}

.inner-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--bg-white);
    box-shadow: 0 20px 60px rgba(0,0,0,0.05);
}

.content-zone {
    padding: 80px;
}

.article-meta {
    font-size: 12px;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 20px;
}

.article-h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 40px;
}

.article-hero-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    margin-bottom: 60px;
}

.article-body {
    font-size: 16px;
    line-height: 1.8;
}

.article-body h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin: 50px 0 20px 0;
}

.article-body p {
    margin-bottom: 20px;
}

.lead-text {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.8;
}

.article-body blockquote {
    border-left: 2px solid var(--color-gold);
    padding-left: 30px;
    margin: 40px 0;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--color-gold);
}

.article-cta {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 60px;
    margin-top: 60px;
    text-align: center;
}

.article-cta h3 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 15px;
    color: var(--color-gold);
}

.article-cta p {
    margin-bottom: 30px;
    opacity: 0.8;
}

/* Modal Form Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(54, 59, 64, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-window {
    background: var(--bg-white);
    padding: 60px;
    width: 100%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-window {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px; right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-dark);
    line-height: 1;
}

.modal-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.modal-desc {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid var(--border-color);
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
    border-radius: 0;
}

.form-group input:focus {
    border-color: var(--color-gold);
}

.form-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 20px;
    margin-top: 20px;
    font-size: 14px;
}

/* Адаптивность (Responsive) */
@media (max-width: 1024px) {
    .split-bg {
        background: var(--bg-dark);
    }
    .split-container {
        flex-direction: column;
    }
    .split-left, .split-right {
        width: 100%;
    }
    .split-left {
        padding: 60px 40px !important;
    }
    .split-right {
        background: var(--bg-beige);
        padding: 60px 40px !important;
    }
    .overlap-image {
        position: relative;
        left: 0;
        transform: none;
        width: 100%;
        margin-top: 20px;
    }
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .hero-text-grid {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-action-col {
        text-align: left;
        max-width: 100%;
        margin-top: 40px;
    }
    .hero-buttons {
        align-items: flex-start;
    }
    .zigzag-item, .zigzag-item.reverse {
        flex-direction: column;
    }
    .zigzag-image {
        width: 100%;
        height: 350px;
    }
    .video-player-wrapper {
        width: 100%;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.8rem !important; line-height: 1.2; }
    h2.section-title { font-size: 2rem !important; margin-bottom: 20px !important; line-height: 1.3; }
    h3 { font-size: 1.6rem !important; line-height: 1.3; }
    
    .header-inner { padding: 15px 20px; flex-direction: column; gap: 20px; text-align: center; }
    .header-brand { flex-direction: column; gap: 10px; align-items: center; }
    .brand-descriptor { border-left: none; padding-left: 0; border-top: 1px solid var(--border-color); padding-top: 10px; text-align: center; }
    .header-nav { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .header-contacts { width: 100%; text-align: center; }
    
    .hero-section { padding-top: 40px; }
    .hero-text-grid { padding: 0 20px 40px 20px; }
    .hero-image-wrapper { height: 40vh; }
    
    .split-left { padding: 40px 20px !important; }
    .split-right { padding: 40px 20px !important; }
    
    .stats-grid { flex-direction: column; gap: 30px; }
    .stat-num { font-size: 3rem !important; }
    
    .zigzag-wrapper { gap: 60px; margin-top: 40px; }
    .zigzag-content { flex-direction: column; gap: 20px; align-items: flex-start; }
    .header-row { flex-direction: column; align-items: flex-start; gap: 15px; }
    .service-stats { margin-left: 0; gap: 30px; flex-direction: column; margin-top: 20px; }
    .zigzag-image { height: 250px; }
    
    .container { padding: 0 20px; }
    
    .agile-section, .services-section, .knowledge-base { padding: 60px 0 !important; }
    .video-section { padding: 0 0 60px 0; }
    
    .video-player-wrapper { height: 300px; width: 100%; }
    .video-title-wrapper { padding: 0 20px; margin-bottom: 30px; }
    
    .article-cta { padding: 40px 20px !important; margin-top: 40px; }
    .article-cta h3 { font-size: 1.8rem !important; }
    
    .grid-3 { grid-template-columns: 1fr; gap: 30px; }
    
    .site-footer { padding: 150px 20px 40px 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; padding-bottom: 40px; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
    
    .content-zone { padding: 40px 20px; }
    .article-h1 { font-size: 2rem !important; margin-bottom: 20px; }
    .article-hero-img { height: 250px; margin-bottom: 30px; }
    
    .modal-window { padding: 40px 20px; width: calc(100% - 40px); }
    .modal-title { font-size: 1.5rem; }
    
    .pre-footer-img-wrapper { height: 300px; margin-bottom: -100px; }
    
    /* Сброс жестких инлайн отступов */
    section[style*="padding: 120px"] { padding: 60px 0 !important; }
    section[style*="padding: 80px"] { padding: 40px 0 !important; }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem !important; }
    .btn { padding: 14px 20px; font-size: 12px; width: 100%; text-align: center; margin-bottom: 10px; }
    .hero-buttons { width: 100%; align-items: stretch; }
    .btn-inline { margin-right: 0; }
    .file-note { display: block; text-align: center; margin-top: 10px; }
    .split-left a[href^="tel"] { font-size: 1.8rem !important; }
    .split-left a[href^="mailto"] { font-size: 1.4rem !important; }
    .header-nav { gap: 10px; }
    .header-nav a { font-size: 12px; }
}
/* --- Smart Hub Styles (Avant-Garde/Minimalism) --- */
.smart-hub {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.hub-controls {
    margin-bottom: 2rem;
}

.hub-search {
    position: relative;
    max-width: 400px;
}

.hub-search input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.hub-search input:focus {
    outline: none;
    border-color: #333;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hub-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.hub-card {
    background: transparent;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 400px;
}

.hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.hub-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.hub-card__image-wrapper {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.hub-card__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hub-card:hover .hub-card__image-wrapper img {
    transform: scale(1.05);
}

/* Pattern Thumbnails */
.hub-card__image-wrapper.pattern-0 {
    background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%);
}

.hub-card__image-wrapper.pattern-1 {
    background: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
}

.hub-card__image-wrapper.pattern-2 {
    background: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
}

.hub-card__image-wrapper.pattern-3 {
    background: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%);
}

.hub-card__image-wrapper.pattern-4 {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
}

.hub-card__image-wrapper.pattern-5 {
    background: linear-gradient(to right, #43e97b 0%, #38f9d7 100%);
}

.hub-card__image-wrapper.pattern-6 {
    background: linear-gradient(to top, #30cfd0 0%, #330867 100%);
}

.hub-card__image-wrapper.pattern-7 {
    background: linear-gradient(to right, #fa709a 0%, #fee140 100%);
}

.hub-card__image-wrapper.pattern-8 {
    background: linear-gradient(to top, #5ee7df 0%, #b490ca 100%);
}

.hub-card__image-wrapper.pattern-9 {
    background: linear-gradient(to right, #f78ca0 0%, #f9748f 19%, #fd868c 60%, #fe9a8b 100%);
}

.hub-card__content {
    padding: 1.5rem;
}

.hub-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: inherit;
    line-height: 1.4;
}

.hub-card__excerpt {
    font-size: 0.9rem;
    color: inherit;
    opacity: 0.8;
    line-height: 1.6;
}

.hub-footer {
    margin-top: 3rem;
    text-align: center;
}

/* Related Posts */
.related-posts {
    margin-top: 4rem;
    margin-bottom: 6rem;
    padding-top: 2rem;
    border-top: 1px solid #eaeaea;
}

.related-posts__heading {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.related-post-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.related-post-card:hover {
    background: rgba(128, 128, 128, 0.05);
}

.related-post-card__image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}

.related-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-card__title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

/* Utilities */
.btn-clean {
    background: none;
    border: 1px solid #333;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-clean:hover {
    background: #333;
    color: #fff;
}