/* Custom font and color definitions */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 64px;
}

body {
    margin: 0;
    font-family: "Heebo", sans-serif;
}

h1,
h2,
h3 {
    font-family: "Frank Ruhl Libre", serif;
}

body.language-ru {
    font-family: Arial, "Helvetica Neue", sans-serif;
}

body.language-ru h1,
body.language-ru h2,
body.language-ru h3 {
    font-family: Georgia, "Times New Roman", serif;
}

.site-logo {
    margin-inline-end: 0.5rem;
}

.desktop-nav {
    margin-inline-start: 2.5rem;
}

.desktop-actions,
.mobile-menu-toggle {
    margin-inline-start: auto;
}

.language-selector {
    border-inline-start-width: 1px;
    padding-inline-start: 1rem;
    margin-inline-start: 1rem;
}

.contact-icon {
    margin-inline-end: 1rem;
    flex: none;
}

body.language-ru input:not([type="email"]),
body.language-ru textarea {
    text-align: left;
}

body.language-he input:not([type="email"]),
body.language-he textarea {
    text-align: right;
}

.bg-sage {
    background-color: #f3f4f1;
}

.text-forest {
    color: #2d4b41;
}

.bg-forest {
    background-color: #2d4b41;
}

.border-forest {
    border-color: #2d4b41;
}

/* Navigation underline animation */

.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: #2d4b41;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

html[dir="rtl"] .nav-link::after,
body.language-he .nav-link::after {
    transform-origin: right center;
}

html[dir="ltr"] .nav-link::after,
body.language-ru .nav-link::after {
    transform-origin: left center;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
    transform: scaleX(1);
}

.nav-link:hover,
.mobile-nav-link:hover {
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);
}

/* Slideshow fade */

#slideshow-image {
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

.slideshow-hidden {
    opacity: 0 !important;
}

/* Better keyboard focus visibility */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2d4b41;
    outline-offset: 3px;
}

/* Mobile menu animation */

#mobile-menu {
    animation: mobileMenuOpen 0.2s ease-out;
}

@keyframes mobileMenuOpen {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduce motion for users who request it */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
