/* IAUI Guidelines — shared visual theme
   Used by templates/guidelines/new/*.html, which all extend
   guidelines/base.html -> base.html, so scoping stays predictable. */

:root {
    --gl-navy-deep: #16233f;
    --gl-navy: #203864;
    --gl-navy-soft: #33508c;
    --gl-gold: #e8b923;
    --gl-lemon: #ffea00;
    --gl-paper: #f6f7fb;
    --gl-line: #e3e7f0;
    --gl-ink: #1d2740;
    --gl-muted: #5b667e;
}

a:hover {
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
}

#section {
    background: var(--gl-paper);
    padding: 0 0 56px;
}

/* ---------- hero ---------- */

.gl-hero {
    background: linear-gradient(135deg, var(--gl-navy-deep), var(--gl-navy) 60%, var(--gl-navy-soft));
    border-radius: 12px;
    padding: 30px 32px;
    color: #fff;
    margin-top: 26px;
    position: relative;
    overflow: hidden;
}

.gl-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 234, 0, .16), transparent 70%);
}

.gl-hero .kicker,
.gl-hero h1,
.gl-hero .subtitle-en,
.gl-hero .rule {
    position: relative;
    z-index: 1;
}

.gl-hero .kicker {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .65);
    font-weight: 700;
    margin-bottom: 8px;
}

.gl-hero h1 {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.9rem;
    margin: 0;
}

.gl-hero .subtitle-en {
    font-style: italic;
    color: rgba(255, 255, 255, .78);
    font-size: 15px;
    margin-top: 4px;
}

.gl-hero .rule {
    width: 46px;
    height: 3px;
    background: var(--gl-lemon);
    margin: 16px 0 0;
}

/* ---------- category menu ---------- */

.gl-menu {
    display: flex;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--gl-line);
    border-radius: 999px;
    padding: 6px;
    margin: 22px 0 26px;
    overflow-x: auto;
    scrollbar-width: none;
}

.gl-menu::-webkit-scrollbar {
    display: none;
}

.gl-menu-item {
    flex: 0 0 auto;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--gl-muted) !important;
    transition: background-color .15s ease, color .15s ease;
}

.gl-menu-item:hover {
    background: var(--gl-paper);
    color: var(--gl-navy) !important;
    text-decoration: none;
}

/* own class name — base.html has a global `.active { color:#fff !important }` */
.gl-menu-item.is-current {
    background: var(--gl-navy);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(32, 56, 100, .25);
}

.gl-menu-item:focus-visible {
    outline: 2px solid var(--gl-gold);
    outline-offset: -2px;
}

/* ---------- intro copy ---------- */

.gl-intro p {
    text-align: justify;
    color: #26314d;
    font-size: 15px;
    line-height: 1.75;
}

.gl-intro .gl-gloss {
    font-style: italic;
    font-size: 13.5px;
    color: var(--gl-muted);
    border-left: 2px solid var(--gl-line);
    padding-left: 14px;
    margin-bottom: 0;
}

/* ---------- section label ---------- */

.gl-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    color: #a8862c;
    margin: 34px 0 14px;
}

.gl-label::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--gl-gold);
    border-radius: 2px;
}

/* ---------- category cards (index) ---------- */

.gl-cat-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--gl-line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.gl-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(16, 26, 48, .14);
}

.gl-cat-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--gl-line);
}

.gl-cat-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 24px 24px;
}

.gl-cat-body h2 {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 18px;
    color: var(--gl-ink);
    margin: 0;
}

.gl-cat-body .title-en {
    font-style: italic;
    font-size: 14px;
    color: var(--gl-muted);
    margin-top: 2px;
}

.gl-cat-body .desc {
    flex: 1;
    margin: 14px 0 18px;
    font-size: 14px;
    line-height: 1.65;
    color: #26314d;
}

.gl-cat-body .desc .en {
    display: block;
    margin-top: 6px;
    font-style: italic;
    font-size: 13px;
    color: var(--gl-muted);
}

