/* COMMON STYLES & VARS */
html {
    box-sizing: border-box;
    overflow-x: hidden;
}

*, *:before, *:after {
    box-sizing: inherit;
}

:root {
    --primary-color: #007bff;
    --hero-text: #ffffff;
    --h3-color: #000000;
    --text-color: #000000;
    --background-color: #ffffff;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    scroll-behavior: smooth;
    background-color: var(--background-color);
    overflow-x: hidden;
}

h2 {
    font-family: "Unbounded", sans-serif;
    font-size: 32px;
    text-align: center;
    margin-top: 0;
    margin-bottom: 50px;
    line-height: 1.2;
}

h3 {
    font-family: "Unbounded", sans-serif;
    font-size: 24px;
    line-height: 1.2;
}

p {
    margin-bottom: 1.2em;
}

section {
    padding-top: 20px;
    padding-bottom: 20px;
}

.container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* HEADER */
header {
    font-family: "Unbounded", sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 33%;
    justify-content: flex-start;
}
.logo-icon { height: 40px; }
.logo-text { font-size: 20px; font-weight: bold; color: var(--hero-text); }
.social-icons { display: flex; justify-content: center; gap: 18px; flex-grow: 1; }
.social-icons a { display: inline-block; transition: transform 0.3s ease; }
.social-icons a:hover { transform: scale(1.15); }
.social-icons img { height: 26px; }

header nav { 
    width: 33%; 
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
}

header nav a { 
    color: #fff; 
    text-decoration: none; 
    margin-left: 30px; 
    font-size: 18px; 
    transition: color 0.3s; 
}
header nav a:hover { color: var(--primary-color); }

.dropdown { position: relative; display: inline-block; }
.dropdown .dropbtn { cursor: pointer; }
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #2c2c2c;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.3);
    z-index: 1;
    border-radius: 16px;
    padding-top: 0px;
    top: 100%;
    overflow: hidden;
}

/* DROPPED DOWN MENU */
.dropdown { position: relative; display: inline-block; }
.dropdown .dropbtn { cursor: pointer; }
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #2c2c2c;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.3);
    z-index: 1;
    border-radius: 16px;
    top: 100%;
    overflow: hidden;
}
.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    margin: 0;
}
.dropdown-content a:hover { background-color: #444; color: var(--primary-color); }
.dropdown:hover .dropdown-content { display: block; }


/* --- СТИЛИ ДЛЯ АДАПТИВНОЙ ШАПКИ --- */
.menu-toggle-btn {
    display: none;
    background: none;
    border: 1px solid white;
    border-radius: 16px;
    padding: 5px;
    cursor: pointer;
    z-index: 101;
}
.menu-toggle-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #fff;
    margin: 5px;
    transition: all 0.5s;
}
.menu-toggle-btn.is-active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle-btn.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle-btn.is-active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.contacts-button {
    background-color: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 16px;
    font-size: 21px;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
}

/*HERO SECTION */
#hero {
    position: relative;
    overflow: hidden;
    height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(70%);
}

.hero-content {
    flex-grow: 1; /* Позволяет этому блоку занять все доступное пространство */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Центрирует контент по вертикали */
    align-items: center;
}

