/* =====================================================================
   ՃՇՀԱՀ — Tuition refund applications. Modern restyle of the Figma set.
   ===================================================================== */
:root {
    --red: #960000;
    --red-dark: #7a0000;
    --red-soft: #fdf1f1;
    --navy: #00123e;
    --text: #1f2430;
    --muted: #6b7280;
    --bg: #f4f5f7;
    --card: #ffffff;
    --border: #d9dde3;
    --border-strong: #b9c0ca;
    --footer: #2b2f36;
    --green: #16a34a;
    --green-soft: #ecfdf3;
    --shadow: 0 10px 30px rgba(16, 24, 40, .08);
    --font: 'Noto Sans Armenian', 'GHEA Grapalat', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 52px;
    padding: 0 32px;
    border: 0;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(150, 0, 0, .25);
    transition: background .2s, transform .15s, box-shadow .2s;
}
.btn:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 12px 24px rgba(150, 0, 0, .3); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn--lg { height: 60px; min-width: 280px; font-size: 19px; }

/* =====================================================================
   HOME
   ===================================================================== */
.home { flex: 1; display: grid; grid-template-columns: minmax(360px, 40%) 1fr; min-height: calc(100vh - 72px); }

.home__side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 64px 48px;
    background: linear-gradient(160deg, #a30000 0%, var(--red) 55%, #6e0000 100%);
    color: #fff;
}
.home__logo { width: min(420px, 100%); height: auto; margin-bottom: 48px; }
.home__title {
    max-width: 520px;
    font-size: clamp(26px, 2.4vw, 34px);
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: .01em;
}
.home__sub { max-width: 440px; margin-top: 18px; font-size: 15px; opacity: .8; }

.home__content { position: relative; display: flex; align-items: center; padding: 64px 6vw; overflow: hidden; }
.home__bg {
    position: absolute; inset: 0;
    background: url('../img/bg.png') right center / cover no-repeat;
    opacity: .35;
    pointer-events: none;
}
.offers { position: relative; display: grid; gap: 28px; width: 100%; max-width: 820px; margin: 0 auto; }

.offer {
    padding: 36px 40px;
    background: var(--card);
    border: 1px solid #eceef2;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
}
.offer:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(16, 24, 40, .12); }
.offer__tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--red-soft);
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.offer__title { font-size: 24px; font-weight: 800; line-height: 1.3; color: var(--navy); }
.offer__text { margin: 14px 0 24px; color: var(--muted); font-size: 15px; }

/* =====================================================================
   APPLY
   ===================================================================== */
