/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Стилизация скроллбара */
::-webkit-scrollbar {
    width: 12px; /* Ширина вертикального скроллбара */
    height: 12px; /* Высота горизонтального скроллбара */
}

/* Фон скроллбара */
::-webkit-scrollbar-track {
    background: #ffffff; /* Белый фон */
    border-left: 1px solid #e0e0e0;
}

/* Ползунок скроллбара */
::-webkit-scrollbar-thumb {
    background: #d00; /* Красный цвет */
    border-radius: 6px;
    border: 3px solid #ffffff; /* Белая рамка вокруг */
}

/* Ползунок при наведении */
::-webkit-scrollbar-thumb:hover {
    background: #b00; /* Темнее красный при наведении */
}

/* Для Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #d00 #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
    color: #333;
    line-height: 1.6;
    padding-top: 60px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Решение для всех якорных ссылок */
:target {
  scroll-margin-top: 100px;
}

section:target::before {
  content: "";
  display: block;
  height: 100px;
  margin-top: -100px;
  visibility: hidden;
} 

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background: #d00;
    color: white;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
}

.btn:hover {
    background: #b00;
}

/* Прогресс-бар */
.progress-container {
    width: 100%;
    height: 5px;
    background: #eee;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 101;
}

.progress-bar {
    height: 5px;
    background: #d00;
    width: 0%;
    transition: width 0.1s;
}

/* Шапка */
header {
    background: #111;
    color: white;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    z-index: 100;
    top: 5px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social{
    opacity:0.8;
    position:fixed;
    right: 10px;
    z-index:999;
    transition: .3s all;
}

.tg{
    bottom: 1px;
    }

.wa{
    bottom: 65px;
}

.social img{
    width:50px;
}

.social:hover{
    opacity:1;
}

/* Мобильное меню */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    transition: all 0.3s ease;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.logo .red {
    color: #d00;
}

.logo .split-i {
    display: inline-block;
    position: relative;
    color: white;
    background: linear-gradient(to right, white 50%, #d00 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a:hover {
    color: #d00;
}

/* Главный-баннер */
.hero {
    background: url('../image/page.jpg') no-repeat center center/cover;
    height: 98dvh;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* О клубе */
.about {
    padding: 80px 0;
    text-align: center;
}

.about h2 {
    font-size: 36px;
    margin-bottom: 40px;
    position: relative;
}

.about h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: #d00;
    margin: 15px auto;
}

.about p {
    max-width: 450px;
    margin: 0 auto 40px;
    text-align:justify;
}

/* Направления */
.directions {
    padding: 80px 0;
    background: #f5f5f5;
}

.directions h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
}

.directions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.direction-card:nth-child(7){
    grid-column: 2;
}

.direction-card {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.direction-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: top;
}

.direction-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.direction-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #d00;
}

.direction-content p {
    flex-grow: 1;
    margin-bottom: 20px;
}

.direction-content .btn {
    margin-top: auto;
    align-self: flex-start;
}

#mma{
    object-position: center!important;
}

/* Тренеры  */
.trainers {
    padding: 80px 0;
    text-align: center;
}

.trainers h2 {
    font-size: 36px;
    margin-bottom: 50px;
}

.trainers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.trainer-card {
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    box-sizing: border-box;
}

.trainer-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: top;
    border-radius: 5px;
    margin-bottom: 15px;
}

.trainer-card h3 {
    font-size: 22px;
    margin-bottom: 5px;
    text-align: center;
}

.trainer-card h4 {
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
    color: #555;
}

.trainer-card p {
    color: #777;
    text-align: center;
}

/* Контакты */
.contacts {
    padding: 20px 0;
    background: #111;
    color: white;
}

.contacts h2 {
    font-size: 36px;
    margin-bottom: 30px;
    text-align: center;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: center;
    justify-items: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #d00;
}

.contact-info p {
    margin-bottom: 15px;
}

/* Подвал */
footer {
    background: #000;
    color: #777;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
}

