/* public/css/main.css */

/* --------------------
   Переменные CSS
--------------------- */
:root {
    /* Общие переменные */
    --primary-color: #3498db;
    --secondary-color: #2C3E50;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f1c40f;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --text-light: #6c757d;
    --white: #fff;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    
    /* Кнопки */
    --btn-border-radius: 5px;
    --btn-padding: 0.6rem 1.2rem;
    --btn-font-size: 1rem;
    --btn-transition: background-color var(--transition-duration), transform var(--transition-duration);
    --btn-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --btn-hover-color: #2980b9; /* Более тёмный оттенок для ховера */
    
    /* Дополнительные переменные */
    --navbar-height: 60px; /* Добавлено */
    --transition-duration: 0.3s; /* Добавлено */
}

/* --------------------
   Общие стили
--------------------- */
body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    margin-top: 2rem;
}

h2 {
    font-size: 2rem;
    margin-top: 1.5rem;
}

h3 {
    font-size: 1.75rem;
    margin-top: 1.25rem;
}

/* --------------------
   Кнопки
--------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--btn-padding);
    border: none;
    border-radius: var(--btn-border-radius);
    font-size: var(--btn-font-size);
    cursor: pointer;
    transition: var(--btn-transition);
    box-shadow: var(--btn-shadow);
    text-decoration: none;
    color: var(--white);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--btn-hover-color); /* Заменили darken */
    transform: translateY(-2px);
}

.btn-light {
    background-color: #ecf0f1;
    color: var(--text-color);
}

.btn-light:hover {
    background-color: #dcdcdc;
    transform: translateY(-2px);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* --------------------
   Hero Section
--------------------- */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    z-index: 2;
    color: #fff;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-in;
}

/* --------------------
   Features Section
--------------------- */
.features-section {
    padding: 5rem 0;
    background: #f8f9fa;
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.section-subtitle {
    text-align: center;
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    font-family: var(--font-secondary);
    font-weight: 300;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.feature-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--btn-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* --------------------
   Courses Section
--------------------- */
.courses-section {
    padding: 5rem 0;
}

.course-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--btn-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.course-image {
    height: 200px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-content {
    padding: 1.5rem;
}

.course-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.course-description {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* --------------------
   CTA Section
--------------------- */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.cta-section .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --------------------
   Анимации
--------------------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-in;
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-hover {
    transition: color 0.3s ease, transform 0.3s ease;
}

.animate-hover:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* --------------------
   Медиа-запросы
--------------------- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-subtitle {
        font-size: 1.1rem;
    }
    
    #dynamic-slogan {
        font-size: 2.5rem;
    }
    
    /* Адаптация шрифтов заголовков */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Улучшение мобильной читаемости */
    .feature-card,
    .course-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .course-title {
        font-size: 1.25rem;
    }
}

/* --------------------
   Дополнительные стили
--------------------- */

/* Стили для ссылок без стилей (например, иконки внутри кнопок) */
a {
    color: inherit;
    text-decoration: none;
}

/* Стили для ссылок с классом text-danger */
.text-danger {
    color: var(--danger-color);
}

/* Дополнительные стили для плавного отображения текста при появлении */
.animate-slideInDown {
    animation: slideInDown 0.5s ease-out;
}

/* Стили для контейнера с иконкой */
.input-group {
    position: relative;
    width: 100%;
}

/* Стили для иконки */
.input-group i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 2;
}

/* Отступ для текстовых полей с иконками */
.input-group input,
.input-group select {
    padding-left: 35px !important;
    width: 100%;
}

/* Стили для полей формы */
.form-control,
.form-select {
    height: calc(2.5rem + 2px);
}

/* Исправление для select с иконкой */
.input-group select {
    padding-right: 30px;
    appearance: auto;
}

/* Стили для label */
.form-label {
    margin-bottom: 0.5rem;
    display: block;
}

/* Стили для текстовых полей в админ-панели */
.input-with-icon-left {
    padding-left: 2.5rem !important;
    text-indent: 0;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 2;
}
