﻿/* ============================================================
   home.css — stiluri pagina principală EducatieReala
   ----
   Folosește variabilele CSS din site.css. Trebuie inclus DUPĂ site.css.

   Conține stiluri pentru:
   - panelMiddle (gradient + 2 coloane: filtre stânga, stats dreapta)
   - autocomplete localitate (pattern din pagina Hartă)
   - zona listă (titlu + buton "Vezi toate")
   - banner incentive (gradient + 2 coloane: text + butoane)
   - modal QR pentru "Sună"

   NU conține stiluri pentru cardurile de instituții — vezi lista-institutii.css.
   ============================================================ */


/* ============================================================
   1. PANEL MIDDLE — gradient cu filtre + stats
   ============================================================ */

.er-home-panel-middle {
    background: linear-gradient(135deg, var(--er-color-primary) 0%, var(--er-color-primary-deep) 100%);
    padding: 64px 32px 72px;
    position: relative;
    overflow: hidden;
}

/* Cercuri decorative cu blur — pure decoration, nu interferează cu conținutul */
.er-home-decor {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.er-home-decor-1 {
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: rgba(245, 184, 46, 0.05);
}

.er-home-decor-2 {
    bottom: -100px;
    left: 20%;
    width: 380px;
    height: 380px;
    background: rgba(37, 99, 235, 0.10);
    filter: blur(70px);
}

.er-home-panel-inner {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 56px;
    align-items: center;
}


/* ============================================================
   STÂNGA — Card cu filtre
   ============================================================ */

.er-home-filter-card {
    background: var(--er-bg-surface);
    border-radius: var(--er-radius-md);
    padding: 22px 22px 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.er-home-filter-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--er-color-primary);
    line-height: 1.3;
    letter-spacing: -0.015em;
    margin: 0 0 16px;
}

    .er-home-filter-title span {
        color: var(--er-color-secondary);
    }

/* Container pentru un singur câmp de filtru */
.er-home-filter {
    margin-bottom: 10px;
}

    .er-home-filter:last-of-type {
        margin-bottom: 0;
    }

    .er-home-filter label {
        display: block;
        font-size: 11px;
        font-weight: 700;
        color: var(--er-text-soft);
        text-transform: uppercase;
        letter-spacing: 0.06em;
        margin-bottom: 5px;
    }

/* Wrapper care conține input-ul + iconița în stânga */
.er-home-input-wrap {
    position: relative;
}

    .er-home-input-wrap > .material-icons {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--er-text-muted);
        font-size: 18px;
        pointer-events: none;
    }

/* Input și select — același stil consistent */
.er-home-input,
.er-home-select {
    width: 100%;
    height: 42px;
    background: var(--er-bg-surface);
    color: var(--er-text-main);
    border: 1.5px solid var(--er-border);
    border-radius: 10px;
    padding: 0 14px 0 38px;
    font-family: inherit;
    font-size: 13.5px;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

    .er-home-input:focus,
    .er-home-select:focus {
        border-color: var(--er-color-secondary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

    .er-home-input::placeholder {
        color: #94A3B8;
    }

/* Select cu chevron custom (overrides default browser arrow) */
.er-home-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}


/* ============================================================
   AUTOCOMPLETE — copiat 1:1 din pagina Hartă (consistență)
   ============================================================ */

.er-home-autocomplete {
    position: relative;
}

/* Buton X care apare doar când input-ul are valoare */
.er-home-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    background: var(--er-bg-muted);
    color: var(--er-text-muted);
    border-radius: 50%;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    display: none;
    transition: all 0.15s ease;
}

    .er-home-clear-btn:hover {
        background: #DBE3EE;
        color: var(--er-text-main);
    }

.er-home-autocomplete.er-has-value .er-home-clear-btn {
    display: block;
}

.er-home-autocomplete.er-has-value .er-home-input {
    padding-right: 40px;
}

/* Dropdown cu sugestii */
.er-home-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--er-bg-surface);
    border: 1px solid var(--er-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
}

    .er-home-suggestions.er-show {
        display: block;
    }

/* Un item în dropdown — iconă pin + nume + județ */
.er-h-sug-item, /* Refolosit din pagina Hartă — același pattern de markup */
.er-home-sug-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--er-border);
    transition: background 0.12s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.er-home-suggestions .er-h-sug-item:last-child {
    border-bottom: none;
}

