/**
 * E-Ruhsat sayfası — portal girişi, adımlar ve müellif belgeleri
 */

.er-page {
    --er-brand: #32439f;
    --er-navy: #1e2a6b;
    --er-ink: #27304f;
    --er-muted: #64748b;
    --er-line: #e2e8f0;
    --er-soft: #f5f7fc;

    padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(2.5rem, 5vw, 4rem);
    background: #f8fafc;
}

/* ── Tanıtım ── */
.er-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
    padding: clamp(1.75rem, 4vw, 3rem);
    border-radius: 20px;
    overflow: hidden;
    color: #fff;
    background-color: var(--er-brand);
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1.5px),
        linear-gradient(120deg, var(--er-brand) 0%, var(--er-navy) 100%);
    background-size: 22px 22px, cover;
}

.er-hero__title {
    margin: 0;
    max-width: 34rem;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
    text-wrap: balance;
}

.er-hero__lead {
    margin: 1rem 0 0;
    max-width: 40rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.er-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.er-hero__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(7rem, 14vw, 11rem);
    aspect-ratio: 1;
    border-radius: 50%;
    font-size: clamp(3rem, 6vw, 4.75rem);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 0 1.25rem rgba(255, 255, 255, 0.04);
}

/* ── Düğmeler ── */
.er-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0 1.35rem;
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.er-btn--light {
    font-weight: 600;
    color: var(--er-brand);
    background: #fff;
    box-shadow: 0 14px 28px -16px rgba(8, 12, 45, 0.9);
}

.er-btn--light:hover {
    color: var(--er-navy);
    background: #eef1fb;
}

.er-btn--ghost {
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.er-btn--ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.er-btn--outline {
    color: var(--er-brand);
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(50, 67, 159, 0.3);
}

.er-btn--outline:hover {
    color: #fff;
    background: var(--er-brand);
}

.er-btn:focus-visible,
.er-chip:focus-visible,
.er-format:focus-visible {
    outline: 3px solid #f5b800;
    outline-offset: 2px;
}

/* ── Bölüm başlıkları ── */
.er-section {
    margin-top: clamp(2rem, 4vw, 3rem);
    scroll-margin-top: 6rem;
}

.er-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
}

.er-section__title {
    position: relative;
    margin: 0;
    padding-left: 0.9rem;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--er-navy);
}

.er-section__title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 3px;
    border-radius: 3px;
    background: var(--er-brand);
}

.er-section__lead {
    margin: 0.5rem 0 0;
    max-width: 40rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--er-muted);
}

.er-section__count {
    font-size: 0.875rem;
    color: var(--er-muted);
}

/* ── Adımlar ── */
.er-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.er-step {
    padding: 1.35rem 1.4rem 1.5rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.er-step__no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #fff;
    background: var(--er-brand);
}

.er-step__title {
    margin: 1rem 0 0;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--er-navy);
}

.er-step__text {
    margin: 0.4rem 0 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--er-muted);
}

/* ── Belge araçları ── */
.er-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-top: 1.25rem;
}

.er-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.er-chip {
    min-height: 2.5rem;
    padding: 0 1rem;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--er-navy);
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--er-line);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.er-chip:hover {
    box-shadow: inset 0 0 0 1px rgba(50, 67, 159, 0.45);
}

.er-chip.is-active {
    color: #fff;
    background: var(--er-brand);
    box-shadow: none;
}

.er-search {
    display: flex;
    flex: 0 1 18rem;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    margin: 0;
    padding: 0 1rem;
    border-radius: 12px;
    color: var(--er-muted);
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--er-line);
}

.er-search:focus-within {
    box-shadow: inset 0 0 0 2px var(--er-brand);
}

.er-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--er-navy);
    background: transparent;
}

/* ── Belge listesi ── */
.er-group {
    margin-top: 1.5rem;
}

.er-group__title {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--er-muted);
}

.er-docs {
    margin: 0;
    padding: 0;
    list-style: none;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06), 0 4px 24px rgba(15, 23, 42, 0.05);
}

.er-doc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding: 1rem 1.25rem;
}

.er-doc[hidden] {
    display: none;
}

.er-doc + .er-doc {
    border-top: 1px solid var(--er-line);
}

.er-doc__text {
    flex: 1 1 16rem;
    min-width: 0;
}

.er-doc__title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--er-navy);
}

.er-doc__desc {
    margin: 0.2rem 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--er-muted);
}

.er-doc__files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Biçim düğmesi: ikon, uzantı ve boyut */
.er-format {
    --er-tone: 100, 116, 139;

    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0 0.85rem;
    border-radius: 10px;
    font-size: 0.85rem;
    text-decoration: none;
    color: rgb(var(--er-tone));
    background: rgba(var(--er-tone), 0.08);
    box-shadow: inset 0 0 0 1px rgba(var(--er-tone), 0.22);
    transition: background 0.15s ease, color 0.15s ease;
}

.er-format:hover {
    color: #fff;
    background: rgb(var(--er-tone));
}

.er-format i {
    font-size: 1.05rem;
}

.er-format__ext {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.er-format__size {
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
}

.er-format--pdf { --er-tone: 185, 28, 28; }
.er-format--doc { --er-tone: 29, 78, 216; }
.er-format--xls { --er-tone: 21, 128, 61; }
.er-format--dwg { --er-tone: 180, 83, 9; }
.er-format--zip { --er-tone: 109, 40, 217; }

.er-empty {
    margin: 1.25rem 0 0;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--er-muted);
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--er-line);
}

.er-empty[hidden],
.er-group[hidden] {
    display: none;
}

/* ── Yardım ── */
.er-help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    margin-top: clamp(2rem, 4vw, 3rem);
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: 18px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.er-help__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--er-navy);
}

.er-help__text {
    margin: 0.4rem 0 0;
    max-width: 38rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--er-muted);
}

.er-help__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* ── Duyarlı ── */
@media (max-width: 767.98px) {
    .er-hero {
        grid-template-columns: 1fr;
    }

    .er-hero__mark {
        display: none;
    }

    .er-btn {
        width: 100%;
    }

    .er-search {
        flex-basis: 100%;
    }

    .er-doc__files {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .er-btn,
    .er-chip,
    .er-format {
        transition: none;
    }
}
