/*
 * Socijalistička partija Srpske site theme.
 * Styles for the public-facing site markup, paired with script.js and map.js.
 */

:root {
    --brand-red: #e31b23;
    --brand-red-dark: #c71419;
    --brand-blue: #196fce;
    --brand-red-2: #fe2d2b;
    --header-height: 135px;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: #1b1b18;
}

a {
    color: var(--brand-red);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-red-dark);
    text-decoration: none;
}

img {
    max-width: 100%;
}

/* Cap the page width on large desktops so the layout doesn't stretch
   too wide - Bootstrap's default xxl container grows to 1320px, which
   feels too wide for this layout. */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* ---------- Header ---------- */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: var(--brand-red);
    border: 0;
    box-shadow: none;
}

#header,
#header a,
#header .nav-link,
#header .navbar-toggler {
    color: #fff;
}

#header .social-wrapper {
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

#header .social-wrapper .pismo-switch a {
    color: #fff;
    opacity: 0.85;
}

#header .social-wrapper .pismo-switch a.active {
    font-weight: 700;
    opacity: 1;
}

#header .social-wrapper .social-icons a {
    color: #fff;
    margin-left: 12px;
}

#header .navbar {
    padding: 10px 0;
}

#header .navbar-brand img {
    height: 48px;
    width: auto;
    display: block;
}

#header .navbar-nav .nav-link {
    font-weight: 700;
    padding: 8px 14px !important;
}

#header .navbar-toggler {
    border: 0;
    padding: 4px 8px;
    font-size: 1.4rem;
    line-height: 1;
}

#header .navbar-toggler:focus {
    box-shadow: none;
}

#header .dropdown-menu {
    background: var(--brand-red-dark);
    border: 0;
    border-radius: 4px;
}

#header .dropdown-menu .dropdown-item {
    color: #fff;
}

#header .dropdown-menu .dropdown-item:hover,
#header .dropdown-menu .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#header.header-fix {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ---------- Hero ---------- */
.home-hero {
    position: relative;
    padding-top: var(--header-height);
}

.home-hero .carousel,
.home-hero .carousel-inner,
.home-hero .carousel-item {
    height: 70vh;
    min-height: 350px;
}

.home-hero .carousel-item img {
    width: 100%;
    height: 70vh;
    min-height: 350px;
    object-fit: cover;
    object-position: center 20%;
    transform: scale(1);
}

.home-hero .carousel-item.active img {
    animation: heroZoomIn 6s ease-out forwards;
}

@keyframes heroZoomIn {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.12);
    }
}

.home-hero .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    pointer-events: none;
    z-index: 1;
}

.home-hero .carousel-caption {
    z-index: 2;
    bottom: 15%;
}

.home-hero .carousel-caption h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
}

.home-hero .carousel-caption h1 a {
    color: #fff;
}

.home-hero .carousel-caption h1 a:hover {
    color: #fff;
}

/* ---------- News / Activity carousels ---------- */
.news,
.activity {
    padding: 60px 0;
}

.news .card-link,
.activity .card-link {
    display: flex;
    color: inherit;
    width: 100%;
}

