/* Common Header Styles for all pages */

/* Fix logo text overlapping the logo image */
.header_logo .text {
    margin-left: 12px !important;
    display: none;
}

/* Header logo larger, title/subtitle white, mobile menu button icon white */
.header_logo .logo_picture img {
    width: 120px !important;
    height: auto !important;
}

.header_logo .brand,
.header_logo .text_secondary {
    color: #fff !important;
    display: none;
}

@media (max-width: 991.98px) {
    .header_trigger .line {
        background: #fff !important;
    }
}

/* Desktop navigation underline effect */
@media (min-width: 992px) {

    .header .nav-item:not(.dropdown-item),
    .header .nav-item.dropdown-toggle {
        position: relative;
    }

    .header .nav-item:not(.dropdown-item):after,
    .header .nav-item.dropdown-toggle:after {
        content: '';
        position: absolute;
        width: 100%;
        height: 4px;
        bottom: 0;
        left: 0;
        background: linear-gradient(111.41deg, #ff0844 24.85%, #ff8b67 95.39%);
        border-radius: 2px;
        transform: scale(0);
        transition: .4s ease-in-out;
    }

    /* Only show underline for current page */
    .header .nav-item.current:after {
        transform: scale(1);
    }

    /* Show underline on hover for individual items */
    .header .nav-item:not(.dropdown-item):hover:after,
    .header .nav-item.dropdown-toggle:hover:after {
        transform: scale(1);
    }

    .header .nav-item:not(.dropdown-item):focus:after,
    .header .nav-item.dropdown-toggle:focus:after {
        transform: scale(1);
    }

    .header .nav-item:not(.dropdown-item).current,
    .header .nav-item:not(.dropdown-item):focus,
    .header .nav-item:not(.dropdown-item):hover,
    .header .nav-item.dropdown-toggle.current,
    .header .nav-item.dropdown-toggle:focus,
    .header .nav-item.dropdown-toggle:hover {
        color: #2b3543;
    }
}

/* Custom styles for specialties dropdown */
.all-specialties-link {
    font-weight: 600 !important;
    color: #ffffff !important;
    font-size: 0.85em !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    padding: 14px 16px !important;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%) !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(106, 17, 203, 0.2) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

.all-specialties-link:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #7a21d5 0%, #3585fd 100%) !important;
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3) !important;
    transform: translateY(-2px) !important;
}

/* Remove the star icon */
.all-specialties-link::before {
    display: none !important;
}

.all-specialties-link:hover::before {
    display: none !important;
}

.specialty-divider {
    border: none !important;
    height: 2px !important;
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%) !important;
    margin: 12px 0 15px 0 !important;
    opacity: 0.4 !important;
    border-radius: 1px !important;
}

/* Modern outline button for "Δωρεάν Δοκιμή" with gradient border */
.header-btn--demo {
    background: transparent !important;
    border: 2px solid #fff !important;
    color: #fff !important;
    border-radius: 25px !important;
    padding: 0 24px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    height: 40px !important;
    text-transform: none !important;
}

.header-btn--demo:hover {
    background: linear-gradient(135deg, #6a11cb, #2575fc) !important;
    border: 2px solid transparent !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.4);
    transform: translateY(-2px);
}

/* Modern solid button for "Σύνδεση" */
.header-btn--login {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1)) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
    border-radius: 25px !important;
    padding: 0 24px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    height: 40px !important;
    text-transform: none !important;
}

.header-btn--login:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Dropdown styling improvements */
.header_nav .dropdown .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 1000 !important;
    width: 350px !important;
    max-width: 350px !important;
    min-width: 350px !important;
    padding: 20px !important;
    margin: 0 !important;
    font-size: 14px !important;
    background-color: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175) !important;
    background-clip: padding-box !important;
}

/* Bootstrap collapse behavior - this controls the visibility */
.header_nav .dropdown .dropdown-menu.collapse:not(.show) {
    display: none !important;
}

.header_nav .dropdown .dropdown-menu.collapse.show {
    display: block !important;
}

/* Fallback for show class without collapse */
.header_nav .dropdown .dropdown-menu.show {
    display: block !important;
}

