:root {
    --primary-color: #e74c3c;
    --secondary-color: #f1c40f;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --success-color: #2ecc71;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 3px 0;
    transition: all 0.3s ease;
    padding-top: 0px; /* Было 15px */
    padding-bottom: 0px; /* Можно оставить или уменьшить */
}

header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Добавляем перенос элементов */
    gap: 15px; /* Добавляем отступ между элементами */
    padding: 15px 0; /* Уменьшаем отступы */
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo img {
    height: 50px; /* Фиксированная высота для логотипа */
    width: auto; /* Сохраняем пропорции */
    max-width: 100%;
}

.logo-text {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
}

.logo-text-image {
    height: auto;
    max-height: 30px; /* Подберите подходящую высоту */
    width: auto;
    margin-left: 10px; /* Отступ от основного лого */
    transition: opacity 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.logo:hover .logo-text-image {
    opacity: 0.9;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;

}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: width 0.3s;
}

nav ul li a:hover:after {
    width: 100%;
}

textarea {
    resize: vertical;
    min-height: 120px;
    overflow-y: auto; /* Добавляет скролл при необходимости */
    word-wrap: break-word; /* Перенос длинных слов */
}

.phone {
    font-weight: 700;
    color: var(--dark-color);
    font-size: clamp(14px, 2vw, 18px);
    white-space: nowrap;
    padding: 0 5px;
}

.social-icons {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.social-icons a {
    color: var(--dark-color);
    font-size: clamp(16px, 2.5vw, 18px);
    transition: all 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
}

.social-icons a:hover {
    color: white;
    background: var(--primary-color);
    transform: scale(1.1);
}

.social-icons-center {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icons-center a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f0f0;
    transition: all 0.3s ease;
}

.social-icons-center a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.social-icons-center img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-color);
}

/* Hero Slider */
.hero-slider {
    height: 80vh;
    position: relative;
    overflow: hidden;
    margin-top: 0px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    will-change: opacity;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 80%;
    max-width: 800px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}

.slide.active .slide-content {
    opacity: 1;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 20px;
}

