/* ==============================================
   Qazaq Online Bilim - Main Stylesheet
   Профессиональный адаптивный дизайн для образовательной платформы
   ============================================== */

/* Базовые переменные */
:root {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --max-width: 1200px;
    --header-height: 80px;
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Типографика - Poppins */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Контейнер */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: 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: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

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

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

.nav a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-color);
    background: rgba(16, 185, 129, 0.1);
}

/* Мобильное меню */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Hero блок */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9)), 
                url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=1920&q=80') center/cover;
    color: white;
    padding: 100px 20px;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    text-align: center;
}

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

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

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

.btn-secondary:hover {
    background: transparent;
    color: white;
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Секции */
.section {
    padding: 80px 20px;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* Альтернативный фон */
.bg-gray {
    background: var(--bg-gray);
}

/* Сетка карточек */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.card-text {
    color: var(--text-light);
    line-height: 1.6;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

/* Формы */
.form-group {
    margin-bottom: 1.5rem;
}

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

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

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

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

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 20px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: var(--max-width);
    margin: 0 auto 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

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

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.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 баннер */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--text-dark);
    color: white;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    display: none;
}

.cookie-banner.show {
    display: block;
    animation: slideUp 0.3s ease;
}

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

.cookie-text {
    flex: 1;
    min-width: 250px;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.btn-accept {
    background: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-accept:hover {
    background: var(--primary-hover);
}

/* Дисклеймер */
.disclaimer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    z-index: 9998;
    border: 2px solid var(--primary-color);
    display: none;
}

.disclaimer.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.disclaimer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.disclaimer-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.125rem;
}

.disclaimer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.disclaimer-close:hover {
    background: var(--bg-gray);
    color: var(--text-dark);
}

.disclaimer-text {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 20px 0;
    background: var(--bg-gray);
}

.breadcrumbs-list {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumbs-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}

.breadcrumbs-list a {
    color: var(--primary-color);
}

.breadcrumbs-list a:hover {
    text-decoration: underline;
}

/* Анимации */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Адаптив: Планшет (768px+) */
@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }
    
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
}

/* Адаптив: Десктоп (1024px+) */
@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero h1 {
        font-size: 4rem;
    }
}

/* Адаптив: Мобильный (< 768px) */
@media (max-width: 767px) {
    :root {
        --header-height: 70px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero {
        min-height: 500px;
        padding: 60px 20px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section {
        padding: 60px 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Мобильное меню */
    .mobile-toggle {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: white;
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        align-items: flex-start;
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav a {
        width: 100%;
        padding: 1rem;
        font-size: 1.125rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .cookie-content {
        flex-direction: column;
    }
    
    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-accept {
        width: 100%;
    }
    
    .disclaimer {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Утилиты */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.hidden {
    display: none;
}
