/**
 * Основные стили для MicroTrip.ru
 * Дизайн-система: "Ускользающая природа"
 */

/* ===== CSS ПЕРЕМЕННЫЕ ===== */
:root {
    /* Основные цвета */
    --color-primary: #2E5E4E;      /* Глубокий зеленый */
    --color-secondary: #4A5D23;    /* Хаки */
    --color-accent: #7FC7D4;       /* Аквамарин */
    --color-warm: #E07A5F;         /* Терракота */
    
    /* Дополнительные цвета */
    --color-white: #FFFFFF;
    --color-gray-light: #F5F5F5;
    --color-gray: #666666;
    --color-gray-dark: #333333;
    
    /* Типографика */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-h1: 48px;
    --font-size-h2: 36px;
    --font-size-h3: 24px;
    --font-size-body: 16px;
    --font-size-caption: 14px;
    
    /* Анимации */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Тени */
    --shadow-light: 0 2px 8px rgba(46, 94, 78, 0.1);
    --shadow-medium: 0 4px 16px rgba(46, 94, 78, 0.15);
    --shadow-heavy: 0 8px 32px rgba(46, 94, 78, 0.2);
}

/* ===== СБРОС И БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    line-height: 1.6;
    color: var(--color-gray-dark);
    background-color: var(--color-white);
}

/* ===== ТИПОГРАФИКА ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: var(--font-size-h1);
    color: var(--color-primary);
}

h2 {
    font-size: var(--font-size-h2);
    color: var(--color-primary);
}

h3 {
    font-size: var(--font-size-h3);
    color: var(--color-secondary);
}

p {
    margin-bottom: 1rem;
    color: var(--color-gray-dark);
}

/* ===== КНОПКИ ===== */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    min-height: 48px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    background-color: #1e4a3a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* ===== HERO СЕКЦИЯ ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(46, 94, 78, 0.7) 0%,
        rgba(74, 93, 35, 0.5) 50%,
        rgba(127, 199, 212, 0.3) 100%
    );
}

.hero-content {
    text-align: center;
    color: var(--color-white);
    max-width: 800px;
    padding: 0 20px;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-cta {
    margin-bottom: 3rem;
}

/* ===== ИНТЕРАКТИВНАЯ КАРТА ===== */
.map-section {
    padding: 80px 0;
    background-color: var(--color-gray-light);
}

.map-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.map-header {
    text-align: center;
    margin-bottom: 3rem;
}

.map-wrapper {
    position: relative;
    height: 600px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
}

#map-container {
    width: 100%;
    height: 100%;
}

/* Стили для балунов карты */
.map-balloon {
    padding: 20px;
    max-width: 300px;
    font-family: var(--font-family);
}

.balloon-header {
    margin-bottom: 15px;
}

.balloon-header h3 {
    color: var(--color-primary);
    margin-bottom: 5px;
}

.travel-time {
    color: var(--color-warm);
    font-weight: 500;
    font-size: var(--font-size-caption);
}

.balloon-image {
    margin-bottom: 15px;
}

.balloon-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.balloon-description {
    margin-bottom: 15px;
    color: var(--color-gray-dark);
}

.balloon-highlights h4 {
    color: var(--color-secondary);
    margin-bottom: 8px;
    font-size: var(--font-size-caption);
}

.balloon-highlights ul {
    list-style: none;
    padding: 0;
}

.balloon-highlights li {
    padding: 4px 0;
    color: var(--color-gray);
    font-size: var(--font-size-caption);
}

.balloon-highlights li:before {
    content: "✓";
    color: var(--color-accent);
    margin-right: 8px;
}

.balloon-actions {
    margin-top: 15px;
}

.balloon-actions .btn-primary {
    width: 100%;
    font-size: var(--font-size-caption);
    padding: 8px 16px;
}

/* ===== КВИЗ-ГЕНЕРАТОР ===== */
.quiz-section {
    padding: 80px 0;
    background-color: var(--color-white);
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.quiz-header {
    text-align: center;
    margin-bottom: 3rem;
}

.quiz-header h2 {
    margin-bottom: 1rem;
}

.quiz-header p {
    color: var(--color-gray);
    font-size: 1.1rem;
}

.quiz-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--color-gray-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    width: 0%;
    transition: width var(--transition-slow);
}

