/* Language toggle styling */
.language-switch {
    transition: all 0.3s ease;
    background: none !important;
    border: none !important;
    padding: 8px 12px !important;
    border-radius: 0 !important;
    font-weight: bold !important;
    text-decoration: none !important;
    position: relative;
}

/* Desktop version - just text, no background */
@media (min-width: 992px) {
    .lang-en-active {
        background: none !important;
        color: #fff !important;
        border-bottom: 2px solid #0d6efd !important;
    }

    .lang-uk-active {
        background: none !important;
        color: #0d6efd !important;
        border-bottom: 2px solid #0d6efd !important;
    }
    
    .language-switch:hover {
        background: none !important;
        color: #0d6efd !important;
        border-bottom: 2px solid #0d6efd !important;
    }
}

/* Mobile optimization fixes */
@media (max-width: 991.98px) {
    
    /* Fix navbar layout on mobile */
    #ftco-navbar .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
        position: relative;
        min-height: 60px;
    }
    
    .navbar-brand {
        flex: 0 0 auto;
        margin-right: 0;
        font-size: 18px;
    }
    
    /* Menu button styling */
    .navbar-toggler {
        margin: 0;
        padding: 6px 10px;
        border: 1px solid rgba(255,255,255,0.3);
        background: transparent;
        color: #fff;
        font-size: 14px;
        cursor: pointer;
        margin-left: auto;
    }
    
    .navbar-toggler:hover {
        background: rgba(255,255,255,0.1);
    }
    
    /* Mobile menu dropdown */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(52, 58, 64, 0.98);
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .navbar-collapse.collapse {
        display: none;
    }
    
    .navbar-collapse.show {
        display: block;
    }
    
    /* Ensure mobile menu items are visible */
    .navbar-nav {
        padding: 1rem 0;
        flex-direction: column;
        margin: 0;
        list-style: none;
    }
    
    .navbar-nav .nav-item {
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin: 0;
    }
    
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link {
        padding: 12px 20px;
        color: #fff;
        display: block;
        text-decoration: none;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }
    
    /* Mobile language toggle in menu */
    .mobile-language-item {
        border-top: 2px solid rgba(255,255,255,0.2);
        background: rgba(0,0,0,0.1);
    }
    
    .language-switch-mobile {
        display: block;
        color: #fff;
        text-decoration: none;
        font-weight: bold;
        padding: 12px 20px;
        transition: all 0.3s ease;
        font-size: 14px;
    }
    
    .language-switch-mobile:hover {
        background: rgba(255,255,255,0.1);
        color: #fff;
        text-decoration: none;
    }
    
    /* Hide desktop language toggle on mobile */
    .language-toggle-container {
        display: none;
    }
    
    /* Container for right side elements - remove if exists */
    .navbar-right-items {
        display: none;
    }
    
    /* Fix hero section on mobile */
    .hero-wrap {
        padding: 100px 0 60px;
    }
    
    .hero-wrap h1 {
        font-size: 28px;
        line-height: 1.2;
    }
    
    .hero-wrap .one-forth {
        text-align: center;
        margin-bottom: 30px;
    }
}

/* Desktop version - keep original language toggle */
@media (min-width: 992px) {
    .mobile-language-item {
        display: none;
    }
    
    .navbar-right-items {
        display: none;
    }
    
    .navbar-toggler {
        display: none;
    }
    
    .navbar-collapse {
        display: flex !important;
        position: static;
        background: transparent;
        box-shadow: none;
        border: none;
    }
    
    .navbar-nav {
        flex-direction: row;
        padding: 0;
    }
    
    .navbar-nav .nav-item {
        border: none;
        margin-left: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* Mobile optimization styles */
@media (max-width: 767px) {
    /* General adjustments */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    /* Navbar adjustments */
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    /* Hero section adjustments */
    .hero-wrap .slider-text {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    /* Domain form adjustments */
    .domain-form .form-group {
        flex-direction: column;
    }
    
    .domain-form .search-domain {
        margin-top: 10px;
        width: 100%;
    }
    
    /* Services section adjustments */
    .services {
        margin-bottom: 30px;
    }
    
    /* Pricing section adjustments */
    .block-7 {
        margin-bottom: 30px;
    }
    
    /* Blog section adjustments */
    .blog-entry {
        margin-bottom: 30px;
    }
    
    /* Footer adjustments */
    .ftco-footer-widget {
        margin-bottom: 30px;
    }
    
    /* Language toggle positioning */
    .language-switch {
        position: absolute;
        top: 10px;
        right: 60px;
        z-index: 999;
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        padding: 5px 10px !important;
    }
}

/* Tablet optimization */
@media (min-width: 768px) and (max-width: 991px) {
    /* Services section adjustments */
    .services {
        margin-bottom: 30px;
    }
    
    /* Pricing section adjustments */
    .block-7 {
        margin-bottom: 30px;
    }
    
    /* Footer adjustments */
    .ftco-footer-widget {
        margin-bottom: 30px;
    }
}

/* Improved loading performance */
.hero-wrap {
    height: auto !important;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Fluid containers on small screens */
@media (max-width: 767px) {
    .container {
        width: 100%;
        padding-right: 15px;
        padding-left: 15px;
        margin-right: auto;
        margin-left: auto;
    }
}

/* Better touch targets for mobile */
@media (max-width: 767px) {
    .nav-link, 
    .btn,
    input[type="submit"],
    input[type="button"],
    button {
        padding: 10px 15px;
        min-height: 44px;
    }
    
    .navbar-toggler {
        padding: 10px;
        margin-right: 5px;
    }
}

/* Improved visibility for language toggle */
.language-switch {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.language-switch:hover {
    background-color: rgba(0, 0, 0, 0.2);
}