/* 
   Project: Tviy Trener
   Version: v1.03
   Author: Klava (AI Assistant)
   Date: 2026-03-02
*/

:root {
    --bg-dark: #0f0f0f;
    --bg-card: #1a1a1a;
    --accent: #ffb400; /* Amber/Orange accent */
    --accent-hover: #ffd600;
    --text-white: #f5f5f5;
    --text-gray: #b0b0b0;
    --border: #333;
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px;
}

header {
    background: rgba(0, 0, 0, 0.9);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
}

.logo span {
    color: var(--accent);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
}

.nav-list li a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.1em;
    transition: 0.3s;
}

.nav-cta {
   letter-spacing: 0.1em;
}

.nav-list li a:hover {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    font-size: 24px;
    color: var(--text-white);
    cursor: pointer;
}

#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(15,15,15,0.95)), url('img_new/illya_01.jpg');
    background-size: cover;
    background-position: center;
}

/* Gallery Section v1.01 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    height: 300px;
    border: 1px solid var(--border);
    transition: 0.4s;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) contrast(1.2) grayscale(0.4);
    transition: 0.5s ease-in-out;
}

.gallery-item:hover img {
    filter: brightness(1) contrast(1) grayscale(0);
    transform: scale(1.05);
}

.gallery-item:hover {
    border-color: var(--accent);
}

/* Featured Blog Images v1.01 */
.featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 40px;
    filter: brightness(0.7) contrast(1.1);
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-item {
        height: 180px;
    }
    .gallery-item:nth-child(n+5) {
        display: none;
    }
}

#hero h1 {
    font-size: 90px;
    margin-bottom: 5px;
    letter-spacing: 10px;
    font-weight: 900;
}

#hero .subtitle {
    font-size: 28px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
}

#hero .description {
    max-width: 800px;
    margin: 0 auto 30px;
    font-size: 18px;
    color: var(--text-gray);
}

.cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: var(--accent);
    color: #000;
    text-decoration: none;
    font-weight: 900;
    border-radius: 4px;
    text-transform: uppercase;
    transition: 0.3s;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

section {
    padding: 40px 0;
}

h2 {
    font-size: 42px;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-align: center;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 20px auto 0;
}

/* Education Section v1.03 */
.edu-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: var(--bg-card);
    padding: 50px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.edu-text p {
    font-size: 18px;
    color: var(--text-gray);
    text-align: left;
}

.diploma-preview {
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid var(--accent);
    cursor: pointer;
}

.zoomable-img {
    width: 100%;
    height: auto;
    transition: 0.5s ease-in-out;
}

.zoomable-img:hover {
    transform: scale(1.15);
}

@media (max-width: 768px) {
    .edu-container {
        grid-template-columns: 1fr;
        padding: 30px;
    }
}

/* Philosophy Cards */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.phil-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 8px;
    border-top: 4px solid var(--accent);
    transition: 0.4s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.phil-card .icon {
    font-size: 40px;
    margin-bottom: 10px;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.phil-card .icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) invert(0.85);
}

.phil-card h3 {
    margin: 5px 0;
    font-size: 20px;
    text-transform: uppercase;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.service-card {
    background: #222;
    padding: 30px;
    border: 1px solid #333;
    transition: 0.3s;
}

.service-card:hover {
    border-color: var(--accent);
    background: #2a2a2a;
}

/* Video Gallery */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.video-item {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}

.video-item:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: #000;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.video-type-badge.short {
    background: #ff0000;
    color: #fff;
}

.video-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.video-info h4 {
    font-size: 16px;
    margin: 0 0 8px 0;
    line-height: 1.3;
    color: var(--text-white);
}

.video-date {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 12px;
    display: block;
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
    transition: 0.3s;
}

.video-link:hover {
    color: var(--accent-hover);
    letter-spacing: 1px;
}

.video-link i {
    font-size: 14px;
}

/* Video Filter Tabs */
.video-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.video-filter-tab {
    padding: 10px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

.video-filter-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.video-filter-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

/* Load More Button */
.load-more-container {
    margin-top: 40px;
}

#load-more-videos {
    min-width: 200px;
}

/* Blog Cards (for index page) */
.blog-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}

.blog-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.blog-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-badge {
    display: inline-block;
    background: var(--accent);
    color: #000;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    border-radius: 4px;
    margin: 20px 20px 10px;
    letter-spacing: 0.5px;
}

.blog-card h3 {
    font-size: 20px;
    margin: 0 20px 12px;
    color: var(--text-white);
}

.blog-preview {
    font-size: 14px;
    color: var(--text-gray);
    margin: 0 20px 12px;
    line-height: 1.5;
    flex-grow: 1;
}

.blog-date {
    display: block;
    font-size: 12px;
    color: var(--text-gray);
    margin: 0 20px 16px;
}

.read-more-btn {
    display: inline-block;
    margin: 0 20px 20px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: 0.3s;
}

.read-more-btn:hover {
    color: var(--accent-hover);
    letter-spacing: 0.5px;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Form Status */
.form-status {
    min-height: 24px;
    text-align: center;
}

/* Loading Placeholder */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
    font-size: 16px;
}

/* Error State */
.error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #ff6b6b;
    font-size: 16px;
}

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
    font-size: 16px;
}

/* New Blog Layout */
#blog-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.main-blog-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.main-blog-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.main-blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 300px;
}

