/* main.css */
/* Глобальные стили */
@font-face {
    font-family: 'ABeeZee';
    src: url('/fonts/ABeeZee-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    margin: 0;
    font-family: 'ABeeZee', sans-serif;
    color: #6b7280;
    background-color: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Секция с фоном */
.bg-section {
    background-image: url("images/background.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
}

/* Навигация */
nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 1.75rem;
}

nav a.logo {
    color: white;
    font-size: 1.25rem;
    margin-right: auto;
}

nav img {
    height: 5rem;
    width: auto;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Карточки */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1rem;
    justify-items: center;
    padding: 2rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.card {
    background-color: #9333ea;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: scale(1.05);
}

.card img {
    height: 18rem;
    object-fit: cover;
    width: 100%;
}

.card .label {
    background-color: #9333ea;
    color: white;
    text-align: center;
    padding: 0.75rem;
    font-weight: 100;
    font-size: 1.2rem;
}

/* Футер */
footer {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.875rem;
}

footer h2 {
    font-size: 1.25rem;
    font-weight: bold;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer li {
    margin-bottom: 1rem;
}

footer a:hover {
    color: #a78bfa;
    text-decoration: underline;
}

footer .social svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

footer .subscribe-form {
    display: flex;
    background-color: white;
    border: 2px solid #9ca3af;
    padding: 0.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

footer .subscribe-form input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.5rem 1rem;
    color: #4b5563;
    font-weight: 300;
}

footer .subscribe-form button {
    background-color: #1f2937;
    color: white;
    text-transform: uppercase;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
}

footer .subscribe-form button:hover {
    background-color: #9333ea;
}

.h-64 {
    height: 16rem;
}

/* Контентные блоки */
.content-block {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1rem;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
    align-items: flex-start;
}

.video-text-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
    justify-content: center;
    max-width: 960px;
    margin: 0 auto;
    gap: 2rem;
}

.video-wrapper {
    flex: 1 1 400px;
    max-width: 480px;
}

.video-wrapper iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.text-wrapper {
    flex: 1 1 300px;
    max-width: 460px;
    padding: 0 0.5rem;
    color: #444;
}

.text-wrapper h2 {
    font-size: 1.5rem;
    color: #7c3aed;
    margin-bottom: 1rem;
}

.text-wrapper ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Адаптивная сетка для гифок и видео */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    justify-items: center;
    align-items: start;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.media-grid img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 256px;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.media-grid.single-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: center;
}

.media-grid.cooking-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
}

.media-grid iframe {
    flex: 1 1 45%;
    min-width: 320px;
    max-width: 480px;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cooking-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1.5rem;
    justify-content: flex-start;
    margin: 2rem auto;
    max-width: 960px;
    padding-bottom: 1rem;
}

.cooking-row img {
    max-height: 160px;
    height: auto;
    width: auto;
    flex-shrink: 0;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section.center-align {
    display: flex;
    justify-content: center;
}

.unicorn-block {
    justify-content: center;
    gap: 2rem;
}

.cooking-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;

    /* если хочешь отступы между гифками */
}

.freepik-link {
    text-decoration: none;
}

.freepik-link:hover {
    text-decoration: underline;
}

* {
    font-style: normal !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
em,
i,
.card-grid h3,
.video-text-container h2,
.content-block h2,
.content-block h3 {
    font-style: normal !important;
}

em,
i {
    font-style: normal !important;
}

nav a {
    padding: 0 16px;

    /* Отступы между ссылками */
    text-decoration: none;

    /* опционально — убрать подчёркивание */
    color: #333;

    /* или тот цвет, который нужен */
}

header.top-nav nav a {
    font-size: 1.5rem;
    padding: 0 16px;
    color: #333;
    text-decoration: none;
}

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

.logo img {
    max-height: 48px;
    height: auto;
    width: auto;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
}

.top-nav img {
    height: 56px;
    margin-right: 0.5rem;
}

.top-nav a {
    margin-left: 1.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
}

.top-nav a:hover {
    color: #9333ea;
    text-decoration: underline;
}

.stranger-page .video-text-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.stranger-page .video-text-container.reverse {
    flex-direction: row-reverse;
}

.stranger-page .media-left,
.stranger-page .media-right {
    flex: 1 1 45%;
    max-width: 500px;
}

.stranger-page .media-left img,
.stranger-page .media-right img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.stranger-page .media-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.stranger-page .media-grid > div {
    flex: 1 1 45%;
    max-width: 480px;
    text-align: center;
}

.stranger-page .media-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.page-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    margin-top: 2rem;
}

/* Сдвиг первой гифки чуть ниже */
.video-text-container:first-of-type {
    margin-top: 2rem;
}

.grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 800px;
    margin: 40px auto;
}

.grid-2x2 img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background-color: #000;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 1rem;
}

