/* ============================================================
   style.css
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #fff;
    scroll-behavior: smooth;
}

/* --- TOP STRIP --- */
.top-strip {
    height: 180px;
    width: 100%;
    background-color: #87CEEB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.top-strip img {
    width: 313px;
    height: 68px;
    display: block;
    margin-left: 250px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-right: 250px;
}

.nav a {
    color: #000;
    text-decoration: none;
    font-weight: 700;
    font-size: 17px;
    font-family: Arial, Helvetica, sans-serif;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: border-color 0.15s ease;
    cursor: pointer;
}

.nav a:hover {
    border-bottom-color: #000;
}

.nav .search-icon {
    display: inline-flex;
    align-items: center;
    color: #000;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: border-color 0.15s ease;
}

.nav .search-icon:hover {
    border-bottom-color: #000;
}

.nav .search-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* --- HERO --- */
.hero-text {
    padding: 70px 40px 20px 290px;
    font-family: Helvetica, Arial, sans-serif;
}

.hero-text h1 {
    font-size: 46px;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.1;
    margin-bottom: 22px;
    letter-spacing: -0.5px;
    -webkit-text-stroke: 0.4px #fff;
}

.hero-text p {
    font-size: 26px;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.3;
    letter-spacing: -0.2px;
    -webkit-text-stroke: 0.3px #fff;
}

/* --- SIGN IN --- */
.form-section {
    padding: 10px 40px 60px 290px;
    font-family: Helvetica, Arial, sans-serif;
}

.form-section h2 {
    font-size: 32px;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 24px;
    letter-spacing: -0.3px;
    -webkit-text-stroke: 0.3px #fff;
}

