/* Основные стили */
:root {
    --primary-color: #9c88ff;
    --primary-light: #c1b7fd;
    --primary-dark: #7660db;
    --secondary-color: #8ecbaf;
    --dark-color: #333;
    --light-color: #f9f9f9;
    --gray-color: #f1f1f1;
    --text-color: #333;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --container-width: 1170px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    position: relative;
    padding-bottom: 15px;
    color: var(--dark-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-light), var(--primary-color), var(--primary-dark));
    border-radius: 3px;
}

section {
    padding: 80px 0;
}

.btn {
    display: inline-block;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.15);
}

/* Анимации появления при скролле */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

section {
    opacity: 0;
    animation: fadeIn 0.8s forwards;
}

section:nth-child(even) {
    animation-name: scaleIn;
}

section:nth-child(3n) {
    animation-delay: 0.1s;
}

section:nth-child(3n+1) {
    animation-delay: 0.2s;
}

/* Шапка сайта */
.header {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 20px 0;
    transition: var(--transition);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.nav__list {
    display: flex;
}

.nav__item:not(:last-child) {
    margin-right: 25px;
}

.nav__link {
    color: white;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: var(--transition);
}

.nav__link:hover::after {
    width: 100%;
}

.header__burger {
    display: none;
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
}

.header__burger span {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: white;
    top: 9px;
    left: 0;
    transition: var(--transition);
}

.header__burger::before,
.header__burger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: white;
    left: 0;
    transition: var(--transition);
}

.header__burger::before {
    top: 0;
}

.header__burger::after {
    bottom: 0;
}

.header__burger-form {
    display: none;
}

/* Главная секция */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    background: url('../img/rBodVI.jpg') center/cover no-repeat;
    color: white;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
}

.hero__content {
    position: relative;
    z-index: 1;
    animation: fadeIn 1.2s forwards;
}

.hero__title {
    font-size: 60px;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero__subtitle {
    font-size: 24px;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* О студии */
.about__content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about__text {
    flex: 1;
}

.about__text p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.about__image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about__image:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Наши тренировки */
.classes__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.class-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.class-card:hover {
    transform: rotateY(5deg) rotateX(5deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.class-card__image {
    height: 200px;
    overflow: hidden;
}

.class-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.class-card:hover .class-card__image img {
    transform: scale(1.05);
}

.class-card__content {
    padding: 20px;
}

.class-card__title {
    margin-bottom: 10px;
    font-size: 20px;
    color: var(--primary-dark);
}

.class-card__description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Расписание занятий */
.schedule__table-wrapper {
    overflow-x: auto;
}

.schedule__table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.schedule__table th,
.schedule__table td {
    padding: 15px;
    text-align: center;
    border: 1px solid #eee;
}

.schedule__table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.schedule__table tr:nth-child(even) {
    background-color: #f8f8f8;
}

.schedule__table td:not(:empty):hover {
    background-color: var(--primary-light);
    color: var(--dark-color);
    transform: scale(1.05);
    font-weight: 500;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
}

/* Форма записи */
.form {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    position: relative;
}

.form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/QmYVPc.jpg') center/cover no-repeat;
    opacity: 0.1;
}

.form__wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.form__body {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form__field {
    margin-bottom: 25px;
}

.form__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form__input,
.form__select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: var(--transition);
}

.form__input:focus,
.form__select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(156, 136, 255, 0.2);
    outline: none;
}

.form__btn {
    width: 100%;
    margin-top: 10px;
}

.form__errors {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(255, 200, 200, 0.8);
    border-radius: 6px;
    border-left: 4px solid #ff5555;
}

.form__error {
    color: #a30000;
    font-size: 14px;
    margin-bottom: 5px;
}

.form__error:last-child {
    margin-bottom: 0;
}

/* Отзывы клиентов */
.testimonials__wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    margin-bottom: 40px;
    text-align: center;
}

.testimonial__content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
}

.testimonial__content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.testimonial__content::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 60px;
    color: var(--primary-light);
    opacity: 0.3;
    font-family: Georgia, serif;
}

