/* Раздел «Финансист» — общий каркас в дизайне сайта italpha.pro */

:root {
    --primary-color: #596e9f;
    --primary-hover: #4a5d8a;
    --bg-light: #f7f7f7;
    --bg-block-light: #ffffff;
    --bg-dark: #151517;
    --bg-block-dark: #1b1b1c;
    --text-dark: #333333;
    --text-light: #f5f5f7;
    --border-color: rgba(89, 110, 159, 0.1);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1400px;
}

.dark-mode {
    --bg-light: #151517;
    --bg-block-light: #1b1b1c;
    --bg-dark: #151517;
    --bg-block-dark: #1b1b1c;
    --text-dark: #f5f5f7;
    --text-light: #f5f5f7;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.4);
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* ============ Header (как на сайте) ============ */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%;
    background-color: rgba(247, 247, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 0.9rem 0;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.dark-mode header { background-color: rgba(21, 21, 23, 0.95); }

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img { height: 40px; width: auto; }

.nav-links { display: flex; gap: 1.6rem; align-items: center; }

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.dark-mode .nav-links a { color: var(--text-light); }
.nav-links a:hover { color: var(--primary-color); }

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 0; height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after { width: 100%; }

.theme-toggle { display: flex; align-items: center; cursor: pointer; margin-left: 1rem; }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: var(--transition);
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(20px); }

/* ============ Off-canvas меню (как на сайте) ============ */
.site-menu-toggle {
    margin-left: 1rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.dark-mode .site-menu-toggle { color: var(--text-light); background: rgba(255,255,255,0.05); }

.site-menu-toggle:hover { background: rgba(0,0,0,0.03); box-shadow: 0 4px 10px rgba(0,0,0,0.08); }

.site-menu-toggle-icon {
    width: 18px; height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
}

.site-menu-toggle-icon::before,
.site-menu-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px; height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: var(--transition);
}

.site-menu-toggle-icon::before { top: -6px; }
.site-menu-toggle-icon::after { top: 6px; }

.site-menu-toggle.open .site-menu-toggle-icon { background: transparent; }
.site-menu-toggle.open .site-menu-toggle-icon::before { top: 0; transform: rotate(45deg); }
.site-menu-toggle.open .site-menu-toggle-icon::after { top: 0; transform: rotate(-45deg); }

.site-menu-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.site-menu-overlay.active { opacity: 1; visibility: visible; }

.site-menu-panel {
    position: fixed;
    top: 0; right: -280px;
    width: 260px;
    max-width: 80%;
    height: 100%;
    background: var(--bg-block-light);
    color: var(--text-dark);
    box-shadow: -4px 0 20px rgba(0,0,0,0.2);
    border-left: 1px solid var(--border-color);
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
}

.dark-mode .site-menu-panel { background: var(--bg-block-dark); color: var(--text-light); }
.site-menu-panel.active { right: 0; }

.site-menu-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.site-menu-title { font-size: 1rem; font-weight: 600; }

.site-menu-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: inherit;
    padding: 0;
}

