/* ========================================
   LANGUAGE MENU AND MULTILINGUAL SUPPORT
   ======================================== */

/* The site's fonts have no Greek or Cyrillic letters. For Greek, Bulgarian, Macedonian and
   Ukrainian, use a matching font already on the visitor's device for those letters only. */
@font-face {
    font-family: 'Neue';
    src: local('Helvetica Neue'), local('HelveticaNeue'), local('Arial'), local('ArialMT'), local('Roboto');
    font-weight: 400;
    font-style: normal;
    unicode-range: U+0370-03FF, U+1F00-1FFF, U+0400-052F;
}
@font-face {
    font-family: 'Neue';
    src: local('Helvetica Neue Bold'), local('HelveticaNeue-Bold'), local('Arial Bold'), local('Arial-BoldMT'), local('Roboto Bold');
    font-weight: 700;
    font-style: normal;
    unicode-range: U+0370-03FF, U+1F00-1FFF, U+0400-052F;
}
@font-face {
    font-family: 'Kansas';
    src: local('Georgia'), local('Times New Roman'), local('TimesNewRomanPSMT');
    font-weight: 500;
    font-style: normal;
    unicode-range: U+0370-03FF, U+1F00-1FFF, U+0400-052F;
}
@font-face {
    font-family: 'Kansas';
    src: local('Georgia Italic'), local('Georgia-Italic'), local('Times New Roman Italic'), local('TimesNewRomanPS-ItalicMT');
    font-weight: 500;
    font-style: italic;
    unicode-range: U+0370-03FF, U+1F00-1FFF, U+0400-052F;
}

/* Long words in some languages (German, Finnish, Hungarian...) must not overflow on phones. */
.homepage h1, .homepage h2, .homepage h3, .homepage h4 {
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Header: the contact button and the language menu sit together on the right. */
.new-homepage-hero__navbar {
    align-items: center;
}
.new-homepage-hero__navbar__home {
    display: inline-flex;
    line-height: 0;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}
.nav-actions .button {
    margin: 0 !important;
    white-space: nowrap;
}

.lang-switch {
    position: relative;
    font-family: 'Neue', sans-serif;
}
.lang-switch__button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 52px;
    background: transparent;
    color: #fff;
    font: 700 14px/1 'Neue', sans-serif;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.lang-switch__button:hover,
.lang-switch.is-open .lang-switch__button {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}
.lang-switch__button:focus-visible {
    outline: 2px solid #ff7315;
    outline-offset: 2px;
}
.lang-switch__chevron {
    transition: transform 0.2s ease;
}
.lang-switch.is-open .lang-switch__chevron {
    transform: rotate(180deg);
}

.lang-switch__menu {
    position: fixed;
    z-index: 2000;
    width: 420px;
    max-width: calc(100vw - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    padding: 12px;
    background: #fff;
    color: #002e22;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    text-align: left;
}
.lang-switch__menu[hidden] {
    display: none;
}
.lang-switch__title {
    margin: 4px 8px 10px !important;
    font-size: 12px !important;
    font-weight: 700;
    line-height: 1.3 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #52625d !important;
}
.lang-switch__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 6px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}
.lang-switch__list li {
    margin: 0 !important;
    padding: 0 !important;
}
.lang-switch__list li::before,
.lang-switch__list li::after {
    content: none !important;
    display: none !important;
}
.lang-switch__list a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #002e22 !important;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.25;
    text-decoration: none !important;
}
.lang-switch__list a:hover,
.lang-switch__list a:focus-visible {
    background: #e3f8ee;
    outline: none;
}
.lang-switch__list a[aria-current="true"] {
    background: #fff1e6;
    font-weight: 700;
}
/* Flags: 4:3, slightly rounded, with a thin outline so white flags (Finland, Greece...) show on white. */
.lang-switch__flag {
    display: block;
    flex: none;
    width: 20px;
    height: 15px;
    margin: 0 !important;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 46, 34, 0.15);
    object-fit: cover;
}
.lang-switch__button .lang-switch__flag {
    width: 24px;
    height: 18px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.new-homepage-hero__navbar__home {
    flex: 0 0 auto;
}

@media (max-width: 759px) {
    .nav-actions {
        gap: 8px;
        min-width: 0;
        flex: 0 1 auto;
    }
    /* Long labels ("Επικοινωνήστε μαζί μας", "Ar ais go dtí an leathanach baile") wrap
       onto two lines instead of pushing the language button off the screen. */
    .nav-actions .button {
        white-space: normal;
        text-wrap: balance;
        text-align: center;
        line-height: 1.15 !important;
        min-width: 0;
        flex: 0 1 auto;
        height: auto !important;
        min-height: 40px;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .lang-switch {
        flex: 0 0 auto;
    }
    .lang-switch__button {
        height: 32px;
        padding: 0 10px;
        font-size: 13px;
    }
    .lang-switch__button .lang-switch__flag {
        width: 20px;
        height: 15px;
    }
    .lang-switch__menu {
        width: auto;
        max-width: none;
    }
}
@media (max-width: 479px) {
    .nav-actions .button {
        font-size: 13px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}
@media (max-width: 359px) {
    .lang-switch__list {
        grid-template-columns: 1fr;
    }
}
