/* Root Variables */
:root {
    --color-primary: #5C6B4D;
    --color-primary-light: #7A8B6A;
    --color-primary-dark: #4A5A3E;
    --color-accent: #D4A574;
    --color-accent-light: #E8C9A8;
    --color-background: #FDF9F3;
    --color-background-warm: #FAF5ED;
    --color-background-card: #FFFFFF;
    --color-text: #3D3D3D;
    --color-text-light: #6B6B6B;
    --color-text-muted: #9B9B9B;
    --color-border: #E8E2D9;
    --color-shadow: rgba(92, 107, 77, 0.1);
    
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    --shadow-sm: 0 2px 8px var(--color-shadow);
    --shadow-md: 0 4px 16px var(--color-shadow);
    --shadow-lg: 0 8px 32px var(--color-shadow);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-background);
    min-height: 100vh;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main Content */
.main-content {
    flex: 1;
    padding-bottom: 80px;
}

.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Home Container */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero Section */
.hero {
    padding: 60px 0 80px;
    background: linear-gradient(180deg, var(--color-background-warm) 0%, var(--color-background) 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 32px;
}

.hero-quote {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-style: italic;
    color: var(--color-text);
    padding: 24px 0;
    border-left: 3px solid var(--color-accent);
    padding-left: 24px;
    margin-bottom: 40px;
}

.hero-quote cite {
    display: block;
    font-size: 1rem;
    font-style: normal;
    color: var(--color-text-muted);
    margin-top: 12px;
}

.hero-image {
    position: relative;
    flex-shrink: 0;
}

.image-frame {
    width: 380px;
    height: 480px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.decorative-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--color-accent-light);
    border-radius: 50%;
    top: -30px;
    right: -40px;
    z-index: 1;
    opacity: 0.5;
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cta-button.secondary {
    background: var(--color-accent);
}

.cta-button.secondary:hover {
    background: #c49562;
}

/* Section Styles */
.section-header {
    margin-bottom: 40px;
    text-align: center;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--color-primary);
    position: relative;
}

.section-tag::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* About Section */
.about-section {
    padding: 80px 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--color-text);
    white-space: pre-line;
}

.welcome-text {
    font-family: var(--font-display);
    font-size: 1.3rem !important;
    font-style: italic;
    color: var(--color-primary) !important;
    text-align: center;
    margin-top: 32px !important;
}

/* Methods Section */
.methods-section {
    padding: 80px 0;
    background: var(--color-background-warm);
}

.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.method-card {
    background: var(--color-background-card);
    padding: 28px 24px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.method-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    opacity: 0;
    transition: var(--transition);
}

.method-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent-light);
}

.method-card:hover::before {
    opacity: 1;
}

.method-card span {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 1.05rem;
}