.testimonial__text {
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.testimonial__author {
    font-weight: 600;
    color: var(--primary-dark);
}

/* Галерея */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery__item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 250px;
    transition: var(--transition);
}

.gallery__item:hover {
    transform: scale(1.05);
    z-index: 1;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.gallery__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery__item:hover .gallery__image {
    transform: scale(1.1);
}

.gallery__description {
    margin-top: 30px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gallery__description p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--dark-color);
}

/* Контакты */
.contacts__content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.contacts__info {
    flex: 1;
}

.contacts__address,
.contacts__phone,
.contacts__email {
    margin-bottom: 15px;
    font-size: 18px;
    position: relative;
    padding-left: 30px;
}

.contacts__address::before,
.contacts__phone::before,
.contacts__email::before {
    font-family: sans-serif;
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.contacts__address::before {
    content: '📍';
}

.contacts__phone::before {
    content: '📞';
}

.contacts__email::before {
    content: '✉️';
}

.contacts__schedule {
    margin-top: 30px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.contacts__map {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 300px;
}

.contacts__map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Политики */
.policies__tabs {
    max-width: 900px;
    margin: 0 auto;
}

.policies__tabs-nav {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
}

.policies__tab-btn {
    padding: 12px 20px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    white-space: nowrap;
    transition: var(--transition);
    color: #555;
}

.policies__tab-btn.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.policies__tab-item {
    display: none;
    animation: fadeIn 0.5s forwards;
}

.policies__tab-item.active {
    display: block;
}

.policies__tab-item h3 {
    margin-bottom: 20px;
    color: var(--primary-dark);
}

.policies__tab-item p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Подвал сайта */
.footer {
    background-color: #333;
    color: #fff;
    padding: 60px 0 20px;
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer__logo,
.footer__info,
.footer__nav {
    margin-bottom: 30px;
}

.footer__logo .logo {
    text-shadow: none;
}

.footer__info p {
    margin-bottom: 10px;
}

.footer__nav-item {
    margin-bottom: 10px;
}

.footer__nav-link {
    color: #ccc;
    transition: var(--transition);
}

.footer__nav-link:hover {
    color: white;
    padding-left: 5px;
}

.footer__bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
}

.footer__copyright {
    color: #999;
    font-size: 14px;
}

/* Поп-ап о cookies */
.cookies-popup {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    z-index: 1000;
    transition: transform 0.5s ease;
    transform: translateY(100px);
    opacity: 0;
}

.cookies-popup.show {
    transform: translateY(0);
    opacity: 1;
}

.cookies-popup__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.cookies-popup__text {
    flex: 1;
    margin-right: 20px;
    font-size: 14px;
}

.cookies-popup__link {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookies-popup__btn {
    white-space: nowrap;
    padding: 8px 20px;
    font-size: 13px;
}

/* Адаптивность */
@media (max-width: 1200px) {
    :root {
        --container-width: 960px;
    }

    .hero__title {
        font-size: 50px;
    }
}

@media (max-width: 992px) {
    :root {
        --container-width: 720px;
    }

    section {
        padding: 60px 0;
    }

    .about__content,
    .contacts__content {
        flex-direction: column;
    }

    .about__image,
    .contacts__map {
        width: 100%;
        margin-top: 30px;
    }

    .classes__grid,
    .gallery__grid,
    .benefits__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero__title {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    :root {
        --container-width: 540px;
    }

    .header {
        padding: 15px 0;
        background-color: rgba(0, 0, 0, 0.8);
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--dark-color);
        z-index: 100;
        transition: var(--transition);
        padding: 80px 20px 20px;
    }

    .nav.active {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
    }

    .nav__item:not(:last-child) {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .header__burger {
        display: block;
        z-index: 101;
    }

    .header__burger.active span {
        transform: scale(0);
    }

    .header__burger.active::before {
        transform: rotate(45deg);
        top: 9px;
    }

    .header__burger.active::after {
        transform: rotate(-45deg);
        bottom: 9px;
    }

    .header__burger-form {
        display: block;
        z-index: 101;
    }

    .hero__title {
        font-size: 36px;
    }

    .hero__subtitle {
        font-size: 18px;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .cookies-popup__content {
        flex-direction: column;
    }

    .cookies-popup__text {
        margin-right: 0;
        margin-bottom: 15px;
        text-align: center;
    }

    .nav__close-form {
        display: block;
    }

    .nav__close-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        font-size: 24px;
        color: white;
        cursor: pointer;
    }
}

@media (max-width: 576px) {
    :root {
        --container-width: 100%;
    }

    .classes__grid,
    .gallery__grid,
    .benefits__grid {
        grid-template-columns: 1fr;
    }

    .form__body {
        padding: 20px;
    }

    .footer__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .policies__tabs-nav {
        justify-content: flex-start;
    }
}

/* CSS-only tab switching */
#privacy:target,
#consent:target,
#return:target,
#terms:target {
    display: block;
}

#privacy:target ~ .policies__tabs-nav .policies__tab-btn[data-tab="privacy"],
#consent:target ~ .policies__tabs-nav .policies__tab-btn[data-tab="consent"],
#return:target ~ .policies__tabs-nav .policies__tab-btn[data-tab="return"],
#terms:target ~ .policies__tabs-nav .policies__tab-btn[data-tab="terms"] {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* CSS-only mobile menu toggle */
.header__burger:focus ~ .nav {
    right: 0;
}

/* Scroll Animation - CSS-only */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .about, .classes, .schedule, .form, .testimonials, 
    .gallery, .benefits, .contacts, .policies {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .about:target, .classes:target, .schedule:target, .form:target, 
    .testimonials:target, .gallery:target, .benefits:target, 
    .contacts:target, .policies:target {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Keyframes for CSS animations */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.btn:hover {
    animation: pulse 1s infinite;
}

.testimonial__content:hover {
    animation: float 3s ease-in-out infinite;
}

/* CSS Variables for additional animations */
:root {
    --animate-duration: 0.8s;
    --animate-delay: 0s;
}

/* Helper classes for animations */
.animate-on-scroll {
    opacity: 0;
    transition: opacity var(--animate-duration) ease var(--animate-delay),
                transform var(--animate-duration) ease var(--animate-delay);
}

.animate-on-scroll.fade-in {
    transform: translateY(30px);
}

.animate-on-scroll.fade-in-left {
    transform: translateX(-50px);
}

.animate-on-scroll.fade-in-right {
    transform: translateX(50px);
}

.animate-on-scroll.scale-in {
    transform: scale(0.9);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translate(0) scale(1);
}

.nav__close-form {
    display: none;
}

.nav__close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav__close-form {
        display: block;
    }
}

/* Преимущества занятий йогой */
.benefits {
    background-color: var(--gray-color);
}

.benefits__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.benefit-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.benefit-card__icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.benefit-card__title {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.benefit-card__description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Контакты */
.classes__grid,
.gallery__grid {
    grid-template-columns: repeat(2, 1fr);
}

.benefits__grid {
    grid-template-columns: repeat(2, 1fr);
}

.classes__grid,
.gallery__grid {
    grid-template-columns: 1fr;
}

.benefits__grid {
    grid-template-columns: 1fr;
}

@media (prefers-reduced-motion: no-preference) {
    .about, .classes, .schedule, .form, .testimonials, 
    .gallery, .benefits, .contacts, .policies {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .about:target, .classes:target, .schedule:target, .form:target, 
    .testimonials:target, .gallery:target, .benefits:target, 
    .contacts:target, .policies:target {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Политики */
.policy-page {
    padding: 100px 0 60px;
    position: relative;
}

.policy-content {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.policy-content h2 {
    color: var(--primary-dark);
    margin: 25px 0 15px;
    font-size: 24px;
}

.policy-content p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.footer__policies {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.footer__policy-link {
    color: var(--light-color);
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.3s;
    text-decoration: none;
}

.footer__policy-link:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .policy-page {
        padding: 80px 0 40px;
    }
    
    .policy-content {
        padding: 20px;
    }
    
    .policy-content h2 {
        font-size: 20px;
    }
    
    .footer__policies {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
} 