/* --- 1. Глобальні налаштування та змінні --- */
:root {
    --bg-color-dark: #1d1746;  /* Глибокий індиго */
    --bg-color-light: #3d338f; /* Більш насичений синій */
    --text-color: #FFFFFF;     /* Чисто білий для максимального контрасту */
    --accent-color: #FF00E5;   /* Неоновий рожевий/маджента */
    --accent-glow: rgba(255, 0, 229, 0.5);
    --card-bg-color: #1a142d; /* Суцільний темно-фіолетовий для карток */
    --border-color: rgba(255, 0, 229, 0.5); /* Зробили контури яскравішими */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* --- 2. Основні стилі (теги) --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--bg-color-dark), var(--bg-color-light));
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- 3. Хедер та Навігація --- */
.header {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.8);
    backdrop-filter: blur(10px);
}

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

.logo a {
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}

.logo span {
    display: block;
    font-size: 0.7rem;
    font-family: var(--font-body);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

.nav a:hover, .nav a.active {
    color: var(--accent-color);
}

.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

.nav a:hover::after, .nav a.active::after {
    width: 100%;
}

/* --- 4. Герой (головний екран) --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
   /* ---  background: url('cosmic-bg.jpg') no-repeat center center/cover;--- */
}

.hero-overlay, .page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content, .page-hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(0,0,0,0.7);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px auto;
    opacity: 0.9;
}

/* --- 5. Загальні стилі секцій --- */
.section {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: -40px auto 40px auto;
    font-size: 1.1rem;
    color: #cccccc;
}

/* --- 6. Компоненти (кнопки, картки) --- */
.cta-button {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button:hover {
    background-color: var(--accent-color);
    color: var(--bg-color-dark);
    box-shadow: 0 0 15px var(--accent-glow);
}

.cta-button.large {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 500;
}

.direction-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.direction-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.direction-card:hover img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.card-overlay h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-color);
}

.blog-card {
    background-color: var(--card-bg-color); /* Суцільний фон */
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(255, 0, 229, 0.1);
}

.blog-card h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.blog-card a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    margin-top: 20px;
    display: inline-block;
}

/* --- 7. Стилі для окремих сторінок --- */

/* СТОРІНКА "НАПРЯМКИ" */
.page-hero {
    padding: 80px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    /* ---  background: url('cosmic-bg.jpg') no-repeat center center/cover;--- */
    background-attachment: fixed;
    margin-top: 80px;
}

.page-hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    text-shadow: 0 0 15px var(--accent-glow);
    color: var(--accent-color);
}

.page-hero p {
    font-size: 1.2rem;
    color: var(--text-color);
}

.directions-nav {
    text-align: center;
    margin-bottom: 60px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.directions-nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.directions-nav a:hover {
    background-color: var(--accent-color);
    color: var(--bg-color-dark);
    border-color: var(--accent-color);
}

.direction-section {
    display: flex;
    gap: 50px;
    align-items: center;
    margin-bottom: 100px;
    padding-top: 80px;
    margin-top: -80px;
}

.direction-section.reverse {
    flex-direction: row-reverse;
}

.direction-image { flex: 1; min-width: 300px; }
.direction-image img { width: 100%; border-radius: 10px; border: 1px solid var(--border-color); }
.direction-content { flex: 1.2; }
.direction-content h2 { font-family: var(--font-heading); font-size: 3rem; margin-bottom: 20px; color: var(--accent-color); }
.direction-content p { margin-bottom: 20px; }
.direction-content .cta-button { margin-top: 20px; }

/* СТОРІНКА "РОЗКЛАД І ЦІНИ" */
./* --- СТОРІНКА "РОЗКЛАД І ЦІНИ" --- */

.schedule-grid {
    display: grid;
    /* На великих екранах до 3 колонок, на менших - менше */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; /* Збільшуємо відстань між картками */
}

.day-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden; /* Ховаємо все, що виходить за межі рамки */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Додаємо тінь для об'єму */
    display: flex;
    flex-direction: column;
}