.methods-description {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/* Services Section */
.services-section {
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--color-background-card);
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.service-card:hover {
    border-left-color: var(--color-accent);
    transform: translateX(4px);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.service-card p {
    color: var(--color-text-light);
    white-space: pre-line;
}

/* Education Section */
.education-section {
    padding: 80px 0;
    background: var(--color-background-warm);
}

.diplomas-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.diploma-item {
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.diploma-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.diploma-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: rotate(0deg);
}

/* Blog Section */
.blog-section {
    padding: 80px 0;
}

/* ИЗМЕНЕНИЯ ЗДЕСЬ: Используем Flexbox для умного выравнивания */
.blog-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: flex-start; /* Статьи начинаются слева */
}

.blog-card {
    background: var(--color-background-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    
    /* Размеры карточки для сетки */
    width: 100%;
    max-width: 400px; /* Не дает карточке стать слишком широкой */
    flex: 1 1 300px; /* Гибкость: мин 300px, растет до 400px */
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* --- СТИЛИ ДЛЯ РАМКИ ФОТО В СТАТЬЯХ (B17-стиль) --- */
.article-image-frame {
    width: 100%;
    height: 350px; /* Высота для фото */
    background-color: transparent; /* Прозрачный фон */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 24px;
}

.article-image-frame img {
    width: auto;
    max-width: 95%;
    height: 100%;
    object-fit: contain; /* Фото вписывается целиком */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Легкая тень для фото */
    transition: transform 0.5s ease;
}

/* Эффект при наведении на карточку */
.blog-card:hover .article-image-frame img {
    transform: scale(1.02);
}

.blog-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center; /* Центрируем заголовки */
}

.blog-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.blog-card p {
    color: var(--color-text-light);
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    text-align: left; /* Текст описания слева */
}

.blog-card-date {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 16px;
}

.no-posts-message {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
    width: 100%;
}

/* How Section */
.how-section {
    padding: 80px 0;
}

.how-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.how-content > p {
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.how-details {
    background: var(--color-background-card);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.how-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.how-item:last-child {
    border-bottom: none;
}

.how-label {
    font-weight: 600;
    color: var(--color-primary);
}

.how-value {
    color: var(--color-text-light);
    text-align: right;
}

/* Pricing Section */
.pricing-section {
    padding: 80px 0;
    background: var(--color-background-warm);
}

.pricing-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-background-card);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.price-tag {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--color-primary);
}

.price-duration {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.price-note {
    color: var(--color-text-light);
    margin-bottom: 32px;
    white-space: pre-line;
    text-align: left;
    line-height: 1.8;
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    background: linear-gradient(180deg, var(--color-background) 0%, var(--color-background-warm) 100%);
}

.footer-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.footer-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.footer-text {
    color: var(--color-text-light);
    margin-bottom: 32px;
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--color-primary-dark);
}

.location {
    color: var(--color-text-muted);
}

.copyright {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-background-card);
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    box-shadow: 0 -4px 20px var(--color-shadow);
    z-index: 100;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.nav-item:hover {
    background: var(--color-background-warm);
}

.nav-item.active {
    background: var(--color-primary);
    color: white;
}

.nav-icon {
    font-size: 1.25rem;
}

/* Forum Page */
.forum-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
}

.forum-header {
    text-align: center;
    margin-bottom: 40px;
}

.forum-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.forum-header p {
    color: var(--color-text-light);
}

.create-post-card {
    background: var(--color-background-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
}

.create-post-card textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}

.create-post-card textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.post-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    gap: 16px;
}

.post-form-footer input {
    flex: 1;
    max-width: 200px;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.post-form-footer input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.publish-btn {
    padding: 12px 24px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.publish-btn:hover {
    background: var(--color-primary-dark);
}

/* Posts List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-card {
    background: var(--color-background-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    background: var(--color-accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--color-primary);
}

.post-author {
    font-weight: 500;
    color: var(--color-text);
}

.post-date {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.post-content {
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: 16px;
}

.post-actions {
    display: flex;
    gap: 16px;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--color-background-warm);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.post-action:hover {
    background: var(--color-accent-light);
}

.post-action.liked {
    color: #e74c3c;
}

/* Chat Page */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

.chat-header {
    text-align: center;
    margin-bottom: 24px;
}

.chat-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.chat-header p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--color-background-card);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    background: var(--color-accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.chat-message.user .message-avatar {
    background: var(--color-primary);
    color: white;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    background: var(--color-background-warm);
    border-radius: var(--radius-md);
}

.chat-message.user .message-content {
    background: var(--color-primary);
    color: white;
}

.chat-input-area {
    display: flex;
    gap: 12px;
    background: var(--color-background-card);
    padding: 16px;
    border-radius: var(--radius-md);
}

.chat-input-area textarea {
    flex: 1;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    resize: none;
}

.chat-input-area textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.send-btn {
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    background: var(--color-primary-dark);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-background-card);
    border-radius: var(--radius-md);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    position: relative;
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    display: block;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: var(--color-background-card);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--color-accent-light);
}

.post-modal-content {
    width: 100%;
    max-width: 600px;
    padding: 32px;
}

/* Blog Modal */
.blog-modal-content {
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    padding: 40px;
    overflow-y: auto;
}

.blog-article h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.blog-modal-date {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.blog-modal-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text);
}

.blog-modal-text p {
    margin-bottom: 16px;
    white-space: pre-line;
}

/* Comments */
.comments-section {
    margin-top: 24px;
    border-top: 1px solid var(--color-border);
    padding-top: 24px;
}

.comments-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    resize: vertical;
    min-height: 80px;
}

.comment-form-footer {
    display: flex;
    gap: 12px;
}

.comment-form-footer input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
}

