/* Public site styles layered on top of the theme (style.css). */
:root {
    --brand: #005cbf;
    --brand-dark: #00438c;
    --ink: #1f2933;
    --muted: #5f6b7a;
    --line: #e3e8ef;
    --soft: #f4f7fb;
}

body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
body { color: var(--ink); height: auto; }

/* The navbar is absolutely positioned by the theme; keep content below it */
.site-main { padding-top: 76px; min-height: 60vh; }

/* ---------- navigation ---------- */
.site-navbar .site-navigation .site-menu > li.brand-logos { display: inline-flex; align-items: center; gap: 8px; margin-right: 12px; }
.brand-link { padding: 0 !important; }
.header-logo { width: auto; height: 50px; }
.sem-logo { background: transparent; }
.site-navbar .site-navigation .site-menu > li > a { color: rgba(255, 255, 255, .85); }
.site-navbar .site-navigation .site-menu .dropdown a { color: var(--ink); }

/* ---------- home carousel ---------- */
.home-carousel { margin-bottom: 1.5rem; }
.home-carousel .carousel-item img { width: 100%; height: clamp(260px, 42vw, 560px); object-fit: cover; display: block; }
.home-carousel .carousel-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 30, 70, 0) 35%, rgba(0, 30, 70, .75) 100%); }
.home-carousel .carousel-caption { z-index: 2; text-align: left; left: 8%; right: 8%; bottom: 2.5rem; }
.home-carousel .carousel-caption h2 { color: #fff; font-weight: 700; font-size: clamp(1.25rem, 3vw, 2.25rem); }
.home-carousel .carousel-caption p { color: rgba(255, 255, 255, .92); font-weight: 400; font-size: clamp(.9rem, 1.5vw, 1.1rem); }
.home-carousel .carousel-indicators { z-index: 3; }

/* ---------- page header ---------- */
.page-header { background: var(--soft); border-bottom: 1px solid var(--line); padding: 1.25rem 0 1.5rem; }
.page-header h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; color: var(--brand-dark); margin: 0; }
.page-header .breadcrumb { background: none; padding: 0; margin-bottom: .5rem; font-size: .875rem; }
.page-header .breadcrumb a { color: var(--muted); }

/* ---------- content ---------- */
.page-content { font-size: 1rem; line-height: 1.7; }
.page-content p, .page-content li, .page-content td { color: var(--ink); font-weight: 400; }
.page-content h2, .page-content h3 { color: var(--brand-dark); font-weight: 700; margin-top: 1.75rem; }
.page-content h3 { font-size: 1.35rem; }
.page-content h4, .page-content h5 { font-weight: 700; font-size: 1.05rem; margin-top: 1.25rem; color: var(--ink); }
.page-content > :first-child, .page-content .legacy-section > h3:first-child { margin-top: 0; }
.page-content a { color: var(--brand); }
.page-content a:hover { color: var(--brand-dark); text-decoration: underline !important; }
.page-content img { max-width: 100%; height: auto; }
.page-content blockquote { border-left: 4px solid var(--brand); background: var(--soft); padding: 1rem 1.25rem; font-style: italic; }
.page-content iframe { max-width: 100%; border: 0; }
.page-content .table td, .page-content .table th { vertical-align: top; }

/* ---------- documents ---------- */
.doc-list { list-style: none; padding: 0; margin: .5rem 0 1.25rem; border-top: 1px solid var(--line); }
.doc-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem .25rem; border-bottom: 1px solid var(--line); }
.doc-list li a::before { content: "\f15b"; font-family: "Font Awesome 6 Free"; font-weight: 400; margin-right: .6rem; color: var(--muted); }
.doc-ext { flex: none; font-size: .7rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 3px; padding: 0 .35rem; }
.page-files { margin-top: 2rem; }
.page-files h2 { font-size: 1.25rem; }

/* ---------- long merged pages ---------- */
.legacy-toc { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.25rem; margin: 1rem 0 2rem; }
.legacy-toc h4 { margin-top: 0; }
.legacy-toc ul { columns: 2 16rem; margin: 0; padding-left: 1.1rem; }
.legacy-toc li { break-inside: avoid; }
.legacy-section { padding-top: 1.5rem; margin-top: 1.5rem; border-top: 2px solid var(--line); scroll-margin-top: 90px; }

