﻿/* ==========================================
   GLOSAR CADASTRU SISTEMATIC — GeoCG
   Dedicated CSS for the glossary page
   ========================================== */

/* --- Wrapper --- */
.glosar-wrapper {
    padding: 7rem 0 4rem;
    background: var(--light);
    min-height: 100vh;
}

.glosar-wrapper .glosar-letter-section,
.glosar-wrapper .glosar-legislatie {
    text-align: left;
}

/* --- Header --- */
.glosar-header {
    position: static;
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #eee;
}

.glosar-header h1 {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.glosar-brand {
    color: var(--accent);
}

.glosar-subtitle {
    font-size: 1.05rem;
    color: #777;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Search --- */
.glosar-search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.glosar-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #aaa;
    pointer-events: none;
}

.glosar-search-icon svg {
    width: 100%;
    height: 100%;
}

.glosar-search-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: white;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.glosar-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15);
}

.glosar-search-input::placeholder {
    color: #bbb;
}

.glosar-search-count {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #999;
    font-weight: 600;
    pointer-events: none;
}

/* --- Alphabetic nav --- */
.glosar-alpha-nav {
    flex-direction: row;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 2.5rem;
    padding: 1rem 1.5rem;
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.glosar-alpha-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--dark);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.glosar-alpha-nav a:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.08);
}

/* --- Content --- */
.glosar-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* --- Letter section --- */
.glosar-letter-section {
    margin-bottom: 2rem;
    scroll-margin-top: 100px;
}

.glosar-letter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.25);
}

/* --- Entries --- */
.glosar-entries {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* --- Entry card --- */
.glosar-entry {
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    scroll-margin-top: 100px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.glosar-entry:hover {
    border-color: rgba(46, 204, 113, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.glosar-entry:target {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), 0 4px 16px rgba(46, 204, 113, 0.12);
}

.glosar-entry h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.6rem;
    scroll-margin-top: 100px;
}

/* --- Definition text --- */
.glosar-def {
    font-size: 0.93rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.glosar-def a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.glosar-def a:hover {
    color: #27ae60;
    text-decoration: underline;
}

.glosar-def strong {
    color: var(--dark);
}

.glosar-def em {
    color: #555;
    font-style: italic;
}

.glosar-def code {
    background: rgba(46, 204, 113, 0.08);
    color: var(--dark);
    padding: 0.1em 0.4em;
    border-radius: 4px;
    font-size: 0.87em;
    font-weight: 600;
}

/* --- Meta (tags + references) --- */
.glosar-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.glosar-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    background: rgba(46, 204, 113, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
}

.glosar-tag--lege {
    color: #8B5A2B;
    background: rgba(139, 90, 43, 0.1);
}

.glosar-ref {
    font-size: 0.78rem;
    color: #999;
    font-weight: 500;
}

.glosar-ref a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.glosar-ref a:hover {
    text-decoration: underline;
}

/* --- Legislație section --- */
.glosar-legislatie {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 2.5rem;
    margin-top: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.glosar-legislatie-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.glosar-legislatie-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.glosar-legislatie-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
}

.glosar-legislatie-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 700px;
}

.glosar-legi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.glosar-lege-card {
    background: var(--light);
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 1.5rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.glosar-lege-card:hover {
    border-color: rgba(46, 204, 113, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.glosar-lege-num {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.glosar-lege-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.glosar-lege-card p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.55;
    margin-bottom: 0.6rem;
}

.glosar-lege-status {
    font-size: 0.75rem;
    color: #999;
    font-style: italic;
}

/* --- Footer CTA --- */
.glosar-cta {
    text-align: center;
    padding: 2.5rem 2rem;
    margin-top: 2rem;
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.glosar-cta p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1.25rem;
}

.glosar-cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.glosar-cta-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.glosar-cta-link:hover {
    color: #27ae60;
    text-decoration: underline;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .glosar-wrapper {
        padding: 5rem 0 3rem;
    }

    .glosar-header h1 {
        font-size: 1.7rem;
    }

    .glosar-subtitle {
        font-size: 0.95rem;
    }

    .glosar-alpha-nav {
        z-index:5;
        padding: 0.75rem 1rem;
        gap: 0.3rem;
    }

    .glosar-alpha-nav a {
        width: 32px;
        height: 32px;
        font-size: 0.82rem;
    }

    .glosar-entry {
        padding: 1.25rem 1rem;
    }

    .glosar-legislatie {
        padding: 1.75rem 1.25rem;
    }

    .glosar-legi-grid {
        grid-template-columns: 1fr;
    }

    .glosar-cta {
        padding: 2rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .glosar-header h1 {
        font-size: 1.5rem;
    }

    .glosar-letter-badge {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .glosar-entry h3 {
        font-size: 1rem;
    }
}