#hero h1, #hero p, #hero .cta-button, #hero .hero-badges {
    position: relative;
    z-index: 2;
    max-width: 90%;
    color: var(--hero-text);
    line-height: 1.2;
}
#hero h1 { font-family: "Unbounded", sans-serif; font-optical-sizing: auto; font-weight: bold; font-style: normal; font-size: clamp(32px, 5vw, 48px); margin-bottom: 20px; }
#hero p { font-size: clamp(18px, 2.5vw, 22px); color: rgba(255, 255, 255, 0.8); }
.hero-badges { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap;}
.badge {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
/* CALL TO ACTION BUTTON */
.cta-button {
    background-color: rgb(173, 43, 43);
    border: 0px solid #fff;
    color: #fff;
    padding: 15px 30px;
    margin-top: auto;
    margin-bottom: 100px;
    text-decoration: none;
    border-radius: 16px;
    font-family: "Unbounded";
    font-size: 21px;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
}
.cta-button:hover {
    background-color: rgb(233, 66, 66);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* ABOUT SECTION */
#about {
    text-align: center;
    margin-top: 20px;
}

.plain-text {
    font-size: 21px;
    /* line-height: 1.7; */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.styled-list {
    text-align: left;
    font-size: 18px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* COMMON STYLES OF MEDIA SECTION */
.media-block {
    background-color: var(--background-color);
    margin-top: 40px;
}

.media-block-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.media-block__video {
    flex: 1;
    min-width: 0;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.media-block__video video {
    display: block;
    width: 100%;
    max-height: 500px;
    border-radius: 16px;
}

.media-block__text {
    flex: 1;
    min-width: 0;
    font-size: 18px;
    /* line-height: 1.7; */
}
.media-block__text h3 {
    color: var(--h3-color);
    margin-top: 0;
    margin-bottom: 20px;
}

.media-block__text h4 {
    font-size: 20px; 
    font-weight: bold; 
    color: #333; 
    margin-top: 20px;
    margin-bottom: 10px;
}

/* .media-block__text p { margin-bottom: 15px } */
.media-block__text ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.media-block__text li {
    margin-bottom: 0.1em;
}

/* REVERSE MEDIA BLOCK */
.media-block--reversed .media-block-wrapper {
    flex-direction: row-reverse;
}

/* --- SPEEDRAMP WINDOW --- */

.tooltip-trigger {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted var(--primary-color);
}

.tooltip-content {
    visibility: hidden;
    opacity: 0;
    
    /* Внешний вид */
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    font-size: 16px;
    line-height: normal;
    hyphens: auto;
    background-color: #2c2c2c;
    color: #fff;
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 10;
    transition: opacity 0.3s, visibility 0.3s;
}

.tooltip-trigger:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

.tooltip-content video {

    width: 100%;
    border-radius: 16px;
    margin-bottom: 10px;
}

.tooltip-content strong {
    color: var(--primary-color);
    font-family: "Unbounded", sans-serif;
}

/* PORTFOLIO & GALLERY */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.youtube-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 40px;
}

.youtube-link img {
    max-width: 120px;
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.portfolio-item, .photo-gallery-grid a {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 32px;
}

.portfolio-item img, .photo-gallery-grid img {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.4s ease;
    object-fit: cover;
}

.portfolio-item:hover img, .photo-gallery-grid a:hover img {
    transform: scale(1.05);
}

.portfolio-item .portfolio-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background:
    linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    font-weight: bold;
}

.photo-gallery-grid a {
    padding-bottom: 100%;
}

.photo-gallery-grid img {
    position: absolute;
    top: 0;
    left: 0;
}

.youtube-link a { display: inline-block; transition: transform 0.3s ease; }
.youtube-link a:hover { transform: scale(1.15); }
.social-icons-bottom { display: flex; justify-content: center; gap: 30px; flex-grow: 1; }
.social-icons-bottom a { display: inline-block; transition: transform 0.3s ease; }
.social-icons-bottom a:hover { transform: scale(1.15); }
.social-icons-bottom img { height: 60px; }

/* CONTACT FORM */
#contact .contact-subtitle, #contact h3, #contact p { text-align: center; font-size: 21px; }
#contact h2 { margin-bottom: 10px; }
.form-wrapper {
    background-color: rgba(230, 230, 230, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 700px;
    margin: 10px auto 0;
    padding: 25px;
    border-radius: 32px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
#contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: flex; gap: 20px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: fit-content; }
.form-group { display: flex; flex-direction: column; }
.form-group label { margin-bottom: 5px; color: rgba(0, 0, 0, 0.7); font-size: 21px; }
#contact-form input, #contact-form textarea {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 10px;
    color: #000000;
    font-size: 18px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: none;
}
#contact-form input:focus, #contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}
#contact-form button[type="submit"] {
    cursor: pointer; display: block; margin: 20px auto 0; border: none; padding: 15px 40px;
    border-radius: 16px; background-color: var(--primary-color); color: #fff; font-size: 21px;
    transition: background-color 0.3s, transform 0.3s;
}
#contact-form button[type="submit"]:hover { background-color: #0056b3; transform: translateY(-2px); }

.grecaptcha-badge { visibility: hidden; }
.recaptcha-notice { font-size: 12px; color: rgba(0, 0, 0, 0.5); text-align: center; margin-top: 0px; margin-bottom: 0px; }
.recaptcha-notice a { color: rgba(0, 0, 0, 0.7); text-decoration: underline; }

/* MODAL WINDOW */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); }
.modal-content { position: relative; margin: auto; padding: 20px; width: 80%; max-width: 900px; top: 50%; transform: translateY(-50%); }
.close-button { color: #fff; position: absolute; top: -20px; right: 0; font-size: 40px; font-weight: bold; cursor: pointer; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; }
#player { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* Медиа-запрос для планшетов и мобильных */
@media (max-width: 1240px) {
    header {
        padding: 20px;
    }
    
    header nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: max-content;
        background-color: #1c1c1c;
        padding: 20px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.3);
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        border-radius: 16px;
    }
    
    header nav.is-open {
        display: flex;
    }
    
    .menu-toggle-btn {
        display: block;
    }
    
    header nav a {
        margin: 0;
        font-size: 20px;
    }
    
    .dropdown {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dropdown-content {
        display: none !important;
    }
    
    .dropdown:hover .dropdown-content {
        display: flex;
        flex-direction: column;
    }
}

/* --- Мобильные устройства (до 768px) --- */
@media (max-width: 768px) {
    .logo-container {
        display: none;
    }

    .social-icons {
        justify-content: flex-start;
        flex-grow: 1;
    }

    .media-block-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .media-block--reversed .media-block-wrapper {
        flex-direction: column;
    }

    #hero h1 { 
        max-width: 100%; 
        font-size: clamp(24px, 5vw, 42px);
    }

    #hero {
        justify-content: flex-start;
        padding-top: 60px;
    }

    .hero-content {
        flex-grow: 0;
    }
}