/* Local Fonts */
@import url('./fonts.css');

* {
    box-sizing: border-box;
}

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

a:hover {
    color: var(--secondary-color);
}

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

.content-section, .articles-list {
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section h2 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-section p {
    font-size: 1.1em;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: #fff;
}

.main-header {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    padding: 20px 40px;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.navigation li {
    margin-left: 25px;
}

.navigation a {
    font-size: 1em;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.navigation a:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 120px 40px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 80vh;
}

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

.hero h1 {
    font-size: 3.5em;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: none;
}

.hero-video {
    position: relative;
}

.hero-video video {
    width: 120%;
    height: auto;
    display: block;
    max-width: none;
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 80px 20px;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.5em;
    }

    .navigation ul li a[href="#course-form-section"] {
        font-size: 0;
    }
    
    .navigation ul li a[href="#course-form-section"]::after {
        content: "Курс";
        font-size: 16px;
    }
}

.cta-button {
    background: var(--gradient-primary);
    color: #000;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 220, 130, 0.4);
    filter: brightness(1.1);
}

.content-image {
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.article-card {
    background: var(--gradient-secondary);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 12px;
}

.article-card:hover::before {
    opacity: 0.1;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 220, 130, 0.2);
    border-color: var(--primary-color);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 24px;
    position: relative;
    z-index: 2;
}

.card-content h3 {
    margin-top: 0;
    font-size: 1.3em;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 12px;
}

.card-content p {
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.card-content a {
    display: inline-block;
    margin-top: 15px;
    font-weight: bold;
}

.container-404 {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 40px;
    text-align: center;
}

.container-404 h1 {
    font-size: 8em;
    margin: 0 0 20px 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.container-404 h2 {
    font-size: 2.5em;
    margin-bottom: 24px;
    color: var(--text-color);
    font-weight: 600;
}

.container-404 p {
    font-size: 1.2em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

.container-404 h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin: 60px 0 30px 0;
}

.list-404 {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    text-align: left;
}

.list-404 li {
    background: var(--gradient-secondary);
    border-radius: 8px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.list-404 li:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 220, 130, 0.2);
}

.list-404 a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    display: block;
}

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


.related-articles {
    max-width: 960px;
    margin: 60px auto 0;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid var(--bg-secondary-color);
}

.related-articles h2 {
    margin-bottom: 30px;
}

.faq-section {
    margin-top: 60px;
    background: var(--gradient-secondary);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 32px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    width: 100%;
    text-align: left;
    padding: 20px 24px;
    font-size: 1.2em;
    font-family: var(--font-heading);
    color: var(--text-color);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 600;
}

.accordion-header:hover {
    background: rgba(0, 220, 130, 0.1);
    color: var(--primary-color);
}

.accordion-header::after {
    content: '+';
    position: absolute;
    right: 24px;
    font-size: 1.5em;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.accordion-item.active .accordion-header::after {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: rgba(0, 0, 0, 0.2);
}

.accordion-content p {
    padding: 0 24px 24px;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

#video-section {
    text-align: center;
    margin-top: 60px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-top: 30px;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.youtube-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.youtube-placeholder img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 1;
}

.youtube-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-play-button svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

#course-form-section {
    text-align: center;
    padding: 80px 40px;
    margin: 80px auto 0;
    max-width: 1000px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form input {
    width: 100%;
    padding: 18px 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.contact-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.contact-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 220, 130, 0.3);
    background-color: rgba(0, 0, 0, 0.7);
}

.contact-form .cta-button {
    width: 100%;
    border: none;
    cursor: pointer;
}

.main-footer {
    text-align: center;
    padding: 40px;
    margin-top: 60px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.6);
}

body:not(.article-page) .main-footer {
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    min-height: 650px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 40px;
    padding-top: 120px;
    margin-top: -200px;
    z-index: 1;
}

body:not(.article-page) .main-footer.loaded {
    background: url('../images/footer.jpg') right center / contain no-repeat;
    background-size: 50% auto;
}

body:not(.article-page) .main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

body:not(.article-page) .main-footer > * {
    position: relative;
    z-index: 2;
}

.article-page .main-footer {
    background: none;
}

:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --primary-color: #00dc82;
    --secondary-color: #36e4da;
    --accent-color: #ff6b6b;
    --gradient-primary: linear-gradient(135deg, #00dc82 0%, #36e4da 100%);
    --gradient-secondary: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.stagger-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-animation.visible {
    opacity: 1;
    transform: translateY(0);
}

.article-card.stagger-animation,
.article-card.fade-in {
    display: block;
    width: auto;
    height: auto;
}

.articles-grid .article-card.stagger-animation,
.articles-grid .article-card.fade-in {
    display: block;
    width: auto;
    height: auto;
}

.hero-content.slide-in-left {
    text-align: left;
}

.hero-video.slide-in-right {
    position: relative;
}

.video-container.fade-in {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.articles-section.fade-in {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
}

.articles-section.fade-in .articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.articles-section.fade-in .article-card.stagger-animation {
    display: block;
    width: auto;
    height: auto;
    max-width: none;
}

#video-section.fade-in {
    max-width: 1000px;
    margin: 80px auto 0;
    padding: 80px 40px;
    text-align: center;
}

#video-section.fade-in .video-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

#course-form-section.scale-in {
    text-align: center;
    padding: 80px 40px;
    margin: 80px auto 0;
    max-width: 1000px;
    position: relative;
    z-index: 2;
    background: var(--bg-color);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.article-page {
    background: var(--bg-color) url('../images/background.png') center center no-repeat;
    background-size: 30%;
    background-attachment: fixed;
}

body:not(.article-page) {
    background-color: var(--bg-color);
}

body.article-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: -1;
}

.article-page .content-section {
    margin: 40px auto;
}

.article-page h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.8em;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 32px;
}

.article-page h2 {
    color: var(--primary-color);
    font-size: 2em;
    font-weight: 600;
    margin: 40px 0 24px 0;
}

.article-page h3 {
    color: var(--secondary-color);
    font-size: 1.5em;
    font-weight: 600;
    margin: 32px 0 16px 0;
}

.article-page p {
    font-size: 1.1em;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}

.article-page blockquote {
    background: var(--gradient-secondary);
    border-left: 4px solid var(--primary-color);
    padding: 24px;
    margin: 32px 0;
    border-radius: 8px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
}

.article-page .important-block {
    background: rgba(0, 220, 130, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
}

.article-page .important-block h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 16px;
}

.article-meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
