/* Top Controls Container */
.top-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Dark Mode Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    .theme-toggle:hover {
        transform: translateY(-2px) rotate(20deg);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        background: rgba(255, 255, 255, 0.25);
    }

    .theme-toggle:active {
        transform: translateY(0) rotate(20deg);
    }

/* Light mode colors */
body.light-mode .theme-toggle {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
    border-color: rgba(0, 0, 0, 0.1);
}

    body.light-mode .theme-toggle:hover {
        background: rgba(0, 0, 0, 0.15);
    }

/* Language Switcher - Simplified & Smaller */
.language-switcher {
    position: relative;
}

.custom-select-wrapper {
    position: relative;
}

.custom-select {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    min-width: 95px;
    height: 40px;
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    .select-trigger:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        background: rgba(255, 255, 255, 0.25);
    }

    .select-trigger:active {
        transform: translateY(0);
    }

body.light-mode .select-trigger {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.1);
}

    body.light-mode .select-trigger:hover {
        background: rgba(0, 0, 0, 0.15);
    }

.flag-icon {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.select-trigger:hover .flag-icon {
    transform: scale(1.1);
}

.selected-lang {
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

body.light-mode .selected-lang {
    color: #333;
    text-shadow: none;
}

.arrow-icon {
    display: none;
}

.select-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-select.open .select-options {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body.light-mode .select-options {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.1);
}

.option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
    font-weight: 500;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}

    .option::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.3) 100%);
        transition: left 0.3s ease;
        z-index: 0;
    }

    .option:hover::before {
        left: 0;
    }

    .option:hover {
        padding-left: 20px;
        color: #90cdf4;
    }

        .option:hover .flag-icon {
            transform: scale(1.1);
        }

    .option.active {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.35) 100%);
        color: #90cdf4;
        font-weight: 700;
        padding-left: 20px;
    }

        .option.active::after {
            content: '✓';
            position: absolute;
            right: 16px;
            font-size: 14px;
            font-weight: bold;
            color: #90cdf4;
            animation: checkmark 0.5s ease;
            z-index: 1;
        }

@keyframes checkmark {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-45deg);
    }

    50% {
        transform: scale(1.2) rotate(10deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.option:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.option span {
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
}

.option .flag-icon {
    z-index: 1;
}

/* Light Mode Option Styles */
body.light-mode .option {
    color: #333;
}

    body.light-mode .option::before {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.15) 100%);
    }

    body.light-mode .option:hover {
        color: #667eea;
    }

    body.light-mode .option.active {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.2) 100%);
        color: #667eea;
    }

        body.light-mode .option.active::after {
            color: #667eea;
        }

    body.light-mode .option:not(:last-child) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

/* Light Mode General Styles */
body.light-mode {
    background-color: #f5f5f5;
    color: #333;
}

    body.light-mode .hero-section,
    body.light-mode .bottom-section,
    body.light-mode .contact-section {
        background-color: #f5f5f5;
        color: #333;
    }

    body.light-mode .carousel-container {
        background: linear-gradient(to bottom, #f5f5f5 0%, #e0e7ff 50%, #f5f5f5 100%);
    }

    body.light-mode .header-text_top,
    body.light-mode .header-text_bot {
        color: #333;
    }

    body.light-mode .newsletter-btn,
    body.light-mode .signup-btn {
        background-color: #333;
        color: #fff;
    }

        body.light-mode .newsletter-btn:hover,
        body.light-mode .signup-btn:hover {
            background-color: #555;
        }

    body.light-mode .bottom-section .header-text_bot {
        color: #666;
    }

    body.light-mode .contact-item h3 {
        color: #667eea;
    }

    body.light-mode .contact-item p {
        color: #555;
    }

    body.light-mode .modal-content {
        background: #fff;
        border-color: #667eea;
        color: #333;
    }

    body.light-mode .modal-title {
        color: #667eea;
    }

    body.light-mode .form-group input,
    body.light-mode .form-group select {
        background: #f8f9fa;
        border-color: #ddd;
        color: #333;
    }

        body.light-mode .form-group input::placeholder {
            color: #999;
        }

    body.light-mode .date-input {
        background: #f8f9fa;
        color: #333;
    }

    body.light-mode .form-select {
        background-color: #f8f9fa;
        color: #333;
        border-color: #ddd;
    }

        body.light-mode .form-select option {
            background-color: #fff;
            color: #333;
        }

    body.light-mode .carousel-nav {
        background-color: rgba(0, 0, 0, 0.1);
        color: #333;
        border-color: rgba(0, 0, 0, 0.2);
    }

        body.light-mode .carousel-nav:hover {
            background-color: rgba(0, 0, 0, 0.2);
        }

    body.light-mode .indicator {
        background-color: rgba(0, 0, 0, 0.2);
    }

        body.light-mode .indicator.active {
            background-color: #333;
        }

/* Responsive */
@media (max-width: 768px) {
    .top-controls {
        top: 10px;
        right: 10px;
        gap: 10px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .select-trigger {
        padding: 6px 12px;
        min-width: 85px;
        height: 36px;
        gap: 6px;
    }

    .flag-icon {
        width: 20px;
        height: 14px;
    }

    .selected-lang {
        font-size: 12px;
    }

    .select-options {
        min-width: 140px;
    }

    .option {
        padding: 10px 14px;
        gap: 8px;
        font-size: 12px;
    }

        .option:hover {
            padding-left: 18px;
        }

        .option.active {
            padding-left: 18px;
        }
}

@media (max-width: 440px) {
    .theme-toggle {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .select-trigger {
        padding: 5px 10px;
        min-width: 75px;
        height: 34px;
        gap: 5px;
    }

    .flag-icon {
        width: 18px;
        height: 13px;
    }

    .selected-lang {
        font-size: 11px;
    }
}

/* Smooth entrance animation */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-controls {
    animation: slideInFromTop 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth theme transition */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

* {
    transition-property: background-color, color, border-color;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}