.progress-text {
    text-align: center;
    color: var(--color-gray);
    font-size: var(--font-size-caption);
}

.quiz-content {
    margin-bottom: 2rem;
}

.question {
    text-align: center;
}

.question-title {
    margin-bottom: 2rem;
    color: var(--color-primary);
}

.question-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid var(--color-gray-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    background-color: var(--color-white);
}

.option:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.option.selected {
    border-color: var(--color-primary);
    background-color: rgba(46, 94, 78, 0.05);
    box-shadow: var(--shadow-medium);
}

.option-icon {
    font-size: 2rem;
    margin-right: 16px;
    flex-shrink: 0;
}

.option-content {
    flex: 1;
    text-align: left;
}

.option-label {
    color: var(--color-primary);
    margin-bottom: 5px;
}

.option-description {
    color: var(--color-gray);
    font-size: var(--font-size-caption);
    margin: 0;
}

.option-checkbox {
    margin-left: 16px;
    flex-shrink: 0;
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-gray-light);
    border-radius: 4px;
    transition: all var(--transition-normal);
}

.option.selected .checkbox {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.option.selected .checkbox:after {
    content: "✓";
    color: var(--color-white);
    font-size: 14px;
    line-height: 16px;
    text-align: center;
    display: block;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-next.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===== РЕЗУЛЬТАТЫ КВИЗА ===== */
.quiz-result {
    text-align: center;
}

.result-header {
    margin-bottom: 2rem;
}

.result-header h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.result-destination {
    background-color: var(--color-gray-light);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.result-destination h4 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.result-schedule {
    margin-bottom: 2rem;
}

.result-schedule h4 {
    color: var(--color-secondary);
    margin-bottom: 1rem;
}

.schedule-timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.schedule-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.schedule-time {
    font-weight: 600;
    color: var(--color-warm);
    margin-right: 20px;
    min-width: 80px;
}

.schedule-activity {
    color: var(--color-gray-dark);
}

.result-tips {
    margin-bottom: 2rem;
}

.result-tips h4 {
    color: var(--color-secondary);
    margin-bottom: 1rem;
}

.result-tips ul {
    list-style: none;
    padding: 0;
}

.result-tips li {
    padding: 8px 0;
    color: var(--color-gray-dark);
}

.result-tips li:before {
    content: "💡";
    margin-right: 10px;
}

.result-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== КАЛЬКУЛЯТОР ВРЕМЕНИ ===== */
.calculator-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-white);
}

.calculator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.calculator-header h2 {
    color: var(--color-white);
    margin-bottom: 1rem;
}

.calculator-widget {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calculator-steps {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.calculator-step {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.calculator-step.active {
    background-color: var(--color-warm);
    transform: scale(1.1);
}

.calculator-result {
    font-size: 2rem;
    font-weight: 600;
    margin: 2rem 0;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== UGC ГАЛЕРЕЯ ===== */
.gallery-section {
    padding: 80px 0;
    background-color: var(--color-white);
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-header h2 {
    margin-bottom: 1rem;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--color-primary);
    background-color: transparent;
    color: var(--color-primary);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: var(--font-size-caption);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: var(--color-white);
    padding: 20px;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-caption {
    font-weight: 500;
    margin-bottom: 5px;
}

.gallery-location {
    font-size: var(--font-size-caption);
    opacity: 0.8;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .map-wrapper {
        height: 400px;
    }
    
    .question-options {
        grid-template-columns: 1fr;
    }
    
    .calculator-steps {
        flex-direction: column;
        align-items: center;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .map-wrapper {
        height: 300px;
    }
    
    .calculator-widget {
        padding: 2rem 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* ===== ПАРАЛЛАКС ЭФФЕКТЫ ===== */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    transform: translateY(0);
    transition: transform 0.1s ease-out;
}

/* ===== LOADING АНИМАЦИИ ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== УТИЛИТЫ ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.hidden { display: none; }
.visible { display: block; }

.opacity-0 { opacity: 0; }
.opacity-1 { opacity: 1; }