.header_nav .dropdown .dropdown-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 8px 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.header_nav .dropdown .dropdown-list .list-item {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Dropdown item styling */
.header_nav .dropdown .dropdown-menu .dropdown-item {
    display: block !important;
    padding: 12px 0 !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Regular specialty items styling (not all-specialties-link) */
.header_nav .dropdown .dropdown-menu .dropdown-item:not(.all-specialties-link) {
    font-size: 11px !important;
    color: #555 !important;
    font-weight: 400 !important;
    padding: 10px 8px !important;
    border-radius: 3px !important;
    margin: 2px 0 !important;
    transition: all 0.2s ease !important;
}

.header_nav .dropdown .dropdown-menu .dropdown-item:hover {
    color: #2575fc !important;
    background: #f8f9fa !important;
    border-radius: 4px !important;
}

/* Enhanced hover for regular specialty items */
.header_nav .dropdown .dropdown-menu .dropdown-item:not(.all-specialties-link):hover {
    color: #2575fc !important;
    background: rgba(37, 117, 252, 0.05) !important;
    border-radius: 4px !important;
    padding-left: 12px !important;
}

/* Ensure dropdown parent positioning */
.header_nav .dropdown {
    position: relative !important;
}

/* Tablet dropdown styling */
@media (max-width: 1199.98px) and (min-width: 992px) {
    .header_nav .dropdown .dropdown-menu {
        width: 320px !important;
        max-width: 320px !important;
        min-width: 320px !important;
    }
}

/* Mobile dropdown styling */
@media (max-width: 991.98px) {
    .header_nav .dropdown .dropdown-menu {
        position: static !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        border: 1px solid #ddd !important;
        padding: 15px !important;
        background: white !important;
        color: #333 !important;
        margin-top: 10px !important;
        border-radius: 8px !important;
        width: 100% !important;
        min-width: auto !important;
        max-width: none !important;
    }

    .header_nav .dropdown .dropdown-menu .dropdown-item {
        color: #333 !important;
        font-weight: 500 !important;
        padding: 12px 0 !important;
        border-bottom: 1px solid #eee !important;
        font-size: 16px !important;
    }

    .header_nav .dropdown .dropdown-menu .dropdown-item:last-child {
        border-bottom: none !important;
    }
}

/* White header text for gradient backgrounds (specialties page) */
.header[style*="gradient"] .logo .brand,
.header[style*="gradient"] .logo .text_secondary,
.header[style*="gradient"] .header_logo .brand,
.header[style*="gradient"] .header_logo .text_secondary {
    color: white !important;
}

/* White mobile menu icon for gradient backgrounds */
.header[style*="gradient"] .header_trigger .line {
    background-color: white !important;
}

/* Additional mobile menu icon states */
.header[style*="gradient"] .header_trigger.active .line {
    background-color: white !important;
}

/* Ensure all logo text is white on gradient headers */
.header[style*="gradient"] .logo .text,
.header[style*="gradient"] .header_logo .text {
    color: white !important;
}

.header[style*="gradient"] .logo .text .brand,
.header[style*="gradient"] .logo .text .text_secondary,
.header[style*="gradient"] .header_logo .text .brand,
.header[style*="gradient"] .header_logo .text .text_secondary {
    color: white !important;
}

/* Specifically target the logo spans */
.header[style*="gradient"] .logo .text span,
.header[style*="gradient"] .header_logo .text span {
    color: white !important;
}

.header[style*="gradient"] .logo .text span.brand,
.header[style*="gradient"] .logo .text span.text_secondary,
.header[style*="gradient"] .header_logo .text span.brand,
.header[style*="gradient"] .header_logo .text span.text_secondary {
    color: white !important;
}

/* Main Header Component Styles */
.header {
    background-color: #fff;
    z-index: 100000;
    will-change: transform;
    -webkit-transition: .4s ease-in-out;
    -o-transition: .4s ease-in-out;
    transition: .4s ease-in-out;
    padding: 20px 0;
    color: #2b3543;
    position: relative;
    height: 90px
}

/* Header navigation active state styles for gradient backgrounds */
.header .nav-item:hover,
.header .nav-item:not(.dropdown-item):hover {
    color: #FFD580 !important;
}

.header_nav .dropdown-item:hover,
.header_nav .dropdown-item:hover {
    color: #2575fc !important;
}

.header .nav-item.current,
.header .nav-item:not(.dropdown-item).current {
    color: #FFD580 !important;
}

.header.sticky {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    overflow-y: auto
}

.header.sticky+main {
    margin-top: 90px
}

.header.opened {
    height: 100vh
}

.header--pinned {
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0)
}

.header--unpinned {
    -webkit-transform: translateY(-100%);
    -ms-transform: translateY(-100%);
    transform: translateY(-100%)
}

.header .nav-item.current,
.header .nav-item:focus,
.header .nav-item:hover {
    color: #3d53eb
}

.header_logo .logo_picture {
    width: 35px;
    height: 39px;
    margin-right: 5px
}

.header_logo .text {
    font-size: 12px;
    margin-bottom: 5px;
    font-weight: 400
}

.header_logo .text .brand {
    display: block;
    font-family: 'Inter', sans-serif;
    color: #2b3543;
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: -7px;
    font-weight: 600
}

.header_logo .text_secondary {
    position: relative;
    left: 1px
}

.header_trigger .line {
    width: 30px;
    height: 3px;
    background-color: #485870;
    display: block;
    margin: 4px auto;
    -webkit-transition: .3s ease-in-out;
    -o-transition: .3s ease-in-out;
    transition: .3s ease-in-out
}

.header_trigger.active {
    -webkit-transition-delay: .6s;
    -o-transition-delay: .6s;
    transition-delay: .6s;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg)
}