.day-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-color);
    text-align: center;
    padding: 15px;
    background-color: rgba(0,0,0,0.2); /* Робимо "шапку" для картки */
}

.class-list {
    padding: 10px 20px 20px 20px; /* Внутрішні відступи для списку */
}

.class-item {
    padding: 15px 0;
    display: grid;
    grid-template-columns: 70px 1fr;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.class-list .class-item:last-child {
    border-bottom: none;
}

.class-time {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-color);
}

.class-name {
    font-weight: 500;
    font-size: 1.1rem;
}

.class-trainer {
    grid-column: 2 / 3;
    font-size: 0.9rem;
    color: #cccccc;
    opacity: 0.8;
}

.no-classes {
    text-align: center;
    color: #cccccc;
    padding: 20px 0;
    font-style: italic;
}

.prices-rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.prices-container h3, .rules-container h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 20px;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
}

.price-table td {
    padding: 15px;
    border-bottom: 1px solid #2a2a2a;
    font-size: 1rem;
}

.price-table .price {
    font-weight: 700;
    text-align: right;
    color: var(--accent-color);
}

.rules-list {
    list-style: none;
    padding-left: 0;
}

.rules-list li {
    padding: 15px;
    border-bottom: 1px solid #2a2a2a;
}

.rules-list li::before {
    content: '→';
    margin-right: 15px;
    color: var(--accent-color);
}

/* Адаптивність для цін та правил */
@media (max-width: 768px) {
    .prices-rules-grid {
        grid-template-columns: 1fr;
    }
}
/* --- 8. Футер --- */
.footer {
    background-color: #0c0916; /* Темніший фон для футера */
    padding: 60px 0 20px 0;
    border-top: 1px solid var(--border-color);
}

.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 40px; }
.footer-col h4 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 15px; color: var(--accent-color); }
.footer-col p, .footer-col a, .footer-col li { color: #a0a0a0; text-decoration: none; list-style: none; transition: color 0.3s; }
.footer-col a:hover { color: var(--accent-color); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #333; color: #777; font-size: 0.9rem; }

/* --- 9. Адаптивність (мобільна версія) --- */
.nav-toggle, .nav-toggle-label { display: none; }
.cta-button.mobile-cta { display: none; }

@media (max-width: 992px) {
    .header .cta-button { display: none; }
    .cta-button.mobile-cta { display: block; margin-top: 20px; text-align: center; }
    .nav-toggle-label { display: block; position: relative; width: 30px; height: 30px; cursor: pointer; z-index: 101; }
    .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after { display: block; background: var(--text-color); height: 2px; width: 100%; border-radius: 2px; position: absolute; transition: all 0.3s ease; }
    .nav-toggle-label span::before { content: ''; top: -8px; }
    .nav-toggle-label span::after { content: ''; top: 8px; }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 320px;
        height: 100vh;
        padding: 100px 30px 30px 30px;
        transition: right 0.5s ease;
        z-index: 100;
        border-left: 1px solid var(--border-color);
        background-color: var(--bg-color-dark); /* СУЦІЛЬНИЙ ФОН ДЛЯ ЧИТАБЕЛЬНОСТІ */
    }

    .nav ul { flex-direction: column; align-items: flex-start; gap: 25px; }
    .nav a { font-size: 1.2rem; }

    .nav-toggle:checked ~ .nav { right: 0; }
    .nav-toggle:checked ~ .nav-toggle-label span { background: transparent; }
    .nav-toggle:checked ~ .nav-toggle-label span::before { transform: rotate(45deg); top: 0; }
    .nav-toggle:checked ~ .nav-toggle-label span::after { transform: rotate(-45deg); top: 0; }

    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1rem; }
    .hero .cta-button.large { font-size: 0.9rem; padding: 14px 24px; white-space: nowrap; }

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

    .direction-section { flex-direction: column !important; text-align: center; }
    .direction-content .cta-button { display: inline-block; }
    .page-hero { margin-top: 70px; }
    .page-hero h1 { font-size: 3rem; }

    .prices-rules-grid { grid-template-columns: 1fr; }
}
/* --- Стилі для сторінки "Про нас" --- */

