/* Accessibility fixes (WCAG 2.1 AA) — loaded after the theme stylesheets */

/* Visible keyboard focus: dark ring on light backgrounds, white ring on dark and green ones.
   No box-shadow halo: on multi-line inline links it covered the surrounding text. */
:focus-visible {
    outline: 3px solid #002c42 !important;
    outline-offset: 2px !important;
}

.header-top :focus-visible,
#slideHome :focus-visible,
.bg-theme-colored1 :focus-visible,
#footer :focus-visible {
    outline-color: #fff !important;
}

/* The theme rule "a:focus { color: #00653B }" beats .btn-theme-colored1: green text on a green button.
   Restore the button text color on focus (hover keeps its own colors). */
a.btn-theme-colored1:focus:not(:hover) {
    color: #fff;
}

#slideHome a.btn-theme-colored1:focus:not(:hover),
.bg-theme-colored1 a.btn-theme-colored1:focus:not(:hover) {
    color: #000;
}

/* Carousel arrows are faded (opacity .3) until mouse hover: show them the same way on keyboard focus */
.owl-carousel:focus-within .owl-nav > button {
    opacity: 1;
}

.owl-carousel:focus-within .owl-nav > button.disabled {
    opacity: .5;
}

.owl-carousel:focus-within .owl-nav > button.owl-prev {
    left: 20px;
}

.owl-carousel:focus-within .owl-nav > button.owl-next {
    right: 20px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100000;
    padding: .75rem 1.25rem;
    background: #002c42;
    color: #fff !important;
    font-weight: 700;
    text-decoration: underline;
}

main:focus {
    outline: none;
}

/* Home hero title: the page h1 */
#slideHome .hero-title {
    font-family: "Poppins", sans-serif;
    font-weight: 800;
    font-size: 70px;
    line-height: 1;
    margin-top: 0;
    margin-bottom: 30px;
    color: #fff;
}

@media (max-width:768px) {
    #slideHome .hero-title {
        font-size: 46px;
    }
}

/* Home hero grows with its text (zoom, user text spacing) instead of clipping it */
#slideHome {
    display: flex;
    height: auto;
    min-height: max(70vh, 400px);
}

#slideHome .container-wrapper {
    position: relative;
    flex: 1;
    height: auto;
    padding: 40px 0;
}

/* Background video pause / play button */
#slideHome .video-background-controls {
    z-index: 3 !important;
    top: auto !important;
    bottom: 20px;
    right: 20px !important;
}

#slideHome .video-background-controls button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

/* Page subtitles (were h2) */
.page-title .page-subtitle {
    font-family: "Poppins", sans-serif;
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: normal;
    color: #002c42;
    margin-bottom: 0;
}

@media (max-width:768px) {
    .page-title .page-subtitle {
        font-size: 1.1rem;
    }
}

/* CMS text: headings fixed to the right level keep their old look through .h3/.h4 classes */
.text .h3 {
    color: #002c42;
    font-size: 1.8rem;
    line-height: 1.3;
}

@media (max-width:768px) {
    .text .h3 {
        font-size: 1.4rem;
        line-height: 1.2;
    }
}

/* Floating labels: Bootstrap fades them to 65% opacity, below the 4.5:1 contrast ratio */
.form-floating > label,
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    opacity: 1;
    color: #555;
}

/* File upload: the native input was display:none, so keyboard users could not reach it */
.upload-file-wrapper .form-upload {
    display: block !important;
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.upload-file-wrapper .form-upload:focus-visible + label {
    outline: 3px solid #002c42;
    outline-offset: 2px;
}

/* Form help text: Bootstrap grey #6c757d is 4.3:1 on the #f5f5f5 sections */
.form-text {
    color: #555;
}

/* Hero text over the video: a soft shadow keeps contrast on bright frames */
#slideHome .hero-title,
#slideHome p {
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

/* Footer: the cookie preferences widget replaces the reCAPTCHA notice, aligned left from tablet up */
@media (min-width: 768px) {
    .footer-bottom #cookies-manager-list-of-choices-made {
        margin-left: 0 !important;
        margin-right: auto !important;
    }
}

/* Feature boxes: their titles became h2 (heading order), the theme hover rule only covers h3 */
.feature-box:hover h2 {
    color: #fff;
}

/* Attachment format and size */
.file-meta {
    font-size: .85em;
    white-space: nowrap;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
