/* Общие стили для сайта UrokOnline */
body { 
    font-family: Arial, sans-serif; 
    line-height: 1.6; 
    color: #222; 
    margin: 0; 
}

.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 16px; 
}

/* Заголовки */
h1 {
    font-size: 28px;
    margin: 0 0 16px;
    color: #111;
}

h2 {
    font-size: 22px;
    margin: 24px 0 12px;
    color: #333;
}

h3 {
    font-size: 18px;
    margin: 20px 0 8px;
    color: #444;
}

/* Параграфы */
p {
    margin: 8px 0;
    color: #333;
}

/* Шапка */
.header { 
    background: #f3f4f6; 
    border-bottom: 1px solid #e5e7eb; 
    position: sticky; 
    top: 0; 
    z-index: 100;
}

.header-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 0; 
    flex-wrap: wrap;
    gap: 16px;
}

.ol-logo { 
    text-decoration: none; 
    color: #111; 
    font-weight: 700; 
    font-size: 20px;
}

.nav { 
    display: flex; 
    gap: 16px; 
    flex-wrap: wrap;
}

.nav a { 
    text-decoration: none; 
    color: #333; 
    padding: 6px 10px; 
    border: 1px solid transparent; 
    border-radius: 6px; 
    transition: all 0.2s;
}

.nav a:hover { 
    border-color: #d1d5db; 
    background: #fff; 
}

.nav a.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* Правая часть шапки */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Кнопка "Войти" */
.login-btn {
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.login-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}



/* Основной контент */
main {
    min-height: calc(100vh - 140px);
}

.section { 
    padding: 32px 0; 
}

/* Сетки */
.ol-grid { 
    display: grid; 
    gap: 16px; 
}

.ol-grid--2 { 
    grid-template-columns: repeat(2, 1fr); 
}

.ol-grid--3 { 
    grid-template-columns: repeat(3, 1fr); 
}

.ol-grid--4 { 
    grid-template-columns: repeat(4, 1fr); 
}

/* Карточки */
.card { 
    border: 1px solid #e5e7eb; 
    border-radius: 8px; 
    padding: 16px; 
    background: #fff; 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.service-card img { 
    width: 100%; 
    height: 220px; 
    object-fit: cover; 
    border-radius: 6px; 
    margin-bottom: 8px; 
}

/* Кнопки */
.btn { 
    display: inline-block; 
    padding: 8px 12px; 
    border: 1px solid #d1d5db; 
    background: #f9fafb; 
    border-radius: 6px; 
    text-decoration: none; 
    color: #111; 
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}

.btn:hover { 
    opacity: 0.9; 
    background: #f3f4f6;
}

.btn-primary { 
    background: #2563eb; 
    border-color: #2563eb; 
    color: #fff; 
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

/* Формы авторизации */
.auth-form {
    max-width: 500px;
    margin: 0 auto;
}

.auth-form .card {
    padding: 24px;
}

.auth-form h3 {
    margin-top: 24px;
    margin-bottom: 8px;
}

.auth-form h3:first-child {
    margin-top: 0;
}

.auth-form input {
    margin-bottom: 16px;
}

.auth-form button {
    margin-top: 16px;
}

/* Подвал */
.footer { 
    background: #f3f4f6; 
    border-top: 1px solid #e5e7eb; 
    padding: 20px 0; 
    margin-top: 32px; 
}

.footer-content {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.footer-section {
    min-width: 200px;
}

.footer-section h3 {
    margin: 0 0 8px;
    color: #111;
}

.footer-section a { 
    margin-right: 8px; 
    text-decoration: none;
    color: #2563eb;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
    text-align: center;
    color: #6b7280;
}

/* Утилиты */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-16 {
    margin-top: 16px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

/* Специальные стили */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: 36px;
    margin-bottom: 16px;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    margin-bottom: 24px;
}

/* Прогресс-бар */
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-fill {
    height: 100%;
    background-color: #10b981;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Список корзины */
.cart-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cart-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.cart-list li:last-child {
    border-bottom: none;
}

.cart-list li::before {
    content: "🛒";
    margin-right: 8px;
}

/* Кнопка "В корзину" */
.btn-cart {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
    margin-left: 8px;
}

.btn-cart:hover {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

/* Стили корзины */
.cart-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-remove {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
    margin-left: 0;
}

.btn-remove:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.cart-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    margin-top: 24px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #cbd5e1;
}

.cart-total p {
    margin: 0;
    font-size: 18px;
}

.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Стили админки */
.admin-form {
    max-width: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Загрузка изображений */
.image-upload {
    margin: 20px 0;
}

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.upload-area:hover {
    border-color: #2563eb;
    background: #f0f9ff;
}

.upload-content p {
    margin: 8px 0;
    color: #6b7280;
}

.upload-content p:first-child {
    font-size: 32px;
    margin-bottom: 16px;
}

.image-preview {
    text-align: center;
    margin-top: 16px;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Уроки */
.lessons-container {
    margin: 20px 0;
}

.lesson-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    background: #f9fafb;
}
/* Поиск */
input[type="text"], 
input[type="email"], 
input[type="password"], 
select, 
textarea { 
    padding: 8px 10px; 
    border: 1px solid #d1d5db; 
    border-radius: 6px; 
    width: 100%; 
    box-sizing: border-box;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.lesson-item:last-child {
    margin-bottom: 0;
}

/* Предпросмотр */
.preview-card {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.preview-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Действия админки */
.admin-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.admin-actions .btn {
    min-width: 120px;
}

/* Адаптивность для админки */


/* Форма профиля */
.profile-form {
    max-width: 400px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #374151;
}

/* Кнопка выхода */
.logout-btn {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.logout-btn:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Кружочки прогресса */
.progress-courses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 20px 0;
}

.course-progress {
    text-align: center;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.progress-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(#10b981 0deg, #10b981 var(--progress-angle, 0deg), #e5e7eb var(--progress-angle, 0deg));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    position: relative;
}

.progress-circle::before {
    content: '';
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
}

.progress-text {
    font-size: 14px;
    font-weight: bold;
    color: #10b981;
    z-index: 1;
    position: relative;
}

.course-progress p {
    margin: 4px 0;
    color: #333;
}

.course-progress p:first-of-type {
    font-weight: 600;
    font-size: 16px;
}

.course-progress p:last-of-type {
    font-size: 14px;
    color: #6b7280;
}

/* Дополнительные стили для совместимости */
.ol-layout { 
    display: grid; 
    grid-template-columns: 260px 1fr; 
    gap: 16px; 
    margin: 16px 0; 
}

/* Специфика страницы урока: одна колонка */
.ol-lesson .ol-layout {
    grid-template-columns: 1fr;
}

/* Медиа в уроке */
.ol-lesson__media img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 6px;
}

.section-title { 
    margin: 0 0 16px; 
    font-size: 24px; 
}

.ol-more { 
    text-align: center; 
    margin: 12px 0; 
}

/* Адаптивность */
@media (max-width: 900px) { 
    .ol-layout { 
        grid-template-columns: 1fr; 
    } 
    
    .ol-grid--3 { 
        grid-template-columns: 1fr 1fr; 
    } 
    
    .ol-grid--4 { 
        grid-template-columns: 1fr 1fr; 
    }
}

@media (max-width: 520px) { 
    .ol-grid--3, 
    .ol-grid--4, 
    .ol-grid--2 { 
        grid-template-columns: 1fr; 
    } 
    
    .nav { 
        flex-wrap: wrap; 
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
        margin-top: 8px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 16px;
    }
}