.text-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px auto;
}

#advantages-about {
    padding-top: 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
}

.team-member img {
    width: 100%;
    max-width: 250px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.team-member h4 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Стилі для лайтбоксу (спливаюче вікно для фото) */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--accent-color);
}
/* --- Стилі для сторінки "Контакти" --- */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.contact-item {
    margin-bottom: 25px;
}

.contact-item h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.contact-item p {
    font-size: 1.1rem;
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--accent-color);
}

.contact-map iframe {
    width: 100%;
    height: 450px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

/* Адаптивність для сторінки контактів */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-map {
        /* Міняємо порядок на мобільних: спочатку деталі, потім карта */
        grid-row: 2;
    }
    .contact-details {
        grid-row: 1;
        text-align: center;
    }
    .contact-details .section-title, .contact-details .section-subtitle {
        text-align: center;
    }
}
/* --- Стилі для сторінок Блогу --- */

/* Сітка на головній сторінці блогу */
/* --- Стилі для сторінок Блогу --- */
/* --- Стилі для сторінок Блогу --- */
.blog-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}
.article-card-link {
    text-decoration: none;
    color: var(--text-color);
}
.article-card {
    background-color: var(--card-bg-color);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all .3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(255, 0, 229, .1);
}
.article-card-image {
    height: 220px;
    background-size: cover;
    background-position: center;
}
.article-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.article-card-date {
    font-size: .8rem;
    color: #ccc;
    margin-bottom: 10px;
}
.article-card h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 15px;
    flex-grow: 1;
}
.article-card p {
    font-size: .9rem;
    color: #ccc;
    line-height: 1.5;
}
.article-card .read-more {
    color: var(--accent-color);
    font-weight: 500;
    margin-top: 20px;
    align-self: flex-start;
}
.single-article-container {
    max-width: 800px;
    margin: 0 auto;
}
.article-header {
    text-align: center;
    margin-bottom: 40px;
}
.article-header h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.2;
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}
.article-date {
    font-size: 1rem;
    color: #ccc;
}
.article-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 40px;
}
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}
.back-to-blog {
    text-align: center;
    margin-top: 60px;
}

/* Кнопка всередині статті */
.article-cta-inline {
    text-align: center;
    margin: 30px 0;
}

/* Блок в кінці статті */
.cta-block {
    text-align: center;
    padding: 40px;
    margin: 60px 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--card-bg-color);
}

.cta-block h3 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* Банер на сторінці блогу */
.cta-banner {
    padding: 60px 0;
    background-color: var(--card-bg-color);
    text-align: center;
}

.cta-banner h3 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.cta-banner p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #cccccc;
}
/* --- Фінальні правки для відступів та читабельності --- */

/* Збільшуємо відступ між заголовком і текстом в блоці переваг */
.advantage-item h3 {
    margin-bottom: 15px;
}

/* Додаємо відступ після основного тексту статті */
.article-content {
    margin-bottom: 40px;
}

/* Покращуємо відступи для абзаців всередині статті */
.article-content p,
.article-content ul,
.article-content h2 {
    margin-bottom: 20px;
}
.price-table .price-section-header th {
    background-color: var(--card-bg-color);
    color: var(--accent-color);
    text-align: center;
    padding: 10px;
    font-size: 1.1rem;
}
/* Стиль для карток-посилань на головній сторінці */
.direction-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
/* --- Стилі для сторінки 404 --- */
.text-center {
    text-align: center;
    padding-top: 50px;
    padding-bottom: 50px;
}

.error-title {
    font-family: var(--font-heading);
    font-size: 10rem;
    color: var(--accent-color);
    text-shadow: 0 0 25px var(--accent-glow);
    line-height: 1;
}