/*!
Theme Name:   Мистическая Мастерская
Author:       AlexeyS
Author URI:   https://alexeys.ru/
Version:      1.0
Requires PHP: 7.4
*/


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    font-family: 'Comfortaa', cursive;
    font-size: 14px;
    min-width: 320px;
    background: #f6effb;
    color: #242424;

    --swiper-theme-color: #b78fd6;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

p {
    margin: 0 0 8px 0;
}


/* promo */
.promo {
    position: relative;
    display: flex;
    flex-direction: column;
    font-family: 'Comfortaa', cursive;
    font-size: 14px;
    color: #fff;
    background-color: #b78fd6;
    min-width: 320px;
    height: 100%;
    min-height: 100vh;
    z-index: 12;
}

.promo .promo-body {
    position: relative;
    flex: 1 0 0;
    display: flex;
    padding: 25px 25px 60px 25px;
    max-width: 860px;
    margin: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.promo .promo-footer {
    flex: 0 0 auto;
    text-align: center;
    padding: 12px;
    font-size: 10px;
    opacity: 0.4;
}

@media (max-width: 992px) {
    .promo .promo-body {
        max-width: 720px;
    }
}

@media (max-width: 768px) {
    .promo .promo-body {
        padding: 15px 15px 50px 15px;
        max-width: 320px;
    }
}

.promo h1 {
    font-size: 3em;
    margin-bottom: 1em;
    text-align: center;
}

.promo .social {
    display: flex;
    justify-content: center;
    align-content: center;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    flex-direction: row;
    gap: 20px;
}

.promo .social > li {
    display: block;
    padding: 0;
    margin: 0;
}

.promo .social a {
    display: flex;
    justify-content: center;
    align-content: center;
    align-items: center;
    flex-wrap: wrap;
    background-color: #fff;
    width: 90px;
    height: 90px;
    line-height: 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 28%;
    box-shadow: 0 5px 15px -5px rgb(0 0 0 / 10%);
    opacity: 0.99;
}
.promo .social a svg  {
    position: relative;
    z-index: 1;
}

.promo .social a,
.promo .social a::before,
.promo .social a path {
    transition: all 0.35s;
    transition-timing-function: cubic-bezier(0.31, -0.105, 0.43, 1.59);
}

.promo .social a::before {
    content: '';
    width: 120%;
    height: 120%;
    top: 90%;
    left: -110%;
    position: absolute;
    transform: rotate(45deg);
}

.promo .social a:focus::before,
.promo .social a:hover::before {
    top: -10%;
    left: -10%;
}

.promo .social a.icon-instagram path {
    fill: #E4405F;
}
.promo .social a.icon-telegram path {
    fill: #0088cc;
}
.promo .social a.icon-vk path {
    fill: #4C75A3;
}
.promo .social a.icon-whatsapp path {
    fill: #25D366;
}

.promo .social a.icon-instagram:hover path,
.promo .social a.icon-telegram:hover path,
.promo .social a.icon-vk:hover path,
.promo .social a.icon-whatsapp:hover path {
    fill: #fff;
}

.promo .social a.icon-instagram::before {
    background-color: #E4405F;
}
.promo .social a.icon-telegram::before {
    background-color: #0088cc;
}
.promo .social a.icon-vk::before {
    background-color: #4C75A3;
}
.promo .social a.icon-whatsapp::before {
    background-color: #25D366;
}

.promo .icon-instagram > span {
    display: block;
    position: absolute;
    text-decoration: none;
    font-size: 14px;
    color: #000;
    margin: -30px -40px 0 0;
}

/* scroll-indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 3px solid #fff;
    border-bottom: 3px solid #fff;
    transform: rotate(45deg);
    animation: scroll-arrows 2s infinite;
    opacity: 0;
}

@media (max-width: 480px) {
    .scroll-arrow {
        width: 10px;
        height: 10px;
        border-right: 2px solid #fff;
        border-bottom: 2px solid #fff;
    }
}

.scroll-arrow:nth-child(1) {
    animation-delay: 0s;
}

.scroll-arrow:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-arrow:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes scroll-arrows {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-10px, -10px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(10px, 10px);
    }
}


/* header  */
header {
    background-color: #b78fd6;
    padding: 15px 0;
    margin-bottom: 24px;
    position: sticky;
    top: 0;
    z-index: 10;
}

@media (max-width: 360px) {
    header {
        padding: 10px 0;
    }
}

.promo + header {
    position: fixed;
    left: 0;
    width: 100%;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-title {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.header-title a {
    color: inherit;
    text-decoration: none;
}

@media (max-width: 768px) {
    .header-title {
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .header-title {
        font-size: 16px;
    }
}

.header-socials {
    display: flex;
    list-style: none;
    gap: 15px;
}

.header-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    transition: all 0.3s ease;
}

.header-socials a:hover {
    transform: scale(1.1);
}

.header-socials .icon-telegram path {
    fill: #0088cc;
}

.header-socials .icon-vk path {
    fill: #4C75A3;
}


@media (max-width: 768px) {
    .header-socials {
        gap: 4px;
    }
    .header-socials a {
        width: 24px;
        height: 24px;
    } 
    .header-socials svg {
        width: 16px;
        height: 16px;
    } 
}


/*  */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.main-posts {
    padding: 20px 0;
}

.home .main-posts {
    padding-top: 40px;
}


.main-posts h2 {
    font-size: 26px;
    margin-bottom: 24px;
}

/* grid-items */
.grid-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 0 0 30px;
}

.grid-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.grid-item:hover {
    /*transform: translateY(-5px);*/
}

.grid-item-link {
    color: inherit;
    text-decoration: none;
}

.grid-item-thumbnail {
    position: relative;
    aspect-ratio: 4/3;
    will-change: transform;
}

.grid-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-item-thumbnail .swiper-slide {
    position: relative;
    contain: content;
}

@media (min-width: 768px) {
    .grid-item-thumbnail .swiper-pagination-full {
        position: absolute;
        display: flex;
        height: 100%;
        right: 0;
        top: 0;
        width: 100%;
        opacity: 0;
        z-index: 1;
    }
    .grid-item-thumbnail .swiper-pagination-full > div {
        flex: 1;
    }
}

.grid-item-title {
    padding: 15px;
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .grid-items {
        gap: 15px;
    }
    
    .grid-item-title {
        font-size: 16px;
        padding: 12px;
    }
}



/* post-detail-grid */
.post-detail-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 40px;
    margin: 40px 0;
}

.post-detail-gallery {
    flex: 1.2;
    min-width: 0;
}

.post-detail-content {
    flex: 1;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(183, 143, 214, 0.12);
}

.post-detail-description {
    flex: 1 0 100%;
}

.post-detail-gallery .swiper,
.post-detail-gallery .post-thumbnail {
    aspect-ratio: 4/3;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(183, 143, 214, 0.12);
}

.post-detail-gallery a[data-fancybox] {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-detail-gallery a[data-fancybox]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(183, 143, 214, 0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-detail-gallery a[data-fancybox]:hover::after {
    background: rgba(183, 143, 214, 0.15);
}

.post-detail-gallery a[data-fancybox]:hover {
    transform: scale(1.03);
}

.post-detail-gallery img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: all 0.4s ease;
}

.post-detail-content {
    color: #4a4a4a;
    font-size: 18px;
    line-height: 1.6;
}

.post-detail-content h1 {
    font-size: 36px;
    margin-bottom: 25px;
    line-height: 1.3;
    color: #2c2c2c;
}

.post-detail-description {
    font-size: 16px;
    line-height: 1.6;
}

@media (max-width: 992px) {
    .post-detail-gallery,
    .post-detail-content {
        flex: 1 0 100%;
    }
    .post-detail-content {
        background: transparent;
        box-shadow: none;
        padding: 0;
        order: -1;
    }
}

@media (max-width: 768px) {
    .post-detail-grid {
        gap: 25px;
        margin: 25px 0;
    }

    .post-detail-content,
    .post-detail-description {
        font-size: 14px;
    }

    .post-detail-content h1 {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
}