.header_trigger.active .line:nth-child(1),
.header_trigger.active .line:nth-child(3) {
    -webkit-transition-delay: .3s;
    -o-transition-delay: .3s;
    transition-delay: .3s
}

.header_trigger.active .line:nth-child(1) {
    -webkit-transform: translateY(1px);
    -ms-transform: translateY(1px);
    transform: translateY(1px)
}

.header_trigger.active .line:nth-child(3) {
    -webkit-transform: translateY(-13px) rotate(90deg);
    -ms-transform: translateY(-13px) rotate(90deg);
    transform: translateY(-13px) rotate(90deg)
}

.header_trigger.active .line:nth-child(2) {
    width: 0
}

.header_nav {
    width: 100%;
    text-align: center
}

.header_nav .promobar_socials {
    margin-top: 20px;
    color: #3d53eb
}

.header_nav .promobar_socials-item {
    font-size: 24px;
    line-height: 1;
    margin-right: 15px;
    position: relative;
    bottom: 0;
    -webkit-transition: bottom .3s;
    -o-transition: bottom .3s;
    transition: bottom .3s
}

.header_nav .promobar_socials-item:last-of-type {
    margin-right: 0
}

.header_nav .promobar_socials-item:focus,
.header_nav .promobar_socials-item:hover {
    bottom: 5px
}

.header_nav-list {
    font-size: 16px;
    line-height: 1;
    margin-top: 30px
}

.header_nav-list_item:not(.header_nav-list.dropdown) {
    padding: 20px 0
}

.header_nav .dropdown-menu .list-item:not(:last-of-type),
.header_nav .dropdown-toggle[aria-expanded=true] {
    padding-bottom: 20px
}

.header_nav .dropdown-toggle .icon {
    margin-left: 10px;
    position: relative;
    top: 1px
}