.comment-form-footer button {
    padding: 10px 20px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.comment-form-footer button:hover {
    background: var(--color-primary-dark);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    padding: 16px;
    background: var(--color-background-warm);
    border-radius: var(--radius-sm);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 500;
    color: var(--color-text);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.comment-text {
    color: var(--color-text);
}

/* === VIDEO WIDGET === */
.video-widget {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 250px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 900;
    background: #000;
    animation: slideUp 0.8s ease-out forwards;
    transition: transform 0.3s ease;
}

.video-widget:hover {
    transform: translateY(-5px);
}

.video-wrapper {
    width: 100%;
    height: 100%;
}

.video-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.video-close-btn:hover {
    background: rgba(255,0,0,0.8);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(100px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-quote {
        border-left: none;
        padding-left: 0;
        border-top: 3px solid var(--color-accent);
        padding-top: 24px;
    }
    
    .image-frame {
        width: 280px;
        height: 350px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .decorative-circle {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 600px) {
    .video-widget {
        width: 180px;
        height: 300px;
        bottom: 80px;
        right: 16px;
    }

    .hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-tag {
        font-size: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .post-form-footer {
        flex-direction: column;
    }
    
    .post-form-footer input {
        max-width: none;
    }
    
    .nav-label {
        font-size: 0.8rem;
    }
    
    .nav-item {
        padding: 10px 16px;
    }
    
    .how-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .how-value {
        text-align: center;
    }
    
    .blog-modal-content {
        padding: 24px;
    }
    
    .blog-article h2 {
        font-size: 1.5rem;
    }

    /* МОБИЛЬНАЯ ВЕРСИЯ: Центрируем статьи */
    .blog-grid {
        justify-content: center;
    }
}
/* ======================== */
/* TESTS PAGE */
/* ======================== */

.tests-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
}

.tests-header {
    text-align: center;
    margin-bottom: 40px;
}

.tests-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.tests-header p {
    color: var(--color-text-light);
}

.tests-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.test-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-background-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.test-card:hover {
    border-left-color: var(--color-accent);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.test-card-icon { font-size: 2rem; flex-shrink: 0; }
.test-card-info { flex: 1; }
.test-card-info h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--color-primary); margin-bottom: 4px; }
.test-card-info p { color: var(--color-text-light); font-size: 0.95rem; }
.test-card-arrow { font-size: 1.5rem; color: var(--color-accent); flex-shrink: 0; }

.test-take-container { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.test-take { background: var(--color-background-card); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-md); }

.back-to-home { background: none; border: none; color: var(--color-primary); font-family: var(--font-body); font-size: 1rem; cursor: pointer; padding: 8px 0; margin-bottom: 24px; display: inline-block; transition: var(--transition); }
.back-to-home:hover { color: var(--color-primary-dark); }

.test-take-title { font-family: var(--font-display); font-size: 2rem; color: var(--color-primary); margin-bottom: 8px; }
.test-take-desc { color: var(--color-text-light); margin-bottom: 32px; }

.test-question { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--color-border); }
.test-question:last-child { border-bottom: none; }

.test-q-num { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.test-q-text { font-size: 1.15rem; color: var(--color-text); margin-bottom: 16px; font-weight: 500; }

.test-options { display: flex; flex-direction: column; gap: 10px; }

.test-option {
    display: flex; align-items: center; gap: 12px; padding: 14px 18px;
    background: var(--color-background-warm); border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition); border: 2px solid transparent;
}
.test-option:hover { background: var(--color-accent-light); }
.test-option input[type="radio"] { accent-color: var(--color-primary); width: 18px; height: 18px; }
.test-option input[type="radio"]:checked + span { color: var(--color-primary); font-weight: 600; }

.test-result-card {
    background: linear-gradient(135deg, var(--color-background-warm), var(--color-background));
    border-radius: var(--radius-md); padding: 32px; text-align: center;
    margin-top: 24px; border: 2px solid var(--color-accent-light);
}
.test-result-score { font-family: var(--font-display); font-size: 2.5rem; color: var(--color-primary); font-weight: 600; margin-bottom: 12px; }
.test-result-title { font-family: var(--font-display); font-size: 1.5rem; color: var(--color-primary); margin-bottom: 12px; }
.test-result-text { color: var(--color-text); font-size: 1.05rem; line-height: 1.7; margin-bottom: 24px; }
.test-result-cta { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--color-border); }
.test-result-cta p { color: var(--color-text-light); margin-bottom: 8px; }

.embedded-test {
    margin-top: 40px; padding: 32px; background: var(--color-background-warm);
    border-radius: var(--radius-md); border: 2px solid var(--color-accent-light);
}
.embedded-test-header { text-align: center; margin-bottom: 24px; }
.embedded-test-header h3 { font-family: var(--font-display); font-size: 1.5rem; color: var(--color-primary); margin-bottom: 8px; }
.embedded-test-header p { color: var(--color-text-light); }

.article-full-container { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.article-full { background: var(--color-background-card); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-md); }
.article-hero-img { width: auto; max-width: 100%; max-height: 500px; display: block; margin: 0 auto 32px; border-radius: var(--radius-md); object-fit: contain; }
.article-full-title { font-family: var(--font-display); font-size: 2.2rem; color: var(--color-primary); margin-bottom: 8px; line-height: 1.3; }
.article-full-date { display: block; font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--color-border); }
.article-full-body { font-size: 1.1rem; line-height: 1.8; color: var(--color-text); }

.article-cta { margin-top: 40px; padding: 32px; background: var(--color-background-warm); border-radius: var(--radius-md); text-align: center; }
.article-cta p { color: var(--color-text-light); margin-bottom: 16px; font-size: 1.1rem; }

@media (max-width: 600px) {
    .test-take, .article-full { padding: 24px; }
    .article-full-title { font-size: 1.6rem; }
    .test-take-title { font-size: 1.5rem; }
    .embedded-test { padding: 20px; }
}

/* ==================== */
/* SCHEDULE & BOOKING  */
/* ==================== */

.schedule-section { padding: 80px 0; }
.schedule-intro { text-align: center; color: var(--color-text-light); margin: -16px 0 40px; font-size: 1.05rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.schedule-grid { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.schedule-grid::-webkit-scrollbar { height: 4px; }
.schedule-grid::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }
.schedule-day-col { min-width: 100px; flex-shrink: 0; scroll-snap-align: start; }
.schedule-day-label { font-size: 0.8rem; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; text-align: center; padding: 8px 4px; border-bottom: 1px solid var(--color-border); margin-bottom: 8px; }
.schedule-slot-btn { display: block; width: 100%; padding: 10px 8px; background: var(--color-background-card); border: 1.5px solid var(--color-border); border-radius: 8px; font-family: var(--font-body); font-size: 0.95rem; color: var(--color-text); cursor: pointer; margin-bottom: 6px; transition: all 0.2s; text-align: center; }
.schedule-slot-btn:hover { border-color: var(--color-primary); background: var(--color-primary); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(92,107,77,0.2); }

/* Booking Overlay */
.booking-form-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.booking-form-card { background: #fff; border-radius: 16px; padding: 36px; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.booking-form-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--color-text-muted); line-height: 1; }
.booking-form-close:hover { color: var(--color-text); }
.booking-form-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--color-primary); margin-bottom: 16px; }
.booking-chosen-slot { background: var(--color-background-warm); padding: 12px 16px; border-radius: 8px; font-size: 0.95rem; color: var(--color-text); margin-bottom: 20px; border-left: 3px solid var(--color-primary); }
.booking-field { margin-bottom: 16px; }
.booking-field label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; color: var(--color-text); }
.booking-field input, .booking-field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--color-border); border-radius: 8px; font-family: var(--font-body); font-size: 1rem; transition: border 0.2s; background: var(--color-background); color: var(--color-text); }
.booking-field input:focus, .booking-field textarea:focus { outline: none; border-color: var(--color-primary); }
.booking-submit-btn { width: 100%; padding: 15px; background: var(--color-primary); color: #fff; border: none; border-radius: 10px; font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; cursor: pointer; margin-top: 8px; transition: background 0.2s; }
.booking-submit-btn:hover { background: var(--color-primary-dark, #4A5A3E); }
.booking-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.booking-privacy { text-align: center; font-size: 0.8rem; color: var(--color-text-muted); margin-top: 12px; }
.booking-success { text-align: center; padding: 48px 24px; margin-top: 32px; background: var(--color-background-card); border-radius: 16px; box-shadow: 0 2px 12px rgba(92,107,77,0.1); }
.booking-success span { font-size: 3rem; display: block; margin-bottom: 16px; }
.booking-success h3 { font-family: var(--font-display); font-size: 1.8rem; color: var(--color-primary); margin-bottom: 12px; }
.booking-success p { color: var(--color-text-light); font-size: 1.05rem; }

@media (max-width: 600px) {
    .booking-form-card { padding: 24px; }
    .schedule-grid { gap: 8px; }
    .schedule-day-col { min-width: 85px; }
}

/* ==================== */
/* BOOKING PAGE         */
/* ==================== */

.booking-page-container { max-width: 680px; margin: 0 auto; padding: 32px 20px 120px; }

.booking-page-header { text-align: center; margin-bottom: 36px; }
.booking-page-header h1 { font-family: var(--font-display); font-size: 2rem; color: var(--color-primary); margin-bottom: 8px; }
.booking-page-header p { color: var(--color-text-light); font-size: 1rem; }

/* Пустое состояние */
.booking-empty { text-align: center; padding: 60px 20px; }
.booking-empty span { font-size: 3rem; display: block; margin-bottom: 16px; }
.booking-empty p { color: var(--color-text-light); margin-bottom: 8px; font-size: 1rem; }
.booking-tg-btn { display: inline-block; margin-top: 20px; padding: 14px 28px; background: var(--color-primary); color: #fff; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 1rem; transition: background 0.2s; }
.booking-tg-btn:hover { background: var(--color-primary-dark, #4A5A3E); }

/* Сетка расписания */
.booking-page-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; margin-bottom: 32px; }
.booking-page-grid::-webkit-scrollbar { height: 4px; }
.booking-page-grid::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }
.bp-day-col { min-width: 88px; flex-shrink: 0; scroll-snap-align: start; }
.bp-day-label { font-size: 0.75rem; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; text-align: center; padding: 6px 4px 8px; border-bottom: 1px solid var(--color-border); margin-bottom: 8px; }
.bp-slot-btn { display: block; width: 100%; padding: 10px 6px; background: var(--color-background-card); border: 1.5px solid var(--color-border); border-radius: 8px; font-family: var(--font-body); font-size: 0.95rem; color: var(--color-text); cursor: pointer; margin-bottom: 6px; transition: all 0.18s; text-align: center; }
.bp-slot-btn:hover { border-color: var(--color-primary); color: var(--color-primary); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(92,107,77,0.15); }
.bp-slot-btn.selected { background: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: 0 4px 14px rgba(92,107,77,0.3); }

/* Форма */
.booking-page-form { background: var(--color-background-card); border-radius: 16px; padding: 28px; box-shadow: 0 2px 16px rgba(92,107,77,0.08); animation: fadeInUp 0.3s ease; }
@keyframes fadeInUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.booking-chosen-slot-banner { background: var(--color-background-warm); border-left: 3px solid var(--color-primary); border-radius: 8px; padding: 12px 16px; margin-bottom: 22px; font-size: 0.95rem; color: var(--color-text); }
.booking-page-submit-btn { width: 100%; padding: 15px; background: var(--color-primary); color: #fff; border: none; border-radius: 10px; font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; cursor: pointer; margin-top: 8px; transition: background 0.2s; }
.booking-page-submit-btn:hover { background: var(--color-primary-dark, #4A5A3E); }
.booking-page-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Успех */
.booking-page-success { text-align: center; padding: 60px 20px; animation: fadeInUp 0.4s ease; }
.booking-page-success span { font-size: 3.5rem; display: block; margin-bottom: 20px; }
.booking-page-success h3 { font-family: var(--font-display); font-size: 2rem; color: var(--color-primary); margin-bottom: 12px; }
.booking-page-success p { color: var(--color-text-light); font-size: 1.05rem; margin-bottom: 28px; }
.booking-back-btn { padding: 12px 28px; background: var(--color-background-warm); border: 1.5px solid var(--color-border); border-radius: 10px; font-family: var(--font-body); font-size: 0.95rem; cursor: pointer; color: var(--color-text); transition: all 0.2s; }
.booking-back-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

@media (max-width: 480px) {
    .booking-page-header h1 { font-size: 1.6rem; }
    .booking-page-form { padding: 20px; }
    .bp-day-col { min-width: 78px; }
}