.hdr { background: linear-gradient(160deg, #a30000, var(--red)); color: #fff; }
.hdr__inner {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 24px 56px;
    text-align: center;
}
.hdr { position: relative; }
.hdr__back {
    position: absolute; left: 32px; top: 32px; z-index: 2;
    display: inline-flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 18px 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff; font-size: 14px; font-weight: 600; text-decoration: none;
    transition: background .2s;
}
.hdr__back svg { display: block; }
.hdr__back:hover { background: rgba(255,255,255,.26); }
.hdr__logo { width: 300px; height: auto; margin-bottom: 22px; }
.hdr__title { max-width: 1100px; font-size: clamp(20px, 2vw, 28px); font-weight: 800; line-height: 1.3; text-transform: uppercase; }

.form-page { flex: 1; width: 100%; padding: 0 24px 72px; overflow-x: clip; }
.card {
    max-width: 1200px;
    margin: -28px auto 0;
    padding: 12px 48px 48px;
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.block { padding: 32px 0; border-bottom: 1px solid #eef0f3; }
.block:last-of-type { border-bottom: 0; }
.block__title { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; font-size: 20px; font-weight: 800; color: var(--navy); }
.block__title span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--red); color: #fff;
    font-size: 15px;
}
.block__hint { margin: -10px 0 22px; color: var(--muted); font-size: 14px; }

.grid { display: grid; gap: 22px 28px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* fields */
.field { min-width: 0; }
.lbl {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--navy);
}
.lbl i { font-style: normal; color: #e11d48; margin-left: 2px; }

.inp {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: #fff;
    font-size: 16px;
    color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.inp::placeholder { color: #a0a7b3; }
.inp:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(150, 0, 0, .1); }

/* custom select */
.sel { position: relative; min-width: 0; max-width: 100%; }
.sel__btn {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; height: 50px; padding: 0 14px 0 16px;
    border: 1.5px solid var(--border); border-radius: 12px;
    background: #fff; color: var(--text); font-size: 16px; text-align: left; cursor: pointer; overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.sel__btn:hover { border-color: var(--border-strong); }
.sel.is-open .sel__btn { border-color: var(--red); box-shadow: 0 0 0 4px rgba(150, 0, 0, .1); }
.sel__val { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sel__val:empty::before { content: attr(data-placeholder); color: #a0a7b3; }
.sel__arrow { flex: none; width: 12px; height: auto; transform: rotate(180deg); opacity: .7; transition: transform .2s; }
.sel.is-open .sel__arrow { transform: rotate(0); }

.sel__list {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
    display: none;
    max-height: 320px; overflow-y: auto;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(16, 24, 40, .14);
}
.sel.is-open .sel__list { display: block; }
.sel__opt { padding: 10px 12px; border-radius: 8px; font-size: 15px; line-height: 1.4; cursor: pointer; }
.sel__opt:hover { background: var(--red-soft); color: var(--red); }
.sel__list--wide { max-height: 420px; }

/* file input → styled button + filename (JS wraps it in .upload) */
.upload { position: relative; }
.upload input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload__ui {
    display: flex; align-items: center; gap: 12px;
    height: 50px; padding: 0 6px 0 16px;
    border: 1.5px dashed var(--border-strong); border-radius: 12px;
    background: #fafbfc; color: var(--muted); font-size: 14px;
    transition: border-color .15s, background .15s;
}
.upload:hover .upload__ui { border-color: var(--red); background: var(--red-soft); }
.upload__name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upload.has-file .upload__name { color: var(--text); font-weight: 600; }
.upload__btn {
    flex: none; display: inline-flex; align-items: center; gap: 6px;
    height: 36px; padding: 0 14px;
    border-radius: 8px; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700;
}
.upload__btn::before { content: '⬆'; font-size: 12px; }

/* category blocks */
.cat { position: relative; padding: 24px; margin-bottom: 18px; border: 1.5px solid #e6e9ee; border-radius: 16px; background: #fafbfc; }
.cat__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: end; }
.cat__head > * { min-width: 0; }
.cat__head .lbl { grid-column: 1 / -1; margin-bottom: 0; }
.cat__remove {
    display: none;
    height: 50px; padding: 0 16px;
    border: 1.5px solid var(--border); border-radius: 12px; background: #fff;
    color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer;
}
.cat__remove:hover { border-color: #e11d48; color: #e11d48; }
.cat.is-removable .cat__remove { display: inline-flex; align-items: center; }
.cat__docs:not(:empty) { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--border); display: grid; gap: 16px; }
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: center; }
.doc__lbl { margin: 0; font-size: 13px; line-height: 1.45; text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 600; }

/* consent */
.block--consent { padding-top: 24px; }
.chk { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk__box {
    flex: none; width: 24px; height: 24px; margin-top: 1px;
    border: 1.5px solid var(--border-strong); border-radius: 7px; background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, border-color .15s;
}
.chk__box::after { content: ''; width: 6px; height: 11px; margin-top: -2px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); opacity: 0; }
.chk input:checked + .chk__box { background: var(--red); border-color: var(--red); }
.chk input:checked + .chk__box::after { opacity: 1; }
.chk.is-invalid .chk__box { border-color: #e11d48; }
.chk__text { font-size: 14px; color: var(--muted); }

.form__actions { display: flex; justify-content: center; padding-top: 32px; }

.success {
    display: flex; align-items: center; gap: 10px;
    margin-top: 28px; padding: 18px 22px;
    border: 1px solid #bbf7d0; border-radius: 14px;
    background: var(--green-soft); color: #14532d; font-size: 16px;
}
.success::before { content: '✓'; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; flex: none; }
.success[hidden] { display: none; }
.form.is-sent .form__actions { display: none; }

/* validation */
.is-invalid, .sel.is-invalid .sel__btn, .upload.is-invalid .upload__ui { border-color: #e11d48 !important; box-shadow: 0 0 0 4px rgba(225, 29, 72, .1); }

/* footer */
.ftr { background: var(--footer); color: #cfd3da; }
.ftr__inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 48px; max-width: 1200px; margin: 0 auto; padding: 22px 24px; }
.ftr__item { display: flex; align-items: center; gap: 10px; font-size: 14px; text-decoration: none; transition: color .15s; }
.ftr__item:hover { color: #fff; }
.ftr__item img { width: 22px; height: 22px; object-fit: contain; }

/* responsive */
@media (max-width: 1024px) {
    .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card { padding: 8px 28px 36px; }
    .doc { grid-template-columns: 1fr; gap: 8px; }
    .doc .upload { max-width: 420px; }
    .hdr__inner { padding: 28px 20px 52px; }
    .hdr__back { left: 16px; top: 20px; }
    .home__side { padding: 56px 32px; }
    .home__content { padding: 48px 32px; }
}
@media (max-width: 900px) {
    .home { grid-template-columns: 1fr; min-height: 0; }
    .home__side { padding: 48px 24px; }
    .home__content { padding: 40px 24px; }
}
@media (max-width: 640px) {
    .grid--3 { grid-template-columns: 1fr; }
    .doc { grid-template-columns: 1fr; }
    .cat__head { grid-template-columns: 1fr; }
    .hdr__logo { width: 220px; }
    .offer { padding: 28px 24px; }
    .btn--lg { width: 100%; }
    .form-page { padding: 0 12px 48px; }
    .card { padding: 4px 18px 28px; margin-top: -20px; }
    .cat { padding: 18px 16px; }
    .cat__remove { width: 100%; justify-content: center; }
    .block { padding: 24px 0; }
    .block__title { font-size: 18px; }
    .hdr__inner { padding: 24px 16px 44px; }
    .hdr__back { left: 12px; top: 14px; height: 36px; padding: 0 12px 0 8px; }
    .hdr__back span { display: none; }
    .hdr__logo { width: 200px; margin-bottom: 16px; }
    .hdr__title { font-size: 17px; }
    .home__side { padding: 40px 20px; }
    .home__logo { width: 260px; margin-bottom: 28px; }
    .home__title { font-size: 22px; }
    .home__sub { font-size: 14px; }
    .home__content { padding: 28px 16px; }
    .offer__title { font-size: 20px; }
    .ftr__inner { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 20px; }
}
