/* ==============================================
   ӘлеуметКөмек — Redesigned
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

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

:root {
    --ink: #0D1B2A;
    --ink-mid: #2C3E50;
    --muted: #6B7A8D;
    --gold: #B8872A;
    --gold-light: #E8C97A;
    --gold-pale: #FAF3E0;
    --sky: #1A5276;
    --sky-light: #D6E4F0;
    --white: #FFFFFF;
    --off-white: #F8F6F2;
    --border: #DDD8CF;
    --success: #1E6E3E;
    --danger: #8B1A1A;
    --shadow-sm: 0 1px 4px rgba(13,27,42,0.07);
    --shadow-md: 0 4px 16px rgba(13,27,42,0.10);
    --shadow-lg: 0 12px 40px rgba(13,27,42,0.13);
    --radius: 4px;
    --radius-md: 8px;

    /* Алиасы для совместимости с assistant.html и map.html */
    --primary: #1A5276;
    --primary-dark: #0D1B2A;
    --text-dark: #0D1B2A;
    --text-gray: #6B7A8D;
    --shadow: 0 4px 16px rgba(13,27,42,0.10);
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    line-height: 1.65;
    color: var(--ink);
    background: var(--off-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: var(--sky); }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============== ORNAMENT BAND ============== */
.ornament-band {
    display: none;
}

/* ============== HEADER ============== */
header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.top-bar {
    background: var(--ink);
    color: rgba(255,255,255,0.75);
    padding: 7px 0;
    font-size: 12.5px;
    letter-spacing: 0.2px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.top-bar span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--ink);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.3px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--ink);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.logo span {
    line-height: 1.1;
}

.logo .logo-sub {
    display: block;
    font-size: 10.5px;
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2px;
    align-items: center;
}

nav ul li a {
    color: var(--ink-mid);
    font-weight: 500;
    font-size: 13.5px;
    padding: 7px 12px;
    border-radius: var(--radius);
    transition: all 0.15s ease;
    white-space: nowrap;
}

nav ul li a:hover {
    background: var(--off-white);
    color: var(--ink);
}

nav ul li a.active {
    background: var(--ink);
    color: var(--white);
}

/* ============== BUTTONS ============== */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 14px;
    transition: all 0.2s ease;
    text-align: center;
    font-family: inherit;
    letter-spacing: 0.1px;
}

.btn-primary {
    background: var(--ink);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--sky);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--gold);
    color: var(--white);
    font-weight: 700;
}

.btn-accent:hover {
    background: #9A6E1F;
    color: var(--white);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--white);
    color: var(--white);
}

.btn-danger { background: var(--danger); color: var(--white); }
.btn-success { background: var(--success); color: var(--white); }

/* ============== HERO ============== */
.hero {
    background: var(--ink);
    color: var(--white);
    padding: 80px 0 90px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 80% 50%, rgba(26,82,118,0.55) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 10% 80%, rgba(184,135,42,0.2) 0%, transparent 60%);
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: center;
}

.hero-text { max-width: 620px; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 20px;
}

.hero-eyebrow::before {
    content: '';
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--gold);
}

.hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 46px;
    line-height: 1.15;
    margin-bottom: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero h1 em {
    font-style: normal;
    color: var(--gold-light);
}

.hero p {
    font-size: 17px;
    max-width: 560px;
    margin-bottom: 36px;
    opacity: 0.82;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stat-box {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    display: grid;
    grid-template-rows: repeat(4, auto);
    gap: 20px;
    min-width: 180px;
}

.hero-stat-item {
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 16px;
}

.hero-stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hero-stat-num {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1;
}

.hero-stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 4px;
    display: block;
}

/* ============== SECTIONS ============== */
section { padding: 64px 0; }

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}

.section-label::after {
    content: '';
    display: block;
    width: 32px;
    height: 1.5px;
    background: var(--gold);
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 34px;
    margin-bottom: 14px;
    color: var(--ink);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.section-subtitle {
    color: var(--muted);
    margin-bottom: 44px;
    font-size: 15.5px;
    max-width: 560px;
}

/* ============== CARDS ============== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
}

.card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    border: 1px solid var(--border);
    position: relative;
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 28px;
    right: 28px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    opacity: 0;
    transform: scaleX(0.4);
    transition: all 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold-light);
}

.card:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.card-icon {
    width: 52px;
    height: 52px;
    background: var(--off-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--sky);
}

.card-icon svg {
    width: 26px;
    height: 26px;
}

.card h3 {
    font-size: 17px;
    margin-bottom: 10px;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.3;
}

.card p {
    color: var(--muted);
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.6;
}

.card-link {
    color: var(--gold);
    font-weight: 600;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.card-link:hover { gap: 10px; color: var(--gold); }

/* ============== STEPS ============== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0;
    position: relative;
}

.steps-grid::before {
    content: '';
    position: absolute;
    top: 26px;
    left: 13%;
    right: 13%;
    height: 1px;
    background: var(--border);
    z-index: 0;
}

.step-card {
    background: transparent;
    padding: 0 20px 28px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 52px;
    height: 52px;
    background: var(--white);
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--gold);
}

.step-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ink);
}

.step-card p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.6;
}

/* ============== STATS STRIP ============== */
.stats-strip {
    background: var(--ink);
    padding: 40px 0;
}

.stats-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.stat-block {
    background: var(--ink);
    padding: 28px 24px;
    text-align: center;
}

.stat-block .num {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 40px;
    font-weight: 700;
    color: var(--gold-light);
    display: block;
    line-height: 1;
}

.stat-block .lbl {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 6px;
    display: block;
}

/* ============== FORMS ============== */
.form-wrapper {
    max-width: 500px;
    margin: 40px auto;
    background: var(--white);
    padding: 44px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.form-wrapper.wide { max-width: 700px; }

.form-wrapper h2 {
    text-align: center;
    margin-bottom: 8px;
    color: var(--ink);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
}

.form-wrapper .form-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 32px;
    font-size: 14px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-weight: 500;
    font-size: 13.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14.5px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--white);
    color: var(--ink);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184,135,42,0.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-wrapper .btn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
}