/* Desktop header styles */
@media screen and (min-width:991.98px) {
    .header {
        padding: 0;
        height: 84px;
        font-weight: 700;
        font-size: 16px
    }

    .header .container {
        height: 100%
    }

    .header.sticky {
        overflow-y: visible
    }

    .header.sticky+main {
        margin-top: 84px
    }

    .header_logo {
        position: relative;
        top: 3px
    }

    .header_trigger {
        display: none
    }

    .header .nav-item:not(.dropdown-item) {
        height: 100%;
        display: -webkit-inline-box;
        display: -ms-inline-flexbox;
        display: inline-flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        position: relative
    }

    .header .nav-item:not(.dropdown-item):after {
        content: '';
        position: absolute;
        width: 100%;
        height: 4px;
        bottom: 0;
        left: 0;
        background: -o-linear-gradient(338.59deg, #ff0844 24.85%, #ff8b67 95.39%);
        background: linear-gradient(111.41deg, #ff0844 24.85%, #ff8b67 95.39%);
        border-radius: 2px;
        -webkit-transform: scale(0);
        -ms-transform: scale(0);
        transform: scale(0);
        -webkit-transition: .4s ease-in-out;
        -o-transition: .4s ease-in-out;
        transition: .4s ease-in-out
    }

    .header .nav-item:not(.dropdown-item).current,
    .header .nav-item:not(.dropdown-item):focus,
    .header .nav-item:not(.dropdown-item):hover {
        color: #2b3543
    }

    .header .nav-item:not(.dropdown-item).current:after,
    .header .nav-item:not(.dropdown-item):focus:after,
    .header .nav-item:not(.dropdown-item):hover:after {
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1)
    }

    .header_nav {
        display: -webkit-box !important;
        display: -ms-flexbox !important;
        display: flex !important;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        width: unset;
        height: 100%
    }

    .header_nav .promobar_socials {
        display: none !important
    }

    .header_nav-list {
        height: 100%;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        font-size: 16px;
        margin-top: 0
    }

    .header_nav-list_item:not(.header_nav-list.dropdown) {
        padding: 0 17.5px;
        margin-right: 0;
        position: relative
    }

    .header_nav-list_item:not(.header_nav-list.dropdown):after {
        content: '';
        position: absolute;
        width: 0;
        height: 4px;
        bottom: 0;
        left: 0;
        background: -o-linear-gradient(338.59deg, #ff0844 24.85%, #ff8b67 95.39%);
        background: linear-gradient(111.41deg, #ff0844 24.85%, #ff8b67 95.39%);
        border-radius: 2px
    }

    .header_nav-list_item:not(.header_nav-list.dropdown).current,
    .header_nav-list_item:not(.header_nav-list.dropdown):focus,
    .header_nav-list_item:not(.header_nav-list.dropdown):hover {
        color: #2b3543
    }

    .header_nav-list_item:not(.header_nav-list.dropdown).current:after,
    .header_nav-list_item:not(.header_nav-list.dropdown):focus:after,
    .header_nav-list_item:not(.header_nav-list.dropdown):hover:after {
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1)
    }

    .header_nav-list_item {
        text-align: center;
        height: 100%;
        display: -webkit-inline-box;
        display: -ms-inline-flexbox;
        display: inline-flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center
    }

    .header_nav-list_item:last-of-type {
        margin-right: 0 !important
    }

    .header_nav .dropdown-menu {
        position: absolute;
        z-index: 100;
        opacity: 0;
        top: calc(100% - 30px);
        max-height: unset;
        text-align: left;
        visibility: hidden;
        padding-top: 10px;
        -webkit-transition: opacity .3s;
        -o-transition: opacity .3s;
        transition: opacity .3s;
        width: calc(100% + 60px)
    }

    .header_nav .dropdown-menu.active {
        opacity: 1;
        visibility: visible
    }

    .header_nav .dropdown-menu .list-item:not(:last-of-type) {
        padding-bottom: 25px
    }

    .header_nav .dropdown-menu .list-item[data-main=true] {
        display: none !important
    }

    .header_nav .dropdown-list {
        background: #fff;
        -webkit-box-shadow: 0 2px 14px rgba(112, 115, 255, .4);
        box-shadow: 0 2px 14px rgba(112, 115, 255, .4);
        border-radius: 8px;
        padding: 20px;
        margin: 0
    }

    .header_nav .dropdown-toggle[aria-expanded=true] {
        padding-bottom: 0
    }

    .header_nav .dropdown-toggle .icon {
        margin-left: 10px;
        position: relative;
        top: 1px
    }
}