/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1A5FCE;
    --primary-dark: #0F4AA8;
    --dark: #333333;
    --gray: #666666;
    --light-gray: #999999;
    --light-bg: #F8F9FA;
    --white: #FFFFFF;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--gray);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    font-weight: 700;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    border: none;
    outline: none;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

/* ========== LANGUAGE SWITCHER ========== */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray);
}

.lang-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* ========== HEADER ========== */
.header {
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    height: 70px;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu li {
    display: inline-block;
}

.nav-menu a {
    color: var(--dark);
    font-weight: 500;
    font-size: 16px;
    position: relative;
    padding: 5px 0;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-menu a:hover:after {
    width: 100%;
}

.contact-btn {
    background: var(--primary);
    color: var(--white) !important;
    padding: 10px 25px !important;
    border-radius: var(--radius);
    margin-left: 10px;
}

.contact-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.contact-btn:after {
    display: none !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--dark);
    cursor: pointer;
    padding: 5px;
}

/* ========== HERO SECTION ========== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('../images/hero-bg.jpg') center/cover no-repeat;
    min-height: 90vh;
    color: var(--white);
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 70px;
    margin-top: 70px;
}

.hero .container {
    padding-top: 60px;
    padding-bottom: 60px;
}

.hero h1 {
    font-size: 48px;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

/* ========== SEARCH FORM ========== */
.search-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px 30px;
    border-radius: 15px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    align-items: end;
    gap: 15px;
    max-width: 1000px;
    margin: 40px auto 0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.form-group label {
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 8px;
    font-weight: 600;
    display: block;
}

.search-form input,
.search-form select {
    width: 100%;
    padding: 15px 20px;
    height: 52px;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Open Sans', sans-serif;
    background: white;
    transition: all 0.3s;
}

.search-form input:focus,
.search-form select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 95, 206, 0.1);
}

/* Select стили */
.search-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: white url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e") no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
    cursor: pointer;
}

.search-form select:hover {
    border-color: var(--primary);
}

.search-form select option {
    background: white;
    color: #333;
    padding: 10px;
}

.date-group input[type="text"] {
    color: #666;
}

.date-group input[type="date"] {
    color: #333;
}

.search-btn {
    background: linear-gradient(135deg, var(--primary), #0F4AA8);
    color: white;
    padding: 15px 35px;
    height: 52px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    align-self: flex-end;
    white-space: nowrap;
    min-width: 150px;
    transition: all 0.3s;
}

.search-btn:hover {
    background: linear-gradient(135deg, #0F4AA8, #0A3A8C);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(26, 95, 206, 0.3);
}

/* ========== SECTION TITLES ========== */
.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary);
}

/* ========== DESTINATIONS ========== */
.destinations {
    background: var(--white);
    padding: 100px 0;
    position: relative;
}

.destinations-grid {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding: 20px 10px 40px;
    margin-top: 30px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f0f0f0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.destinations-grid::-webkit-scrollbar {
    height: 8px;
}

.destinations-grid::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.destinations-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.destinations-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Кнопки скролла */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    z-index: 100;
    font-size: 20px;
    color: var(--primary);
    cursor: pointer;
    display: none;
}

.scroll-btn.left {
    left: 10px;
}

.scroll-btn.right {
    right: 10px;
}

.scroll-btn:hover {
    background: var(--primary);
    color: white;
}

@media (min-width: 768px) {
    .scroll-btn {
        display: block;
    }
}

/* Карточки направлений */
.destination-card {
    min-width: 280px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    height: 380px;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
}

.destination-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.destination-card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.destination-card:hover .card-overlay {
    opacity: 1;
}

.view-btn {
    background: var(--primary);
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.view-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--dark);
}

.card-content p {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.tours-count {
    font-size: 14px;
    color: var(--light-gray);
    display: flex;
    align-items: center;
}

.tours-count:before {
    content: "📍";
    margin-right: 5px;
}

.price-from {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}

/* Анимация карточек */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.destination-card {
    animation: fadeInUp 0.6s ease forwards;
}

.destination-card:nth-child(1) { animation-delay: 0.1s; }
.destination-card:nth-child(2) { animation-delay: 0.2s; }
.destination-card:nth-child(3) { animation-delay: 0.3s; }
.destination-card:nth-child(4) { animation-delay: 0.4s; }

/* ========== FOOTER ========== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.footer-column p {
    margin-bottom: 15px;
    opacity: 0.8;
    line-height: 1.8;
}

.footer-column a {
    display: block;
    color: #ccc;
    margin-bottom: 10px;
    font-size: 15px;
}

.footer-column a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 14px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1100px) {
    .header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 20px;
    }
    
    .logo {
        order: 1;
        width: auto;
    }
    
    .nav-toggle {
        order: 2;
        margin-left: auto;
        margin-right: 10px;
    }
    
    .lang-switcher {
        position: absolute;
        top: 15px;
        right: 70px; /* Отодвигаем от кнопки меню */
        z-index: 2001;
    }
    
    .nav-menu {
        order: 4;
        width: 100%;
        margin-top: 15px;
        z-index: 1999; /* Ниже языковых кнопок */
    }
    
    .contact-btn {
        margin: 10px auto 0;
        display: block;
        width: 200px;
        position: relative;
        z-index: 1998; /* Ещё ниже */
    }
}
@media (max-width: 992px) {
    .hero h1 {
        font-size: 40px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .search-form {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-btn {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    /* Мобильное меню */
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 30px 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        gap: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .nav-menu a {
        display: block;
        padding: 15px;
        font-size: 18px;
    }
    
    .nav-menu a:after {
        display: none;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .lang-switcher {
        top: 15px;
        right: 50px;
    }
    
    .contact-btn {
        margin-top: 20px;
        order: 5;
    }
    
    /* Герой секция */
    .hero {
        min-height: 70vh;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 18px;
        padding: 0 15px;
    }
    
    /* Форма поиска */
    .search-form {
        grid-template-columns: 1fr;
        padding: 20px;
        margin: 30px 15px 0;
    }
    
    .search-btn {
        grid-column: span 1;
        width: 100%;
        margin-top: 10px;
    }
    
    /* Секции */
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    /* Кнопки скролла */
    .scroll-btn {
        display: none !important;
    }
    
    .footer-columns {
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 400px) {
    .lang-switcher {
        right: 60px;
        top: 12px;
    }
    
    .lang-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .contact-btn {
        width: 180px;
        font-size: 14px;
        padding: 8px 20px !important;
    }
}
/* ЭКСТРЕННЫЙ ФИКС ДЛЯ КНОПКИ СВЯЗАТЬСЯ */
@media (max-width: 1100px) {
    .header .container {
        padding-right: 120px !important; /* Даем место языковым кнопкам */
    }
    
    .contact-btn {
        position: relative !important;
        z-index: 1 !important;
    }
    
    .lang-switcher {
        z-index: 1000 !important;
        background: white !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }
}
