@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Playfair+Display:wght@700&display=swap');

:root {
    --primary-color: #DAA520; /* Gold */
    --dark-bg: #121212;
    --text-color: #f0f0f0;
    --dark-surface: #1e1e1e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Retreats Schedule */
.retreats-info p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.retreats-info p:first-child {
    margin-top: 1.5rem;
}

.retreats-info p:last-child {
    margin-bottom: 1.5rem;
}

.retreats-info .btn {
    margin-top: 1.5rem;
    display: inline-block;
}

/* Header */
.header {
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

.logo img {
    height: 60px;
    width: auto;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav__link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.nav__link:hover {
    color: var(--primary-color);
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
}

.burger-menu span {
    width: 2rem;
    height: 0.25rem;
    background: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.burger-menu.burger--active span:nth-child(1) {
    transform: rotate(45deg);
}

.burger-menu.burger--active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.burger-menu.burger--active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('photo_2024-09-19_19-39-54.jpg') no-repeat center center/cover;
    /* I'm using one of the uploaded photos as a background. */
}

.hero__title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    color: #fff;
    margin-bottom: 1rem;
}

.hero__subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    background-color: var(--primary-color);
    color: #000;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
    background-color: #c4951c;
    transform: translateY(-2px);
}

/* General Section Styling */
.section {
    padding: 6rem 0;
}

.section__title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section__title.visible,
.feature-content.visible,
.feature-image.visible,
.service.visible,
.section__text,
.section__text.visible,
.retreats-info,
.retreats-info.visible,
.contact-form.visible,
.gallery-item.visible,
.program-item.visible,
.preparation-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.section__text {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.5);
}

.section--dark {
    background-color: var(--dark-surface);
}

/* Feature Section (Ayahuasca & Guide) */
.section-feature .section__title {
    text-align: left;
}

.feature-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.feature-content {
    flex: 1;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.feature-content p {
    text-align: left;
}

.feature-image {
    flex: 1;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.feature-image img {
    width: 100%;
    border-radius: 15px;
    height: auto;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.5);
}

.feature-container--reversed {
    flex-direction: row-reverse;
}

.feature-container--reversed .feature-content {
     transform: translateX(30px);
}

.feature-container--reversed .feature-image {
     transform: translateX(-30px);
}

/* Services */
.services {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.service {
    background-color: var(--dark-bg);
    padding: 2rem;
    border-radius: 10px;
    flex-basis: 30%;
    min-width: 280px;
    text-align: center;
    border: 1px solid var(--primary-color);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.service:nth-child(2) {
    transition-delay: 0.2s;
}
.service:nth-child(3) {
    transition-delay: 0.4s;
}

.service__title {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Retreats */
.retreats-info {
    text-align: center;
    margin-top: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
}

.retreats-info p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
}

.contact-form__input {
    width: 100%;
    max-width: 500px;
    padding: 0.8rem;
    background-color: var(--dark-bg);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: var(--text-color);
}

.contact-form__input:focus,
.contact-form textarea:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.5);
}

textarea.contact-form__input {
    min-height: 100px;
    resize: vertical;
}

.btn:disabled {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
     background-color: #555;
}

/* Questionnaire Styles */
#start-form-btn {
    margin: 0 auto 3rem;
    display: block;
}

.questionnaire-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s ease-in-out;
    margin-top: 0;
}

.questionnaire-wrapper.expanded {
    margin-top: 3rem;
}

.questionnaire {
    display: block;
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group--full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-weight: bold;
    cursor: pointer;
}

.form-group input[type="radio"],
.form-group input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.form-group input[type="radio"] + label,
.form-group input[type="checkbox"] + label {
    position: relative;
    padding-left: 35px;
    font-weight: normal;
}

.form-group input[type="radio"] + label::before,
.form-group input[type="checkbox"] + label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.1em;
    transform: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    background-color: var(--dark-surface);
    transition: background-color 0.3s ease;
}

.form-group input[type="radio"] + label::before {
    border-radius: 50%;
}

.form-group input[type="checkbox"] + label::before {
    border-radius: 4px;
}

/* Checked state */
.form-group input[type="radio"]:checked + label::before,
.form-group input[type="checkbox"]:checked + label::before {
    background-color: var(--primary-color);
}

