/*
Theme Name: Club Ippon Theme
Author: Ippon Admin
Description: Финальная оптимизированная версия (Галерея 1:1 + Контакты + FAB).
Version: 1.5
*/

/* --- 1. ПЕРЕМЕННЫЕ И ОСНОВА --- */
:root {
    --primary: #D60000;        
    --primary-dark: #a50000;
    --dark: #0F0F0F;           
    --dark-sec: #181818; 
    --dark-card: #222;      
    --text: #F0F0F0;
    --text-gray: #A0A0A0;
    --font-head: 'Oswald', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --font-kanji: 'Noto Serif JP', serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--dark);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

body.is-menu-open { overflow: hidden; height: 100vh; }

h1, h2, h3, h4, h5 { font-family: var(--font-head); text-transform: uppercase; line-height: 1.2; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
section { padding: 80px 0; position: relative; overflow: hidden; }

/* --- 2. КОМПОНЕНТЫ --- */
.section-subtitle {
    color: var(--primary);
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    color: #fff;
    position: relative;
    z-index: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    padding: 16px 40px;
    font-family: var(--font-head);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    transition: var(--transition);
}
.btn:hover { background: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(214, 0, 0, 0.4); }

.btn-outline { background: transparent; border: 2px solid var(--primary); padding: 10px 20px; }
.btn-outline:hover { background: var(--primary); }

.bg-kanji {
    position: absolute;
    font-family: var(--font-kanji);
    font-size: 20vw;
    color: rgba(255,255,255,0.02);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
}

/* --- 3. ШАПКА И НАВИГАЦИЯ --- */
header {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 15px 0;
}

.nav-row { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; letter-spacing: 1px; }
.logo img { height: 45px; width: 45px; object-fit: contain; }

.nav-menu { display: flex; gap: 25px; }
.nav-menu a {
    font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; position: relative; color: #ccc;
}
.nav-menu a:hover { color: #fff; }
.nav-menu a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--primary); transition: 0.3s;
}
.nav-menu a:hover::after { width: 100%; }

.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: #fff; width: 40px; text-align: center; }

.menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 998; opacity: 0; visibility: hidden; transition: 0.3s;
}
.menu-overlay.active { opacity: 1; visibility: visible; }

