/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #222222;
    background-color: #ffffff;
    overflow-x: hidden;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: #666666;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: #222222;
    color: #ffffff;
    border-color: #222222;
}

.btn-primary:hover {
    background-color: #333333;
    border-color: #333333;
}

.btn-secondary {
    background-color: transparent;
    color: #222222;
    border-color: #222222;
}

.btn-secondary:hover {
    background-color: #222222;
    color: #ffffff;
}

.btn-white {
    background-color: #ffffff;
    color: #222222;
    border-color: #ffffff;
}

.btn-white:hover {
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #222222;
}

.logo-img {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

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

.nav-link {
    text-decoration: none;
    color: #222222;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #4CAF50;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-icon {
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
}

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

.dropdown-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #222222;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-link:hover {
    background-color: #f8f9fa;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #222222;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* CSS-only Burger and Mobile Overlay */
.nav-toggle { display: none; }

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 32px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: #222222;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: #ffffff; /* полностью непрозрачный фон */
    padding: 20px;
    display: none;
    flex-direction: column;
    z-index: 10000;
    height: 100vh;
    overflow-y: auto;
}

.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mobile-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #222222; }
.mobile-logo img { width: 28px; height: 28px; }
.mobile-close { font-size: 32px; line-height: 1; cursor: pointer; }
.mobile-nav-list { list-style: none; display: flex; flex-direction: column; gap: 16px; font-size: 1.125rem; }
.mobile-group { font-weight: 700; }
.mobile-group ul { list-style: none; padding-left: 16px; margin-top: 8px; display: flex; flex-direction: column; gap: 10px; font-weight: 500; }
.mobile-link { text-decoration: none; color: #111111; }
.mobile-link:hover { color: #4CAF50; }
.mobile-cta { margin-top: auto; padding-top: 20px; }

.nav-toggle:checked ~ .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle:checked ~ .burger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked ~ .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nav-toggle:checked ~ .mobile-overlay { display: flex; }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #E8F5E8 0%, #ffffff 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%234CAF50" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-tag {
    display: inline-block;
    background-color: #4CAF50;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #222222;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #666666;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-image {
    margin-top: 4rem;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Statistics */
.stats {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    padding: 3rem 0;
    margin-top: 4rem;
}

.stats-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    color: #ffffff;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: #ffffff;
}

.features-header {
    text-align: center;
    margin-bottom: 4rem;
}

.features-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #222222;
    margin-bottom: 1rem;
}

.features-subtitle {
    font-size: 1.125rem;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    color: #ffffff;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222222;
    margin-bottom: 1rem;
}

.feature-description {
    color: #666666;
    line-height: 1.6;
}

/* Courses Section */
.courses {
    padding: 80px 0;
    background: linear-gradient(135deg, #E8F5E8 0%, #ffffff 100%);
}

.courses-header {
    text-align: center;
    margin-bottom: 4rem;
}

.courses-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #222222;
    margin-bottom: 1rem;
}

.courses-subtitle {
    font-size: 1.125rem;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.course-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.course-content {
    padding: 1.5rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222222;
    margin-bottom: 0.75rem;
}

.course-description {
    color: #666666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.course-link {
    display: inline-block;
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.course-link:hover {
    color: #388E3C;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #222222 0%, #333333 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, #4CAF50, transparent);
    border-radius: 50%;
    opacity: 0.1;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    padding: 60px 0 20px;
    color: #ffffff;
}

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

.footer-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #ffffff;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-icon {
    flex-shrink: 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #ffffff;
}

.footer-logo-img {
    width: 24px;
    height: 24px;
}

.footer-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin: 0;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #111111;
    color: #ffffff;
    z-index: 100000;
}

.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.cookie-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: 2px solid #ffffff;
    background: #ffffff;
    color: #111111;
    text-decoration: none;
    font-weight: 700;
}

.cookie-link {
    color: #8EE28E;
    text-decoration: underline;
}

.cookie-hidden { display: none; }

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #222222;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: #ffffff;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

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

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.checkbox {
    margin-top: 0.25rem;
}

.checkbox-label {
    font-size: 0.875rem;
    color: #666666;
    line-height: 1.4;
}

/* Content Pages */
.content-page {
    padding: 120px 0 80px;
    background-color: #ffffff;
}

.content-header {
    text-align: center;
    margin-bottom: 4rem;
}

.content-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #222222;
    margin-bottom: 1rem;
}

.content-subtitle {
    font-size: 1.125rem;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

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

.content-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #222222;
    margin: 2rem 0 1rem;
}

.content-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222222;
    margin: 1.5rem 0 0.75rem;
}

.content-body p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.content-body ul,
.content-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav {
        display: none;
    }
    .burger { display: flex; }
    .header-actions { display: none; }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .features-title,
    .courses-title,
    .cta-title {
        font-size: 2rem;
    }
    
    .stats-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .features,
    .courses,
    .cta {
        padding: 60px 0;
    }
    
    .features-title,
    .courses-title,
    .cta-title {
        font-size: 1.75rem;
    }
    
    .stats-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .content-title {
        font-size: 2rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    .cookie-container { grid-template-columns: 1fr; }
    .cookie-actions { justify-content: flex-start; }
}

/* Fix overflowing inline-styled grids (legacy sections) */
@media (max-width: 768px) {
    /* Any inline grid containers should collapse to 2 cols on tablets */
    div[style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

@media (max-width: 480px) {
    /* On phones collapse grids to single column */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    /* Ensure tall cards scale gracefully */
    div[style*="height: 200px"] {
        height: 160px !important;
    }
    .hero-title { word-break: break-word; hyphens: auto; }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-full { width: 100%; }
.h-full { height: 100%; }