/* Checkmark/dot */
.form-group input[type="radio"] + label::after,
.form-group input[type="checkbox"] + label::after {
    content: '';
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-group input[type="checkbox"] + label::after {
    left: 7px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid var(--dark-bg);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.form-group input[type="radio"]:checked + label::after,
.form-group input[type="checkbox"]:checked + label::after {
    opacity: 1;
}

.contact-form__input,
textarea.contact-form__input {
    background-color: transparent;
    border: none;
    border-bottom: 2px solid #555;
    border-radius: 0;
    color: var(--text-color);
    transition: border-color 0.3s ease;
    padding: 0.5rem 0;
}

.contact-form__input:focus,
textarea.contact-form__input:focus {
    outline: none;
    box-shadow: none;
    border-bottom-color: var(--primary-color);
}

.confirmation-group {
    margin-top: 2rem;
    padding: 2rem;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
}

.checkbox-group label {
    line-height: 1.4;
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    border-top: 1px solid var(--primary-color);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 70px;
}

.footer-links, .footer-social, .footer-contact {
    display: flex;
    flex-direction: column;
}

.footer-links a, .footer-social a, .footer-contact p {
    color: var(--text-color);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-social a i, .footer-contact p i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

.footer-links a:hover, .footer-social a:hover {
    color: var(--primary-color);
}

.footer h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.footer-copy {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--dark-surface);
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

.gallery-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(218, 165, 32, 0.6);
}

.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.2s; }
.gallery-item:nth-child(4) { transition-delay: 0.3s; }

/* Program Section */
.program-timeline {
    margin-top: 4rem;
    position: relative;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.program-timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 20px;
}

.program-item {
    padding: 1rem 3rem 2rem 5rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.program-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--dark-bg);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    top: 15px;
    left: 12px;
    z-index: 1;
}

.program-item__title {
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.5rem;
}

/* Preparation Section */
.preparation-content {
    max-width: 800px;
    margin: 4rem auto 0;
    text-align: left;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.preparation-content h4 {
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.preparation-content p {
    margin-bottom: 1rem;
}

@media (max-width: 992px) {
    .feature-container {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        background: var(--dark-surface);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
    }

    .nav.nav--active {
        transform: translateX(0);
    }

    .nav__link {
        font-size: 1.5rem;
        padding: 1rem;
    }

    .burger-menu {
        display: flex;
    }

    .hero__title {
        font-size: 2.8rem;
    }

    .hero__subtitle {
        font-size: 1.1rem;
    }

    .section {
        padding: 4rem 0;
    }

    .feature-container,
    .feature-container--reversed {
        flex-direction: column;
        gap: 3rem;
    }
    
    .feature-container--reversed .feature-content,
    .feature-container .feature-content {
        transform: none;
    }

    .feature-container--reversed .feature-image,
    .feature-container .feature-image {
        transform: none;
    }
    
    .section-feature .section__title,
    .feature-content p {
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links, .footer-social {
        align-items: center;
    }

    .program-item {
        /* Adjust padding for mobile to prevent overlap with the timeline */
        padding: 1rem 1rem 1.5rem 4rem;
    }

    .questionnaire {
        grid-template-columns: 1fr;
    }
    .logo img {
        height: 40px;
    }
    .footer-logo img {
        height: 50px;
    }
}

.footer-contact p a.footer-whatsapp {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
}

.footer-contact p a.footer-whatsapp:hover {
    text-decoration: underline;
}

.footer-whatsapp-note {
    color: #aaa;
    font-size: 0.95em;
    margin-left: 2.2em;
}

.input-error {
    border-bottom: 2px solid #e74c3c !important;
    background-color: rgba(231, 76, 60, 0.07);
    transition: border-color 0.3s, background-color 0.3s;
}

/* Preloader styles */
#preloader {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #121212;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #daa52033;
    border-top: 6px solid #DAA520;
    border-radius: 50%;
    animation: spin 1.1s linear infinite;
    margin-bottom: 1.5rem;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.preloader-text {
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
}
body.loaded #preloader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Language Switcher Button (добавляю анимации) */
#lang-switcher {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 2000;
    background: linear-gradient(135deg, #DAA520 60%, #fffbe6 100%);
    color: #121212;
    border: none;
    border-radius: 50px;
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 16px rgba(218,165,32,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.4s, color 0.3s, box-shadow 0.3s, transform 0.2s;
    overflow: hidden;
}
#lang-switcher::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2.5px solid rgba(218,165,32,0.5);
    opacity: 0;
    transition: opacity 0.3s, box-shadow 0.3s;
    pointer-events: none;
}
#lang-switcher:hover::before {
    opacity: 1;
    box-shadow: 0 0 18px 6px rgba(218,165,32,0.25);
    animation: lang-glow 1.2s infinite alternate;
}
@keyframes lang-glow {
    0% { box-shadow: 0 0 18px 6px rgba(218,165,32,0.25); }
    100% { box-shadow: 0 0 32px 12px rgba(218,165,32,0.45); }
}
#lang-switcher:active {
    background: linear-gradient(135deg, #b8860b 60%, #fffbe6 100%);
    transform: scale(0.96) rotate(-15deg);
}
#lang-switcher.animate {
    animation: lang-rotate 0.5s cubic-bezier(.6,2,.4,1) 1;
}
@keyframes lang-rotate {
    0% { transform: scale(1) rotate(0deg); }
    40% { transform: scale(1.15) rotate(180deg); }
    70% { transform: scale(0.95) rotate(270deg); }
    100% { transform: scale(1) rotate(360deg); }
}
#lang-switcher-label {
    font-size: 1.1em;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    transition: color 0.3s;
}
#lang-switcher.wave::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, #fffbe6 0%, #DAA520 80%, transparent 100%);
    opacity: 0.5;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: lang-wave 0.5s cubic-bezier(.6,2,.4,1);
    pointer-events: none;
}
@keyframes lang-wave {
    0% { width: 0; height: 0; opacity: 0.7; }
    70% { width: 80px; height: 80px; opacity: 0.3; }
    100% { width: 120px; height: 120px; opacity: 0; }
}
@media (max-width: 768px) {
    #lang-switcher {
        width: 44px;
        height: 44px;
        font-size: 1rem;
        bottom: 20px;
        right: 16px;
    }
}

