:root {
    --bs-primary: #0F6690;
    --accent: #2795FB;
    --bs-info: #2795FB;
    --bs-font-sans-serif: 'PT Sans', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    --focus-ring: 0 0 0 .25rem rgba(39,149,251,.35);
}

/* Focus visibility for key interactive items */
.navbar .nav-link:focus-visible,
.dropdown-item:focus-visible,
.btn:focus-visible,
.nav-link.btn:focus-visible {
    outline: 0;
    box-shadow: var(--focus-ring);
    border-radius: .5rem;
}

/* Smaller font sizes */
.fs-7 {
    font-size: 0.75rem !important;
}
.fs-8 {
    font-size: 0.5rem !important;
}

/* Hero */
.hero {
    position: relative;
    min-height: 30vh;
    background-image: url('/skin/dechemax2025/assets/img/hero-background.png');
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,.85), rgba(255,255,255,.65));
    pointer-events: none;
}
.logo-a { max-width: clamp(160px, 25vw, 300px); }
.logo-b { max-width: clamp(110px, 20vw, 200px); }
.logo-c { max-width: clamp(90px, 15vw, 150px); }

/* News slider */
.news-swiper {
    position: relative
}

.news-swiper .swiper {
    width: 100%;
    height: 100%
}

.news-swiper .swiper-wrapper {
    align-items: stretch
}

.news-swiper .swiper-slide {
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 */
    overflow: hidden;
    border-radius: 12px
}

.news-swiper .slide-link {
    position: absolute;
    inset: 0;
    display: block;
    color: inherit;
    text-decoration: none
}

.news-swiper .slide-link:focus-visible {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
    border-radius: 12px
}

.news-swiper .slide-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.news-swiper .slide-media.placeholder {
    background: linear-gradient(135deg, #e9ecef, #dee2e6)
}

.news-swiper .slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 60%)
}

.news-swiper .slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    color: #fff
}

.news-swiper .slide-caption h4 {
    margin: 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .5)
}

/* News slider: Navigation buttons within bounds */
.news-swiper .swiper-button-next,
.news-swiper .swiper-button-prev {
    color: var(--bs-primary);
    width: 42px;
    #height: 42px;
    background: transparent;
    border-radius: 50%;
    border: 0;
}

.news-swiper .swiper-button-next:after,
.news-swiper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: 700;
}


/* News slider: Pagination dashes */
.news-swiper .swiper-pagination {
    position: static;
    margin-top: .5rem;
    display: flex;
    gap: .4rem;
    justify-content: center
}

.news-swiper .swiper-pagination-bullet {
    width: 18px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .5);
    opacity: 1
}

.news-swiper .swiper-pagination-bullet-active {
    background: #0d6efd
}

/* News cards */
.news-card .media-wrap {
    position: relative;
    overflow: hidden;
    border-top-left-radius: var(--bs-card-border-radius);
    border-top-right-radius: var(--bs-card-border-radius);
}

.news-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: opacity .25s ease, transform .25s ease;
}

@media (min-width: 768px) {
    .news-card .card-img-top {
        height: 220px;
    }
}

@media (min-width: 992px) {
    .news-card .card-img-top {
        height: 230px;
    }
}

.news-card .hover-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 102, 144, 0.35);
    color: #fff;
    opacity: 0;
    transition: opacity .25s ease;
}

.news-card .hover-overlay span {
    background: rgba(0, 0, 0, .35);
    padding: .25rem .5rem;
    border-radius: .25rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.news-card .media-link:hover .card-img-top,
.news-card .media-link:focus-visible .card-img-top {
    opacity: .8;
}

.news-card .media-link:hover .hover-overlay,
.news-card .media-link:focus-visible .hover-overlay {
    opacity: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .swiper, .swiper * {
        transition: none !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }
}
