/* Language Dropdown Switcher */
.language-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 1rem;
}

.language-dropdown-toggle {
    background: transparent;
    border: 1px solid rgba(172, 179, 194, 0.3);
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #454d5d;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}

.language-dropdown-toggle:hover {
    background: rgba(172, 179, 194, 0.1);
    border-color: rgba(172, 179, 194, 0.5);
}

.lang-flag {
    font-size: 1.2rem;
    line-height: 1;
}

.lang-code {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.dropdown-arrow {
    font-size: 0.6rem;
    margin-left: 0.2rem;
    transition: transform 0.3s ease;
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: #fff;
    border: 1px solid rgba(172, 179, 194, 0.3);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    padding: 0.5rem 0;
    margin-left: 0;
    min-width: 100px;
    z-index: 1000;
}

.language-dropdown:hover .language-dropdown-menu,
.language-dropdown.open .language-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown:hover .dropdown-arrow,
.language-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown-menu li {
    margin: 0;
    padding: 0;
    display: block;
}

.language-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #454d5d;
    text-decoration: none;
    transition: background 0.2s ease;
}

.language-link:hover {
    background: rgba(172, 179, 194, 0.1);
    color: #454d5d;
}

/* Dark header support */
.header-dark #header:not(.scrolled) .language-dropdown-toggle {
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
}

.header-dark #header:not(.scrolled) .language-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* Ensure dropdown menu items are always visible with dark text on white background */
.header-dark #header .language-dropdown-menu {
    background: #fff !important;
}

.header-dark #header .language-link {
    color: #454d5d !important;
}

.header-dark #header .language-link:hover {
    background: rgba(172, 179, 194, 0.1) !important;
    color: #454d5d !important;
}

/* Force text color on all child elements too */
.header-dark #header .language-link * {
    color: #454d5d !important;
}

.header-dark #header .language-link:hover * {
    color: #454d5d !important;
}

.header-dark #header .language-link .lang-code {
    color: #454d5d !important;
}

/* Also for scrolled state */
.header-dark #header.scrolled .language-dropdown-menu {
    background: #fff !important;
}

.header-dark #header.scrolled .language-link {
    color: #454d5d !important;
}

.header-dark #header.scrolled .language-link * {
    color: #454d5d !important;
}

/* Also ensure it works when scrolled */
.header-dark #header.scrolled .language-dropdown-toggle {
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
}

.header-dark #header.scrolled .language-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* Mobile menu styles */
.mobile-container .language-dropdown {
    margin: 1rem 0;
    display: block;
}

.mobile-container .language-dropdown-toggle {
    width: 100%;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

.mobile-container .language-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.mobile-container .language-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 0.5rem;
    box-shadow: none;
    background: transparent;
    border: none;
}

.mobile-container .language-link {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(102, 113, 137, 0.1);
    margin-bottom: 1px;
}

.mobile-container .language-link:hover {
    background: rgba(102, 113, 137, 0.2);
    color: #fff;
}

/* Responsive */
@media (max-width: 840px) {
    .language-dropdown {
        margin-left: 0;
    }
}

/* ===========================
   BRICOSALO HEADER CUSTOMIZATION
   =========================== */

/* Mobile hamburger menu color for dark header */
.header-dark .mobile-menu .button_container span {
    background: #fff !important;
}

/* Login status visibility on dark header */
.header-dark #header:not(.scrolled) .login-status-wrapper,
.header-dark #header:not(.scrolled) .login-status-wrapper i {
    color: rgba(255, 255, 255, 0.85);
}

/* Logo container alignment */
#header .logo {
    display: flex;
    align-items: center;
}

/* Text logo styling */
.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #454d5d;
}

/* White text logo on dark header */
.header-dark #header:not(.scrolled) .logo-text,
.header-dark #header.scrolled .logo-text {
    color: #fff;
}

/* Italian flag border at bottom of header */
#header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right,
        #008C45 0%,
        #008C45 33.33%,
        #F4F9FF 33.33%,
        #F4F9FF 66.66%,
        #CD212A 66.66%,
        #CD212A 100%
    );
    z-index: 0;
}

/* Ensure dropdown menus appear above the header border */
.dropmenu ul ul {
    z-index: 10 !important;
}

/* Footer link styling - make FDT Group link stand out */
.footer-copyright a {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.footer-copyright a:hover {
    text-decoration-thickness: 2px;
}

/* Home icon styling in navigation */
.dropmenu a .fa-home {
    font-size: 1.2rem;
    vertical-align: middle;
    display: inline-block;
    line-height: 1;
}

/* Ensure home link has proper spacing and visibility */
.dropmenu > li > a .fa-home {
    padding: 0 0.2rem;
}

/* Site-wide font styling - Manrope + Poppins */
body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
}