.slider-controls button {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-controls button:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.slide:first-child {
    opacity: 1;
}

/* Red Stripe */
.red-stripe {
    background-color: var(--primary-color);
    height: 50px;
    width: 100%;
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* About Club */
.about-club {
    background-color: var(--light-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Services */
.services {
    background-color: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    padding: 30px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card p {
    flex-grow: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 50px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

/* Trainers */
.trainers {
    background-color: var(--light-color);
}

.trainers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.trainer-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card, .trainer-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Уточнение к существующему transition */
  }

.trainer-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.trainer-image {
    height: 300px;
    overflow: hidden;
}

.trainer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.trainer-card:hover .trainer-image img {
    transform: scale(1.1);
}

.trainer-info {
    padding: 20px;
    text-align: center;
}

.trainer-info h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

.trainer-info p {
    color: #666;
    margin-bottom: 20px;
}

/* Schedule */
.schedule {
    background-color: white;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.schedule-table th, .schedule-table td {
    padding: 15px;
    text-align: center;
    border: 1px solid #ddd;
}

.schedule-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
}

.schedule-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.schedule-table tr:hover {
    background-color: #f1f1f1;
}

.download-btn {
    display: flex;
    justify-content: center;
}

.schedule-horizontal {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.schedule-row {
    display: flex;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.schedule-day {
    flex: 0 0 150px;
    background: var(--primary-color);
    color: white;
    padding: 15px;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-slots {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
}

.time-slot {
    background: var(--light-color);
    padding: 12px;
    border-radius: 6px;
    flex: 1;
    min-width: 200px;
}

.time {
    display: block;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.workout {
    display: block;
    margin-bottom: 3px;
}

.trainer {
    display: block;
    font-size: 0.9em;
    color: #666;
}

/* Contacts */
.contacts-modern {
    background-color: #f9f9f9;
    padding: 80px 0;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.contacts-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.contact-card-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-card-header i {
    font-size: 1.5rem;
}

.contact-card-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.contact-card-body {
    padding: 25px;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.contact-list li:last-child {
    margin-bottom: 0;
}

.contact-list i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 3px;
}

.contact-list strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.contact-list a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-list a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.error-message {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

.form-success {
    background: #2ecc71;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.form-success i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

#formError {
    margin-bottom: 15px;
    text-align: center;
    color: #e74c3c;
    font-size: 0.9rem;
}

/* Добавим анимацию для кнопки при отправке */
.btn-submit.loading {
    position: relative;
    pointer-events: none;
}

.btn-submit.loading:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.social-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.social-links h4 {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.1rem;
}

.social-title {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #555;
    text-align: center;
}

.modern-contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    width: 100%;
}

.form-group {
    margin-bottom: 0;
}

.modern-contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.modern-contact-form input,
.modern-contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s;
    height: 48px;
    box-sizing: border-box;
}

.modern-contact-form input:focus,
.modern-contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.modern-contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-submit:hover {
    background: #c0392b;
}

.half-width {
    flex: 1;
    min-width: 0; /* Важно для правильного сжатия */
}

.full-width {
    width: 100%;
}

.header-contact {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    margin-left: auto;
    padding: 5px 10px;
    background: rgba(255,255,255,0.8);
    border-radius: 30px;
    transition: all 0.3s ease;
}

/* Стили для социальных иконок как в шапке */
.header-social-icons {
    display: flex;
    gap: 8px;
}

.header-social-icons a {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    transition: all 0.3s;
}

.header-social-icons a:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.header-social-icons img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.social-links h4 {
    margin-bottom: 12px;
    font-size: 1rem;
    color: #555;
}

/* Стили для карты */
.contact-map-card {
    grid-column: span 2; /* Карта занимает 2 колонки */
}

.map-container {
    padding: 0; /* Убираем внутренние отступы */
    height: 100%; /* Занимаем всю доступную высоту */
}

.map-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Соотношение сторон 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.map-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive */
@media (max-width: 992px) {
    .contacts-modern-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-map-card {
        grid-column: span 2;
    }

    .map-wrapper {
        padding-bottom: 75%; /* Изменяем соотношение для мобильных */
    }
}

@media (max-width: 768px) {
    .contacts-modern-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-map-card {
        grid-column: span 1;
    }
    
    .modern-contact-form .form-row {
        grid-template-columns: 1fr;
    }

    .map-wrapper {
        padding-bottom: 100%; /* Квадратное соотношение для маленьких экранов */
    }
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 30px 0 20px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-logo img {
    height: 50px; /* Размер логотипа */
    width: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.footer-logo:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .contacts-container {
        flex-direction: column;
        gap: 30px;
        grid-template-columns: 1fr;
    }
    
    .map-container {
        height: 350px;
        order: 1;
    }

    .header-container {
        gap: 10px;
        padding: 10px 0;
    }
    
    .header-contact {
        gap: 8px;
        padding: 5px 8px;
    }

    nav ul {
        gap: 10px;
    }
    
    nav ul li {
        margin-left: 15px;
    }

    .phone {
        font-size: clamp(12px, 2vw, 16px);
    }
    
    .social-icons a {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .contact-info {
        flex: 1;
        width: 100%;
    }

    .contact-form-container {
        order: 2;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .logo-text-image {
        max-height: 25px;
    }
    
    nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 80px);
        background-color: white;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s;
        z-index: 999;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        padding: 20px;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .header-contact {
        display: none;
        flex-direction: row; /* Оставляем горизонтальное расположение */
        flex-wrap: wrap; /* Разрешаем перенос */
        justify-content: center;
        gap: 10px;
        order: 2;
        width: 100%;
        margin: 10px 0;
        background: none;
    }

    .schedule-row {
        flex-direction: column;
    }
    
    .schedule-day {
        flex: 0 0 auto;
        padding: 10px;
    }
    
    .time-slot {
        min-width: 100%;
    }

    .footer-logo img {
        height: 40px; /* Уменьшаем размер на мобильных */
    }
}
    
    .slide-content h1 {
        font-size: 2.5rem;
    }

    .phone {
        margin-right: 0;
        margin-bottom: 0;
        width: 100%;
        text-align: center;
    }
    

    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .half-width {
        width: 100%;
    }
    
    .modern-contact-form input,
    .modern-contact-form textarea {
        width: 100%;
    }

@media (max-width: 576px) {
    .section-title h2 {
        font-size: 2rem;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        margin-top: 20px;
    }
    
    .footer-links a {
        margin: 0 10px;
    }

    .map-container {
        min-height: 250px;
    }

    .contact-info {
        padding: 20px;
    }
    
    .contact-item {
        gap: 10px;
    }
    
    .contact-social .social-icons {
        gap: 15px;
    }
    
    .contact-social .social-icons a img {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .header-contact {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .phone {
        margin-bottom: 5px;
    }
    
    .social-icons a {
        margin: 0 8px;
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .logo-text-image {
        max-height: 20px;
    }

    .footer-logo img {
        max-height: 20px;
    }
}

#formError {
    margin-bottom: 15px;
    text-align: center;
    color: #e74c3c;
    font-size: 0.9rem;
}

input, textarea, select {
    font-size: 16px; /* Минимальный размер шрифта для предотвращения масштабирования */
    touch-action: manipulation; /* Отключает жесты масштабирования для элемента */
  }