/* Security warning — голубоватая, острые углы */
.security-warning {
    background: linear-gradient(135deg, #eef7fd 0%, #e3f1fb 100%);
    border: 1px solid #a8cfe8;
    border-left: 4px solid #4a90c4;
    border-radius: 3px;
    padding: 16px 20px;
    margin-bottom: 28px;
    max-width: 720px;
    font-family: Helvetica, Arial, sans-serif;
    color: #1e3a52;
    line-height: 1.5;
    box-shadow: 0 1px 4px rgba(74, 144, 196, 0.10);
}

.security-warning-body { min-width: 0; }

.security-warning-title {
    font-size: 14px;
    font-weight: 700;
    color: #2c6693;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.security-warning-text {
    font-size: 14px;
    color: #1e3a52;
    line-height: 1.5;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    max-width: 720px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.form-field .req {
    color: #b91c1c;
    font-weight: 700;
    margin-left: 2px;
}

.form-field input {
    height: 44px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 16px;
    color: #1a1a1a;
    font-family: inherit;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input::placeholder { color: #aaa; }

.form-field input:focus {
    border-color: #87CEEB;
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.25);
}

.form-field input.invalid {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}

.field-error {
    font-size: 12px;
    color: #b91c1c;
    margin-top: 4px;
    font-weight: 500;
}

.field-error:empty { display: none; }

.form-field.full { grid-column: 1 / -1; }

.form-submit {
    grid-column: 1 / -1;
    margin-top: 8px;
    height: 48px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
}

.form-submit:hover { background: #2a2a2a; }

/* --- FIND SUPPORT --- */
.find-support {
    width: 882px;
    height: 350px;
    display: flex;
    align-items: stretch;
    margin: 20px 40px 80px 290px;
    border: 1px solid #d8d8d8;
    font-family: Helvetica, Arial, sans-serif;
    overflow: hidden;
}

.find-support .text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 40px 40px 60px;
}

.find-support h2 {
    font-size: 44px;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.6px;
    -webkit-text-stroke: 0.4px #fff;
}

.find-support p {
    font-size: 20px;
    font-weight: 400;
    color: #2a2a2a;
    line-height: 1.4;
    letter-spacing: -0.2px;
    max-width: 400px;
    -webkit-text-stroke: 0.2px #fff;
}

.find-support .image {
    flex: 0 0 50%;
    height: 100%;
}

.find-support .image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* --- USEFUL --- */
.useful {
    background: #f1f1f1;
    padding: 70px 40px 90px 290px;
    font-family: Helvetica, Arial, sans-serif;
}

.useful h2 {
    font-size: 48px;
    font-weight: 400;
    color: #1a1a1a;
    letter-spacing: -0.6px;
    margin-bottom: 50px;
    -webkit-text-stroke: 0.3px #f1f1f1;
}

.useful-grid {
    display: grid;
    grid-template-columns: repeat(3, 416px);
    gap: 40px;
    align-items: stretch;
}

.useful-card {
    width: 416px;
    height: 484px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.useful-card:hover { border-color: #cfcfcf; }

.useful-card .card-image {
    width: 100%;
    height: 260px;
    flex: 0 0 260px;
    overflow: hidden;
    background: #f1f1f1;
}

.useful-card .card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.useful-card .card-body {
    flex: 1 1 auto;
    padding: 28px 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
}

.useful-card h3 {
    font-size: 24px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 14px;
    line-height: 1.2;
    letter-spacing: -0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(24px * 1.2 * 2);
}

.useful-card p {
    font-size: 16px;
    font-weight: 400;
    color: #3a3a3a;
    line-height: 1.5;
    letter-spacing: -0.1px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
}

/* --- FOOTER --- */
.footer {
    background: #000;
    color: #fff;
    padding: 70px 40px 60px 290px;
    font-family: Helvetica, Arial, sans-serif;
}

.footer-top {
    display: flex;
    gap: 80px;
    margin-bottom: 50px;
}

.footer-col { display: flex; flex-direction: column; }

.footer-col h4 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 26px;
    letter-spacing: 0.2px;
}

.footer-col a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 18px;
    border-bottom: 1px solid transparent;
    align-self: flex-start;
    padding-bottom: 1px;
    transition: border-color 0.15s ease;
    cursor: pointer;
}

.footer-col a:hover { border-bottom-color: #fff; }

.footer hr {
    border: 0;
    border-top: 1px solid #3a3a3a;
    margin: 0 0 30px 0;
}

.footer-legal {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.footer-legal a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: border-color 0.15s ease;
    cursor: pointer;
}

.footer-legal a:hover { border-bottom-color: #fff; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-logos { flex-shrink: 0; cursor: pointer; }

.footer-logos img {
    width: 313px;
    height: 68px;
    display: block;
    filter: brightness(0) invert(1);
}

.footer-ack {
    flex: 1;
    max-width: 620px;
    font-size: 15px;
    line-height: 1.5;
    color: #fff;
}

#signin { scroll-margin-top: 20px; }

/* ============================================
   ПЛАНШЕТ (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .top-strip { padding: 0 30px; }
    .top-strip img { margin-left: 0; width: 260px; height: auto; }
    .nav { margin-right: 0; gap: 20px; }
    .nav a { font-size: 16px; }

    .hero-text { padding: 60px 30px 20px 60px; }
    .hero-text h1 { font-size: 40px; }
    .hero-text p  { font-size: 22px; }

    .form-section { padding: 10px 30px 60px 60px; }
    .form-grid { max-width: 100%; }
    .security-warning { max-width: 100%; }

    .find-support {
        width: auto; max-width: 100%; height: auto;
        margin: 20px 30px 70px 60px;
    }
    .find-support .text { padding: 30px 30px 30px 40px; }
    .find-support h2 { font-size: 36px; }
    .find-support p  { font-size: 18px; }

    .useful { padding: 60px 30px 70px 60px; }
    .useful h2 { font-size: 40px; }
    .useful-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }
    .useful-card {
        width: auto;
        height: auto;
        min-height: 460px;
    }
    .useful-card .card-image {
        height: 240px;
        flex-basis: 240px;
    }

    .footer { padding: 60px 30px 50px 60px; }
}

/* ============================================
   МОБИЛА (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    .top-strip {
        height: auto; min-height: 120px;
        padding: 20px;
        flex-direction: column; gap: 20px;
        align-items: center; justify-content: center;
    }
    .top-strip img { width: 220px; height: auto; margin-left: 0; }
    .nav {
        margin-right: 0; gap: 20px;
        justify-content: center; flex-wrap: wrap;
    }
    .nav a { font-size: 15px; }

    .hero-text { padding: 40px 20px 10px 20px; }
    .hero-text h1 { font-size: 32px; margin-bottom: 14px; }
    .hero-text p  { font-size: 18px; }

    .form-section { padding: 10px 20px 50px 20px; }
    .form-section h2 { font-size: 26px; margin-bottom: 20px; }

    .security-warning {
        padding: 14px 16px;
        margin-bottom: 20px;
        border-radius: 3px;
    }
    .security-warning-title { font-size: 13px; }
    .security-warning-text  { font-size: 13px; }

    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        max-width: 100%;
    }
    .form-field.full { grid-column: 1 / -1; }

    .form-field input {
        height: 46px;
        font-size: 16px;
        padding: 0 12px;
    }
    .form-field label { font-size: 12px; }

    .form-submit {
        width: 100%;
        height: 50px;
        font-size: 16px;
    }

    .find-support {
        width: auto; max-width: 100%; height: auto;
        flex-direction: column;
        margin: 20px 20px 50px 20px;
    }
    .find-support .text { padding: 30px 24px 24px 24px; }
    .find-support h2 { font-size: 30px; margin-bottom: 16px; }
    .find-support p  { font-size: 17px; max-width: 100%; }
    .find-support .image {
        flex: 0 0 auto; width: 100%; height: 220px;
    }
    .find-support .image img { object-fit: cover; }

    /* Карточки Useful — уменьшены */
    .useful { padding: 40px 20px 50px 20px; }
    .useful h2 { font-size: 30px; margin-bottom: 24px; }
    .useful-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .useful-card {
        width: 100%;
        height: auto;
        min-height: auto;
    }
    .useful-card .card-image {
        height: 140px;
        flex-basis: 140px;
    }
    .useful-card .card-body { padding: 16px 18px 18px 18px; }
    .useful-card h3 {
        font-size: 18px;
        margin-bottom: 8px;
        min-height: auto;
        -webkit-line-clamp: 2;
    }
    .useful-card p  { font-size: 13px; line-height: 1.4; -webkit-line-clamp: 3; }

    .footer { padding: 50px 20px 40px 20px; }
    .footer-top { flex-direction: column; gap: 40px; margin-bottom: 40px; }
    .footer-col h4 { font-size: 17px; margin-bottom: 18px; }
    .footer-col a { font-size: 15px; margin-bottom: 14px; }
    .footer-legal { gap: 20px; margin-bottom: 40px; }
    .footer-legal a { font-size: 14px; }
    .footer-bottom { flex-direction: column; gap: 30px; }
    .footer-logos img { width: 240px; height: auto; }
    .footer-ack { font-size: 14px; max-width: 100%; }
}

/* ============================================
   МАЛЫЙ ТЕЛЕФОН (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .top-strip img { width: 180px; }
    .nav { gap: 16px; }
    .nav a { font-size: 14px; }
    .nav .search-icon svg { width: 16px; height: 16px; }

    .hero-text { padding: 30px 16px 10px 16px; }
    .hero-text h1 { font-size: 26px; }
    .hero-text p  { font-size: 16px; }

    .form-section { padding: 10px 16px 40px 16px; }
    .form-section h2 { font-size: 22px; }

    .security-warning {
        padding: 12px 14px;
        margin-bottom: 16px;
        border-radius: 3px;
    }
    .security-warning-title { font-size: 12px; }
    .security-warning-text  { font-size: 12px; }

    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .form-field.full { grid-column: 1 / -1; }

    .form-field input {
        height: 44px;
        font-size: 15px;
        padding: 0 10px;
    }
    .form-field label { font-size: 11px; }

    .form-submit {
        width: 100%;
        height: 46px;
        font-size: 15px;
    }

    .find-support { margin: 16px 16px 40px 16px; }
    .find-support .text { padding: 24px 20px 20px 20px; }
    .find-support h2 { font-size: 24px; }
    .find-support p  { font-size: 15px; }
    .find-support .image { height: 180px; }

    .useful { padding: 32px 16px 40px 16px; }
    .useful h2 { font-size: 24px; margin-bottom: 20px; }
    .useful-grid { gap: 12px; }
    .useful-card .card-image {
        height: 120px;
        flex-basis: 120px;
    }
    .useful-card .card-body { padding: 14px 14px 16px 14px; }
    .useful-card h3 {
        font-size: 16px;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
    }
    .useful-card p  { font-size: 12px; line-height: 1.35; -webkit-line-clamp: 2; }

    .footer { padding: 40px 16px 30px 16px; }
    .footer-col h4 { font-size: 16px; }
    .footer-col a  { font-size: 14px; }
    .footer-legal a { font-size: 13px; }
    .footer-logos img { width: 200px; }
    .footer-ack { font-size: 13px; }
}

/* ============================================
   iPhone safe-area
   ============================================ */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    .top-strip {
        padding-top: max(20px, env(safe-area-inset-top));
    }
}

/* Ландшафт */
@media (max-height: 500px) and (orientation: landscape) {
    .top-strip {
        min-height: 80px; padding: 10px 20px;
        flex-direction: row; gap: 20px;
    }
    .top-strip img { width: 160px; }
    .hero-text { padding: 20px 20px 10px 20px; }
    .hero-text h1 { font-size: 24px; margin-bottom: 8px; }
    .hero-text p  { font-size: 15px; }
}

/* Убираем -webkit-text-stroke на мобильных */
@media (max-width: 768px) {
    .hero-text h1, .hero-text p,
    .find-support h2, .find-support p,
    .form-section h2, .useful h2 {
        -webkit-text-stroke: 0;
    }
}
