* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 40px;
    background: #111;
    color: white;
    font-family: Raleway, sans-serif;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
}

h3 {
    font-family: "MyCustomFont", sans-serif;
    background: linear-gradient(1deg, rgb(142, 71, 143), rgb(6, 6, 129)) text;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.menu {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1000;
    font-family: "MyCustomFont", sans-serif;
}

.menu-button {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.menu-button img {
    width: 66px;
    height: 66px;
    display: block;
    transition: transform 0.3s ease;
}

/* Иконата се завърта, докато курсорът е върху цялото меню */
.menu:hover .menu-button img {
    transform: scale(1.1) rotate(180deg);
}

.menu-items {
    position: absolute;
    top: 55px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 0.3s ease;
    font-weight: bold;
    align-items: end;
    margin-top: 25%;
}

/* Hover поведение само на десктоп */
@media (min-width: 769px) {
    .menu:hover .menu-items {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .menu:hover .menu-button img {
        transform: scale(1.1) rotate(180deg);
    }
}

.menu-items a {
    color: rgb(221, 11, 11);
    text-decoration: none;
    white-space: nowrap;
}

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10;
}

.mobile-nav {
    z-index: 20;
}

/* само на mobile */

@media (max-width: 768px) {

    .menu-button img {
        transform: rotate(0deg);
        transition: transform 0.3s ease;
    }

    .menu-button.active img {
        transform: rotate(180deg);
    }

    .menu-items.mobile-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .menu-items.mobile-nav {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
    }

    .nav-backdrop.active {
        display: block;
    }

    .menu {
        position: fixed;
        top: 30px;
        right: 10px;
        z-index: 1000;
    }
}

/* -------------------------
   GALLERY
------------------------- */

.blog-grid {
    max-width: 1200px;
    margin: auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;

    text-align: center;
}


.blog-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: scale(1.03);
}


.blog-card img {
    width: 100%;
    aspect-ratio: 3 / 4;

    object-fit: cover;

    display: block;
}


.blog-card h2 {
    margin-top: 12px;
    font-size: 20px;
}


/* -------------------------
   MODAL
------------------------- */

.modal {
    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.85);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;

    z-index: 1000;
}


.modal.active {
    opacity: 1;
    visibility: visible;
}


/* -------------------------
   MODAL CONTENT
------------------------- */

.modal-content {
    position: relative;

    width: min(900px, 100%);

    max-height: 90vh;

    overflow-y: auto;

    background: #1b1b1b;

    display: block;
    grid-template-columns: 1fr 1fr;

    gap: 30px;

    padding: 30px;

    border-radius: 12px;

    text-align: left;
}


.modal-content img {
    width: 100%;

    max-height: 70vh;

    object-fit: contain;
}


.modal-text {
    align-self: start;
    width: 100%;
}


.modal-text h2 {
    font-size: 32px;
    margin-top: 0;
    text-align: center;
}


.modal-text p {
    font-size: 18px;
    line-height: 1.7;
}


/* -------------------------
   CLOSE BUTTON
------------------------- */

.close {
    position: absolute;

    top: 10px;
    right: 15px;

    border: none;
    background: none;

    color: white;

    font-size: 40px;

    cursor: pointer;

    z-index: 10;
}


/* -------------------------
   MOBILE
------------------------- */

@media (max-width: 700px) {

    body {
        padding: 20px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 15px;
    }

    .modal-content {
        grid-template-columns: 1fr;

        padding: 20px;

        max-height: 95vh;
    }

    .modal-content img {
        max-height: 45vh;
    }

    .modal-text h2 {
        font-size: 26px;
    }

    .modal-text p {
        font-size: 16px;
    }
}

