/* ===== style/style.css ===== */
/* ===== FONTS ===== */
@font-face {
    font-family: 'Manrope';
    src: url('/g/fonts/manrope/manrope-r.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Manrope';
    src: url('/g/fonts/manrope/manrope-b.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Onest';
    src: url('/g/fonts/onest/onest-r.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Manrope', 'Onest', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fe856b;
    color: #fff;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s;
    box-shadow: 0 4px 14px rgba(254, 133, 107, 0.35);
}
.btn:hover { background: #e86f55; transform: translateY(-2px); }

.btn-outline {
    background: transparent;
    color: #fe856b;
    border: 2px solid #fe856b;
    box-shadow: none;
    margin-top: 16px;
}
.btn-outline:hover { background: #fe856b; color: #fff; }

/* ===== HEADER ===== */
.header {
    padding: 12px 0;
    border-bottom: 1px solid #eaeaea;
    background: rgba(255,255,255,0.95);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
}
.logo img { height: 48px; width: auto; }
.logo span { letter-spacing: -0.5px; }

.header-contacts {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.header-contacts a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.header-contacts a:hover { color: #fe856b; }
.header-contacts .phone { font-weight: 600; }
.header-contacts svg { flex-shrink: 0; }

/* ===== КНОПКА В ШАПКЕ ===== */
.header-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
    color: #fff;
}
.header-btn .btn-text-short { display: none; }

/* ===== БУРГЕР-МЕНЮ ===== */
.burger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    z-index: 1001;
}
.burger-btn span {
    display: block;
    width: 28px;
    height: 3px;
    background: #1a1a1a;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}
.burger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.burger-btn.active span:nth-child(2) { opacity: 0; }
.burger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
    transition: all 0.3s ease;
}
.main-nav a {
    font-size: 0.9rem;
    color: #333;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.is-current {
    color: #fe856b;
    border-bottom-color: #fe856b;
}

/* ===== PROBLEMS ===== */
.problems { padding: 60px 0; background: #f8f9fa; }
.problems .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}
.problems .card {
    background: #fff;
    padding: 28px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    text-align: center;
    transition: transform 0.2s;
}
.problems .card:hover { transform: translateY(-6px); }
.problems .card .icon {
    font-size: 2.4rem;
    margin-bottom: 0.75rem;
    color: #83cdd4;
}
.problems .card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.problems .card p { color: #555; font-size: 0.95rem; }

/* ===== ABOUT ===== */
.about { padding: 60px 0; }
.about .content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.about .content img {
    border-radius: 16px;
    width: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
    background: #f0f9fa;
}
.about ul {
    list-style: none;
    margin-top: 1rem;
}
.about ul li {
    padding: 6px 0;
    padding-left: 28px;
    position: relative;
}
.about ul li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #83cdd4;
    font-weight: 700;
}

/* ===== STAGES ===== */
.stages { padding: 60px 0; background: #f8f9fa; }
.stages .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}
.stages .card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.stages .card:hover { transform: translateY(-4px); }
.stages .card .step {
    font-weight: 700;
    color: #83cdd4;
    font-size: 0.9rem;
    letter-spacing: 1px;
}
.stages .card h3 { font-size: 1.3rem; margin: 0.5rem 0; }
.stages .card img {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 1/1;
    object-fit: cover;
    margin-bottom: 1rem;
    background: #e8f4f5;
}
.stages .card ul {
    list-style: none;
    padding: 0;
    font-size: 0.95rem;
}
.stages .card ul li {
    padding: 4px 0;
    padding-left: 24px;
    position: relative;
}
.stages .card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #fe856b;
    font-weight: 700;
}

/* ===== CONTENT SECTION (для about и других) ===== */
.content-section {
    padding: 60px 0;
    background: #ffffff;
}
.content-section:nth-child(even) { background: #f8f9fa; }
.content-section .container { max-width: 820px; }

.content-section h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    margin-bottom: 1rem;
    color: #1a1a1a;
}
.content-section p {
    font-size: 1.05rem;
    color: #444;
    margin-bottom: 1.2rem;
    line-height: 1.7;
}
.content-section .quote {
    font-style: italic;
    font-size: 1.15rem;
    color: #555;
    border-left: 4px solid #83cdd4;
    padding-left: 24px;
    margin: 1.5rem 0;
    background: rgba(131, 205, 212, 0.06);
    padding: 20px 24px;
    border-radius: 0 12px 12px 0;
}

/* ===== PROBLEMS GRID (для about) ===== */
.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}
.problems-grid .item {
    background: #fff;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f0f0f0;
}
.problems-grid .item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.problems-grid .item .num {
    font-size: 1.4rem;
    font-weight: 700;
    color: #83cdd4;
    flex-shrink: 0;
    min-width: 32px;
}
.problems-grid .item h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: #1a1a1a;
}
.problems-grid .item p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* ===== CONTACTS ===== */
.contacts-section {
    padding: 60px 0;
    background: #ffffff;
}
.contacts-section .container { max-width: 900px; }

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 1rem;
}

.contact-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
}
.contact-card .icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    color: #83cdd4;
}
.contact-card .icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}
.contact-card .label {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.contact-card .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}
.contact-card .value a {
    transition: color 0.2s;
}
.contact-card .value a:hover {
    color: #fe856b;
}

