/* --- style.css: FINAL PRODUCTION VERSION (MOBILE EMAIL FIXED) --- */

:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --gray-color: #8c8c8c;
    --border-color: #e5e5e5;
    --accent-color: #000000;
    --blue-slogan: #1a237e;
    --transition-speed: 0.3s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition-speed); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1440px; margin: 0 auto; padding: 0 20px; }
.nav-link { font-size: 16px; font-weight: 500; color: #1a1a1a; }
.nav-link:hover { color: var(--blue-slogan); }

/* =========================================
   1. ЛОГОТИП
   ========================================= */
.logo { display: flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1; z-index: 201; }
.logo-content { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.logo-text { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo svg { width: 50px; height: 30px; stroke: #000; stroke-width: 4; stroke-linecap: square; fill: none; transition: 0.3s; }
.logo-title { font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 400; text-transform: uppercase; color: #1a1a1a; letter-spacing: 0.05em; margin-top: 5px; }
.logo-subtitle { font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 500; text-transform: uppercase; color: #666; letter-spacing: 0.08em; }
.logo-slogan { font-family: 'Manrope', sans-serif; font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--blue-slogan); letter-spacing: 0.15em; }

header .logo-content { flex-direction: row; align-items: center; gap: 12px; }
header .logo-text { align-items: flex-start; }
header .logo-subtitle { margin-left: 8px; align-self: center; }
header .logo-title { margin-top: 0; }

/* =========================================
   2. ШАПКА И КОНТАКТЫ
   ========================================= */
header {
    padding: 15px 0; position: sticky; top: 0;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05); z-index: 1000;
    margin-bottom: 40px;
}
.header-wrap { display: flex; justify-content: space-between; align-items: center; position: relative; min-height: 64px; }

/* Правая часть шапки */
.header-right { display: flex; align-items: center; }

.header-contacts {
    display: flex; flex-direction: column; align-items: flex-end;
    margin-right: 20px; line-height: 1.3;
}
.contact-phone { font-size: 16px; font-weight: 700; color: #1a1a1a; letter-spacing: -0.02em; }
.contact-email { font-size: 12px; font-weight: 500; color: #888; border-bottom: 1px solid transparent; transition: 0.3s; }
.contact-email:hover { color: #000; border-bottom-color: #000; }

/* =========================================
   3. БУРГЕР И ВЫПАДАЮЩЕЕ МЕНЮ
   ========================================= */
.burger-btn {
    display: flex; width: 35px; height: 30px; cursor: pointer;
    flex-direction: column; justify-content: center; align-items: flex-end;
    gap: 6px; z-index: 1002;
}
.burger-line { width: 100%; height: 2px; background-color: #000; transition: all 0.3s ease; }
.burger-line:nth-child(2) { width: 70%; }
.burger-btn.active .burger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.burger-btn.active .burger-line:nth-child(2) { opacity: 0; width: 0; }
.burger-btn.active .burger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); width: 100%; }

/* Контейнер меню */
.compact-menu {
    position: absolute; top: 70px; right: 0; width: 300px;
    background: #ffffff; border: 1px solid rgba(0,0,0,0.08); border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); padding: 30px;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all 0.3s ease; z-index: 1001;
}
.compact-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }

/* Список ссылок */
.menu-list { display: flex; flex-direction: column; gap: 20px; text-align: left; }
.menu-item-link { font-size: 16px; font-weight: 500; color: #1a1a1a; cursor: pointer; display: block; transition: 0.2s; }
.menu-item-link:hover { color: var(--blue-slogan); padding-left: 5px; }

/* Выпадающий список Услуг */
.dropdown-trigger { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }

.submenu {
    display: flex; flex-direction: column;
    gap: 12px;
    padding-left: 20px; border-left: 2px solid #f0f0f0; margin-left: 5px;
    max-height: 0; overflow: hidden; transition: all 0.4s ease; opacity: 0;
}
.submenu.open { max-height: 500px; margin-top: 15px; margin-bottom: 5px; opacity: 1; }
.submenu a { display: block; font-size: 15px; color: #666; text-decoration: none; line-height: 1.3; }
.submenu a:hover { color: #000; }
.arrow-down { font-size: 12px; transition: transform 0.3s; color: #999; }
.dropdown-trigger.open .arrow-down { transform: rotate(180deg); }
.menu-item-btn { background: none; border: none; text-align: left; padding: 0; }
.menu-item-btn:hover { color: var(--blue-slogan); padding-left: 5px; }


/* =========================================
   4. КНОПКИ-ТАБЛЕТКИ (PILL BUTTONS)
   ========================================= */
.pill-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; margin-bottom: 60px; }
.pill-btn {
    background: #ffffff; color: #1a1a1a; font-size: 15px; font-weight: 600;
    padding: 14px 28px; border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06); border: 1px solid #f0f0f0;
    transition: all 0.3s ease; display: inline-block; text-align: center;
}
.pill-btn:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); transform: translateY(-2px);
    color: #000; border-color: #000;
}

/* =========================================
   5. HERO БЛОК
   ========================================= */
.hero-section {
    position: relative;
    max-width: 1440px; margin: 0 auto 80px; 
    height: 80vh; min-height: 600px; max-height: 900px;
    border-radius: 24px; overflow: hidden;
    display: flex; align-items: flex-end; justify-content: flex-start;
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('../assets/img/hero-main.jpg');
    background-size: cover; background-position: center center; background-repeat: no-repeat;
    z-index: 1;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.6) 80%, rgba(0,0,0,0.9) 100%);
    z-index: 2;
}
.hero-content { 
    position: relative; z-index: 3; max-width: 800px; padding: 60px 80px;
    text-align: left; color: #fff;
}
.hero-content h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 300; line-height: 1.1; margin-bottom: 25px; letter-spacing: -0.02em; }
.hero-content p { font-size: 18px; opacity: 0.9; line-height: 1.6; max-width: 650px; margin: 0; font-weight: 300; }

/* =========================================
   6. ВНУТРЕННИЕ СТИЛИ
   ========================================= */
.importance-block { padding: 80px 0; max-width: 900px; margin: 0 auto; font-size: 20px; line-height: 1.6; }
.requisites-qr {
    display: block;
    width: 100%;
    max-width: 260px;
    margin: 10px 0 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.contact-section { margin-top: 80px; }
.contact-card {
    background: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    margin: 0 auto 80px;
}
.contact-card h2 { font-size: 28px; font-weight: 400; margin-bottom: 10px; }
.contact-subtitle { color: var(--gray-color); margin-bottom: 30px; }
.contact-form { display: grid; gap: 18px; }
.contact-field { display: grid; gap: 8px; font-size: 14px; color: #444; }
.contact-error { color: #b00020; font-size: 12px; min-height: 16px; }
.contact-status { font-size: 14px; color: #111; }
.contact-field--hidden { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-field input,
.contact-field textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-field input:focus,
.contact-field textarea:focus {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
    outline: none;
}
.contact-submit {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    justify-self: start;
}
.contact-submit:hover { background: #222; transform: translateY(-1px); }
.portfolio-list { margin-top: 40px; border-top: 1px solid var(--border-color); }
.accordion-item { border-bottom: 1px solid var(--border-color); }
.accordion-header { padding: 40px 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.3s; }
.accordion-header:hover { padding-left: 20px; background-color: #fafafa; }
.accordion-title-row { display: flex; gap: 40px; align-items: baseline; }
.acc-title { font-size: 24px; font-weight: 400; }
.acc-meta { color: var(--gray-color); font-size: 16px; }
.acc-arrow { font-size: 24px; transition: transform 0.4s ease; }
.accordion-header.active .acc-arrow { transform: rotate(45deg); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.6s ease; opacity: 0; }
.accordion-content.open { opacity: 1; padding-bottom: 60px; }
.project-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 30px; }
.project-gallery img { width: 100%; height: 350px; object-fit: cover; background: #f0f0f0; }
.timeline { max-width: 800px; margin: 0 auto; padding: 40px 0; }
.timeline-item { padding-left: 50px; position: relative; border-left: 1px solid #e0e0e0; padding-bottom: 60px; }
.timeline-item:last-child { border-left: 1px solid transparent; }
.timeline-marker { position: absolute; left: -6px; top: 0; width: 11px; height: 11px; background: #000; border-radius: 50%; }
.timeline-title { font-size: 24px; font-weight: 400; margin-bottom: 10px; line-height: 1.2; }
.timeline-desc { color: var(--gray-color); font-size: 16px; }
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border-color); border: 1px solid var(--border-color); }
.tool-item { background: #fff; padding: 40px; display: flex; align-items: flex-start; gap: 20px; }
.tool-icon { font-size: 24px; padding: 15px; background: #f5f5f5; border-radius: 50%; min-width: 60px; text-align: center; }
.link-to-realization { background: #111; color: #fff; padding: 60px; display: flex; justify-content: space-between; align-items: center; margin-top: 60px; transition: 0.3s; }
.link-to-realization:hover { background: #222; padding-left: 70px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.feature-card { background: #f9f9f9; padding: 30px; border-left: 2px solid #000; }

.schema-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border-color); border-left: 1px solid var(--border-color); }
.grid-item { background-color: #fff; padding: 30px; min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); position: relative; cursor: pointer; overflow: hidden; }
.item-large { grid-column: span 2; }
.card-bg-img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-size: cover; background-position: center; opacity: 0.05; transition: opacity 0.5s ease; z-index: 0; filter: grayscale(100%); }
.grid-item:hover .card-bg-img { opacity: 0.25; }
.grid-item:hover { background-color: #111; color: #fff; }
.grid-item h3, .grid-item p { position: relative; z-index: 2; }
.grid-item h3 { font-size: 20px; font-weight: 400; margin-bottom: 10px; }
.grid-item p { color: var(--gray-color); font-size: 13px; }
.grid-item:hover p { color: rgba(255,255,255,0.7); }
.arrow-link { display: inline-flex; align-self: flex-end; width: 24px; height: 24px; transition: transform 0.4s, color 0.3s; color: inherit; z-index: 2; }
.arrow-link svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.grid-item:hover .arrow-link { transform: translate(5px, -5px); color: #fff; }

/* =========================================
   7. ФУТЕР И АНИМАЦИЯ
   ========================================= */
footer { background-color: #111; color: #fff; padding: 100px 0 50px; margin-top: 100px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.footer-col h4 { color: #666; font-size: 12px; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col a { display: block; margin-bottom: 12px; opacity: 0.7; font-size: 14px; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
footer .logo svg { stroke: #fff; }
footer .logo-title { color: #fff; }
footer .logo-slogan { color: #8c9eff; }

.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 2000;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: #fff;
    color: #1a1a1a;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.modal-header h3 { font-size: 20px; font-weight: 500; }
.modal-close {
    border: none;
    background: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #1a1a1a;
}
.modal-body p { margin-bottom: 10px; }
.modal-body a { color: inherit; text-decoration: underline; }
body.modal-open { overflow: hidden; }

/* =========================================
   8. АДАПТИВНОСТЬ
   ========================================= */
@media (max-width: 900px) {
    /* --- ШАПКА --- */
    .header-contacts { margin-right: 15px; }
    /* Возвращаем отображение почты, но делаем шрифт меньше */
    .contact-email { display: block; font-size: 11px; }
    .contact-phone { font-size: 14px; margin-bottom: 2px; }

    /* Меню на телефоне */
    .compact-menu { width: 90%; right: 5%; top: 70px; }
    
    /* Сетки */
    .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .link-to-realization { flex-direction: column; gap: 20px; align-items: flex-start; padding: 40px; }
    .features-grid, .tools-grid, .project-gallery { grid-template-columns: 1fr; }
    .accordion-title-row { flex-direction: column; gap: 5px; }
    .schema-grid { grid-template-columns: 1fr; border-left: none; }
    .grid-item { border-left: 1px solid var(--border-color); }
    .item-large { grid-column: span 1; }

    /* Кнопки (в столбик) */
    .pill-nav { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 40px; }
    .pill-btn { width: 100%; font-size: 15px; padding: 15px; border-radius: 12px; background: #f9f9f9; }

    /* Hero (Мобильная версия) */
    .hero-section { min-height: 420px; height: auto; border-radius: 0; margin-left: -20px; margin-right: -20px; width: calc(100% + 40px); align-items: flex-end; }
    .hero-bg { background-position: 65% center; }
    .hero-overlay { background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.2) 100%); }
    .hero-content { padding: 30px 20px; }
    .hero-content h1 { font-size: 28px; margin-bottom: 15px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
    .hero-content p { font-size: 15px; text-shadow: 0 1px 5px rgba(0,0,0,0.5); }
}

@media (max-width: 600px) {
    header { margin-bottom: 24px; }
    .header-wrap { flex-direction: column; align-items: stretch; gap: 10px; min-height: unset; }
    .header-wrap nav { width: 100%; }
    .header-right { width: 100%; justify-content: space-between; }
    .header-contacts { align-items: flex-start; margin-right: 0; }
    .contact-phone { font-size: 14px; }
    .contact-email { font-size: 11px; }
    .logo { align-items: flex-start; }
    header .logo-content { gap: 10px; }
    header .logo-text { gap: 2px; align-items: flex-start; }
    header .logo-subtitle { margin-left: 6px; }
    .logo-row { gap: 6px; }
    .logo svg { width: 40px; height: 24px; }
    .logo-title { font-size: 16px; }
    .logo-subtitle { font-size: 10px; }
    .logo-slogan { font-size: 8px; }
    .compact-menu { width: calc(100% - 20px); right: 10px; left: 10px; }

    .importance-block { padding: 40px 0; font-size: 16px; }
    .importance-block h1,
    .importance-block h2 { font-size: 24px !important; margin-bottom: 20px !important; }
    .importance-block h3 { font-size: 20px !important; }

    .contact-section { margin-top: 50px; }
    .contact-card { padding: 24px; margin-bottom: 60px; }
    .contact-card h2 { font-size: 22px; }
    .contact-submit { width: 100%; justify-self: stretch; }

    .hero-section { min-height: 320px !important; }
    .hero-content { padding: 24px 18px; }
    .hero-content h1 { font-size: 24px; }
    .hero-content p { font-size: 14px; }

    .accordion-header { padding: 24px 0; }
    .accordion-header:hover { padding-left: 0; }
    .accordion-title-row { gap: 12px; }
    .acc-title { font-size: 20px; }
    .acc-meta { font-size: 14px; }
    .acc-arrow { font-size: 20px; }
    .stage-number { font-size: 14px; margin-right: 10px; min-width: 24px; }

    .project-gallery img { height: 240px; }

    .timeline { padding: 20px 0; }
    .timeline-item { padding-left: 35px; padding-bottom: 40px; }
    .timeline-title { font-size: 20px; }
    .timeline-desc { font-size: 14px; }

    .tool-item { flex-direction: column; padding: 24px; }
    .tool-icon { min-width: auto; }

    .grid-item { padding: 20px; min-height: 220px; }
    .grid-item h3 { font-size: 18px; }
    .grid-item p { font-size: 12px; }

    .link-to-realization { padding: 30px; }
    .link-to-realization h3 { font-size: 22px !important; }
}

@media (max-width: 420px) {
    .container { padding: 0 16px; }
    .hero-section { margin-left: -16px; margin-right: -16px; width: calc(100% + 32px); }
    .project-gallery img { height: 200px; }
    .pill-btn { font-size: 14px; padding: 14px; }
    .modal-content { padding: 20px; }
    .footer-grid { gap: 20px; }
}