/* ---------- sub-pages / side nav ---------- */
.child-pages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.child-pages a { display: block; padding: 1rem; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; }
.child-pages a:hover { border-color: var(--brand); background: var(--soft); text-decoration: none !important; }
.side-nav { margin-top: 1rem; }
@media (min-width: 992px) { .side-nav { margin-top: 0; border-left: 1px solid var(--line); } }
.side-nav-title { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.side-nav-title a { color: var(--brand-dark); }
.side-nav ul { list-style: none; padding-left: 0; margin: 0; }
.side-nav ul ul { padding-left: .9rem; border-left: 2px solid var(--line); margin: .15rem 0 .35rem .3rem; }
.side-nav li a { display: block; padding: .3rem .5rem; color: var(--ink); border-radius: 4px; font-size: .95rem; }
.side-nav li a:hover { background: var(--soft); }
.side-nav li.active > a { background: var(--brand); color: #fff; }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.gallery-item figcaption { font-size: .875rem; color: var(--muted); margin-top: .35rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--soft); border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 2.5rem; color: var(--muted); }
.footer-logo { max-width: 320px; width: 100%; }
.footer-partners { display: flex; align-items: center; gap: 1.25rem; }
.footer-partners img { max-height: 70px; max-width: 140px; }
.footer-contact h2 { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink); }
.footer-contact p { color: var(--muted); font-weight: 400; margin-bottom: .4rem; }
.footer-contact i { width: 1.2rem; color: var(--brand); }
.footer-bottom { text-align: center; padding: 1rem; margin-top: 2rem; background: rgba(0, 0, 0, .04); font-size: .875rem; }
.footer-social { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-social .fa-youtube { color: #ff0000; }
@media (max-width: 575.98px) {
    .home-carousel .carousel-caption { bottom: 1.75rem; }
    .home-carousel .carousel-caption p { display: none; }
    .home-carousel .carousel-caption h2 { font-size: 1.1rem; margin-bottom: .5rem; }
}

/* ---------- content blocks (monograph pages) ---------- */
.page-content .lead { font-size: 1.15rem; color: var(--ink); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin: 1.25rem 0 1.75rem; }
.stat { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; gap: .25rem; }
.stat-number { font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--brand); }
.stat-label { font-size: .875rem; color: var(--muted); line-height: 1.35; }
.timeline { list-style: none; padding: 0; margin: 1.5rem 0; border-left: 3px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.25rem 1.25rem; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: .45rem; width: 13px; height: 13px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.timeline-year { display: block; font-weight: 700; color: var(--brand-dark); }
.timeline-body { color: var(--ink); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.page-content a.info-card { display: block; padding: 1.25rem; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 8px; color: var(--ink); text-decoration: none !important; }
.page-content a.info-card:hover { background: var(--soft); }
.info-card h3 { margin-top: 0; font-size: 1.15rem; }
.info-card p { margin: 0; color: var(--muted); }
.home-section { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.home-section h2 { text-align: center; }
.home-section .lead { text-align: center; max-width: 46rem; margin: 0 auto; }
.home-section > p:last-child { text-align: center; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.profile { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; }
.profile img { width: 96px; height: 110px; object-fit: cover; border-radius: 6px; flex: none; }
.profile h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.profile p { margin: 0; font-size: .925rem; }
.page-banner { border-radius: 8px; }
.page-content a.btn, .page-content a.btn:hover { text-decoration: none !important; }
.page-content a.btn-primary, .page-content a.btn-primary:hover { color: #fff; }

/* ---------- members area (/materijali) ---------- */
.doc-actions { flex: none; display: inline-flex; align-items: center; gap: .6rem; font-size: .85rem; }
.doc-list li .doc-actions a::before { content: none; }
.doc-list li > a { min-width: 0; overflow-wrap: anywhere; }
.page-content a.info-card p { color: var(--muted); margin-bottom: .5rem; }
@media (max-width: 575.98px) { .doc-list li { flex-wrap: wrap; } .doc-actions { margin-left: auto; } }
/* The theme drops the last menu item's right padding, which the dropdown arrow needs. */
.site-navbar .site-navigation .site-menu > li.has-children:last-child > a { padding-right: 20px; }
