.text-transform-lowercase {
    text-transform: lowercase;
}
.testimonial-item {
    width: 100%;
}

.has-text-align-center {
    text-align: center;
}

/* Language Switcher Dropdown */
.language-switcher {
    position: relative;
}

.language-switcher .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.language-switcher .flag-icon {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.language-switcher .dropdown-menu {
    min-width: 150px;
    padding: 8px 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.language-switcher .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
}

.language-switcher .dropdown-item:hover {
    background: #f5f5f5;
}

.language-switcher .dropdown-item.active {
    background: #e8f4f8;
    color: #0066cc;
    font-weight: 600;
}

.language-switcher .dropdown-item .flag-icon {
    flex-shrink: 0;
}

.language-switcher .dropdown-item .lang-name {
    flex: 1;
}

/* Mobile language switcher */
@media (max-width: 1199px) {
    .language-switcher-mobile {
        padding: 20px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 20px;
    }
    
    .language-switcher-mobile .lang-option {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 12px 20px;
        color: #fff;
        text-decoration: none;
        transition: background 0.2s ease;
    }
    
    .language-switcher-mobile .lang-option:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .language-switcher-mobile .lang-option.active {
        background: rgba(255, 255, 255, 0.15);
        font-weight: 600;
    }
}

/* Language Switcher - Clean & Pretty Design */
.lang-switcher .flag-icon {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lang-switcher .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.lang-switcher .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Custom arrow - more visible */
.lang-switcher .dropdown-toggle::after {
    content: "";
    display: inline-block;
    margin-left: 4px;
    width: 14px;
    height: 14px;
    border: none;
    background: url('/wp-content/themes/apartmany-2025-italstina/images/icons/chevron-down.svg') center center;
    transition: background 0.3s ease;
}

.lang-switcher:hover .dropdown-toggle::after {
    background: url('/wp-content/themes/apartmany-2025-italstina/images/icons/chevron-orange.svg') center center;
}

/* Hover to open dropdown */
.lang-switcher:hover .dropdown-menu {
    display: block;
}

.lang-switcher .dropdown-menu {
    min-width: 120px;
    padding: 8px 0;
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: #fff;
}

.lang-switcher .dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
}

.lang-switcher .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #000;
}

.lang-switcher .dropdown-item:active {
    background-color: #e9ecef;
}

.lang-switcher .dropdown-item .flag-icon {
    margin-right: 10px;
}

/* Mobile adjustments */
@media (max-width: 1199px) {
    /* Disable hover on mobile */
    .lang-switcher:hover .dropdown-menu {
        display: none;
    }
    
    .lang-switcher.show .dropdown-menu {
        display: block;
    }
    
    .lang-switcher .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background: transparent;
    }
    
    .lang-switcher .dropdown-item {
        color: #fff;
        padding: 12px 20px;
    }
    
    .lang-switcher .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    .lang-switcher .dropdown-toggle::after {
        border-top-color: rgba(255, 255, 255, 0.9);
    }
}

/* Italian Language - Long Word Handling */

/* Responsive font sizing for long words on mobile */
@media (max-width: 767px) {
    .welcome-heading h1 {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .welcome-heading h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
}

/* Footer Apartment Titles */
footer h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Responsive footer titles */
@media (max-width: 991px) {
    footer h3 {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 767px) {
    footer h3 {
        font-size: 1.5rem !important;
    }
}

/* Prevent text overflow in footer columns */
footer .text-center.text-lg-start {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Italian-specific adjustments for buttons */
.btn-lg {
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    padding: 0.75rem 1.25rem;
}

/* Ensure CIN codes don't break layout */
.text-primary[style*="font-size:15px"] {
    word-break: break-all;
    line-height: 1.6;
}

/* Italian Hero Title - Specific Styling */
.hero-title-italian {
    font-size: 3.5rem;
    letter-spacing: 0.05em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 1199px) {
    .hero-title-italian {
        font-size: 3rem;
    }
}

@media (max-width: 991px) {
    .hero-title-italian {
        font-size: 2.75rem;
    }
}

@media (max-width: 767px) {
    .hero-title-italian {
        font-size: 2.25rem;
        letter-spacing: 0.02em;
    }
}

@media (max-width: 575px) {
    .hero-title-italian {
        font-size: 1.85rem;
        letter-spacing: 0;
    }
}

@media (max-width: 400px) {
    .hero-title-italian {
        font-size: 1.6rem;
    }
}

.footer-apartment h3 {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: manual; /* Only break at &nbsp; points */
    -webkit-hyphens: manual;
    -ms-hyphens: manual;
}

/* Mobile Language Menu Styling */
.mobile-lang-divider {
    margin-top: 30px !important;
    padding-top: 20px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-lang-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    margin-bottom: 10px;
}

.mobile-lang-item {
    order: 5;
}

.mobile-lang-item .nav-link {
    font-size: 1.1rem !important;
    padding: 15px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px;
    transition: all 0.3s ease;
}

.mobile-lang-item .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.flag-icon-mobile {
    width: 32px !important;
    height: 22px !important;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-right: 0 !important;
}

@media all and (min-width: 992px) {
    html[lang="it"] .welcome-wrapper .col-lg-4 {
        width: 41.66666667%;
    }
    
    html[lang="it"] .welcome-wrapper .col-lg-8 {
        width: 58.33333333%;
    }
}