/* Стили для кликабельных контактов с улучшенной анимацией */
.contact-info a {
    color: #333;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    display: inline-block;
    padding: 2px 8px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: linear-gradient(90deg, #f8f8f8, #fff);
}

/* Волнообразный блик */
.contact-info a::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -100%;
    width: 60%;
    height: 120%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.9),
        transparent
    );
    clip-path: polygon(
        0% 30%,
        15% 0%,
        25% 15%,
        40% 0%,
        50% 20%,
        60% 0%,
        75% 15%,
        85% 0%,
        100% 30%,
        85% 50%,
        100% 70%,
        85% 85%,
        75% 100%,
        60% 85%,
        50% 100%,
        40% 85%,
        25% 100%,
        15% 85%,
        0% 70%,
        15% 50%
    );
    animation: shine 3.5s infinite;
    opacity: 0;
    transform: skewX(-15deg);
}

/* Анимация блика */
@keyframes shine {
    0% {
        left: -100%;
        opacity: 0;
    }
    15% {
        opacity: 0.8;
    }
    70% {
        opacity: 0.8;
    }
    100% {
        left: 150%;
        opacity: 0;
    }
}

/* Эффекты при наведении */
.contact-info a:hover {
    color: #d00;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(209, 0, 0, 0.15);
    text-shadow: 0 0 3px rgba(209, 0, 0, 0.2);
}

/* Иконки с анимацией */
.contact-info a[href^="tel:"]::after,
.contact-info a[href^="mailto:"]::after {
    content: "";
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.3s;
}

.contact-info a[href^="tel:"]::after {
    content: "☎";
}

.contact-info a[href^="mailto:"]::after {
    content: "✉";
}

.contact-info a:hover::after {
    transform: scale(1.2) rotate(10deg);
}   

/* Адаптивность */
@media (max-width: 1200px) {
    .hero h1 {
        font-size: 42px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .trainer-card {
        flex: 0 0 calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
    
    .trainer-card:nth-child(n+4) {
        flex: 0 0 calc(50% - 15px);
        max-width: calc(50% - 15px);
        margin-top: 0;
    }
}

@media (max-width: 992px) {
    .hero h1 {
        font-size: 36px;
    }
    
    .about h2,
    .directions h2,
    .trainers h2,
    .contacts h2 {
        font-size: 32px;
    }
    
    .direction-content h3,
    .contact-info h3 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 65px;
        left: 0;
        width: 100%;
        background: #111;
        padding: 20px;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }
    
    nav.active {
        transform: translateY(0);
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .hero h1 {
        font-size: 32px;
        padding: 0 15px;
    }
    
    .hero p {
        font-size: 16px;
        padding: 0 15px;
    }

    .direction-card {
        width: 100%; /* Занимает всю ширину */
        max-width: 100%; /* Сбрасываем максимальную ширину */
        margin-bottom: 0; /* Убираем отступы */
    }
    
    .trainer-card,
    .trainer-card:nth-child(n+4) {
        flex: 0 0 100%;
        max-width: 90%;
    }

    .direction-card img{
        height: 400px;
    }
    
    .about,
    .directions,
    .trainers,
    .contacts {
        padding: 60px 0;
    }
    
    .about h2,
    .directions h2,
    .trainers h2,
    .contacts h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .directions-grid {
        grid-template-columns: 1fr; /* Одна колонка на мобильных */
        gap: 20px; /* Уменьшаем промежуток */
    }
    
    .trainer-card img {
        height: 500px;
    }

    /* Убираем специфичное позиционирование для 7-й карточки */
    .direction-card:nth-child(7) {
        grid-column: auto;
    }
    
    :target {
        scroll-margin-top: 120px;
    }

    .contact-info a {
        font-size: 18px;
        padding: 3px 10px;
    }
    
    .contact-info a::before {
        animation-duration: 4s;
    }
}

@media (max-width: 576px) {
    .logo {
        font-size: 20px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .direction-content {
        padding: 15px; /* Уменьшаем внутренние отступы */
    }
    
    .direction-content h3 {
        font-size: 20px; /* Уменьшаем размер заголовка */
    }
    
    .direction-content p {
        font-size: 14px; /* Уменьшаем размер текста */
        margin-bottom: 15px; /* Фиксируем отступ перед кнопкой */
    }

    .about{
        padding:60px 20px;
    }
}
@media (max-width: 400px) {
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 14px;
    }
    
    .logo {
        font-size: 18px;
    }
}