.site-menu-list {
    list-style: none;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.site-menu-list li { margin-bottom: 0.8rem; }

.site-menu-list a {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 0.5rem 0.25rem;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.site-menu-list a:hover { background: rgba(89,110,159,0.08); color: var(--primary-color); }
.dark-mode .site-menu-list a:hover { background: rgba(255,255,255,0.06); }

.site-menu-footer { margin-top: auto; font-size: 0.8rem; opacity: 0.75; }

@media (max-width: 1024px) {
    .nav-links { gap: 1.1rem; }
    .nav-links a { font-size: 0.8rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
}

@media (max-width: 480px) {
    .nav-container { padding: 0 1.2rem; }
}

/* ============ Контент страниц ============ */
.main-content {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 120px 2rem 4rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-dark);
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 0;
    width: 60px; height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-block {
    background-color: var(--bg-block-light);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    margin-bottom: 2.5rem;
}

.dark-mode .section-block { background-color: var(--bg-block-dark); }

.block-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: var(--text-dark);
}

.dark-mode .block-title { color: var(--text-light); }

.block-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
    opacity: 0.92;
    margin-bottom: 1rem;
}

.dark-mode .block-text { color: var(--text-light); }

/* Кнопки */
.btn {
    padding: 12px 30px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
}

.btn-primary { background: var(--primary-color); color: white; }

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(89, 110, 159, 0.3);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.dark-mode .btn-secondary { background: var(--bg-dark); color: var(--text-light); }

.btn-secondary:hover { background: var(--border-color); transform: translateY(-2px); }

.btn-lg { padding: 15px 40px; font-size: 1.1rem; }

/* ============ Hero ============ */
.fin-hero {
    background: linear-gradient(135deg, var(--bg-block-light) 0%, rgba(89, 110, 159, 0.08) 100%);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 4rem;
    margin-bottom: 2.5rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: center;
}

.dark-mode .fin-hero { background: linear-gradient(135deg, var(--bg-block-dark) 0%, rgba(89, 110, 159, 0.15) 100%); }

.fin-hero h1 {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.dark-mode .fin-hero h1 { color: var(--text-light); }

.fin-hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-dark);
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.dark-mode .fin-hero-subtitle { color: var(--text-light); }

.fin-hero-bullets { list-style: none; margin-bottom: 2rem; }

.fin-hero-bullets li {
    padding-left: 1.8rem;
    position: relative;
    margin-bottom: 0.7rem;
    color: var(--text-dark);
    opacity: 0.9;
}

.dark-mode .fin-hero-bullets li { color: var(--text-light); }

.fin-hero-bullets li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.fin-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.fin-hero-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
}

.dark-mode .fin-hero-badge { background: var(--bg-dark); }

.fin-hero-badge .fin-big-icon { font-size: 4rem; line-height: 1; }

.fin-hero-badge .fin-price-big {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

@media (max-width: 1024px) {
    .fin-hero { grid-template-columns: 1fr; padding: 3rem 2rem; }
    .fin-hero h1 { font-size: 2.1rem; }
}

/* ============ Сетки и карточки ============ */
.fin-grid { display: grid; gap: 2rem; margin-top: 2rem; }
.fin-grid-3 { grid-template-columns: repeat(3, 1fr); }
.fin-grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1024px) {
    .fin-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .fin-grid-3, .fin-grid-2 { grid-template-columns: 1fr; }
    .section-block { padding: 2rem 1.5rem; }
}

.fin-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    transition: var(--transition);
}

.dark-mode .fin-card { background: var(--bg-dark); }

.fin-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.fin-card .fin-card-icon { font-size: 2.4rem; margin-bottom: 1rem; }

.fin-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
    color: var(--text-dark);
}

.dark-mode .fin-card h3 { color: var(--text-light); }

.fin-card p { font-size: 0.95rem; color: var(--text-dark); opacity: 0.85; line-height: 1.6; }

.dark-mode .fin-card p { color: var(--text-light); }

/* Скриншоты */
.fin-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }

.fin-shot {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--bg-light);
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    opacity: 0.6;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.dark-mode .fin-shot { background: var(--bg-dark); color: var(--text-light); }

@media (max-width: 768px) {
    .fin-shots { grid-template-columns: 1fr; }
}

/* ============ Тарифы ============ */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; margin-top: 2rem; }

.plan-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.dark-mode .plan-card { background: var(--bg-dark); }

.plan-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: rgba(89, 110, 159, 0.35); }

.plan-card.plan-featured { border: 2px solid var(--primary-color); }

.plan-name { font-size: 1.3rem; font-weight: 600; color: var(--text-dark); margin-bottom: 0.4rem; }

.dark-mode .plan-name { color: var(--text-light); }