/* Форматы ретритов (аккордеон) */
#formats {
    background: var(--dark-bg);
    border-top: 3px solid var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(218,165,32,0.08);
}
.formats-accordion {
    max-width: 800px;
    margin: 0 auto;
}
.format-item {
    background: var(--dark-surface);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 16px rgba(218,165,32,0.10);
    overflow: hidden;
    border: 1.5px solid var(--primary-color);
    transition: box-shadow 0.3s;
}
.format-item:last-child {
    margin-bottom: 0;
}
.format-toggle {
    width: 100%;
    background: none;
    border: none;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: left;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    transition: background 0.2s;
    position: relative;
}
.format-toggle[aria-expanded="true"] {
    background: rgba(218,165,32,0.08);
}
.format-icon {
    font-size: 1.7rem;
    margin-right: 1rem;
    filter: drop-shadow(0 0 6px #daa52088);
}
.format-content {
    max-height: 0;
    overflow: hidden;
    background: var(--dark-bg);
    color: var(--text-color);
    padding: 0 1.5rem;
    border-top: 1px solid rgba(218,165,32,0.15);
    transition: max-height 0.5s cubic-bezier(.4,0,.2,1), padding 0.3s;
    opacity: 0.7;
}
.format-item.open .format-content {
    padding: 1.2rem 1.5rem 1.5rem 1.5rem;
    max-height: 800px;
    opacity: 1;
    transition: max-height 0.7s cubic-bezier(.4,0,.2,1), opacity 0.3s, padding 0.3s;
}
.format-content ul {
    margin: 1rem 0 1rem 1.5rem;
    padding-left: 0;
    list-style: disc;
}
.format-content li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}
.format-content blockquote {
    margin: 1.2rem 0;
    padding: 1rem 1.5rem;
    background: rgba(218,165,32,0.07);
    border-left: 4px solid var(--primary-color);
    color: #ffe7a0;
    font-style: italic;
    border-radius: 8px;
    font-size: 1.05rem;
}
@media (max-width: 600px) {
    .formats-accordion {
        max-width: 100%;
        padding: 0 0.5rem;
    }
    .format-toggle {
        font-size: 1.05rem;
        padding: 1rem 1rem;
        min-height: 56px;
        line-height: 1.3;
        word-break: break-word;
    }
    .format-content {
        padding: 0 1rem;
        font-size: 0.98rem;
    }
    .format-item.open .format-content {
        padding: 1rem 1rem 1.2rem 1rem;
    }
    .format-content ul {
        margin: 1rem 0 1rem 1rem;
        font-size: 0.98rem;
    }
    .format-content blockquote {
        font-size: 0.97rem;
        padding: 0.8rem 1rem;
    }
}

@media (max-width: 400px) {
    .format-toggle {
        font-size: 0.95rem;
        padding: 0.7rem 0.5rem;
    }
    .format-content {
        padding: 0 0.3rem;
    }
    .format-item.open .format-content {
        padding: 0.7rem 0.3rem 1rem 0.3rem;
    }
    .format-content ul {
        margin: 0.7rem 0 0.7rem 0.7rem;
    }
    .format-content blockquote {
        font-size: 0.93rem;
        padding: 0.6rem 0.7rem;
    }
}

/* Уменьшаю отступы в секции контактов */
#contact .section__title {
    margin-bottom: 1.2rem;
}
#contact .section__text {
    margin-bottom: 1.2rem;
}