.news .card,
.activity .card {
    border: 1px solid #d6d6d6;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

.news .card .wrapper,
.activity .card .wrapper {
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.news .card .wrapper img,
.activity .card .wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* On the /vijesti (category) listing, show the whole image instead of
   cropping it to fill the card. */
.category-listing .news .card .wrapper img,
.category-listing .activity .card .wrapper img {
    object-fit: contain;
    background: #fff;
}

.news .card-body,
.activity .card-body {
    padding: 16px;
}

.news .card-body .date,
.activity .card-body .date {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.news .card-title,
.activity .card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.owl-carousel .owl-item {
    padding: 4px;
}

.news-carousel .owl-stage,
.activity-carousel .owl-stage {
    display: flex;
}

.news-carousel .owl-item,
.activity-carousel .owl-item {
    display: flex;
    height: auto;
}

/* ---------- SVG waves ---------- */
.mb-minus {
    display: block;
    width: 100%;
    margin-bottom: -1px;
}

.mt-minus {
    display: block;
    width: 100%;
    margin-top: -1px;
    transform: rotate(180deg);
}

/* ---------- Goals (blue) ---------- */
.goals {
    background: var(--brand-blue);
    color: #fff;
    padding: 40px 0 60px;
}

.goals h2 {
    text-align: center;
    font-weight: 700;
}

.goals ul {
    list-style: none;
    padding: 0;
    max-width: 760px;
    margin: 24px auto 0;
}

.goals ul li {
    padding: 10px 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---------- Numbers ---------- */
.numbers {
    padding: 50px 0;
    text-align: center;
}

.numbers .count h4.counter {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-red);
    margin-bottom: 4px;
}

.numbers .count p {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #343a40;
}

/* ---------- Maps ---------- */
.maps {
    padding: 50px 0;
    background: #f8f9fa;
}

.bh-map svg {
    width: 100%;
    height: auto;
}

.bh-map path {
    fill: #d6d6d6;
    stroke: #fff;
    stroke-width: 1;
    cursor: pointer;
    transition: fill 0.2s ease;
}

.bh-map path:hover,
.bh-map path.active {
    fill: var(--brand-red);
}

.region-desc {
    display: none;
    padding: 16px 0;
    border-bottom: 1px solid #d6d6d6;
}

.region-desc.active {
    display: block;
}

.region-desc a {
    color: var(--brand-red);
    margin-right: 12px;
}

/* ---------- Join us (red) ---------- */
.join-us {
    background: var(--brand-red-2);
    color: #fff;
    text-align: center;
    padding: 50px 0;
}

.join-us .btn-secondary {
    max-width: 260px;
    margin: 20px auto 0;
}

/* ---------- Contact ---------- */
.contact {
    padding: 60px 0;
}

.contact h2 {
    font-weight: 700;
    margin-bottom: 24px;
}

.contact .contact-list {
    list-style: none;
    padding: 0;
}

.contact .contact-list li {
    padding: 6px 0;
}

.contact .contact-list a {
    color: #1b1b18;
}

/* ---------- Footer ---------- */
footer {
    background: #16181b;
    color: #adb3ba;
    padding: 64px 0 0;
}

footer a {
    color: #adb3ba;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #fff;
    text-decoration: none;
}

footer .logo {
    height: 36px;
    width: auto;
}

footer .footer-tagline {
    font-size: 14px;
    line-height: 1.6;
    max-width: 320px;
    margin-bottom: 22px;
}

footer h5 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    margin-bottom: 18px;
}

footer .social-links {
    display: flex;
    gap: 10px;
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: background 0.2s ease, transform 0.2s ease;
}

footer .social-links a:hover {
    background: var(--brand-red-2);
    transform: translateY(-2px);
}

footer .footer-nav,
footer .footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer .footer-nav li,
footer .footer-contact li {
    padding: 6px 0;
    font-size: 14px;
}

footer .footer-nav .nav-link {
    padding: 0 !important;
    font-weight: 400;
    color: #adb3ba;
}

footer .footer-nav .nav-link:hover {
    color: #fff;
}

footer .footer-nav .footer-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

footer .footer-nav .footer-details summary::-webkit-details-marker {
    display: none;
}

footer .footer-nav .footer-details summary::after {
    content: "+";
    color: #6b7278;
    font-weight: 400;
    margin-left: 8px;
}

footer .footer-nav .footer-details[open] summary::after {
    content: "\2212";
}

footer .footer-nav .footer-details[open] summary {
    margin-bottom: 4px;
}

footer .footer-nav .dropdown-menu-flat {
    list-style: none;
    background: transparent;
    border: 0;
    padding: 4px 0 0 14px;
    margin: 0;
}

footer .footer-nav .dropdown-menu-flat .dropdown-item {
    display: block;
    color: #adb3ba;
    padding: 4px 0;
    background: transparent;
    font-size: 13px;
}

footer .footer-nav .dropdown-menu-flat .dropdown-item:hover {
    color: #fff;
    background: transparent;
}

footer .footer-contact li i {
    width: 18px;
    color: var(--brand-red-2);
    margin-right: 8px;
}

footer .footer-top {
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

footer .footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: #6b7278;
}

/* ---------- Mobile ---------- */
@media (max-width: 991.98px) {
    .home-hero .overlay {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25));
    }

    .home-hero .carousel-item img,
    .home-hero .carousel,
    .home-hero .carousel-inner,
    .home-hero .carousel-item {
        height: 60vh;
        min-height: 300px;
    }

    .home-hero .carousel-item.active img {
        animation-name: heroZoomInMobile;
    }

    @keyframes heroZoomInMobile {
        from {
            transform: scale(1);
        }
        to {
            transform: scale(1.08);
        }
    }

    .home-hero .carousel-caption {
        bottom: 8%;
    }

    .home-hero .carousel-caption h1 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    #header.header-fix .navbar-brand {
        display: none;
    }

    #header.header-fix .navbar > .container,
    #header.header-fix .navbar > .container-fluid {
        justify-content: flex-end;
    }

    #header.header-fix .navbar {
        min-height: 50px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    #header .navbar-collapse {
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        margin-top: 8px;
        background: var(--brand-red-dark);
        border-radius: 4px;
        padding: 8px 12px;
    }

    #header .navbar-nav .nav-link {
        padding: 10px 8px !important;
    }

    #header .dropdown-menu {
        background: rgba(0, 0, 0, 0.15);
        margin: 0 0 4px 8px;
    }

    .news,
    .activity {
        padding: 32px 0;
    }

    .goals,
    .join-us,
    .contact,
    .numbers,
    .maps {
        padding: 32px 0;
    }

    .contact .container {
        padding-left: 28px;
        padding-right: 28px;
    }

    footer {
        padding: 48px 0 0;
    }

    footer .container {
        padding-left: 28px;
        padding-right: 28px;
    }

    footer .footer-top {
        padding-bottom: 32px;
    }

    footer .footer-top > [class^="col-"] {
        margin-bottom: 32px;
    }

    footer .footer-top > [class^="col-"]:last-child {
        margin-bottom: 0;
    }

    footer .footer-bottom {
        padding: 24px 0;
    }
}
