/* Εμφάνιση των πρώτων επιπέδων (univ-1, univ-2, κλπ) οριζόντια */
.header-menu-wrapper {
    position: relative;
    z-index: 101;
    width: 100%;
    overflow: visible;
}

.header-menu .first-menu {
    display: flex;
    flex-direction: row;
    gap: 24px; /* Απόσταση μεταξύ των στοιχείων, προσαρμόστε αν θέλετε */
    list-style: none;
    padding: 0;
    margin: 0;
}

.header-menu .first-menu a:first-child{
    color: #242f4d;
    padding-left: 2px;
    padding-right: 2px;
    font-size: clamp(14px, 1.4vw, 18px);
    font-weight: 400;
}

.page-id-4827 .header-menu .first-menu a:first-child,
.page-id-7668 .header-menu .first-menu a:first-child{ color: #fff;}

.header-menu .first-menu > li {
    display: block;
    position: relative;
}

/* Απόκρυψη όλων των sub-menu και sub-menu2 εξ ορισμού */
.header-menu .sub-menu,
.header-menu .sub-menu2 { display: none;}

.header-menu .first-menu > li:hover > .sub-menu,
.header-menu .first-menu > li:focus-within > .sub-menu { display: none !important;}

/* Εμφάνιση submenu μόνο όταν το li έχει κλάση .open */
.header-menu .first-menu > li.open > .sub-menu { display: block !important;}

.page-id-4827 .header-menu .sub-menu{ top: calc(var(--header-height, 84px)); }
.page-id-7668 .header-menu .sub-menu{ top: calc(var(--header-height, 89px)); }

.header-menu .sub-menu{ top: calc(var(--header-height, 84px)); }

.header-menu .sub-menu {
    display: none;
    position: fixed;
    left: 0;
    width: 100vw;
    min-width: 100vw;
    max-width: 100vw;
    min-height: 50vh; 
    height: auto;             
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-left: 0 !important;     
    border: none;
    padding: 0;
    overflow: visible;
}

/* Διαφορετικό background ανά unit στο submenu */
.header-menu .first-menu > .univ-1 > .sub-menu, .header-menu .first-menu > .univ-1 > .sub-menu li > .sub-menu2 { background: #012d5b; }
/* .header-menu .first-menu > .univ-2 > .sub-menu,.header-menu .first-menu > .univ-2 > .sub-menu li > .sub-menu2 { background: #A16F5C; } */
.header-menu .first-menu > .univ-2 > .sub-menu, .header-menu .first-menu > .univ-2 > .sub-menu li > .sub-menu2 { background: #6f4737; }
.header-menu .first-menu > .univ-3 > .sub-menu, .header-menu .first-menu > .univ-3 > .sub-menu li > .sub-menu2 { background: #A65B00; }
.header-menu .first-menu > .univ-4 > .sub-menu, .header-menu .first-menu > .univ-4 > .sub-menu li > .sub-menu2 { background: #4b2717; }
.header-menu .first-menu > .univ-5 > .sub-menu, .header-menu .first-menu > .univ-5 > .sub-menu li > .sub-menu2 { background: #5F6932; }
.header-menu .first-menu > .univ-6 > .sub-menu, .header-menu .first-menu > .univ-6 > .sub-menu li > .sub-menu2 { background: #5B7382; }
.header-menu .first-menu > .univ-7 > .sub-menu, .header-menu .first-menu > .univ-7 > .sub-menu li > .sub-menu2 { background: #08BADF; }

.univ-1 .sub-menu__featured .call-to-action_button a {color: #012d5b;}
.univ-2 .sub-menu__featured .call-to-action_button a {color: #6f4737;}
.univ-3 .sub-menu__featured .call-to-action_button a {color: #A65B00;}
.univ-4 .sub-menu__featured .call-to-action_button a {color: #4b2717;}
.univ-5 .sub-menu__featured .call-to-action_button a {color: #5F6932;}
.univ-6 .sub-menu__featured .call-to-action_button a {color: #5B7382;}
.univ-7 .sub-menu__featured .call-to-action_button a {color: #08BADF;}

/* Προσαρμογή για να μην ξεχειλώνει το header */
.header-menu-wrapper {
    position: relative;
    z-index: 101;
    width: 100%;
    background: transparent;
    overflow: visible;
}

/* Το submenu να εμφανίζεται πάνω από το υπόλοιπο περιεχόμενο */
.header-menu {
    position: relative;
    z-index: 102;
}

/* Προαιρετικά: Απόκρυψη των κουμπιών "Fermer" και "Retour" στο αρχικό view */
.header-menu .filters__close{ display: none;}

.header-menu .filters__close {
    display: block;
    margin-top: 20px;
    cursor: pointer;
}

/* Τρεις στήλες στο sub-menu__wrapper: about | links | featured */
.sub-menu__wrapper {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1fr;
    gap: 32px;
    align-items: center;         
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    color: #fff;
    height: 430px;
}

.sub-menu__about{
    color: #fff;                
    text-align: left;          
    display: flex;
    flex-direction: column;
    align-items: baseline;        
    justify-content: flex-start;     
    height: 100%; 
}

.sub-menu__links,
.sub-menu__featured {
    color: #fff;                 
    text-align: left;          
    display: flex;
    flex-direction: column;
    align-items: baseline;        
    justify-content: flex-start;    
    height: 100%;
}

.sub-menu__about__title {
    font-size: 3.1rem;
    margin-bottom: 11px;
    font-weight: bold;
    color: inherit;
    line-height: 1.2;
}

.sub-menu__about__content p{ margin-bottom: 11px;}
.sub-menu__about { font-size: 1.3rem;}

.sub-menu__about a.btn.btn-primary{
    background: white;
    color: var(--univ-color, #373CF5);
    position: relative;
    border: none;
    z-index: 1;
    border-radius: 2rem;
    margin-right: 2.5rem;
    will-change: padding-right;
    transition: padding-right 0.3s ease-out 0s;
    min-width: 5.5rem;
    padding: 13px;
}

.sub-menu__wrapper .filters__close {
    position: absolute;
    top: -33px;
    right: 8px;
    cursor: pointer;
    height: 5rem;
    width: 5rem;
    line-height: 5rem;
    background: none;
    border: none;
    text-align: left;
    text-indent: -999em;
    overflow: hidden;
    color: white;
}

.sub-menu__wrapper .filters__close::before {
    content: "×";
    font-weight: 400;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    text-align: center;
    text-indent: 0;
    font-size: 2.8rem;
    transition: transform 0.2s ease-in-out;
}

.libelle__featured {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-align: center;
}

.sub-menu__featured__title {
    font-size: 19px;
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1.2;
    margin-top: 8px;
    color: #fff
}

.first-menu .sub-menu .sub-menu__featured__date.accroche {
    font-size: 18px;
    font-weight: 300;
}

.sub-menu__featured .call-to-action_button {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    color: #373CF5;
    padding: 9px;
    margin-top: 6px;
    border-radius: 17px;
}

.sub-menu__links {
    position: relative;
    flex: 1 1 34rem;
    padding: 3rem 8rem;
}

.sub-menu__featured{ padding: 3rem 0;}

.sub-menu__links::before {
    content: "";
    position: absolute;
    left: 100%;
    width: 16px;
    top: 0px;
    bottom: 0px;
    z-index: 2;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.06), transparent);
}

.sub-menu__links ul {
    margin: 0px;
    padding: 0px;
    list-style: none;
}

.sub-menu__links li {
    font-size: 1.6rem;
    font-weight: bold;
    margin: 0px;
    padding: 7px;
    color: #fff;
}

.sub-menu__links li:not(:last-child){ border-bottom: 1px solid rgba(255, 255, 255, 0.2);}

.sub-menu__links li a {
    color: #fff !important;
    text-decoration: none;
}

/* Προσθέτει το + πριν από κάθε li που έχει .sub-menu2 */
.sub-menu__links li > .sub-menu2 {
    display: block;
    position: absolute;
    top: 0;
    right: -13px;
    width: 24vw;
    max-width: 100vw;
    height: 100%;
    max-height: 430px;
    background: #fff;
    color: #242F4D;
    z-index: 20;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    overflow-y: auto;
    border-radius: 0 8px 8px 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.25s;
}

.sub-menu__links li.has-submenu2{
    display: inline-flex;
    width: 100%;
    justify-content: space-between;
}

/* Όταν το li είναι open, κάνε το sub-menu2 να "γλιστράει" μέσα */
.sub-menu__links li.has-submenu2 > .sub-menu2 {
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 0, 0); /* Ξεκινάει στη θέση του */
    transition: opacity 0.6s ease-in-out, 
                transform 0.7s ease-in-out,
                pointer-events 0s 0.7s; /* Delay ίσο με το μεγαλύτερο transition */
    overflow-x: hidden;
}

/* Όταν ανοίγει - slide από αριστερά προς τα δεξιά */
.sub-menu__links li.has-submenu2.open > .sub-menu2 {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(100%, 0, 0); /* Slide δεξιά */
    transition: opacity 0.4s ease-in-out, 
                transform 0.5s ease-in-out,
                pointer-events 0s 0s; /* Αμέσως clickable */
    overflow: auto;
}

/* Το + εμφανίζεται στο τέλος του li αν έχει sub-menu2 */
.sub-menu__links li.has-submenu2::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 12px;
    font-size: 1.1em;
    font-weight: 300;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
    order: 2;
    padding: 0 0 4px 0;
}

.sub-menu__links li.has-submenu2::after:hover {
    background-color: rgba(255, 255, 255, 0.6);
    transform: rotate(90deg) scale(1.1);
}

.sub-menu__links li.has-submenu2.open::after {
    content: "−";
    background-color: rgba(255, 255, 255, 0.6);
    transform: rotate(180deg);
}

.hide{ display: none !important;}

.sub-menu2__wrapper .btn-back {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 7px 12px;
    text-transform: capitalize;
    font-family: var(--global-font-family);
    margin-left: 5px;
    position: relative;
}

.sub-menu2__wrapper{ padding-top: 12px;}

/* Pseudo-element για το SVG βελάκι */
.sub-menu2__wrapper .btn-back::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0.5rem;  
    width: 16px;
    height: 16px;
    background: url("/business/wp-content/uploads/2025/12/left-arrow-duotone-white.svg") no-repeat center / contain;
    opacity: 0;
    transform: translateX(-8px) translateY(-50%) scale(0.9);
    transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover state */
.sub-menu2__wrapper .btn-back:hover::before {
    opacity: 1;
    transform: translateX(0) translateY(-50%) scale(1.1);
}

.sub-menu2__wrapper .btn-back { transition: padding-left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);}
.sub-menu2__wrapper .btn-back:hover { padding-left: 2.5rem;}

/* Bonus: Active state για click feedback */
.sub-menu2__wrapper .btn-back:active::before { transform: translateX(-2px) translateY(-50%) scale(0.95);}

/* Responsive: κάθετα κάτω από τα 900px */
@media (max-width: 900px) {
    .sub-menu__wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 8px;
        align-items: stretch;
    }
    .sub-menu__about,
    .sub-menu__links,
    .sub-menu__featured {
        grid-column: 1 / 2 !important;
        max-width: 100% !important;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}

/* Slide Animations */
@keyframes slideDownFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

.header-menu .sub-menu {
    opacity: 0;
    transform: translateY(-30px);
    pointer-events: none;
}

.header-menu .first-menu > li.open > .sub-menu {
    animation: slideDownFadeIn 0.4s ease forwards;
    pointer-events: auto;
}

.header-menu .first-menu > li.closing > .sub-menu {
    animation: slideUpFadeOut 0.3s ease forwards;
    pointer-events: none;
}

.header-menu .first-menu > li.open::after {
    content: "";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 9px solid red;
    z-index: 1001;
}

.header-menu .first-menu > .univ-1.open::after { border-bottom-color: #012d5b; }
.header-menu .first-menu > .univ-2.open::after { border-bottom-color: #6f4737; }
.header-menu .first-menu > .univ-3.open::after { border-bottom-color: #A65B00; }
.header-menu .first-menu > .univ-4.open::after { border-bottom-color: #4b2717; }
.header-menu .first-menu > .univ-5.open::after { border-bottom-color: #5F6932; }
.header-menu .first-menu > .univ-6.open::after { border-bottom-color: #5B7382; }
.header-menu .first-menu > .univ-7.open::after { border-bottom-color: #08BADF; }

/* Για οθόνες >= 2560px (2K monitors) */
@media only screen and (min-width: 2560px) {
    .header-menu .sub-menu {
        min-height: min-content; 
        height: auto;
        top: calc(var(--header-height, 89px));             
    }

    html[lang="en-GB"] .header-menu .sub-menu { top: calc(var(--header-height, 136px));             }

    .field__item img{
        width: 100% !important;
        height: auto !important;
    }

    .page-id-7588 .header-menu .sub-menu {
        min-height: 20vh;
        height: 20vh;
        top: calc(var(--header-height, 224px));
    }

    .page-id-7588 .header-menu .first-menu > li.open::after { bottom: -83px;}
    .page-id-7668 .header-menu .sub-menu { top: calc(var(--header-height, 152px));}
    .page-id-7668 .header-menu .first-menu > li.open::after { bottom: -65px;}

    .page-id-4827 .header-menu .sub-menu { top: calc(var(--header-height, 88px));}
    .page-id-4827 .header-menu .first-menu > li.open::after { bottom: -32px;}
}

@media only screen 
  and (min-width: 1200px) 
  and (max-width: 1300px) 
  and (min-height: 780px) 
  and (max-height: 820px) {
    .header-menu .sub-menu { top: calc(var(--header-height, 104px));}
    .sub-menu__wrapper { grid-template-columns: 1.1fr 2fr 1fr;}
}

@media (min-width: 1025px) and (max-width: 1168px){
   .header-menu .first-menu { gap: 16px;}
   .header-menu .sub-menu { top: calc(var(--header-height, 99px));}

    .sub-menu__wrapper { grid-template-columns: 1.1fr 2fr 1fr;}
    .sub-menu__about { justify-content: space-evenly;}

    .first-menu .sub-menu .sub-menu__featured__date.accroche { font-size: 15px;}

    .sub-menu__about__title { font-size: 2.5rem;}
    .sub-menu__about__content p{ font-size: 16px;}
}

@media (min-width: 1169px) and (max-width: 1285px){
   .header-menu .sub-menu { top: calc(var(--header-height, 117px));} 
}

@media (min-width: 1286px) and (max-width: 1510px){
    .header-menu .sub-menu {
        top: calc(var(--header-height, 117px));
        min-height: 54vh; 
        height: 54vh;
    } 

    .page-id-7668 .header-menu .sub-menu { top: calc(var(--header-height, 86px));}
}

.gtranslate{
    position: absolute !important;
    right: -13vw !important;
}
