/* 
   Glossary & Rich Visuals CSS 
   ------------------------------------------------------- */

/* --- Archive: Hero & Search --- */
.glossary-hero {
    background: linear-gradient(135deg, #002147 0%, #004e92 100%);
    color: #fff;
    padding: 4rem 0 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.glossary-hero::after {
    content: "";
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: #fff;
    transform: skewY(-2deg);
}

.glossary-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.glossary-hero .hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Search Box */
.glossary-search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.glossary-search-box input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    padding-right: 3.5rem;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.glossary-search-box button {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: 8px;
    background: #008080;
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.glossary-search-box button:hover {
    transform: scale(1.05);
    background: #006666;
}

/* --- Archive: A-Z Navigation --- */
.az-nav-wrapper {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.az-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.az-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
}

.az-nav a:hover,
.az-nav a.active {
    background: #002147;
    color: white;
    transform: translateY(-2px);
}

/* --- Archive: Grid --- */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.glossary-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.glossary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #008080;
}

.glossary-card h3 {
    color: #002147;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.glossary-card p {
    color: #666;
    flex-grow: 1;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.glossary-link {
    color: #008080;
    font-weight: 600;
    text-decoration: none;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.glossary-link:hover {
    gap: 0.8rem;
    /* Slide arrow effect */
}

/* --- Single: Standard Layout --- */
.single-glossary-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.term-definition-box {
    background: #f0f9ff;
    border-left: 5px solid #002147;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 0 8px 8px 0;
}

.term-definition-box h2 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #002147;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.term-definition-box p {
    font-size: 1.25rem;
    color: #1f2937;
    margin: 0;
    font-weight: 500;
}

/* --- Rich Mode: SDGs & Flowcharts --- */
.rich-visual-mode {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

/* SDG Grid Layout */
.sdg-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 3rem 0;
}

.sdg-item {
    aspect-ratio: 1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    overflow: hidden;
}

.sdg-item:hover {
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.sdg-number {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.5rem;
    opacity: 0.8;
}

/* SDG Colors */
.sdg-1 {
    background: #E5243B;
}

.sdg-2 {
    background: #DDA63A;
}

.sdg-3 {
    background: #4C9F38;
}

.sdg-4 {
    background: #C5192D;
}

.sdg-5 {
    background: #FF3A21;
}

.sdg-6 {
    background: #26BDE2;
}

.sdg-7 {
    background: #FCC30B;
}

.sdg-8 {
    background: #A21942;
}

.sdg-9 {
    background: #FD6925;
}

.sdg-10 {
    background: #DD1367;
}

.sdg-11 {
    background: #FD9D24;
}

.sdg-12 {
    background: #BF8B2E;
}

.sdg-13 {
    background: #3F7E44;
}

.sdg-14 {
    background: #0A97D9;
}

.sdg-15 {
    background: #56C02B;
}

.sdg-16 {
    background: #00689D;
}

.sdg-17 {
    background: #19486A;
}

/* Process Flowchart (Simple Steps) */
.process-flow {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.process-step {
    flex: 1;
    min-width: 200px;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid #008080;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
}

.process-step::after {
    content: "→";
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #ccc;
    font-family: monospace;
}

.process-step:last-child::after {
    display: none;
}

.process-icon {
    font-size: 2.5rem;
    color: #008080;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .process-step::after {
        content: "↓";
        right: 50%;
        top: auto;
        bottom: -25px;
        transform: translateX(50%);
    }

    .process-step {
        margin-bottom: 1.5rem;
    }
}