/* ===== ОСНОВНЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== SMOOTH SCROLL ===== */
html {
    scroll-behavior: smooth;
}

/* ===== КОРНЕВЫЕ ПЕРЕМЕННЫЕ ===== */
:root {
    --primary-dark: #240046;
    --primary-accent: #5a189a;
    --primary-light: #9d4edd;
    --bg-light: #f2e9e4;
    --button-color: #ffecd1;
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-radius: 10px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* ===== КОНТЕЙНЕР ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== SECTION STYLES ===== */
.section {
    padding: 4rem 0;
    margin-top: 80px; /* Отступ от шапки для страниц политик */
}

/* ===== ТИПОГРАФИКА ===== */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 2rem;
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary-accent), var(--primary-light));
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--box-shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(90, 24, 154, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--button-color), #f0d39a);
    color: var(--text-dark);
}

.btn-secondary:hover {
    box-shadow: 0 8px 25px rgba(255, 236, 209, 0.4);
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-accent));
    color: var(--text-light);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-light);
    transition: var(--transition);
}

.logo img {
    height: 40px;
    width: 40px;
    transition: var(--transition);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
}

.logo:hover img {
    transform: scale(1.05);
}

.logo:hover .logo-text {
    color: var(--button-color);
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.nav a:hover {
    color: var(--button-color);
    background: rgba(255, 236, 209, 0.1);
}

.nav a.btn {
    background: linear-gradient(135deg, var(--button-color), #f0d39a);
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
}

.nav a.btn:hover {
    background: linear-gradient(135deg, #f0d39a, var(--button-color));
    transform: translateY(-2px);
}

/* ===== MAIN CONTENT ===== */
main {
    margin-top: 80px;
}

/* ===== ANCHOR OFFSET ===== */
section[id] {
    scroll-margin-top: 100px;
}

.section {
    padding: 4rem 0;
    position: relative;
}

.section:nth-child(even) {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.05), rgba(90, 24, 154, 0.05));
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-accent));
    color: var(--text-light);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 80px; /* Компенсация для фиксированной шапки */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(157, 78, 221, 0.3), transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    color: var(--text-light);
    background: none;
    -webkit-text-fill-color: var(--text-light);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ===== CARDS ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(157, 78, 221, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(90, 24, 154, 0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-accent);
}

.card-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
    border-left: 4px solid var(--primary-accent);
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--primary-light);
    opacity: 0.3;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-dark);
    margin-top: 1rem;
}

/* ===== FAQ ===== */
.faq-item {
    background: white;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-accent), var(--primary-light));
    color: var(--text-light);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-accent));
}

.faq-answer {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid rgba(157, 78, 221, 0.1);
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-accent));
    color: var(--text-light);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--button-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===== COOKIE POPUP ===== */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    max-width: 500px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(100px);
    transition: var(--transition);
}

.cookie-popup.show {
    opacity: 1;
    transform: translateY(0);
}