.intro-text {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
    color: #d33a7e;

    /* можешь поменять */
}

.intro-text h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.intro-text p {
    font-size: 1.3rem;
    color: #8b2ee1;

    /* мягкий фиолетовый */
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    cursor: pointer;
}

.top-nav {
    padding: 2rem 0 1rem;
    background-color: white;
    text-align: center;
}

.header-container {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo img {
    max-height: 80px;
    height: auto;
    width: auto;
    margin-bottom: 1rem;
}

.main-menu {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 1.1rem;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;

    /* чтобы меню появлялось строго под кнопкой */
    left: 0;
    min-width: 180px;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: left;
    z-index: 10;
    padding: 0.5rem 0;
    border-radius: 0.25rem;
}

.dropdown-content a {
    display: block;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

.top-nav {
    padding: 1rem 2rem;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo-container img.logo {
    height: 70px;
    max-width: 100%;
    margin-left: 5rem;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    font-size: 1.3rem;
    margin-right: 5rem;
}

.centered-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* .dropdown:hover .dropdown-content {
    display: block; */
.content-scale {
    transform: scale(1.15);
    transform-origin: top center;
}

/* Steve Harrington text highlight */
.highlight-link {
    color: #9333ea;
    text-decoration: underline;
    font-weight: 500;
}

.blog-page .content-wrapper h1,
.blog-page .content-wrapper h2,
.blog-page .content-wrapper h3 {
    text-align: center;
}

.nav-toggle {
    display: none;
}

.top-nav .nav {
    display: none;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 1rem;
    position: absolute;
    top: 70px;
    right: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 999;
}

.nav-toggle:checked + .nav-toggle-label + .nav {
    display: flex;
}

.nav-menu {
    display: flex;
}

/* Общие стили */
.burger {
    display: none;

    /* По умолчанию скрыт */
}

/* Контейнер навигации */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    order: 0;
    margin-right: auto;
    display: flex;
    align-items: center;
}

.logo-container a {
    display: flex;
}

.logo-container img {
    display: block;
    height: auto;
    max-height: 48px;
}

/* по умолчанию скрыт */
.burger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    margin-left: auto;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

/* мобилка */
@media (max-width: 768px) {
    .burger {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .nav-menu.open {
        display: flex;
    }
}

@media (max-width: 768px) {
    .logo-container img.logo {
        margin-left: 0;
    }
}

img.logo {
    height: 80px;
    width: auto;
    max-height: none;
    margin-left: 0;
}

@media (max-width: 768px) {
    .top-nav {
        text-align: left !important;
    }

    .header-container {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 1rem;
    }

    .logo-container {
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    img.logo {
        height: 48px !important;
        max-width: 120px;
        margin: 0 !important;
    }

    .burger {
        display: block !important;
        font-size: 28px;
        margin-left: auto;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .nav-menu.open {
        display: flex;
    }
}

@media (max-width: 768px) {
    .logo-container img.logo {
        transform: translateX(-40px);

        /* или -10px, подбери на глаз */
    }
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .card img {
        height: 10rem;

        /* подбери нужную высоту, например 10rem, 11rem, 13rem */
    }
}

@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
    }

    /* фото из about */
    .about-photo {
        order: -1;

        /* переместить выше текста */
        max-width: 200px;

        /* или 220px, как тебе больше нравится */
    }

    .about-photo img {
        max-height: 260px;

        /* чтобы не было слишком большим */
    }
}

/* расположение меню под бургером */
@media (max-width: 768px) {
    .top-nav .nav-menu {
        display: none;
        flex-direction: column;
        gap: 1rem;
        background: rgba(255, 255, 255, 0.95);
        padding: 1rem;
        border-radius: 1rem;
        position: absolute;
        top: 60px;
        right: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .nav-menu.open {
        display: flex;
    }
}

.top-nav {
    position: relative;
}

.dropdown-content {
    display: none;
}

.dropdown-content.open {
    display: block;
}

.blog-page .logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-page .burger {
    margin-left: 12rem;
}

@media (max-width: 768px) {
    .video-block {
        flex-direction: column;
        gap: 0.2rem !important;

        /* общий стиль по умолчанию */
    }

    body.early-works .video-block {
        gap: 0.1rem;

        /* переопределение для early-works */
    }

    body.early-works .video-wrapper {
        width: 100%;
        max-width: 90vw;
        aspect-ratio: 16 / 9;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    body.early-works .video-wrapper iframe {
        width: 100%;
        height: auto;
        max-width: 100%;
        display: block;
        margin-bottom: 0;
    }

    body.early-works .text-block {
        font-size: 0.95rem;
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 0.2rem;
        text-align: left;
        margin-top: 0;
    }

    body.early-works .video-block p {
        margin-bottom: 0.3rem;
    }
}

@media (max-width: 768px) {
    body.early-works .video-block {
        gap: 0.1rem !important;
        flex-direction: column !important;
        align-items: stretch !important;

        /* ← ключевая строка */
    }
}

@media (max-width: 768px) {
    body.early-works .video-block {
        display: block !important;
    }

    body.early-works .video-wrapper,
    body.early-works .text-block {
        display: block !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
}

@media (max-width: 768px) {
    body.home-page .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
    }

    body.home-page .card {
        position: relative;
        display: flex;
        flex-direction: column;
        background-color: white;
        border-radius: 1rem;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        height: 240px;
        justify-content: center;
        align-items: center;
    }

    body.home-page .card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    body.home-page .card .label {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 0.5rem;
        background-color: rgba(88, 28, 135, 0.85);

        /* фиолетовая с прозрачностью */
        color: white;
        font-size: 0.95rem;
        font-weight: 500;
        text-align: center;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    body.spine-animations h2,
    body.spine-animations h3,
    body.spine-animations p {
        text-align: center;
    }

    body.spine-animations .media-grid,
    body.spine-animations .media-grid.single-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 1rem;
        justify-items: center;
        align-items: start;
    }

    body.spine-animations .media-grid img {
        max-height: 140px;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 0.5rem;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }

    body.spine-animations .media-grid iframe {
        grid-column: span 2;

        /* видео по ширине всей строки */
        width: 100%;
        max-width: 100%;
    }
}

@media (min-width: 769px) {
    body.spine-animations .section h2,
    body.spine-animations .section p {
        text-align: center;
    }

    body.spine-animations .media-grid,
    body.spine-animations .cooking-row,
    body.spine-animations .unicorn-block {
        justify-content: center !important;
    }
}

@media (max-width: 768px) {
    body.stranger-things .title {
        text-align: center;
        font-size: 1rem;
        padding: 0 1rem;
    }

    body.stranger-things .row {
        flex-direction: column;
        padding: 0 1rem;
        gap: 1rem;
    }

    body.stranger-things .column,
    body.stranger-things .text-column {
        max-width: 100%;
    }

    body.stranger-things .column img {
        max-width: 100%;
        height: auto;
    }

    body.stranger-things .text-column h2,
    body.stranger-things .text-column p {
        text-align: center;
        padding: 1.25rem;
    }

    body.stranger-things .text-column p {
        font-size: 0.84rem;
        line-height: 1.4;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        max-width: 100vw;
        box-sizing: border-box;
    }

    body.stranger-things .grid-2x2 {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    body.stranger-things .grid-2x2 img {
        width: 100%;
        max-width: 90vw;
        height: auto;
    }
}

@media (max-width: 768px) {
    body.gmtk {
        overflow-x: hidden;
    }

    body.gmtk .video-text-container,
    body.gmtk .grid-2x2,
    body.gmtk .text-block,
    body.gmtk .gif-label {
        padding-left: 1rem;
        padding-right: 1rem;
        box-sizing: border-box;
        width: 100%;
    }

    body.gmtk .grid-2x2 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        justify-items: center;
    }

    body.gmtk .grid-2x2 img {
        width: 100%;
        max-width: 320px;
        height: auto;
        display: block;
        border-radius: 0.5rem;
    }

    body.gmtk .text-block p {
        font-size: 0.9rem;
        text-align: justify;
        word-break: break-word;
    }

    body.gmtk h1,
    body.gmtk h2 {
        text-align: center;
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    body.gmtk .frog-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        justify-items: center;
        padding: 0 1rem;
    }

    body.gmtk .frog-section > div {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    body.gmtk .frog-section img {
        width: 100%;
        height: auto;
    }

    body.gmtk .frog-section .last-frog {
        grid-column: 1 / -1;
        justify-self: center;
        width: 60%;
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    body.gmtk .frog-section .last-bug {
        grid-column: 1 / -1;
        justify-self: center;
        width: 60%;
        max-width: 280px;
    }
}

/* Применяется только к карточкам внутри блока с классом sublabel */
.card-grid.sublabel .card {
    position: relative;
    overflow: hidden;
}

/* Подпись поверх изображения */
.card-grid.sublabel .card .label {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    background: none;
    padding: 0.5rem 0;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.card.raised-label .label {
    margin-top: -20px;

    /* или подбери точно по глазу */
}

.card-grid.sublabel .card {
    position: relative;
}

.card-grid.sublabel .up .label {
    position: absolute;
    bottom: 1.3rem;

    /* регулируй по вкусу */
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.footer {
    text-align: center;
    padding: 1rem 0 1rem 0;

    /* верх, право, низ, лево */
    font-size: 0.9rem;
    color: #777;
    background: transparent;
}

.footer .linkedin-icon:hover {
    transform: scale(1.1);
}





