@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-main: #f7ede2;
    --header-bg: #f0e0c8;  /* Темнее фона */
    --footer-bg: #f0e0c8;   /* Темнее фона */
    --accent: #ed8936;
    --accent-dark: #dd6b20;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border-color: #e2d5c1;
}

body {
    padding-top: 70px;
    background-color: var(--bg-main);
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Анимация перелива */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Шапка темнее */
header {
    background: linear-gradient(135deg, var(--header-bg), #f5e5d0, var(--header-bg));
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: auto; /* Изменено с фиксированной высоты */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    width: 100%;
}

/* Исправленный логотип */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0; /* Не сжимается */
}

.logo-link {
    position: relative;
    display: inline-block;
    height: 32px;
    overflow: hidden;
    text-decoration: none;
    font-weight: 800;
    font-size: 24px;
    color: var(--text-dark);
    min-width: 100px;
    flex-shrink: 0;
}

.logo-text {
    display: block;
    transition: transform 0.4s ease;
    line-height: 32px;
}

.logo-text.hover {
    position: absolute;
    top: 100%;
    left: 0;
    color: var(--accent);
}

.logo-link:hover .default {
    transform: translateY(-100%);
}

.logo-link:hover .hover {
    transform: translateY(-100%);
}

/* Навигационные ссылки */
.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap; /* Не переносить */
    overflow-x: auto; /* Скролл если не помещается */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 5px 0;
    scrollbar-width: none; /* Firefox */
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
}

.nav-links a:not(.btn-reg) {
    color: var(--text-dark);
    transition: color 0.3s;
}

.nav-links a:not(.btn-reg):hover {
    color: var(--accent);
}

.nav-links a:not(.btn-reg):after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:not(.btn-reg):hover:after {
    width: 100%;
}

/* Кнопка регистрации */
.btn-reg {
    background-color: var(--accent);
    color: white !important;
    border-radius: 16px;
    padding: 10px 22px !important;
    text-decoration: none;
    font-weight: 700 !important;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}

.btn-reg:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
    border-color: white;
}

/* Основные кнопки */
.btn-accent {
    background-color: var(--accent);
    color: white !important;
    border-radius: 16px;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    font-size: 15px;
    gap: 8px;
}

.btn-accent:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
    border-color: white;
}

.btn-white {
    background: white;
    color: var(--text-dark) !important;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-white:hover {
    background: #f8fafc;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Сетка кружков - АДАПТИВНАЯ */
.clubs-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* По умолчанию 1 столбец */
    gap: 25px;
    padding: 40px 0;
    margin: 0 auto;
    width: 100%;
}

/* Планшет - 2 колонки */
@media (min-width: 768px) {
    .clubs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Десктоп - 3 колонки */
@media (min-width: 1024px) {
    .clubs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.club-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    height: 100%;
}

.club-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 15px 35px rgba(237, 137, 54, 0.15);
}

.category-badge {
    background: #fffaf0;
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: inline-block;
    align-self: flex-start;
}

/* Футер темнее */
footer {
    background: linear-gradient(135deg, var(--footer-bg), #f5e5d0, var(--footer-bg));
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    padding: 50px 0;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

/* Адаптивность для шапки */
@media (max-width: 768px) {
    /* Тело и отступы */
    body {
        padding-top: 60px;
    }
    
    /* Контейнер - больше отступов по бокам */
    .container {
        padding: 0 15px;
    }
    
    /* Шапка - компактнее */
    header {
        padding: 10px 0;
        height: 60px;
    }
    
    /* Навигация - вертикальное выравнивание */
    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        width: 100%;
    }
    
    /* Логотип компактнее */
    .logo-wrapper {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        min-width: auto;
    }
    
    .logo-link {
        font-size: 20px;
        min-width: 80px;
        height: 28px;
    }
    
    .logo-wrapper i {
        font-size: 22px !important;
    }
    
    .logo-text {
        line-height: 28px;
    }
    
    /* Навигационные ссылки - горизонтальный скролл */
    .nav-links {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding: 5px 0 10px 0;
        margin-left: 10px;
        scrollbar-width: thin;
        scrollbar-color: var(--accent) transparent;
        flex: 1;
        justify-content: flex-end;
        max-width: calc(100% - 90px);
    }
    
    /* Скрываем стандартный скроллбар */
    .nav-links::-webkit-scrollbar {
        height: 3px;
    }
    
    .nav-links::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .nav-links::-webkit-scrollbar-thumb {
        background: var(--accent);
        border-radius: 3px;
    }
    
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    
    /* Ссылки компактнее */
    .nav-links a {
        font-size: 13px;
        padding: 6px 10px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .nav-links a:not(.btn-reg) {
        padding: 6px 8px;
    }
    
    /* Убираем подчеркивание на мобильных для экономии места */
    .nav-links a:not(.btn-reg):after {
        display: none;
    }
    
    /* Кнопка регистрации компактнее */
    .btn-reg {
        padding: 6px 14px !important;
        font-size: 12px !important;
        border-radius: 14px;
        min-width: fit-content;
    }
    
    /* Основные кнопки в контенте */
    .btn-accent, .btn-white {
        padding: 10px 18px;
        font-size: 14px;
        border-radius: 14px;
    }
    
    /* Заголовки меньше */
    h1 {
        font-size: 32px !important;
    }
    
    h2 {
        font-size: 24px !important;
    }
    
    h3 {
        font-size: 18px !important;
    }
    
    /* Карточки кружков */
    .club-card {
        padding: 20px;
        border-radius: 20px;
    }
    
    /* Сетка кружков - всегда 1 колонка на мобильных */
    .clubs-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding: 20px 0;
    }
    
    /* Футер компактнее */
    footer {
        padding: 30px 0;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 55px;
    }
    
    header {
        height: 55px;
        padding: 8px 0;
    }
    
    .logo-link {
        font-size: 18px;
        min-width: 70px;
    }
    
    .nav-links {
        gap: 6px;
        max-width: calc(100% - 80px);
    }
    
    .nav-links a:not(.btn-reg) {
        font-size: 12px;
        padding: 5px 6px;
    }
    
    .btn-reg {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }
    
    .container {
        padding: 0 12px;
    }
}

/* Для планшетов (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-links {
        gap: 20px;
    }
    
    .nav-links a {
        font-size: 15px;
    }
    
    .btn-reg {
        padding: 9px 18px !important;
    }
}

@media (hover: none) and (pointer: coarse) {
    .club-card:hover {
        transform: none;
        border-color: transparent;
    }
    
    .btn-accent:hover, .btn-white:hover, .btn-reg:hover {
        transform: none;
        box-shadow: none;
    }
    
    .nav-links a:not(.btn-reg):hover:after {
        width: 0;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .clubs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .club-card {
        padding: 15px;
    }
}

@media (max-width: 360px) {
    .logo-link {
        font-size: 16px;
        min-width: 65px;
    }
    
    .nav-links a:not(.btn-reg) {
        font-size: 11px;
        padding: 4px 5px;
    }
    
    .btn-reg {
        padding: 4px 8px !important;
        font-size: 10px !important;
    }
}
/* Анимация появления карточек */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.club-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

/* Задержка для каждой карточки */
.club-card:nth-child(1) { animation-delay: 0.1s; }
.club-card:nth-child(2) { animation-delay: 0.2s; }
.club-card:nth-child(3) { animation-delay: 0.3s; }
.club-card:nth-child(4) { animation-delay: 0.4s; }
.club-card:nth-child(5) { animation-delay: 0.5s; }
.club-card:nth-child(6) { animation-delay: 0.6s; }