.er-home-suggestions .er-h-sug-item:hover {
    background: var(--er-bg-muted);
}

.er-home-suggestions .er-h-sug-item .material-icons {
    font-size: 18px;
    color: var(--er-color-secondary);
    flex-shrink: 0;
}

.er-home-suggestions .er-h-sug-name {
    font-weight: 600;
    color: var(--er-text-main);
    font-size: 0.92rem;
}

.er-home-suggestions .er-h-sug-judet {
    font-size: 0.78rem;
    color: var(--er-text-muted);
    margin-top: 1px;
}

.er-home-suggestions .er-h-sug-empty {
    padding: 14px;
    text-align: center;
    color: var(--er-text-muted);
    font-size: 0.88rem;
    font-style: italic;
}


/* ============================================================
   SEGMENTED BUTTONS — Toate / Publică / Privată
   ============================================================ */

.er-home-segment {
    display: flex;
    background: var(--er-bg-muted);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
}

    .er-home-segment button {
        flex: 1;
        height: 32px;
        background: transparent;
        color: var(--er-text-muted);
        border: none;
        border-radius: 7px;
        font-family: inherit;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .er-home-segment button.er-active {
            background: var(--er-bg-surface);
            color: var(--er-color-primary);
            font-weight: 700;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        }

        .er-home-segment button:hover:not(.er-active) {
            color: var(--er-text-main);
        }


/* ============================================================
   BUTOANE CARD FILTRE — Caută + Caută pe hartă
   ============================================================ */

.er-home-btn-search {
    width: 100%;
    height: 46px;
    background: var(--er-color-secondary);
    color: var(--er-text-on-dark);
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    transition: all 0.2s ease;
}

    .er-home-btn-search:hover {
        background: var(--er-color-secondary-hover);
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    }

    .er-home-btn-search .material-icons {
        font-size: 18px;
    }

.er-home-btn-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 38px;
    background: transparent;
    color: var(--er-color-primary);
    border: 1.5px solid var(--er-border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    font-family: inherit;
    box-sizing: border-box;
    margin-top: 8px;
    transition: all 0.2s ease;
}

    .er-home-btn-map:hover {
        background: var(--er-bg-muted);
        border-color: var(--er-color-primary);
        color: var(--er-color-primary);
        text-decoration: none;
    }

    .er-home-btn-map .material-icons {
        font-size: 17px;
    }


/* ============================================================
   DREAPTA — Stats cu numerele
   Pattern preluat din CDB divTextPrezentare (BOLD + LIGHT alternativ)
   ============================================================ */

.er-home-stats {
    color: var(--er-text-on-dark);
}

.er-home-stat-line {
    font-size: 32px;
    font-weight: 400;
    color: var(--er-text-on-dark);
    margin: 0 0 16px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

    .er-home-stat-line:last-child {
        margin-bottom: 0;
    }

/* Partea „bold" — albă strălucitoare */
.er-home-stat-bold {
    font-weight: 800;
    color: var(--er-text-on-dark);
}

    /* Variant galben (pentru rândul 2 — breakdown pe categorii) */
    .er-home-stat-bold.er-home-stat-yellow {
        color: var(--er-color-accent);
    }

/* Partea „light" — alb-translucent (mai discret) */
.er-home-stat-light {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}


/* ============================================================
   2. ZONA LISTĂ INSTITUȚII
   ============================================================ */

.er-home-list-section {
    background: #F9FAFB;
    padding: 56px 32px 32px;
}

.er-home-list-inner {
    max-width: 1120px;
    margin: 0 auto;
}

.er-home-list-head {
    text-align: center;
    margin-bottom: 36px;
}

.er-home-list-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--er-color-primary);
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.er-home-list-subtitle {
    font-size: 14px;
    color: var(--er-text-muted);
    margin: 0;
}

/* Footer cu butonul "Vezi toate instituțiile" */
.er-home-list-foot {
    text-align: center;
    margin-top: 32px;
}

.er-home-btn-see-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--er-bg-surface);
    color: var(--er-color-primary);
    padding: 13px 28px;
    border: 1.5px solid var(--er-border-strong);
    border-radius: var(--er-radius-full);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .er-home-btn-see-all:hover {
        background: var(--er-color-primary);
        color: var(--er-text-on-dark);
        border-color: var(--er-color-primary);
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(15, 76, 129, 0.20);
    }

    .er-home-btn-see-all .material-icons {
        font-size: 18px;
        transition: transform 0.2s ease;
    }

    .er-home-btn-see-all:hover .material-icons {
        transform: translateX(3px);
    }