.form-link {
    text-align: center;
    margin-top: 20px;
    color: var(--muted);
    font-size: 13.5px;
}

.alert {
    padding: 13px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 3px solid;
}

.alert-success { background: #EAF4EE; color: #1E5E38; border-color: #2E7D32; }
.alert-danger { background: #FDECEA; color: #7B1818; border-color: var(--danger); }
.alert-info { background: var(--sky-light); color: var(--sky); border-color: var(--sky); }

/* ============== TABLES ============== */
.table-wrapper {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    border: 1px solid var(--border);
}

table { width: 100%; border-collapse: collapse; }

thead { background: var(--ink); color: var(--white); }

th, td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

thead th { font-size: 13px; font-weight: 600; letter-spacing: 0.3px; }

tbody tr:hover { background: var(--off-white); }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-info { background: var(--sky-light); color: var(--sky); }

/* ============== AID DETAIL ============== */
.detail-header {
    background: var(--ink);
    color: var(--white);
    padding: 56px 0;
}

.detail-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 34px;
    margin-bottom: 12px;
}

.detail-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-top: -40px;
    position: relative;
    z-index: 5;
    border: 1px solid var(--border);
}

.detail-content h2 {
    color: var(--sky);
    margin: 28px 0 14px;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.detail-content ul, .detail-content ol { padding-left: 22px; margin-bottom: 16px; }
.detail-content li { margin-bottom: 8px; color: var(--muted); font-size: 14.5px; }

.info-box {
    background: var(--sky-light);
    border-left: 3px solid var(--sky);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: var(--radius);
}

/* ============== CABINET ============== */
.cabinet-header {
    background: var(--ink);
    color: var(--white);
    padding: 40px 0;
}

.cabinet-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    margin-top: 32px;
}

.sidebar {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    border: 1px solid var(--border);
}

.sidebar ul { list-style: none; }

.sidebar ul li a {
    display: block;
    padding: 11px 14px;
    color: var(--ink-mid);
    border-radius: var(--radius);
    margin-bottom: 3px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.15s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: var(--ink);
    color: var(--white);
}

.main-content {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* ============== FOOTER ============== */
footer {
    background: var(--ink);
    color: var(--white);
    padding: 48px 0 24px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 36px;
    margin-bottom: 32px;
}

footer h4 {
    color: var(--gold-light);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

footer p, footer li {
    color: rgba(255,255,255,0.55);
    font-size: 13.5px;
    margin-bottom: 8px;
    list-style: none;
    line-height: 1.6;
}

footer a { color: rgba(255,255,255,0.55); }
footer a:hover { color: var(--gold-light); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 12.5px;
}

/* ============== LANG SWITCHER ============== */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: 10px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.lang-btn {
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 5px 10px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    color: var(--muted);
    letter-spacing: 0.5px;
    transition: all 0.15s;
    font-family: inherit;
    line-height: 1;
}

.lang-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.lang-btn-active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white) !important;
}

.lang-sep {
    color: var(--border);
    font-size: 14px;
    user-select: none;
    margin: 0 1px;
}

/* ============== UTILS ============== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }

.action-buttons { display: flex; gap: 8px; }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* ============== RESPONSIVE ============== */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-stat-box { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: auto auto; min-width: 0; }
    .hero-stat-item { border-bottom: none; border-right: 1px solid rgba(255,255,255,0.08); padding: 12px; }
    .hero-stat-item:nth-child(even) { border-right: none; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .steps-grid::before { display: none; }
    .cabinet-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 15px; }
    .section-title { font-size: 26px; }
    .nav-bar { flex-wrap: wrap; gap: 8px; padding: 10px 0; }
    .top-bar { font-size: 11px; }
    nav ul { gap: 2px; flex-wrap: wrap; }
    nav ul li a { font-size: 12.5px; padding: 6px 9px; }
    .form-row { grid-template-columns: 1fr; }
    .form-wrapper { padding: 28px 20px; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
}