@font-face {
    font-family: "MyCustomFont";
    src: url("../fonts/constantine-lq0q-webfont.woff2") format("woff2"),
        url('../fonts/constantine-lq0q-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "MySecondCustomFont";
    src: url("../fonts2/roadrage-webfont.woff2") format("woff2"),
        url('../fonts2/roadrage-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

h1 {
    font-family: "MySecondCustomFont", sans-serif;
    background: linear-gradient(1deg, rgb(142, 71, 143), rgb(6, 6, 129)) text;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 9%;
}

h2 {
    font-family: "MyCustomFont", sans-serif;
    background: linear-gradient(1deg, rgb(142, 71, 143), rgb(6, 6, 129)) text;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.specialWinners {
    font-family: "MyCustomFont", sans-serif;
    background: linear-gradient(180deg, rgb(235 216 235), rgb(68 68 255)) text;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
    text-align: center;
}

.article-text {
    display: none;
}

/* p {
    font-family: "MyCustomFont", sans-serif;
} */

div.special>p {
    font-family: "MyCustomFont", sans-serif;
    background: linear-gradient(180deg, rgb(235 216 235), rgb(68 68 255)) text;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
    text-align: center;
}

.bold {
    font-weight: bold;
    color: #4a4abf;
}

.numbers {
    color: #cd0046;
}

.winners {
    color: #cd0046;
    text-align: center;
    font-style: italic;
}

.author {
    font-weight: bold;
}

.penta {
    color: #cd0046;
    display: block;
    text-align: center;
    font-weight: bold;
    font-size: 25px;
}

.symbol {
    font-size: medium;
}

.date {
    font-style: italic;
    color: #a1a1a1;
}

.article-text {
    display: none;
}

#backModal {
    margin: 0 0 15px;
    padding: 8px 14px;
    cursor: pointer;
}

#backModal[hidden] {
    display: none;
}

/* Снимки във всички карти, включително вътрешните */
.blog-card>img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
}

.blog-card>img.first {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
    object-position: 0% 69%;
}

.blog-card>img.second {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
    object-position: 0% 76%;
}

.blog-card>img.third {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
    object-position: 0% 101%;
}

.blog-card>img.sixth {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
    object-position: 0% 94%;
}

.blog-card>img.seventh {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
    object-position: 0% 24%;
}

.blog-card>img.eigth {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
    object-position: 0% 7%;
}

.blog-card>img.ninth {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
    object-position: 0% 45%;
}

.blog-card>img.ten {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
    object-position: 0% 34%;
}

.blog-card>img.eleven {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
    object-position: 0% 63%;
}

.blog-card>img.twelve {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
    object-position: 0% 10%;
}

/* Снимка в отворения модален прозорец */
#modalImage {
    width: 100%;
    height: auto;
    max-width: max-content;
    max-height: 80vh;
    object-fit: fill;
    display: block;
    margin: 0 auto 3%;
    box-shadow: 0 4px 8px 0 rgb(0 0 0), 0 6px 20px 0 rgb(0 0 0);
    border-radius: 25px;
    user-select: none;
    caret-color: transparent;
}


.ddd-logo {
    width: 50%;
    max-width: 310px;
    height: auto;
    display: block;
    margin: 0 auto 5%;
}

.neon-glow:hover {
    border: 1px solid #6816bb;
    border-radius: 15px;

    box-shadow:
        0 0 5px #abdaf5b4,
        0 0 15px #abdaf5b4,
        0 0 30px #abdaf5b4,
        inset 0 0 15px #f5eaff;

    animation: neonPulse 1.5s ease-in-out infinite;
}

@keyframes neonPulse {

    0%,
    100% {
        box-shadow:
            0 0 5px #abdaf5b4,
            0 0 10px #abdaf5b4,
            0 0 20px #abdaf5b4,
            inset 0 0 8px #f5eaff;
    }

    50% {
        box-shadow:
            0 0 10px #abdaf5b4,
            0 0 25px #abdaf5b4,
            0 0 25px #abdaf5b4,
            inset 0 0 20px #f5eaff;
    }
}

#backModal {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

#backModal img {
    display: block;
    width: 20%;
    height: 20%;
    object-fit: contain;

    -webkit-mask-image: linear-gradient(to right,
            black 40%,
            transparent 100%);

    mask-image: linear-gradient(to right,
            black 40%,
            transparent 100%);

}

/* само на mobile */

@media (max-width: 768px) {
    #backModal img {
        display: block;
        width: 40%;
        height: 40%;
        object-fit: contain;

        -webkit-mask-image: linear-gradient(to right,
                black 40%,
                transparent 100%);

        mask-image: linear-gradient(to right,
                black 40%,
                transparent 100%);

    }
}