/* ============================================================
   3. BANNER INCENTIVE — gradient albastru, full-width
   ============================================================ */

.er-home-incentive-wrap {
    background: #F9FAFB;
    padding: 32px 32px 64px;
}

.er-home-incentive-inner {
    max-width: 1120px;
    margin: 0 auto;
}

.er-home-incentive-card {
    background: linear-gradient(135deg, var(--er-color-primary) 0%, var(--er-color-secondary) 100%);
    border-radius: var(--er-radius-lg);
    padding: 48px;
    position: relative;
    overflow: hidden;
    color: var(--er-text-on-dark);
}

/* Cercuri decorative pentru atmosferă (galben subtil + alb subtil) */
.er-home-incentive-decor {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.er-home-incentive-decor-1 {
    top: -40px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: rgba(245, 184, 46, 0.18);
}

.er-home-incentive-decor-2 {
    bottom: -60px;
    right: 100px;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(50px);
}

.er-home-incentive-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
}

.er-home-incentive-text {
    max-width: 580px;
}

/* Eyebrow badge — pill cu dot galben + text */
.er-home-incentive-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 184, 46, 0.2);
    border: 1px solid rgba(245, 184, 46, 0.4);
    border-radius: var(--er-radius-full);
    padding: 6px 14px;
    margin-bottom: 14px;
}

    .er-home-incentive-eyebrow span:not(.er-home-incentive-dot) {
        font-size: 12px;
        font-weight: 700;
        color: #FEF3C7;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

.er-home-incentive-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--er-color-accent);
}

.er-home-incentive-text h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--er-text-on-dark);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.er-home-incentive-text p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.55;
    margin: 0;
}

/* Butoane CTA — pe coloana dreaptă */
.er-home-incentive-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 220px;
}

.er-home-incentive-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--er-color-accent);
    color: var(--er-text-main);
    padding: 14px 24px;
    border-radius: var(--er-radius-full);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .er-home-incentive-btn-primary:hover {
        background: var(--er-color-accent-hover);
        color: var(--er-text-main);
        text-decoration: none;
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(245, 184, 46, 0.4);
    }

    .er-home-incentive-btn-primary .material-icons {
        font-size: 18px;
    }

.er-home-incentive-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--er-text-on-dark);
    padding: 13px 24px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--er-radius-full);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .er-home-incentive-btn-secondary:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: var(--er-text-on-dark);
        color: var(--er-text-on-dark);
        text-decoration: none;
    }

    .er-home-incentive-btn-secondary .material-icons {
        font-size: 18px;
    }


/* ============================================================
   MODAL QR pentru "Sună"
   Pattern preluat din pagina Hartă (er-h-overlay + er-h-modal)
   ============================================================ */

.er-home-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

    .er-home-overlay.er-show {
        opacity: 1;
        visibility: visible;
    }

.er-home-modal {
    background: var(--er-bg-surface);
    border-radius: 18px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.30);
    transform: translateY(20px);
    transition: transform 0.25s ease;
    position: relative;
}

.er-home-overlay.er-show .er-home-modal {
    transform: translateY(0);
}

.er-home-modal-head {
    padding: 22px 24px 16px;
    border-bottom: 1px solid var(--er-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

    .er-home-modal-head h3 {
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--er-text-main);
        margin: 0;
    }

.er-home-modal-close {
    width: 32px;
    height: 32px;
    background: var(--er-bg-muted);
    color: var(--er-text-soft);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .er-home-modal-close:hover {
        background: #DBE3EE;
        color: var(--er-text-main);
    }

    .er-home-modal-close .material-icons {
        font-size: 20px;
    }

.er-home-modal-body {
    padding: 22px 24px;
    text-align: center;
}

.er-home-qr-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--er-color-primary);
    margin-bottom: 4px;
}

.er-home-qr-phone {
    font-size: 1rem;
    color: var(--er-text-soft);
    font-weight: 600;
    margin-bottom: 18px;
    letter-spacing: 0.02em;
}

.er-home-qr-instr