.plan-desc { font-size: 0.9rem; opacity: 0.8; color: var(--text-dark); margin-bottom: 1rem; min-height: 2.4em; }

.dark-mode .plan-desc { color: var(--text-light); }

.plan-price { font-size: 2rem; font-weight: 700; color: var(--primary-color); margin-bottom: 0.3rem; }

.plan-meta { font-size: 0.9rem; opacity: 0.8; color: var(--text-dark); margin-bottom: 1.5rem; }

.dark-mode .plan-meta { color: var(--text-light); }

.plan-actions { margin-top: auto; }

.plan-actions .btn { width: 100%; text-align: center; }

.plans-note { margin-top: 1.5rem; font-size: 0.85rem; opacity: 0.7; }

/* ============ Формы ============ */
.fin-form { max-width: 560px; }

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.dark-mode .form-group label { color: var(--text-light); }

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-dark);
    transition: var(--transition);
    font-size: 1rem;
    font-family: inherit;
}

.dark-mode .form-control { background: var(--bg-dark); color: var(--text-light); }

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(89, 110, 159, 0.1);
}

textarea.form-control { min-height: 120px; resize: vertical; }

.form-hint { font-size: 0.85rem; opacity: 0.7; margin-top: 0.4rem; }

/* Уведомления */
.alert { padding: 1rem 1.2rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: 0.95rem; }

.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.dark-mode .alert-error { background: rgba(220, 53, 69, 0.2); color: #f8d7da; }

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.dark-mode .alert-success { background: rgba(40, 167, 69, 0.2); color: #d4edda; }

.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.dark-mode .alert-info { background: rgba(23, 162, 184, 0.2); color: #d1ecf1; }

/* ============ FAQ ============ */
.faq-list { margin-top: 1.5rem; }

.faq-item {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.dark-mode .faq-item { background: var(--bg-dark); }

.faq-item summary {
    cursor: pointer;
    padding: 1.1rem 1.4rem;
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--text-dark);
    list-style: none;
    position: relative;
    padding-right: 3rem;
}

.dark-mode .faq-item summary { color: var(--text-light); }

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 400;
    transition: var(--transition);
}

.faq-item[open] summary::after { content: "–"; }

.faq-answer {
    padding: 0 1.4rem 1.2rem;
    color: var(--text-dark);
    opacity: 0.88;
    line-height: 1.7;
}

.dark-mode .faq-answer { color: var(--text-light); }

/* ============ Таблицы ============ */
.fin-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }

.fin-table th, .fin-table td {
    text-align: left;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 0.95rem;
}

.dark-mode .fin-table th, .dark-mode .fin-table td { color: var(--text-light); }

.fin-table th { font-weight: 600; opacity: 0.85; }

/* ============ Разное ============ */
.fin-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.fin-banner h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }

.fin-banner .btn-secondary { background: white; color: var(--primary-color); border: none; }

.fin-banner .btn-secondary:hover { background: rgba(255,255,255,0.9); }

.fin-links-list { list-style: none; margin-top: 1rem; }

.fin-links-list li { margin-bottom: 0.6rem; }

.fin-links-list a { color: var(--primary-color); text-decoration: none; border-bottom: 1px solid transparent; transition: var(--transition); }

.fin-links-list a:hover { border-color: var(--primary-color); }

/* ============ Footer (как на сайте) ============ */
footer {
    flex-shrink: 0;
    background-color: var(--bg-block-light);
    color: var(--text-dark);
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-color);
}

.dark-mode footer { background-color: var(--bg-block-dark); color: var(--text-light); }

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.footer-links a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.dark-mode .footer-links a { color: var(--text-light); }

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

/* Фиксированные кнопки */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    border: none;
    font-size: 20px;
}

.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

.telegram-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #0088cc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    z-index: 999;
}

.telegram-button::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-image: url('https://www.italpha.pro/img/telegramm.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