.main-blog-text {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.blog-badge {
    background: var(--accent);
    color: #000;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 15px;
}

.main-blog-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
}

.history-title {
    text-align: center;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 40px 0 20px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.blog-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .main-blog-content {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .main-blog-text {
        padding: 20px;
    }
    .main-blog-image img {
        min-height: 200px;
    }
}

.read-more {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.read-more:hover {
    color: var(--accent);
}

/* Contacts */
.contact-info {
    text-align: center;
    background: #111;
    padding: 50px;
    border-radius: 12px;
}

.contact-info p {
    font-size: 22px;
    margin: 15px 0;
}

.contact-info a {
    color: var(--accent);
    text-decoration: none;
}

/* Registration Form */
.form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 50px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.input-group {
    margin-bottom: 20px;
}

#trainerForm input, 
#trainerForm select, 
#trainerForm textarea {
    width: 100%;
    padding: 15px;
    background: #252525;
    border: 1px solid var(--border);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    border-radius: 4px;
}

#trainerForm textarea {
    height: 120px;
    resize: none;
}

#trainerForm input:focus, 
#trainerForm select:focus, 
#trainerForm textarea:focus {
    outline: none;
    border-color: var(--accent);
}

#trainerForm button {
    width: 100%;
    cursor: pointer;
}

.nav-cta {
    background: var(--accent);
    color: #000 !important;
    padding: 8px 20px;
    border-radius: 4px;
}

/* Blog Content Styles */
.blog-page {
    background: var(--bg-dark);
}

.post-content {
    padding-top: 150px;
    padding-bottom: 100px;
    max-width: 900px;
}

.post-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.post-meta {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 40px;
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 40px;
}

.post-content p {
    font-size: 18px;
    margin-bottom: 25px;
    color: #ddd;
}

.post-content h3 {
    font-size: 28px;
    margin: 40px 0 20px;
    color: var(--accent);
}

.post-content ul {
    margin-bottom: 30px;
}

.post-content li {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ddd;
}

blockquote {
    border-left: 5px solid var(--accent);
    padding-left: 30px;
    margin: 40px 0;
    font-style: italic;
    font-size: 22px;
    color: var(--text-white);
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-icons a {
    font-size: 32px;
    color: var(--text-white);
    transition: 0.3s;
}

.social-icons a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* Блог Модалка */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.blog-modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #333;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.close-blog-modal {
    color: #aaa;
    float: right;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    position: sticky;
    top: 0;
    right: 0;
    line-height: 1;
}

.close-blog-modal:hover {
    color: var(--accent);
}

.read-more-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    padding: 0;
    margin-top: 10px;
    transition: 0.3s;
}

.read-more-btn:hover {
    letter-spacing: 1px;
}

.blog-full-text {
    line-height: 1.8;
    font-size: 1.15rem;
    color: #eee;
}

.blog-full-text p {
    margin-bottom: 20px;
}

.blog-full-text ul, .blog-full-text ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.blog-full-text li {
    margin-bottom: 12px;
}

.blog-full-text strong {
    color: var(--accent);
}

.blog-full-text hr {
    border: none;
    border-top: 1px solid #444;
    margin: 30px 0;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

footer {
    padding: 40px;
    background: #000;
    text-align: center;
    color: #666;
    font-size: 13px;
    border-top: 1px solid #222;
}

@media (max-width: 992px) {
    #hero h1 { font-size: 60px; }
    .video-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-item:nth-child(n+7) {
        display: none;
    }
}

@media (max-width: 768px) {
    header {
        position: fixed !important;
        width: 100%;
        top: 0;
        z-index: 1000;
        background: #000;
        padding: 10px 0;
    }
    nav { 
        padding: 0 20px; 
        flex-direction: row;
        justify-content: space-between;
        gap: 15px;
    }
    .menu-toggle {
        display: block;
    }
    .nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        padding: 20px 0;
        border-bottom: 1px solid var(--border);
    }
    .nav-list.active {
        display: flex;
    }
    .nav-list li {
        width: 100%;
        text-align: center;
    }
    .nav-list li a {
        font-size: 16px;
        display: block;
        padding: 12px 0;
    }
    .nav-cta {
        display: inline-block;
        width: auto;
        margin-top: 10px;
    }
    #hero {
        height: auto;
        min-height: 80vh;
        padding: 240px 20px 60px;
        background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.95)), url('img_new/illya_01.jpg');
        background-size: cover;
        background-position: center;
    }
    #hero h1 { 
        font-size: 42px; 
        color: #fff !important;
        text-shadow: 2px 2px 10px rgba(0,0,0,1);
        letter-spacing: 2px;
        line-height: 1.1;
        margin-top: 0;
    }
    #hero .subtitle {
        font-size: 20px;
        color: var(--accent);
        text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
    }
    #hero .description {
        font-size: 15px;
        color: #eee;
        margin-bottom: 20px;
    }
    section {
        padding: 20px 0;
    }
    h2 {
        font-size: 28px;
        margin-bottom: 25px;
    }
    .video-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .video-item:nth-child(n+4) {
        display: none;
    }
    #videos p {
        text-align: center;
    }
    .contact-info p {
        font-size: 16px;
        margin: 10px 0;
    }
    .contact-info a {
        display: inline-block;
        white-space: nowrap;
    }
    .desktop-br {
        display: none;
    }
}
