* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #0066cc;
    --secondary: #003366;
    --accent: #00ccff;
    --white: #ffffff;
    --light-gray: #f5f8fa;
    --dark-gray: #333333;
}

body {
    background-color: var(--light-gray);
}

.header {
    color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background-color: #0063BB;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-selector {
    display: flex;
    gap: 5px;
    margin-left: 15px;
    z-index: 5;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
    background-color: var(--accent);
    color: var(--secondary);
    border-color: var(--accent);
}

.contact-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.contact-info i {
    margin-right: 5px;
}

.user-actions {
    display: flex;
    gap: 15px;
}

.user-actions a {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.user-actions a:hover {
    color: var(--accent);
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 2%;
}

.logo img {
    height: 60px;
    width: auto;
    filter: invert(0.9);
}

.tagline {
    font-size: 18px;
    font-weight: 500;
    color: var(--white);
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.nav-container {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 0 3%;
}

html[dir="rtl"] .nav-container {
    background: linear-gradient(-135deg, var(--primary), var(--secondary));
}

.nav-menu {
    display: flex;
    list-style-type: none;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    color: var(--white);
    text-decoration: none;
    padding: 15px 20px;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

.nav-menu li a.active {
    background-color: var(--accent);
    color: var(--secondary);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 1;
}

.nav-menu li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    color: var(--dark-gray);
    padding: 12px 20px;
    font-weight: 400;
}

.dropdown li a:hover {
    background-color: var(--light-gray);
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

/* RTL overrides */
html[dir="rtl"] .nav-container .nav-menu {
    direction: rtl;
}

html[dir="rtl"] .nav-container .nav-menu li a {
    text-align: right;
}

html[dir="rtl"] .dropdown {
    left: auto;
    right: 0;
}

.contact-info a>img,
.contact-info a>i {
    margin-inline-end: 5px;
}

/* Search Box Styles */
.cruise-search {
    background-color: var(--secondary);
    padding: 15px 1.5%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 7px;
}

.search-item {
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.search-label {
    color: var(--white);
    font-size: 12px;
    margin-bottom: 4px;
    font-weight: 500;
}

.search-select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--light-gray);
    background-color: var(--white);
    font-size: 13px;
    color: var(--dark-gray);
    width: 100%;
}

/* Button and Advanced Search Container */
.search-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    margin-left: 20px;
}

.search-button {
    background-color: var(--accent);
    color: var(--secondary);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 14px;
}

.search-button:hover {
    background-color: var(--white);
}

.lfAdvSearchLink {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.lfAdvSearchLink:hover {
    color: var(--white);
    text-decoration: underline;
}

.search-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 15px;
    margin-top: 20px;
}

.sailings-found {
    font-weight: bold;
    color: var(--accent);
    font-size: 18px;
}

.sailings-label {
    color: var(--white);
    font-size: 12px;
}

select option:not(:disabled) {
    font-weight: bold;
}

i {
    font-style: normal;
}

.low-price-tag {
    position: absolute;
    left: 25%;
    /* centered horizontally */
    transform: translateX(-50%);
    /* adjust so center of image aligns */
    width: 130px;
    /* adjust size as needed */
    height: auto;
    z-index: 101;
    /* above the nav but below any modals */
    pointer-events: none;
    /* so it doesn't block clicks */
    filter:
        brightness(0) saturate(100%)
        /* then tint toward #00ccff */
        invert(71%) sepia(52%) saturate(6300%) hue-rotate(164deg)
        /* final tweaks */
        brightness(1) contrast(1);
}

html.lang-en .low-price-tag {
    content: url("https://copper-verina-47.tiiny.site/low-price-tag.svg");
}

html.lang-ru .low-price-tag {
    width: 110px;
    content: url("https://copper-verina-47.tiiny.site/ru_low-price-tag.svg");
}

/* Media Queries */
@media (max-width: 992px) {
    .search-item {
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 15px 5%;
    }

    .top-bar {
        display: none;
    }

    .tagline {
        display: none;
    }

    .nav-container {
        padding: 0;
    }

    .nav-menu {
        position: fixed;
        flex-direction: column;
        width: 100%;
        background-color: var(--secondary);
        top: 60px;
        left: 0;
        padding: 20px 0;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
        z-index: 99;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .dropdown {
        position: static;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.1);
        box-shadow: none;
        display: none;
    }

    .nav-menu li:hover .dropdown {
        display: block;
    }

    .mobile-toggle {
        display: block;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-item {
        width: 100%;
        min-width: 100%;
    }

    .search-actions,
    .search-stats {
        margin-top: 10px;
    }
}
