/*
 * ========================================
 * GLOBAL COMPONENTS
 * Глобальные переиспользуемые компоненты
 * ========================================
 */

/* ========== КНОПКИ ========== */
.btn {
    display: inline-block;
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    line-height: 1.4;
}

/* Основные варианты кнопок */
.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: color-mix(in srgb, var(--color-primary) 85%, transparent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: color-mix(in srgb, var(--color-secondary) 85%, transparent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: #000000;
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: #000000;
    transform: translateY(-2px);
}

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

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

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

.btn-outline-secondary:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

/* Специальные кнопки для Hero секции */
.btn-reserve {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-reserve:hover {
    background-color: color-mix(in srgb, var(--color-primary) 85%, transparent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

/* Размеры кнопок */
.btn-sm {
    padding: 8px 20px;
    font-size: 0.875rem;
    min-width: auto;
}

.btn-lg,
.btn-large {
    padding: 18px 40px;
    font-size: 1.125rem;
    min-width: 200px;
}

/* Полная ширина */
.btn-block {
    display: block;
    width: 100%;
    min-width: auto;
}

/* ========== ЗАГОЛОВКИ СЕКЦИЙ ========== */
.vovker-section-header {
    text-align: center;
    margin-bottom: 50px;
}

.vovker-section-header .title-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.vovker-section-header .vovker-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 0;
    line-height: 1.3;
}

.vovker-section-header .mountain-icon {
    width: 80px;
    height: 40px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.vovker-section-header .mountain-icon svg {
    width: 100%;
    height: 100%;
}

.vovker-divider {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.vovker-divider-line {
    width: 80px;
    height: 4px;
    background-color: var(--color-primary);
    border-radius: 2px;
}

.vovker-section-header .vovker-subtitle {
    font-size: 1.2rem;
    color: var(--color-gray);
    margin: 0;
    font-weight: 300;
    font-style: italic;
}

/* Адаптивность заголовков */
@media (max-width: 768px) {
    .vovker-section-header .vovker-title {
        font-size: 2rem;
    }

    .vovker-section-header .mountain-icon {
        width: 60px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .vovker-section-header {
        margin-bottom: 35px;
    }

    .vovker-section-header .vovker-title {
        font-size: 1.6rem;
    }

    .vovker-section-header .mountain-icon {
        width: 50px;
        height: 25px;
    }

    .vovker-section-header .vovker-subtitle {
        font-size: 1rem;
    }

    .vovker-divider-line {
        width: 50px;
        height: 3px;
    }
}

/* ========== КАРТОЧКИ ========== */
.card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: var(--color-primary);
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--color-gray);
    margin-bottom: 15px;
}

.card-description {
    color: var(--color-gray-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-footer {
    padding: 15px 20px;
    background: var(--color-gray-light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Карточка мероприятия */
.event-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.event-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    text-align: center;
    min-width: 60px;
}

.event-date-badge .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.event-date-badge .month {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.9;
}

.event-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    color: var(--color-gray);
    font-size: 0.9rem;
}

.event-meta i {
    color: var(--color-primary);
}

.event-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-content {
    padding: 20px;
}

.event-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.event-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-title a:hover {
    color: var(--color-primary);
}

.event-program {
    color: var(--color-gray-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0.9;
}

/* Карточка мероприятия (архив) */
.event-archive-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.event-archive-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.event-archive-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.event-archive-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-archive-card:hover .event-archive-image img {
    transform: scale(1.05);
}

.event-archive-content {
    padding: 25px;
}

.event-archive-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.event-archive-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-archive-title a:hover {
    color: var(--color-primary);
}

.event-archive-excerpt {
    color: var(--color-gray-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Кнопки мероприятий */
.btn-event-details {
    display: inline-block;
    padding: 10px 20px;
    background: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-event-details:hover {
    background: color-mix(in srgb, var(--color-primary) 85%, transparent);
    transform: translateY(-2px);
}

.btn-view-all {
    display: inline-block;
    padding: 12px 30px;
    background: var(--color-secondary);
    color: var(--color-white);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid var(--color-secondary);
}

.btn-view-all:hover {
    background: transparent;
    color: var(--color-secondary);
    transform: translateY(-2px);
}

/* Карточка товара */
.product-card {
    background: var(--color-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    position: relative;
    list-style: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.product-card .product-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
    flex: 0 0 auto;
}

.product-card .product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image-container img {
    transform: scale(1.05);
}

.product-card .product-info {
    padding: 20px;
    background: var(--color-white);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.product-card .product-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-description {
    color: var(--color-secondary);
    font-size: 0.9rem;
    margin: 0 0 15px 0;
    line-height: 1.4;
    opacity: 0.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-card .info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px 0;
}

.product-card .product-weight {
    color: var(--color-secondary);
    font-size: 0.95rem;
    font-weight: 600;
}

.product-card .product-price {
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    flex: 1;
}

/* ========== ФОРМЫ ========== */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--color-gray-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--color-gray-dark);
    transition: all 0.3s ease;
    background: var(--color-white);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.2);
}

.form-control::placeholder {
    color: var(--color-gray);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.form-control-error {
    border-color: var(--color-error);
}

.form-control-error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.form-help {
    font-size: 0.875rem;
    color: var(--color-gray);
    margin-top: 5px;
}

.form-error {
    font-size: 0.875rem;
    color: var(--color-error);
    margin-top: 5px;
}

/* Адаптивность форм */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* ========== СЕТКИ И МАКЕТЫ ========== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-container);
}

.container-narrow {
    max-width: 900px;
}

.container-wide {
    max-width: 1400px;
}

/* Grid системы */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Flex утилиты */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }
.gap-30 { gap: 30px; }
.gap-40 { gap: 40px; }

/* ========== ТИПОГРАФИКА ========== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--color-gray);
    margin: 0;
    font-weight: 300;
    font-style: italic;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--color-primary);
    margin: 20px auto;
    border-radius: 2px;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-gray { color: var(--color-gray); }
.text-white { color: var(--color-white); }

/* ========== ОТСТУПЫ ========== */
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 50px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.mb-5 { margin-bottom: 50px; }

.pt-1 { padding-top: 10px; }
.pt-2 { padding-top: 20px; }
.pt-3 { padding-top: 30px; }
.pt-4 { padding-top: 40px; }
.pt-5 { padding-top: 50px; }

.pb-1 { padding-bottom: 10px; }
.pb-2 { padding-bottom: 20px; }
.pb-3 { padding-bottom: 30px; }
.pb-4 { padding-bottom: 40px; }
.pb-5 { padding-bottom: 50px; }

.py-1 { padding-top: 10px; padding-bottom: 10px; }
.py-2 { padding-top: 20px; padding-bottom: 20px; }
.py-3 { padding-top: 30px; padding-bottom: 30px; }
.py-4 { padding-top: 40px; padding-bottom: 40px; }
.py-5 { padding-top: 50px; padding-bottom: 50px; }

/* ========== УТИЛИТЫ ========== */
.hidden { display: none; }
.visible { display: block; }
.invisible { visibility: hidden; }

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-round); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.z-1 { z-index: 1; }
.z-2 { z-index: 2; }

/* ========== АДАПТИВНОСТЬ СЕТОК ========== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.6rem;
    }
}

/* Экраны ≤400px (маленькие смартфоны) */
@media (max-width: 400px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .card {
        padding: 12px;
    }
}