.cookie-popup-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-popup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cookie-popup-buttons .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 0;
    }
    
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .logo {
        gap: 0.4rem;
    }
    
    .logo img {
        height: 28px;
        width: 28px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .nav ul {
        flex-direction: row;
        gap: 0.3rem;
        text-align: center;
        width: auto;
        flex-wrap: wrap;
    }
    
    .nav ul li {
        margin: 0;
    }
    
    .nav a {
        padding: 0.3rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .nav ul li .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    main {
        margin-top: 65px;
    }
    
    section[id] {
        scroll-margin-top: 75px;
    }
    
    .hero {
        padding: 4rem 0;
        margin-top: 100px; /* Увеличенный отступ для мобильных */
    }
    
    /* Специальные стили для страницы merci.php */
    .hero[style*="margin-top: 120px"] {
        margin-top: 120px !important;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 2rem 0;
        margin-top: 100px; /* Увеличенный отступ для мобильных */
    }
    
    .form-section {
        padding: 2rem 1.5rem;
        max-width: 90%; /* Адаптивная ширина для мобильных */
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .card-image {
        height: 150px;
        margin-bottom: 1rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cookie-popup {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .cookie-popup-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.4rem 0;
    }
    
    main {
        margin-top: 50px;
    }
    
    section[id] {
        scroll-margin-top: 60px;
    }
    
    .header-container {
        flex-direction: row;
        gap: 0.3rem;
        padding: 0.5rem 0;
    }
    
    .logo {
        gap: 0.3rem;
    }
    
    .logo img {
        height: 24px;
        width: 24px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .nav ul {
        gap: 0.2rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .nav ul li {
        flex-shrink: 0;
    }
    
    .nav a {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .nav ul li .btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .section {
        padding: 1.5rem 0;
        margin-top: 120px; /* Еще больший отступ для маленьких экранов */
    }
    
    .form-section {
        padding: 1.5rem 1rem;
        max-width: 95%; /* Больше места на очень маленьких экранах */
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .card-image {
        height: 120px;
        margin-bottom: 0.75rem;
    }
    
    /* FAQ мобильная адаптация */
    .faq-question {
        padding: 1rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .faq-question::after {
        right: 1.2rem;
        font-size: 1.3rem;
    }
    
    .faq-answer {
        padding: 0 1.2rem;
    }
    
    .faq-item input[type="checkbox"]:checked + .faq-question + .faq-answer {
        padding: 1.2rem;
    }
}

@media (max-width: 360px) {
    .header-container {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav ul {
        justify-content: center;
        width: 100%;
    }
    
    .nav ul li {
        margin: 0.1rem;
    }
    
    .nav a {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .nav ul li .btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
    
    .section {
        padding: 1rem 0;
        margin-top: 140px; /* Максимальный отступ для самых маленьких экранов */
    }
    
    .form-section {
        padding: 1rem 0.8rem;
        max-width: 98%; /* Максимальное использование экрана */
    }
    
    /* FAQ самые маленькие экраны */
    .faq-question {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    .faq-question::after {
        right: 1rem;
        font-size: 1.2rem;
    }
    
    .faq-answer {
        padding: 0 1rem;
    }
    
    .faq-item input[type="checkbox"]:checked + .faq-question + .faq-answer {
        padding: 1rem;
    }
}

/* ===== FAQ SECTION ===== */
.faq-item {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background: white;
    transition: var(--transition);
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(90, 24, 154, 0.15);
}

.faq-question {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-accent));
    color: var(--text-light);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    margin: 0;
    display: block;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    transition: var(--transition);
    color: var(--text-light);
    font-weight: 300;
}

.faq-question:hover {
    background: linear-gradient(135deg, var(--primary-accent), var(--primary-light));
    transform: none;
    box-shadow: none;
}

.faq-answer {
    background: linear-gradient(135deg, rgba(242, 233, 228, 0.3), rgba(255, 236, 209, 0.3));
    padding: 0 2rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.faq-answer p {
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 0;
}

.faq-item input[type="checkbox"] {
    display: none;
}

.faq-item input[type="checkbox"]:checked + .faq-question {
    background: linear-gradient(135deg, var(--primary-accent), var(--primary-light));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.faq-item input[type="checkbox"]:checked + .faq-question::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
    font-size: 2rem;
}

.faq-item input[type="checkbox"]:checked + .faq-question + .faq-answer {
    max-height: 300px;
    padding: 2rem;
    border-top: 1px solid rgba(157, 78, 221, 0.2);
}

/* ===== FORM STYLES ===== */
.form-section {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 2rem 0;
    max-width: 700px; /* Делаем форму уже */
    margin: 2rem auto; /* Центрируем форму */
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.1);
}

.form-group input:required:invalid {
    border-color: #ff4444;
}

.form-group input:required:valid {
    border-color: #22c55e;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.2rem;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.4;
}

.checkbox-group a {
    color: var(--primary-accent);
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-accent), var(--primary-light));
    color: var(--text-light);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(90, 24, 154, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ===== УТИЛИТАРНЫЕ КЛАССЫ ===== */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.hidden {
    display: none;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== POLICY PAGES ===== */
.policy-date {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
    font-style: italic;
}

.policy-date strong {
    color: var(--primary-accent);
    font-weight: 600;
} 