/* --- 4. ГЛАВНЫЙ ЭКРАН (HERO) --- */
.hero {
    height: 100vh; min-height: 650px;
    background-color: #000;
    background-size: cover; background-position: center; display: flex; align-items: center; position: relative;
}
.hero-content { max-width: 800px; position: relative; z-index: 2; padding-top: 60px; }
.hero h1 { font-size: clamp(3rem, 7vw, 6rem); font-weight: 700; line-height: 1.1; margin-bottom: 25px; text-shadow: 0 10px 30px rgba(0,0,0,0.8); }
.hero p { font-size: 1.2rem; color: #ddd; margin-bottom: 40px; border-left: 4px solid var(--primary); padding-left: 20px; background: linear-gradient(90deg, rgba(214,0,0,0.1), transparent); }

/* --- 5. НОВОСТИ (ЖЕСТКАЯ СЕТКА) --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    margin-top: 40px;
}

.news-card { background: var(--dark-card); border: 1px solid rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; transition: 0.4s; display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.news-img { height: 200px; overflow: hidden; position: relative; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.news-card:hover .news-img img { transform: scale(1.1); }
.news-date { position: absolute; top: 15px; left: 15px; background: var(--primary); color: #fff; padding: 5px 10px; font-size: 0.8rem; font-weight: 700; border-radius: 2px; }
.news-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.news-tag { color: var(--text-gray); font-size: 0.8rem; text-transform: uppercase; margin-bottom: 10px; letter-spacing: 1px; }
.news-title { font-size: 1.3rem; margin-bottom: 15px; color: #fff; line-height: 1.3; }
.news-excerpt { font-size: 0.95rem; color: #bbb; margin-bottom: 20px; flex-grow: 1; }
.news-link { color: var(--primary); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }

/* --- 6. ГАЛЕРЕЯ (ВОССТАНОВЛЕНИЕ 1:1 ДИЗАЙНА) --- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 250px; gap: 15px; margin-top: 40px; }
.gallery-item { position: relative; overflow: hidden; cursor: pointer; }
.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(4) { grid-column: span 2; }
.gallery-item:nth-child(5) { grid-column: 3; grid-row: 3; }
.gallery-item:nth-child(6) { grid-column: 4; grid-row: 3; }
.gallery-item:nth-child(7) { grid-column: 1 / span 2; grid-row: 3; }

.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; filter: grayscale(30%); }
.gallery-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.3s; }
.gallery-icon { font-size: 2rem; color: #fff; transform: translateY(20px); transition: 0.3s; }
.gallery-item:hover img { transform: scale(1.1); filter: grayscale(0%); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-icon { transform: translateY(0); }

/* --- 7. ТРЕНЕРЫ --- */
.coaches-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; margin-top: 50px; }
.coach-card { background: var(--dark-sec); transition: 0.4s; border-bottom: 3px solid transparent; cursor: pointer; }
.coach-card:hover { transform: translateY(-10px); border-bottom-color: var(--primary); }
.coach-img-wrap { height: 420px; overflow: hidden; position: relative; }
.coach-img-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: 0.5s; }
.coach-info { padding: 30px; }
.coach-name { font-size: 1.5rem; margin-bottom: 5px; color: #fff; }
.coach-role { color: var(--primary); font-size: 0.85rem; font-weight: 700; margin-bottom: 15px; display: block; text-transform: uppercase; }
.coach-achievements li { margin-bottom: 8px; padding-left: 20px; position: relative; font-size: 0.95rem; color: var(--text-gray); }
.coach-achievements li::before { content: '•'; color: var(--primary); position: absolute; left: 0; font-size: 1.5rem; line-height: 1rem; }

/* --- 8. МОДАЛЬНЫЕ ОКНА --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); justify-content: center; align-items: center; }
.modal.active { display: flex; }
.modal-content { background: var(--dark-sec); padding: 40px; width: 90%; max-width: 450px; position: relative; border: 1px solid var(--primary); max-height: 85vh; overflow-y: auto; }
.modal-content-wide { max-width: 800px; }
.close-modal-btn { position: absolute; right: 15px; top: 15px; width: 35px; height: 35px; background: rgba(0,0,0,0.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 100; color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.close-modal-btn:hover { background: var(--primary); }

.coach-modal-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 30px; }
.cm-img img { width: 100%; border-radius: 4px; }
.cm-info h3 { color: var(--primary); font-size: 2rem; }
.cm-role { color: #fff; font-weight: 700; display: block; margin-bottom: 20px; }
.cm-desc { color: #ddd; margin-bottom: 20px; }
.cm-section-title { color: #fff; font-weight: 800; border-bottom: 1px solid var(--primary); display: inline-block; margin-bottom: 10px; }
.cm-list li { color: #aaa; margin-bottom: 8px; position: relative; padding-left: 20px; }
.cm-list li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--primary); position: absolute; left: 0; }

/* --- 9. РАСПИСАНИЕ И КОНТАКТЫ (ИСПРАВЛЕННОЕ ВЫРАВНИВАНИЕ) --- */
.schedule-table { width: 100%; border-collapse: collapse; margin-top: 30px; background: var(--dark-sec); }
.schedule-table th, .schedule-table td { padding: 20px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
.schedule-table th { color: var(--primary); font-family: var(--font-head); }

.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; border: 1px solid rgba(255,255,255,0.1); }
.contact-item { transition: var(--transition); }
.contact-item i { width: 30px; text-align: center; } /* Фикс выравнивания иконок */

/* Иконки соцсетей - крупные и без рамок */
.social-link-clean {
    font-size: 2.2rem;
    color: #fff;
    display: inline-block;
    transition: var(--transition);
}
.social-link-clean:hover {
    color: var(--primary);
    transform: translateY(-8px) scale(1.1);
}

.map-wrap iframe { width: 100%; height: 100%; min-height: 500px; filter: grayscale(100%) invert(90%); }

/* --- 10. КНОПКА ЗВОНКА (FAB) --- */
.fab-wrapper { position: fixed; bottom: 30px; right: 30px; z-index: 999; }
.fab-btn { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.8rem; box-shadow: 0 5px 20px rgba(0,0,0,0.5); background: var(--primary); transition: var(--transition); }
.fab-btn:hover { transform: scale(1.1); background: var(--primary-dark); }

/* --- 11. АДАПТИВНОСТЬ (МЕДИА-ЗАПРОСЫ) --- */
@media (max-width: 1024px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .nav-row { display: grid; grid-template-columns: 40px 1fr 130px; align-items: center; }
    .mobile-toggle { display: block; grid-column: 1; }
    .logo { grid-column: 2; justify-self: center; font-size: 1.2rem; }
    .header-actions { grid-column: 3; justify-self: end; }
    .header-actions .btn { padding: 8px 15px !important; font-size: 0.75rem !important; }

    .nav-menu {
        position: fixed; top: 0; left: -280px; width: 280px; height: 100vh;
        background: #111; flex-direction: column; padding: 80px 30px; gap: 25px;
        border-right: 2px solid var(--primary); z-index: 999;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .nav-menu.active { left: 0; display: flex !important; }
    .nav-menu a { color: #fff !important; font-size: 1.2rem !important; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
    
    .contact-grid { grid-template-columns: 1fr; }
    .gallery-grid { display: flex; flex-direction: column; gap: 15px; }
    .gallery-item { height: 250px; }
}

@media (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; }
    .coach-modal-grid { grid-template-columns: 1fr; }
    .social-link-clean { font-size: 2.5rem; }
}