/* UVS overrides on top of the Charitics template (style.css). */

/* Skip link for keyboard users */
.uvs-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    background: var(--ul-primary);
    color: #fff;
    padding: 10px 16px;
}
.uvs-skip-link:focus {
    left: 10px;
    top: 10px;
}

/* Logo is a wide wordmark, slightly larger than the template's */
.logo-container .logo,
.ul-sidebar-header-logo .logo {
    max-width: clamp(170px, 13vw, 240px);
}

/* Current page in the menu */
.ul-header-nav > a.uvs-active,
.ul-header-nav > .has-sub-menu.uvs-active > a,
.ul-header-submenu a[aria-current="page"],
.ul-inner-sidebar-categories a.uvs-active {
    color: var(--ul-primary);
}

/* Template uses h5 for footer contact values; we use <p>, keep the look */
.ul-footer-top-contact-info-address {
    margin: 0;
    font-weight: 600;
    color: var(--ul-white, #fff);
}

/* Readable long-form text (Markdown content) */
.uvs-prose {
    font-size: clamp(15px, 0.95vw, 17px);
    line-height: 1.75;
    color: var(--ul-p);
}
.uvs-prose > *:first-child { margin-top: 0; }
.uvs-prose h2,
.uvs-prose h3,
.uvs-prose h4 {
    color: var(--ul-black);
    font-weight: 700;
    margin: 1.6em 0 0.6em;
    line-height: 1.3;
}
.uvs-prose h2 { font-size: clamp(22px, 1.6vw, 30px); }
.uvs-prose h3 { font-size: clamp(19px, 1.25vw, 23px); }
.uvs-prose p { margin-bottom: 1em; }
.uvs-prose ul,
.uvs-prose ol {
    padding-left: 1.4em;
    margin-bottom: 1.2em;
}
.uvs-prose ul { list-style: disc; }
.uvs-prose ol { list-style: decimal; }
.uvs-prose li { margin-bottom: 0.45em; }
.uvs-prose a {
    color: var(--ul-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.uvs-prose a.ul-btn { color: #fff; text-decoration: none; }
.uvs-prose blockquote {
    border-left: 4px solid var(--ul-primary);
    padding: 0.4em 0 0.4em 1.2em;
    margin: 1.5em 0;
    font-style: italic;
}

/* Highlighted info box (bank details, notes) */
.uvs-box {
    background: #FFF5EF;
    border: 1px solid rgba(235, 83, 16, 0.2);
    border-radius: 16px;
    padding: clamp(20px, 2vw, 32px);
    margin: 1.5em 0;
}
.uvs-box h3:first-child,
.uvs-box h2:first-child { margin-top: 0; }
.uvs-box dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; }
.uvs-box dt { font-weight: 700; color: var(--ul-black); }
.uvs-box dd { margin: 0; font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
@media (max-width: 575px) {
    .uvs-box dl { grid-template-columns: 1fr; gap: 2px; }
    .uvs-box dd { margin-bottom: 10px; }
}

/* Cards used for activities, topics, partners, media */
.uvs-card {
    height: 100%;
    background: #fff;
    border-radius: 20px;
    padding: clamp(22px, 2vw, 34px);
    box-shadow: 0 8px 40px rgba(30, 37, 47, 0.07);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.uvs-card .icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(235, 83, 16, 0.1);
    color: var(--ul-primary);
    font-size: 24px;
}
.uvs-card h3 { font-size: clamp(18px, 1.2vw, 22px); font-weight: 700; color: var(--ul-black); margin: 4px 0 0; }
.uvs-card h3 a:hover { color: var(--ul-primary); }
.uvs-card p { margin: 0; color: var(--ul-p); }
.uvs-card .meta { font-size: 14px; color: var(--ul-primary); font-weight: 600; }
.uvs-card .uvs-card-link { margin-top: auto; font-weight: 700; color: var(--ul-primary); }

/* Board member list */
.uvs-people { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.uvs-people li { background: #fff; border-radius: 14px; padding: 16px 20px; box-shadow: 0 6px 24px rgba(30, 37, 47, 0.06); }
.uvs-people strong { display: block; color: var(--ul-black); }
.uvs-people span { font-size: 14px; color: var(--ul-p); }

/* Photo gallery on event pages */
.uvs-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.uvs-gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; transition: transform 0.25s; }
.uvs-gallery-item:hover img { transform: scale(1.03); }

/* Click-to-load video */
.uvs-video { background: #1E252F; color: #fff; border-radius: 16px; padding: 24px; margin: 1.5em 0; text-align: center; }
.uvs-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }
.uvs-video-note { margin: 12px 0 0; font-size: 14px; color: #ccc; }
.uvs-video-note a { color: var(--ul-secondary); }

/* Sidebar call to action */
.uvs-sidebar-cta p { margin-bottom: 16px; }

/* Event cards without a venue look fine with the description only */
.ul-event-descr { margin-bottom: 16px; }

/* Template preloader hides scrollbars until JS runs; make sure content shows without JS too */
noscript ~ .preloader { display: none; }

/* Second (outline) button next to the main one */
.ul-btn.uvs-btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
}
.ul-btn.uvs-btn-outline:hover { background: var(--ul-primary); color: #fff; }
.ul-banner-btns { flex-wrap: wrap; gap: 14px; }

/* ---------- UVS logo lockup (sun + name) ---------- */
.uvs-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.uvs-logo-sun { width: clamp(48px, 3.6vw, 64px); height: auto; flex-shrink: 0; }
.uvs-logo-text {
    display: flex; flex-direction: column;
    font-family: var(--font-quicksand); font-weight: 700; line-height: 1.15;
    font-size: clamp(14px, 1vw, 18px); color: #F39200;
}
.uvs-logo--light .uvs-logo-text { color: #fff; }
.uvs-footer-logo { width: clamp(120px, 9vw, 160px); height: auto; margin-bottom: 18px; }
.logo-container a, .ul-sidebar-header-logo a { text-decoration: none; }

/* ---------- Real photos in template image slots ---------- */
/* The template sizes images with aspect-ratio only; crop photos instead of stretching them. */
.ul-banner-img .img-wrapper img,
.ul-about-imgs .img-wrapper img,
.ul-about-block .block-right img,
.ul-why-join-img img,
.ul-about-tab-img img,
.ul-blog-img img,
.ul-event-details-img img,
.ul-inner-sidebar-post .img img,
.ul-blog-sidebar-post .img img {
    object-fit: cover;
}
.ul-about-imgs .img-wrapper img { aspect-ratio: 690 / 612; width: 100%; border-radius: 30px; }
.ul-about-tab-img img { aspect-ratio: 539 / 476; width: 100%; border-radius: 20px; }
.ul-event-details-img img { aspect-ratio: 16 / 9; width: 100%; border-radius: 20px; }
.ul-inner-sidebar-post .img img, .ul-blog-sidebar-post .img img { aspect-ratio: 1; }

/* Background photos for page headings and call-to-action bands */
.ul-breadcrumb {
    background-image: linear-gradient(rgba(30, 37, 47, 0.6), rgba(30, 37, 47, 0.6)), url(/assets/img/uvs/seminar-2019/fews-sastanak.jpg);
    background-position: center 30%;
}
.ul-breadcrumb .ul-breadcrumb-title, .ul-breadcrumb-nav, .ul-breadcrumb-nav a { color: #fff; }
.ul-cta {
    background-image: linear-gradient(rgba(30, 37, 47, 0.72), rgba(30, 37, 47, 0.72)), url(/assets/img/uvs/seminar-2019/ucesnici.jpg);
}

/* Partner logos */
.uvs-partner-logo { height: 64px; width: auto; max-width: 220px; object-fit: contain; object-position: left center; }

/* Video player */
.uvs-video-file { width: 100%; border-radius: 12px; background: #000; }

/* ---------- Language switcher ---------- */
.uvs-lang-switch {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 3px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
}
.uvs-lang-switch a,
.uvs-lang-switch .uvs-lang-current {
    display: inline-block;
    padding: 8px 11px;
    border-radius: 999px;
    color: inherit;
}
.uvs-lang-switch .uvs-lang-current { background: var(--ul-primary); color: #fff; }
.uvs-lang-switch a:hover { color: var(--ul-primary); }
.ul-header-actions .uvs-lang-switch { color: #fff; }
.ul-header-bottom.sticky .uvs-lang-switch { color: var(--ul-black); border-color: rgba(30, 37, 47, 0.25); }
.uvs-sidebar-lang { margin: 20px 0; }
.uvs-sidebar-lang .uvs-lang-switch { color: var(--ul-black); border-color: rgba(30, 37, 47, 0.25); }
@media (max-width: 991px) {
    .ul-header-actions .uvs-lang-switch { display: none; }
}

/* Key-fact circles: custom SVG icons, shown white on the dark band */
.uvs-stat-icon {
    width: clamp(50px, 3.15vw, 60px);
    height: clamp(50px, 3.15vw, 60px);
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* =================== Dark mode =================== */
/* The theme is set on <html data-theme="light|dark"> by assets/js/uvs-theme-init.js.
   Template rules are darkened by the generated uvs-dark-template.css;
   the rules below cover the base page and UVS's own components. */
:root {
    --uvs-d-bg: #12161C;
    --uvs-d-surface: #1B2129;
    --uvs-d-surface-2: #222A34;
    --uvs-d-heading: #F1F3F6;
    --uvs-d-text: #C5CCD5;
    --uvs-d-accent: #FF8A4F;
    --uvs-d-border: #333C48;
}
html[data-theme="dark"] { color-scheme: dark; background-color: var(--uvs-d-bg); }
html[data-theme="dark"] body { background-color: var(--uvs-d-bg); color: var(--uvs-d-text); }

/* Readable text */
html[data-theme="dark"] .uvs-prose { color: var(--uvs-d-text); }
html[data-theme="dark"] .uvs-prose h2,
html[data-theme="dark"] .uvs-prose h3,
html[data-theme="dark"] .uvs-prose h4,
html[data-theme="dark"] .uvs-prose strong { color: var(--uvs-d-heading); }
html[data-theme="dark"] .uvs-prose a,
html[data-theme="dark"] .uvs-card .meta,
html[data-theme="dark"] .uvs-card .uvs-card-link,
html[data-theme="dark"] .uvs-card h3 a:hover,
html[data-theme="dark"] .ul-section-descr a { color: var(--uvs-d-accent); }

/* Cards, boxes, lists */
html[data-theme="dark"] .uvs-card,
html[data-theme="dark"] .uvs-people li {
    background-color: var(--uvs-d-surface);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .uvs-card h3,
html[data-theme="dark"] .uvs-people strong { color: var(--uvs-d-heading); }
html[data-theme="dark"] .uvs-card p,
html[data-theme="dark"] .uvs-people span { color: var(--uvs-d-text); }
html[data-theme="dark"] .uvs-card .icon { background: rgba(255, 138, 79, 0.14); color: var(--uvs-d-accent); }
html[data-theme="dark"] .uvs-box { background: #2A1F19; border-color: rgba(255, 138, 79, 0.25); }
html[data-theme="dark"] .uvs-box dt { color: var(--uvs-d-heading); }

/* Partner logos are dark-on-transparent: give them a light tile */
html[data-theme="dark"] .uvs-partner-logo { background: #fff; padding: 8px 12px; border-radius: 10px; box-sizing: content-box; }

/* Outline button on light backgrounds */
html[data-theme="dark"] .uvs-lang-switch .uvs-lang-current { color: #fff; }
html[data-theme="dark"] .ul-header-bottom.sticky .uvs-lang-switch,
html[data-theme="dark"] .uvs-sidebar-lang .uvs-lang-switch { color: var(--uvs-d-heading); border-color: var(--uvs-d-border); }

/* Gallery and media */
html[data-theme="dark"] .uvs-video { background: var(--uvs-d-surface-2); }

/* =================== Theme toggle button =================== */
.uvs-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s, color 0.2s;
}
.uvs-theme-toggle:hover { background: var(--ul-primary); border-color: var(--ul-primary); color: #fff; }
.uvs-theme-toggle:focus-visible { outline: 2px solid var(--ul-secondary); outline-offset: 2px; }
.ul-header-bottom.sticky .uvs-theme-toggle { color: var(--ul-black); border-color: rgba(30, 37, 47, 0.25); }
html[data-theme="dark"] .ul-header-bottom.sticky .uvs-theme-toggle { color: var(--uvs-d-heading); border-color: var(--uvs-d-border); }
/* Moon in light mode (switch to dark), sun in dark mode (switch to light) */
.uvs-theme-toggle .uvs-icon-sun { display: none; }
html[data-theme="dark"] .uvs-theme-toggle .uvs-icon-sun { display: block; }
html[data-theme="dark"] .uvs-theme-toggle .uvs-icon-moon { display: none; }

/* The template put a placeholder photo behind the key-fact circles (visible on hover). */
.ul-stats-item { background-image: none; }
