/* ================================
   CryptoLearn - Образовательный сайт о криптовалютах
   ================================ */

/* Импорт шрифтов Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ================================
   БАЗОВЫЕ СТИЛИ И ПЕРЕМЕННЫЕ
   ================================ */

:root {
    /* Цветовая палитра */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #10b981;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --bg-gray: #e5e7eb;
    --border: #d1d5db;
    
    /* Размеры */
    --header-height: 70px;
    --container-max: 1200px;
    --border-radius: 12px;
    
    /* Тени */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    
    /* Переходы */
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    font-size: 16px;
}

html {
    scroll-behavior: smooth;
}

/* ================================
   ТИПОГРАФИКА
   ================================ */

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

p {
    margin-bottom: 1rem;
    color: var(--text-gray);
    line-height: 1.7;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ================================
   КОНТЕЙНЕРЫ И ЛЭЙАУТ
   ================================ */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.section-light {
    background-color: var(--bg-light);
}

/* ================================
   HEADER (ШАПКА)
   ================================ */

.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.logo-icon {
    font-size: 1.75rem;
}

/* Навигация */
.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 0;
    display: block;
    transition: var(--transition);
}

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

/* Dropdown меню */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: ' ▾';
    font-size: 0.8em;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 10px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--primary);
}

/* Бургер-меню */
.burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
}

.burger-line {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
}

/* ================================
   HERO СЕКЦИЯ (ГЛАВНАЯ)
   ================================ */

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    color: white;
    margin-bottom: 1.5rem;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ================================
   КНОПКИ
   ================================ */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-accent:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-white:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

/* ================================
   КАРТОЧКИ
   ================================ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.card-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.card h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.card p {
    color: var(--text-gray);
}

/* ================================
   ФОРМЫ
   ================================ */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 5px;
}

.form-success {
    background-color: #d1fae5;
    color: #065f46;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent);
}

/* ================================
   CONTENT (Контентные страницы)
   ================================ */

.content-header {
    text-align: center;
    padding: 60px 0 40px;
    background-color: var(--bg-light);
}

.content-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.content-body h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.content-body h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.content-body ul,
.content-body ol {
    margin-left: 20px;
    margin-bottom: 1.5rem;
    color: var(--text-gray);
}

.content-body li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.content-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--bg-gray);
}

/* ================================
   FAQ
   ================================ */

.faq-item {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px;
    background-color: var(--bg-white);
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: var(--bg-light);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.faq-question.active::after {
    content: '−';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-content {
    padding: 0 20px 20px;
    color: var(--text-gray);
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* ================================
   GLOSSARY (Словарь)
   ================================ */

.glossary-list {
    display: grid;
    gap: 20px;
}

.glossary-term {
    background-color: var(--bg-white);
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.glossary-term h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* ================================
   PRICING (Цены)
   ================================ */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.pricing-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border);
    transition: var(--transition);
}

.pricing-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.pricing-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.pricing-period {
    color: var(--text-gray);
    margin-bottom: 20px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 30px;
}

.pricing-features li {
    padding: 10px 0;
    color: var(--text-gray);
}

/* ================================
   DISCLAIMER (Предупреждение)
   ================================ */

.disclaimer-box {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

.disclaimer-box p {
    color: #78350f;
    margin: 0;
}

/* ================================
   FOOTER (Подвал)
   ================================ */

.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.footer-disclaimer {
    margin-top: 15px;
    padding: 15px;
    background-color: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ================================
   RESPONSIVE (Адаптивность)
   ================================ */

@media (max-width: 1024px) {
    .nav-list {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* Мобильное меню */
    .nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 30px;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--bg-gray);
    }
    
    .nav-link {
        padding: 15px 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 500px;
    }
    
    .burger {
        display: flex;
    }
    
    .burger.active .burger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .burger.active .burger-line:nth-child(2) {
        opacity: 0;
    }
    
    .burger.active .burger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Адаптация секций */
    .section {
        padding: 40px 0;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .content-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ================================
   UTILITY CLASSES
   ================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.hidden {
    display: none;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}