.gl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 18px;
    border-radius: 999px;
    background: var(--gl-navy);
    color: #fff !important;
    font-size: 13.5px;
    font-weight: 700;
    transition: background-color .15s ease;
}

.gl-btn:hover {
    background: var(--gl-navy-deep);
    color: #fff !important;
    text-decoration: none;
}

.gl-btn i {
    font-size: 11px;
}

/* ---------- document cards (list / search / related) ---------- */

.gl-doc-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--gl-line);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

.gl-doc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(16, 26, 48, .13);
}

.gl-doc-card .thumb {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    background: var(--gl-paper);
    border-bottom: 1px solid var(--gl-line);
}

.gl-doc-card .body {
    flex: 1;
    padding: 14px 16px;
}

.gl-doc-card .body h3 {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gl-ink);
    line-height: 1.45;
    margin: 0;
}

.gl-doc-card .year {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gl-muted);
}

.gl-doc-card .foot {
    padding: 0 16px 16px;
}

.gl-doc-card .foot .gl-btn {
    padding: 8px 14px;
    font-size: 12.5px;
}

.gl-empty {
    text-align: center;
    color: var(--gl-muted);
    background: #fff;
    border: 1px dashed var(--gl-line);
    border-radius: 12px;
    padding: 34px 20px;
    font-size: 14px;
}

/* ---------- search ---------- */

.gl-search {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.gl-search .field {
    position: relative;
    width: 100%;
    max-width: 330px;
}

.gl-search input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--gl-line);
    border-radius: 999px;
    background: #fff;
    padding: 0 18px 0 44px;
    font-size: 14px;
    color: var(--gl-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.gl-search input:focus {
    outline: none;
    border-color: var(--gl-navy);
    box-shadow: 0 0 0 3px rgba(32, 56, 100, .12);
}

.gl-search .field i {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b96ab;
    font-size: 14px;
    pointer-events: none;
}

/* ---------- detail (view) ---------- */

.gl-detail {
    background: #fff;
    border: 1px solid var(--gl-line);
    border-radius: 14px;
    overflow: hidden;
}

.gl-detail .cover {
    background: var(--gl-paper);
    padding: 24px;
    text-align: center;
}

.gl-detail .cover img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(16, 26, 48, .16);
}

.gl-detail .info {
    padding: 30px 32px;
}

.gl-detail .info h1 {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 24px;
    color: var(--gl-ink);
    margin: 0 0 20px;
}

.gl-meta {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--gl-line);
    font-size: 14px;
}

.gl-meta:last-of-type {
    border-bottom: none;
}

.gl-meta dt {
    flex: 0 0 116px;
    font-weight: 600;
    color: var(--gl-navy);
    margin: 0;
}

.gl-meta dd {
    margin: 0;
    color: #26314d;
}

.gl-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--gl-line);
}

.gl-btn-download,
.gl-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    transition: background-color .15s ease, color .15s ease;
}

.gl-btn-download {
    background: var(--gl-lemon);
    color: var(--gl-navy-deep) !important;
    box-shadow: 0 5px 16px rgba(255, 234, 0, .28);
}

.gl-btn-download:hover {
    background: #fff43d;
    color: var(--gl-navy-deep) !important;
    text-decoration: none;
}

.gl-btn-back {
    background: #fff;
    border: 1px solid var(--gl-line);
    color: var(--gl-navy) !important;
}

.gl-btn-back:hover {
    background: var(--gl-navy);
    border-color: var(--gl-navy);
    color: #fff !important;
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .gl-hero {
        padding: 24px 22px;
    }

    .gl-detail .info {
        padding: 24px 22px;
    }

    .gl-meta {
        flex-direction: column;
        gap: 2px;
    }

    .gl-meta dt {
        flex-basis: auto;
    }
}

@media (prefers-reduced-motion: reduce) {

    .gl-cat-card,
    .gl-doc-card,
    .gl-menu-item,
    .gl-btn,
    .gl-search input {
        transition: none;
    }
}