/* ===== SOCIAL LINKS ===== */
.social-section {
    padding: 40px 0 60px;
    background: #f8f9fa;
}
.social-section .container { max-width: 800px; }
.social-section h2 {
    text-align: center;
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}
.social-links a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    background: #fe856b;
    color: #fff;
    border-color: #fe856b;
}
.social-links a svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* ===== MAP ===== */
.map-section {
    padding: 0 0 60px;
    background: #ffffff;
}
.map-section .container { max-width: 900px; }
.map-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: #f0f9fa;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.1rem;
    border: 1px solid #eaeaea;
}

/* ===== CTA ===== */
.cta {
    padding: 60px 0;
    text-align: center;
    background: linear-gradient(135deg, #fef6f3 0%, #f0f9fa 100%);
}
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.cta p {
    max-width: 600px;
    margin: 1rem auto 2rem;
    font-size: 1.1rem;
    color: #555;
}

/* ===== FOOTER ===== */
.footer {
    padding: 40px 0 20px;
    background: #1a1a1a;
    color: #ccc;
    font-size: 0.9rem;
}
.footer .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}
.footer .logo { color: #fff; }
.footer .logo img { height: 40px; }
.footer h4 { color: #fff; margin-bottom: 0.75rem; }
.footer a { color: #aaa; transition: color 0.2s; }
.footer a:hover { color: #fe856b; }
.footer .socials {
    display: flex;
    gap: 12px;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.footer .socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2a2a2a;
    color: #fff;
    transition: background 0.2s;
}
.footer .socials a:hover { background: #fe856b; }
.footer .socials svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
.footer .bottom {
    border-top: 1px solid #2a2a2a;
    margin-top: 2rem;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
}

/* ===== POPUP ===== */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}
.popup-overlay.active { display: flex; }
.popup {
    background: #fff;
    max-width: 480px;
    width: 90%;
    padding: 32px 28px;
    border-radius: 20px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    line-height: 1;
}
.popup-close:hover { color: #333; }
.popup h2 { margin-bottom: 1rem; font-size: 1.5rem; text-align: center; }
.popup label { display: block; margin-top: 12px; font-weight: 500; font-size: 0.9rem; }
.popup input, .popup textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-top: 4px;
    transition: border 0.2s;
    font-family: inherit;
}
.popup input:focus, .popup textarea:focus { border-color: #fe856b; outline: none; }
.popup textarea { min-height: 80px; resize: vertical; }
.popup .checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    font-size: 0.85rem;
    color: #555;
}
.popup .checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}
.popup .btn { width: 100%; justify-content: center; margin-top: 20px; }

/* ===== POPUP MESSAGES ===== */
.popup-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid #2e7d32;
}
.popup-error {
    background: #fde8e8;
    color: #c0392b;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid #c0392b;
}

/* ============================================================
   ===== АДАПТИВНОСТЬ =====
   ============================================================ */

/* ===== ПЛАНШЕТЫ (до 992px) ===== */
@media (max-width: 992px) {
    .about .content { grid-template-columns: 1fr; }
    .about .content img { order: -1; max-height: 400px; }
    
    .hero {
        padding: 40px 0 30px;
    }
    .hero-content {
        margin-bottom: 30px;
    }
    .hero-content h1 {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    .hero-content .description {
        font-size: 1rem;
        padding: 0 10px;
    }
    .hero-video-wrapper {
        max-width: 100%;
        border-radius: 16px;
        margin: 0 10px;
    }
}

/* ===== ТЕЛЕФОНЫ (до 768px) ===== */
@media (max-width: 768px) {
    /* ----- БУРГЕР МЕНЮ ----- */
    .burger-btn { display: flex; }
    .header-inner { flex-wrap: nowrap; }
    .logo { flex: 1; }
    .header-contacts { display: none; }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        border-top: none;
        padding: 16px 0;
        gap: 8px;
        margin-top: 0;
    }
    .main-nav.open { display: flex; }
    .main-nav a {
        font-size: 1rem;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
        white-space: normal;
    }
    .main-nav a:last-child { border-bottom: none; }

    /* ----- HERO ----- */
    .hero {
        padding: 30px 0 20px;
    }
    .hero .container {
        padding: 0 12px;
    }
    .hero-content {
        margin-bottom: 24px;
        padding: 0 5px;
    }
    .hero-content .subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    .hero-content h1 {
        font-size: clamp(1.6rem, 7vw, 2.4rem);
        line-height: 1.1;
    }
    .hero-content .tagline {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }
    .hero-content .description {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
        padding: 0 5px;
    }
    .hero-content .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    /* ----- ВИДЕО НА ВЕСЬ ЭКРАН ----- */
    .hero-video-wrapper {
        max-width: 100%;
        border-radius: 12px;
        margin: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
    }
    .hero-video {
        aspect-ratio: 16 / 9;
        width: 100%;
        height: auto;
        min-height: 200px;
        object-fit: cover;
    }

    /* ----- ОСТАЛЬНЫЕ СТИЛИ ----- */
    .btn { padding: 12px 24px; font-size: 0.95rem; }

    .hero-page { padding: 40px 0 30px; }
    .hero-page .subtitle { font-size: 1rem; }

    .content-section { padding: 40px 0; }
    .content-section p { font-size: 0.95rem; }
    .problems-grid { grid-template-columns: 1fr; }
    .problems-grid .item { padding: 16px; }

    .problems .grid { grid-template-columns: 1fr; }
    .stages .grid { grid-template-columns: 1fr; }
    .footer .grid { grid-template-columns: 1fr 1fr; }
    .footer .bottom { flex-direction: column; text-align: center; }

    .contacts-grid { grid-template-columns: 1fr; gap: 16px; }
    .contact-card { padding: 20px; }
    .social-links { gap: 12px; }
    .social-links a { width: 52px; height: 52px; }
    .social-links a svg { width: 24px; height: 24px; }
}

/* ===== МАЛЕНЬКИЕ ТЕЛЕФОНЫ (до 480px) ===== */
@media (max-width: 480px) {
    .logo { font-size: 0.95rem; }
    .logo img { height: 36px; }
    
    /* ----- HERO ----- */
    .hero {
        padding: 20px 0 16px;
    }
    .hero .container {
        padding: 0 10px;
    }
    .hero-content {
        margin-bottom: 16px;
    }
    .hero-content .subtitle {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }
    .hero-content h1 {
        font-size: clamp(1.4rem, 8vw, 1.8rem);
    }
    .hero-content .tagline {
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
    }
    .hero-content .description {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1.2rem;
        padding: 0 3px;
    }
    .hero-content .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        width: 100%;
        max-width: 280px;
        border-radius: 40px;
    }

    /* ----- ВИДЕО НА ВЕСЬ ЭКРАН ----- */
    .hero-video-wrapper {
        border-radius: 8px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        margin: 0 -5px;
        width: calc(100% + 10px);
        max-width: calc(100% + 10px);
        margin-left: -5px;
    }
    .hero-video {
        aspect-ratio: 16 / 9;
        width: 100%;
        height: auto;
        min-height: 180px;
        object-fit: cover;
        border-radius: 8px;
    }

    /* ----- ОСТАЛЬНЫЕ СТИЛИ ----- */
    .hero-page h1 { font-size: 1.8rem; }
    .footer .grid { grid-template-columns: 1fr; text-align: center; }
    .footer .socials { justify-content: center; }
    .popup { padding: 24px 16px; }
    
    .header-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
    .header-btn .btn-text-full { display: none; }
    .header-btn .btn-text-short { display: inline; }
    
    .social-links { gap: 10px; }
    .social-links a { width: 48px; height: 48px; }
    .social-links a svg { width: 22px; height: 22px; }
}

/* ===== ОЧЕНЬ УЗКИЕ ТЕЛЕФОНЫ (до 400px) ===== */
@media (max-width: 400px) and (orientation: portrait) {
    .hero-video {
        aspect-ratio: 16 / 9;
        min-height: 160px;
        height: auto;
    }
    .hero-content h1 {
        font-size: 1.3rem;
    }
    .hero-content .description {
        font-size: 0.8rem;
    }
    .hero-content .btn {
        font-size: 0.8rem;
        padding: 8px 16px;
        max-width: 240px;
    }
}

/* ===== АЛЬБОМНАЯ ОРИЕНТАЦИЯ НА ТЕЛЕФОНАХ ===== */
@media (max-width: 800px) and (orientation: landscape) {
    .hero {
        padding: 20px 0 15px;
    }
    .hero-content {
        margin-bottom: 16px;
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content .description {
        font-size: 0.9rem;
        max-width: 600px;
        margin: 0 auto 1.2rem;
    }
    .hero-video-wrapper {
        max-width: 70%;
        margin: 0 auto;
        border-radius: 12px;
    }
    .hero-video {
        aspect-ratio: 16 / 9;
        min-height: 150px;
    }
}

/* ===== ОТКЛЮЧАЕМ АВТОПЛЕЙ НА УСТРОЙСТВАХ С ОГРАНИЧЕННЫМ ТРАФИКОМ ===== */
@media (prefers-reduced-data: reduce) {
    .hero-video {
        display: none;
    }
    .hero-video-wrapper::after {
        content: "🎬 Видео доступно при подключении к Wi-Fi";
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f0f0f0;
        color: #888;
        font-size: 0.9rem;
        padding: 40px 20px;
        aspect-ratio: 16 / 9;
        border-radius: 12px;
    }
}