/* css/padure.css — Păduri și locuri verzi din România */

#padure-section .container { max-width: 980px; }

.pad-intro {
    max-width: 46rem;
    margin: 0 auto 1.6rem;
    font-size: 0.98rem;
    line-height: 1.7;
    text-align: center;
}

/* ─── Filtre ─────────────────────────────────────────────────────────────── */
.pad-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}
.pad-control { display: flex; flex-direction: column; gap: 0.25rem; }
.pad-control label { font-size: 0.8rem; font-weight: 700; color: var(--secondary-text-color); }
.pad-control select {
    min-width: 12rem;
    font-size: 1rem;              /* ≥1rem: sub atât, iOS mărește pagina la focus */
}
.pad-count { align-self: center; font-size: 0.85rem; color: var(--secondary-text-color); }

.pad-kinds {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}
.pad-kind {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: inherit;
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pad-kind:hover { border-color: #16a34a; }
.pad-kind.is-active { color: #fff; background: #15803d; border-color: #15803d; }

.pad-status {
    max-width: 42rem;
    margin: 0 auto 1.1rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.88rem;
    line-height: 1.55;
    text-align: center;
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.35);
    border-radius: 0.6rem;
}

/* ─── Harta ──────────────────────────────────────────────────────────────── */
.pad-map {
    position: relative;            /* reper pentru perdeaua de „se lucrează" */
    height: min(60vh, 30rem);
    margin-bottom: 0.5rem;
    border: 1px solid var(--card-border);
    border-radius: 0.7rem;
    overflow: hidden;
    z-index: 0;                    /* sub bara de navigare, care e lipită sus */
}
/* Cercul care se învârte cât se aduc potecile. Un semn nemișcat pe ecran nu se deosebește
   de o pagină înțepenită — de-aia se învârte. */
.pad-spin { animation: pad-spin 1s linear infinite; }
@keyframes pad-spin { to { transform: rotate(360deg); } }
/* Cine a cerut mai puțină mișcare pe ecran primește un semn care doar pulsează. */
@media (prefers-reduced-motion: reduce) {
    .pad-spin { animation: pad-fade 1.4s ease-in-out infinite; }
    @keyframes pad-fade { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
}

/* Pe tot ecranul: harta ia tot, fără colțuri rotunjite și fără chenar. */
.pad-map.is-fullscreen {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}
/* Butonul de ecran întreg, în aceeași ținută cu +/− ale hărții. */
.pad-fs a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
    color: #333;
    background: #fff;
    text-decoration: none;
}
.pad-fs a:hover { background: #f4f4f4; }

/* Comutatorul pădurilor, în aceeași ținută cu +/− și cu ecranul întreg. Verde aprins cât
   timp pădurile se marchează, ca să știi dintr-o privire dacă harta lucrează sau stă. */
.pad-forest-toggle a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
    color: #64748b;
    background: #fff;
    text-decoration: none;
}
.pad-forest-toggle a:hover { background: #f4f4f4; }
.pad-forest-toggle a.is-on { color: #fff; background: #15803d; }
.pad-forest-toggle a.is-on:hover { background: #166534; }

/* Butonul cu semnul de atenție: arată arealurile cu urs și viperă. Stins din pornire —
   cine merge la pădure nu vrea harta acoperită de pete roșii din prima clipă. */
.pad-risk-toggle a {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #b45309;
    font-size: 1rem;
}
.pad-risk-toggle a:hover { background: #fff7ed; }
.pad-risk-toggle a.is-on { color: #fff; background: #b45309; }
.pad-risk-toggle a.is-on:hover { background: #92400e; }

/* Cât căutăm pădurile, bradul se învârte. Un buton care nu face nimic vizibil câteva
   secunde bune pare stricat, iar omul apasă din nou — și cere aceleași păduri a doua oară.
   Se oprește când sunt desenate, adică atunci când chiar are ce vedea. */
.pad-forest-toggle a.is-busy { color: #fff; background: #15803d; }
.pad-tree-busy {
    display: inline-block;
    animation: pad-tree-turn 1.1s linear infinite;
}
@keyframes pad-tree-turn {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* Cine a cerut sistemului să nu miște lucrurile pe ecran nu vrea nici bradul învârtit.
   Îi arătăm că se lucrează prin pâlpâire blândă, nu prin rotire. */
@media (prefers-reduced-motion: reduce) {
    .pad-tree-busy { animation: pad-tree-pulse 1.4s ease-in-out infinite; }
    @keyframes pad-tree-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
}

/* Perdeaua de „se lucrează", peste hartă. E în interiorul hărții, deci se vede și pe tot
   ecranul, și oprește apăsările cât timp pagina adună drumurile. */
.pad-map-busy {
    position: absolute;
    inset: 0;
    z-index: 1000;                 /* peste dale și contururi, sub ferestrele Leaflet */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
}
.pad-map-busy[hidden] { display: none; }
.pad-map-busy-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 80%;
    padding: 0.8rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
    border-radius: 0.6rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.pad-map-busy-box i { color: #15803d; font-size: 1.1rem; }

.pad-map-hint {
    margin: 0 0 1.2rem;
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--secondary-text-color);
    text-align: center;
}
/* Bulinele din legendă, aceleași culori ca punctele de pe hartă. */
.pad-dot {
    display: inline-block;
    width: 0.62rem;
    height: 0.62rem;
    margin: 0 0.1rem;
    border: 1px solid #fff;
    border-radius: 50%;
    vertical-align: baseline;
}
.pad-dot.is-green { background: #15803d; }
.pad-dot.is-yellow { background: #eab308; }
/* Liniuțele din legenda drumurilor, aceleași culori ca pe hartă. */
.pad-line {
    display: inline-block;
    width: 1.4rem;
    height: 0;
    margin: 0 0.15rem;
    vertical-align: middle;
    border-top-width: 3px;
    border-top-style: solid;
}
.pad-line.is-path { border-top-color: #b45309; }
.pad-line.is-track { border-top-color: #a16207; border-top-style: dashed; }
.pad-line.is-bike { border-top-color: #0891b2; }
/* Butonul rămâne aprins cât timp drumurile sunt pe hartă. */
.pad-btn.is-on { color: #fff; background: #b45309; border-color: #b45309; }
/* Fereastra care apare la apăsarea unui punct. */
.pad-popup { display: flex; flex-direction: column; gap: 0.35rem; min-width: 11rem; }
.pad-popup strong { font-size: 0.95rem; }
.pad-popup span { font-size: 0.8rem; color: #475569; }
.leaflet-popup-content { margin: 0.7rem 0.9rem; }
/* Două butoane în fereastra de pe hartă: se așază unul sub altul, la lățime plină. */
.pad-popup .pad-btn { width: 100%; }

/* ─── Locul ales: poteci și animale ──────────────────────────────────────── */
.pad-detail {
    margin-bottom: 1.2rem;
    padding: 1.1rem 1.2rem;
    background: var(--section-alt-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.7rem;
}
.pad-detail h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.pad-detail h3 { font-size: 0.98rem; font-weight: 700; margin: 1rem 0 0.6rem; }
.pad-detail-trails { margin: 0; font-size: 0.88rem; line-height: 1.6; }

.pad-danger {
    display: flex;
    gap: 0.7rem;
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.45rem;
    border: 1px solid var(--card-border);
    border-left-width: 4px;
    border-radius: 0.5rem;
}
.pad-danger i { flex: 0 0 auto; margin-top: 0.15rem; font-size: 1.05rem; }
.pad-danger strong { display: block; font-size: 0.92rem; margin-bottom: 0.15rem; }
.pad-danger span { font-size: 0.86rem; line-height: 1.55; }
/* Roșu doar unde chiar e nevoie: judeţele cu cea mai mare densitate de urs. */
.pad-danger.is-high { border-left-color: #dc2626; background: rgba(220, 38, 38, 0.08); }
.pad-danger.is-high i { color: #dc2626; }
.pad-danger.is-warn { border-left-color: #d97706; background: rgba(217, 119, 6, 0.07); }
.pad-danger.is-warn i { color: #d97706; }
.pad-danger.is-always { border-left-color: #16a34a; }
.pad-danger.is-always i { color: #16a34a; }
.pad-danger.is-info { border-left-color: var(--card-border); }
.pad-danger.is-info i { color: var(--secondary-text-color); }
.pad-danger-note {
    margin: 0.6rem 0 0;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--secondary-text-color);
}

/* ─── Locurile ───────────────────────────────────────────────────────────── */
.pad-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
    gap: 0.9rem;
}
.pad-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem 1.1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 4px solid #16a34a;
    border-radius: 0.7rem;
}
.pad-card { cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.pad-card:hover, .pad-card:focus-visible {
    border-color: #16a34a;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.18);
    outline: none;
}
/* Pădurile luate din hartă arată altfel: nu le-am verificat noi. */
.pad-card.is-osm { border-left-color: #94a3b8; }
/* Galben pentru cele fără nume — n-au fișă, dar au drumuri de umblat. */
.pad-card.is-unnamed { border-left-color: #eab308; }
.pad-card.is-unnamed .pad-card-head i { color: #ca8a04; }
.pad-tag.is-unnamed { color: #a16207; border-color: rgba(234, 179, 8, 0.55); background: rgba(234, 179, 8, 0.12); }
body.dark-theme .pad-tag.is-unnamed { color: #fde047; }
.pad-tag {
    align-self: flex-start;
    padding: 0.12rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--secondary-text-color);
    border: 1px solid var(--card-border);
    border-radius: 999px;
}

.pad-card-head { display: flex; align-items: center; gap: 0.55rem; }
.pad-card-head i { color: #16a34a; font-size: 1.05rem; }
.pad-card-head h3 { margin: 0; font-size: 1.02rem; font-weight: 700; }
.pad-card-meta { margin: 0; font-size: 0.84rem; color: var(--secondary-text-color); }
.pad-card-note { margin: 0; font-size: 0.85rem; line-height: 1.55; }

.pad-card-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem; }

.pad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: #15803d;
    border: 1px solid #15803d;
    border-radius: 0.5rem;
    cursor: pointer;
}
.pad-btn:hover { background: #166534; color: #fff; }
.pad-btn:disabled { opacity: 0.6; cursor: default; }
.pad-btn-ghost {
    color: inherit;
    background: transparent;
    border-color: var(--card-border);
}
.pad-btn-ghost:hover { color: inherit; background: rgba(22, 163, 74, 0.12); border-color: #16a34a; }

/* ─── Înregistrarea traseului ────────────────────────────────────────────── */
.pad-track {
    margin: 2rem 0 1.4rem;
    padding: 1.1rem 1.2rem;
    background: var(--section-alt-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.7rem;
}
.pad-track h2 { font-size: 1.12rem; font-weight: 700; margin-bottom: 0.5rem; }
.pad-track-hint { margin: 0 0 0.8rem; font-size: 0.88rem; line-height: 1.6; }
.pad-track-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.pad-track-stats {
    margin: 0.7rem 0 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #15803d;
}
body.dark-theme .pad-track-stats { color: #4ade80; }

/* ─── Sfaturi ────────────────────────────────────────────────────────────── */
.pad-tips {
    margin-top: 1.6rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--card-border);
    border-radius: 0.7rem;
}
.pad-tips h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.6rem; }
.pad-tips ul { padding-left: 1.2rem; margin-bottom: 0.9rem; }
.pad-tips li { font-size: 0.9rem; line-height: 1.65; margin-bottom: 0.4rem; }
.pad-tips code {
    padding: 0.1rem 0.35rem;
    font-size: 0.85em;
    background: var(--table-highlight-bg);
    border-radius: 0.25rem;
}
.pad-note {
    margin: 0 0 0.8rem;
    padding: 0.75rem 0.95rem;
    font-size: 0.88rem;
    line-height: 1.6;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.4);
    border-radius: 0.55rem;
}
.pad-note i { color: #d97706; }
.pad-credit { margin: 0; font-size: 0.78rem; color: var(--secondary-text-color); }

@media (max-width: 575.98px) {
    .pad-controls { align-items: stretch; }
    .pad-control select { min-width: 0; width: 100%; }
    .pad-card-actions .pad-btn { flex: 1 1 auto; }
}

/* Când lista se oprește mai devreme decât harta: spunem cinstit câte au rămas afară. */
.pad-list-more {
    grid-column: 1 / -1;
    margin: 0.5rem 0 0;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    background: rgba(22, 163, 74, 0.08);
    font-size: 0.88rem;
    color: var(--secondary-text-color);
}

/* Vorba despre gunoi. Verde, cu o frunză, ca să se citească dintr-o privire — dar nu
   țipătoare: e o rugăminte între oameni, nu o interdicție lipită pe copac. */
.pad-eco {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    max-width: 46rem;
    margin: 0 auto 1.6rem;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
    line-height: 1.65;
    text-align: left;
    background: rgba(22, 163, 74, 0.1);
    border-left: 4px solid #16a34a;
    border-radius: 0.5rem;
}
.pad-eco i { margin-top: 0.25rem; color: #16a34a; font-size: 1.05rem; }
