/* БАЗОВЫЕ СТИЛИ И СЛОЙ 1 */
body {
    margin: 0; padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #E6E6E3;
    color: #1A1A1A;
    line-height: 1.5;
    display: flex; flex-direction: column; min-height: 100vh;
}

/* ЗАЩИТА КОНТЕНТА */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Разрешаем выделение только в формах */
input, textarea, .modal-desc {
    -webkit-user-select: text;
    user-select: text;
}

img {
    pointer-events: none;
    -webkit-user-drag: none;
}

/* ЖУРНАЛЬНЫЙ ЛИСТ */
.magazine-sheet {
    max-width: 1100px; width: 100%; margin: 30px auto;
    background-color: #FFFFFF;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.06);
    overflow: hidden; box-sizing: border-box;
    display: flex; flex-direction: column; flex-grow: 1;
}

.container { padding: 0 40px; }

/* ШАПКА */
header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #EAEAEA;
    padding: 20px 0; 
}
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.logo-box { display: flex; flex-direction: column; }
.logo { font-weight: 600; font-size: 1.3rem; letter-spacing: 2px; text-transform: uppercase; color: #1A1A1A; line-height: 1; }
.logo span { color: #D32F2F; }
.logo-sub { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 3px; color: #777; margin-top: 4px; }

/* ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКОВ */
.lang-switcher {
    display: flex; align-items: center; gap: 8px; font-size: 0.75rem; font-weight: 500;
}
.lang-switcher button {
    background: none; border: none; cursor: pointer; color: #AAA; padding: 5px; transition: color 0.2s; font-family: 'Inter', sans-serif;
}
.lang-switcher button:hover, .lang-switcher button.active { color: #1A1A1A; }
.lang-switcher .divider { color: #EEE; cursor: default; }

.menu { display: flex; gap: 20px; }
.menu a { color: #666; text-decoration: none; font-size: 0.8rem; font-weight: 500; text-transform: uppercase; transition: color 0.2s; }
.menu a:hover { color: #1A1A1A; }

/* КОНТЕНТ */
.content-block {
    background-color: #F8F8F5; border: 1px solid #EAE6E1;
    padding: 35px 30px; margin-top: 25px; margin-bottom: 10px;
}

.section-title {
    font-size: 1.3rem; font-weight: 400; margin: 0; text-transform: uppercase; letter-spacing: 1.5px; display: inline-block;
}
.section-title::after { content: ''; display: block; width: 100%; height: 2px; background: #D32F2F; margin-top: 8px; }

/* СЕТКИ */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }
.service-card { background: #FFFFFF; border: 1px solid #EAE6E1; padding: 25px 20px; cursor: pointer; transition: all 0.25s ease; }
.service-card:hover { border-color: #A0A0A0; transform: translateY(-2px); }
.service-card h3 { margin: 0 0 6px 0; font-size: 1rem; font-weight: 500; color: #1A1A1A; }
.service-card p { margin: 0; color: #777; font-size: 0.8rem; font-weight: 300; }

.portfolio-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 25px; }
.filter-btn {
    background: #FFFFFF; border: 1px solid #EAE6E1; padding: 8px 16px;
    font-family: 'Inter', sans-serif; font-size: 0.8rem; text-transform: uppercase;
    letter-spacing: 1px; color: #777; cursor: pointer; transition: all 0.2s ease;
}
.filter-btn:hover { border-color: #A0A0A0; color: #1A1A1A; }
.filter-btn.active { background: #1A1A1A; color: #FFFFFF; border-color: #1A1A1A; }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card { background: #FFFFFF; border: 1px solid #EAE6E1; cursor: pointer; transition: all 0.25s ease; display: none; flex-direction: column; }
.card:hover { transform: translateY(-3px); border-color: #A0A0A0; }
.card img { width: 100%; height: 200px; object-fit: cover; border-bottom: 1px solid #EAE6E1; background-color: #EFEFEF; }
.card-content { padding: 15px 20px; }
.card-content h3 { margin: 0 0 4px 0; font-size: 1rem; font-weight: 500; }
.card-content p { margin: 0; color: #D32F2F; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }

.load-more-wrapper { text-align: center; margin-top: 30px; display: none; }
.load-more-btn {
    background: transparent; border: 1px solid #A0A0A0; padding: 10px 24px;
    text-transform: uppercase; letter-spacing: 1.5px; color: #1A1A1A; cursor: pointer; transition: all 0.2s ease;
}

/* МОДАЛКА */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 10, 0.95); z-index: 2000; overflow-y: auto; padding: 30px 10px; box-sizing: border-box;
}
.modal-content { max-width: 850px; margin: 0 auto; background: #151515; padding: 40px; border: 1px solid #2A2A2A; position: relative; }
.close-btn { position: absolute; top: 20px; right: 20px; font-size: 2.5rem; color: #888; cursor: pointer; line-height: 1; transition: color 0.2s; }
.close-btn:hover { color: #D32F2F; }
.modal-images img { width: 100%; height: auto; margin-bottom: 20px; display: block; border: 1px solid #2A2A2A; }
.modal-title { font-size: 1.5rem; font-weight: 400; margin-bottom: 15px; text-transform: uppercase; color: #FFFFFF; border-bottom: 1px solid #2A2A2A; padding-bottom: 15px; }
.modal-desc { color: #A0A0A0; line-height: 1.7; font-size: 0.95rem; font-weight: 300; white-space: pre-wrap; }

/* ФУТЕР */
footer { padding: 40px 0; text-align: center; background: #F8F8F5; border-top: 1px solid #EAE6E1; color: #666; margin-top: auto; }
.footer-wrapper { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 30px; text-align: left; }
.footer-h3 { font-weight: 400; color: #1A1A1A; font-size: 1.1rem; text-transform: uppercase; margin: 0 0 15px 0; }
.footer-p a { color: #555; text-decoration: none; font-size: 0.9rem; }
.footer-form { display: flex; flex-direction: column; gap: 10px; }
.footer-form input, .footer-form textarea {
    width: 100%; padding: 12px 15px; border: 1px solid #EAE6E1; background: #FFFFFF; font-family: 'Inter', sans-serif; box-sizing: border-box; outline: none;
}
.footer-form button {
    padding: 12px; background: #1A1A1A; color: #FFFFFF; border: none; text-transform: uppercase; cursor: pointer; transition: background 0.2s;
}
.footer-form button:hover { background: #D32F2F; }
.success-msg { display: none; color: #2E7D32; font-weight: 500; padding: 15px; border: 1px solid #C8E6C9; background: #E8F5E9; }

.footer-card { background: #FFFFFF; padding: 20px; border: 1px solid #EAE6E1; min-width: 260px; }
.footer-card-name { margin: 0 0 6px 0; color: #1A1A1A; font-size: 0.9rem; }
.footer-card-detail { margin: 0 0 3px 0; font-size: 0.85rem; color: #666; }
.footer-card-iban { margin: 0; font-size: 0.85rem; color: #333; font-family: monospace; }
.copyright { font-size: 0.7rem; color: #999; margin-top: 40px; text-transform: uppercase; letter-spacing: 1px; }

/* АДАПТАЦИЯ */
@media (max-width: 1140px) {
    .magazine-sheet { margin: 0 auto; border-radius: 0; box-shadow: none; }
    .container { padding: 0 20px; }
}
@media (max-width: 768px) {
    .nav-wrapper { flex-direction: column; gap: 15px; align-items: center; text-align: center; }
    .menu { justify-content: center; flex-wrap: wrap; }
    .footer-wrapper { flex-direction: column; }    
}
/* ЕДИНЫЙ СТИЛЬ ДЛЯ ВСЕХ ЗАГОЛОВКОВ-БЛОКОВ */
.section-title-wrapper {
    margin-bottom: 35px; /* Вот он — наш системный отступ от красной линии до контента */
    border-bottom: 1px solid #EAEAEA; /* Тонкая серая линия для структуры (по желанию) */
    padding-bottom: 10px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 400;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
    position: relative;
}

/* Красная линия теперь жестко привязана к заголовку */
.section-title::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px; /* Сделал чуть жирнее для акцента */
    background: #D32F2F;
    position: absolute;
    bottom: -11px; /* Расстояние от текста до линии */
    left: 0;
}

/* Убираем лишние отступы у фильтров, так как теперь их дает wrapper */
.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 0; 
    margin-bottom: 25px;
}