@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #14a6f4;
    --white: #ffffff;
    --bg: #f5f5f5;
    --text: #333;
    --border-color: #A63A3A;
    --active-border: #00ff88;
    --shadow-color: rgba(255, 68, 68, 0.3);
    --modal-bg: rgba(0, 0, 0, 0.7);
    --slide-width: 280px;
    --slide-height: 350px;
    --slide-width-tablet: 250px;
    --slide-height-tablet: 300px;
    --slide-width-mobile: 220px;
    --slide-height-mobile: 280px;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Montserrat", sans-serif;
    background-color: var(--white);
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
}

.bg-wrap {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background-color: var(--white);
}

.bg-wrap .bg-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top center;
    pointer-events: none;
    user-select: none;
    display: block;
}

.container {
    max-width: 1200px;
    padding: 0 20px;
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    min-height: 1cm;
    background: transparent;
    backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 1cm;
    padding: 0 10px;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.header-btn {
    min-width: 5rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid #2F2F2F;
    border-radius: 999px;
    background: var(--white);
    color: #2F2F2F;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.header-btn ion-icon {
    font-size: 1rem;
}

.header-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

.lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 112px;
    z-index: 1;
}

.section-heading {
    color: #222222;
    padding: 2.6rem 0 1.2rem 0;
    text-align: left;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

.section-heading .prefix {
    display: block;
    font-family: "Montserrat", sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111111;
    margin-left: 2px;
    margin-bottom: -0.6rem;
    letter-spacing: 0.02em;
    transform: translateY(-2px);
}

.section-heading .main {
    display: block;
    font-size: clamp(2.8rem, 4.5vw, 4.2rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #111111;
}

.section-heading .subtitle {
    display: block;
    font-family: "Montserrat", sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #2F2F2F;
    margin-top: 0.5rem;
}

.slider-wrapper {
    position: relative;
    margin-bottom: 80px;
}

.tranding-slider {
    height: 400px;
    padding: 2rem 0;
    position: relative;
    overflow: visible;
}

.tranding-slide {
    width: var(--slide-width);
    height: var(--slide-height);
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 4px solid var(--border-color);
    box-shadow:
        0 0 20px var(--shadow-color),
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 0 0 2px rgba(255, 255, 255, 0.3);
    transition: all 0.5s ease;
    transform: scale(0.85);
    opacity: 0.7;
    cursor: pointer;
}

.swiper-slide.no-click {
    cursor: default;
}

.tranding-slide.swiper-slide-active {
    border: 5px solid #D4AF6A;
    box-shadow:
        0 0 30px rgba(212, 175, 106, 0.5),
        0 0 60px rgba(212, 175, 106, 0.3),
        0 15px 40px rgba(0, 0, 0, 0.3),
        inset 0 0 0 3px rgba(255, 255, 255, 0.5);
    transform: scale(1);
    opacity: 1;
    z-index: 10;
}

.tranding-slide.tranding-slide-left {
    border: 4px solid #A63A3A;
    box-shadow:
        0 0 18px rgba(166, 58, 58, 0.35),
        0 8px 30px rgba(0, 0, 0, 0.16);
    transform: scale(0.9);
    opacity: 0.9;
}

.tranding-slide.tranding-slide-left::before {
    background: linear-gradient(45deg,
            #A63A3A,
            rgba(166, 58, 58, 0.85),
            #A63A3A);
    opacity: 0.9;
}

.tranding-slide.tranding-slide-right {
    border: 4px solid #14a6f4;
    box-shadow:
        0 0 15px rgba(20, 166, 244, 0.35),
        0 8px 25px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    opacity: 0.8;
}

.tranding-slide.tranding-slide-right::before {
    background: linear-gradient(45deg,
            #14a6f4,
            #6bb7ff,
            #14a6f4);
    opacity: 0.8;
}

.tranding-slide:hover {
    transform: scale(0.95) !important;
    border-color: #D4AF6A;
    box-shadow:
        0 0 30px rgba(212, 175, 106, 0.55),
        0 12px 35px rgba(0, 0, 0, 0.25);
}

.tranding-slide.swiper-slide-active:hover {
    transform: scale(1.05) !important;
    border-color: #00ffaa;
}

.tranding-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tranding-slide-content {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 60%, rgba(0, 0, 0, 0.7));
}

.tranding-slide-content-bottom {
    position: absolute;
    inset: 20px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
}

.tranding-slide-content-bottom h2,
.tranding-slide-content-bottom h3 {
    position: relative;
    z-index: 2;
}

.event-name {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: 15px;
    width: 1000px;
    height: 600px;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2.1rem;
    cursor: pointer;
    color: var(--text);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-tabs {
    display: flex;
    order: -1;
}

.tab-button {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text);
    transition: background 0.3s, color 0.3s;
}

.tab-button.active {
    background: var(--primary);
    color: var(--white);
}

.tab-button:hover {
    background: #f0f0f0;
}

.modal-content {
    padding: 20px;
    position: relative;
    /* Оставляем место под header и tabs, чтобы внутри не было прокрутки */
    height: calc(100% - 110px);
    overflow: visible;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow:visible;
    padding-right: 0;
    min-height: 0;
}

/* Minimalist fixed footer */
.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2cm;
    max-height: 2cm;
    background: var(--white) !important;
    border-top: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: auto;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.site-footer__inner {
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
    color: #2F2F2F;
    font-size: 0.85rem;
}

.site-footer__link {
    color: inherit;
    text-decoration: none;
    opacity: 0.85;
}

.site-footer__sep { opacity: 0.5; }

@media (prefers-color-scheme: dark) {
    .site-footer { background: rgba(10,10,10,0.6); }
    .site-footer__inner { color: #e6e6e6; }
}

/* Footer: layout and social buttons */
.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.site-footer__left {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.85rem;
    color: #2F2F2F;
}

.site-footer__sub {
    font-size: 0.75rem;
    color: rgba(47,47,47,0.7);
}

.site-footer__social {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.social-btn {
    position: relative;
    display: inline-flex;
    width: 2.2rem;
    height: 2.2rem;
    padding: 0.15rem;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #2F2F2F;
    text-decoration: none;
    border: 1px solid #2F2F2F;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.social-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 0.45rem);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    pointer-events: none;
    opacity: 0;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: 0.35rem;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 1;
}

.social-btn:hover::after,
.social-btn:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.social-btn:hover {
    transform: translateY(-1px);
    background: var(--primary);
    color: var(--white);
}

.social-btn ion-icon {
    font-size: 1.1rem;
    pointer-events: none;
}

.social-btn svg {
    width: 1rem;
    height: 1rem;
    pointer-events: none;
}

@media (max-width: 480px) {
    .site-footer__inner { padding: 0 8px; }
    .site-footer__left { align-items: center; text-align: center; }
}

.tab-content p {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.8;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .section-heading {
        padding: 1.6rem 0 0.6rem 0;
    }

    .section-heading .main {
        font-size: 3.2rem;
    }

    .section-heading .prefix {
        font-size: 1rem;
        margin-bottom: -0.35rem;
    }

    .section-heading .subtitle {
        font-size: 0.85rem;
    }

    #tranding {
        padding: 1rem 0 5rem 0;
    }

    .slider-wrapper {
        margin-bottom: 60px;
    }

    .tranding-slider {
        height: 350px;
        padding: 1rem 0;
    }

    .tranding-slide {
        width: var(--slide-width-tablet);
        height: var(--slide-height-tablet);
        border-width: 3px;
    }

    .tranding-slide.swiper-slide-active {
        border-width: 4px;
    }

    .event-name {
        font-size: 1.5rem;
    }

    .modal {
        width: 100%;
        max-height: 100%;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .tab-button {
        font-size: 0.9rem;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .section-heading {
        padding: 0.8rem 0 0.4rem 0;
    }

    .section-heading .main {
        font-size: 2.2rem;
    }

    .section-heading .prefix {
        font-size: 0.85rem;
        margin-bottom: -0.25rem;
    }

    .section-heading .subtitle {
        font-size: 0.75rem;
    }

    #tranding {
        padding: 1rem 0 4rem 0;
    }

    .slider-wrapper {
        margin-bottom: 50px;
    }

    .tranding-slider {
        height: 320px;
    }

    .tranding-slide {
        width: var(--slide-width-mobile);
        height: var(--slide-height-mobile);
        border-width: 3px;
    }

    .tranding-slide.swiper-slide-active {
        border-width: 4px;
    }

    .event-name {
        font-size: 1.3rem;
    }

    .tranding-slide-content-bottom {
        bottom: 15px;
        left: 15px;
    }

    .swiper-pagination-bullet {
        width: 10px !important;
        height: 10px !important;
    }

    .modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .modal-header {
        padding: 10px 15px;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-close {
        font-size: 2.3rem;
    }

    .tab-button {
        width: 100%;
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
    }

    .tab-button.active {
        background: var(--primary);
        color: var(--white);
    }

    .modal-content {
        padding: 15px;
        min-height: unset;
        height: 100%;
        overflow: auto;
    }

    .tab-content p {
        font-size: 0.9rem;
    }

    .modal-tabs {
        display: flex;
        order: unset;
    }
}

.swiper-slide-shadow-left,
.swiper-slide-shadow-right {
    display: none !important;
}

.tranding-slide::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            var(--border-color),
            #ff6b6b,
            var(--border-color),
            #ff8888);
    border-radius: 22px;
    z-index: -1;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.tranding-slide.swiper-slide-active::before {
    background: linear-gradient(45deg,
            #D4AF6A,
            #E8C896,
            #D4AF6A,
            #F0D9B5);
    opacity: 1;
    animation: borderGlow 2s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    }

    100% {
        box-shadow: 0 0 40px rgba(0, 255, 136, 0.8);
    }
}

.tab-more-button {
    background: var(--primary);
    border: none;
    color: var(--white);
    padding: 10px 20px;
    font-size: 1rem;
    font-family: "Montserrat", sans-serif;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 15px;
    transition: background 0.3s;
}

.tab-more-button:hover {
    background: #643ad8;
}

.tab-more-content {
    display: none;
}

.tab-more-content.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: visible;
    min-height: 0;
}

.tab-back-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
    position: absolute;
    top: -50px;
    left: 20px;
    transition: color 0.3s;
}

.tab-back-button:hover {
    color: var(--primary);
}

.tab-back-button ion-icon {
    vertical-align: middle;
}

.modal-header {
    transition: padding-left 0.3s ease;
}

.search-container {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.slide-search {
    width: 300px;
    padding: 10px;
    font-size: 1.4rem;
    font-family: "Montserrat", sans-serif;
    border: 2px solid var(--primary);
    border-radius: 5px;
    background: var(--white);
    color: var(--text);
    outline: none;
    transition: border-color 0.3s;
}

.slide-search:focus {
    border-color: var(--active-border);
}

.slide-search::placeholder {
    color: #999;
}

@media (max-width: 768px) {
    .tab-more-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .tab-back-button {
        font-size: 1.5rem;
        top: -50px;
        left: 20px;
    }

    .slide-search {
        width: 250px;
        padding: 10px;
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .tab-more-button {
        padding: 6px 12px;
        font-size: 0.8rem;
        margin-top: 10px;
    }

    .tab-back-button {
        font-size: 1.7rem;
        top: -50px;
        left: 15px;
    }

    .slide-search {
        width: 225px;
        padding: 10px;
        font-size: 1rem;
    }

    .search-container {
        bottom: -40px;
    }
}

.multi-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    height: 100%;
}

.multi-buttons .tab-more-button {
    min-width: 120px;
    margin: 0;
}

@media (max-width: 768px) {
    .multi-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .multi-buttons {
        grid-template-columns: 1fr;
    }
}

/* Стили для контента с изображением */
.content-with-image {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-top: 15px;
    align-items: flex-start;
    min-height: 0;
    flex: 1;
    height: 100%;
}

.content-text {
    flex: 1;
    min-height: 0;
    height: 100%;
    margin-bottom: 1em;
    /* Отступ снизу */
    text-indent: 1.5em;
    /* Отступ первой строки (опционально) */
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 10px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.content-text::-webkit-scrollbar {
    width: 0;
}

.content-text::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.event-links {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(47, 47, 47, 0.15);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    text-indent: 0;
}

.event-links .header-btn {
    max-width: 100%;
    white-space: normal;
    line-height: 1.3;
    text-align: center;
}

.content-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

.content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .content-with-image {
        flex-direction: column;
        height: auto !important;
    }
    
    .content-text {
        order: 0;
        overflow-y: visible;
        height: auto;
        max-height: none;
        flex: none;
    }
    
    .content-image {
        order: 1;
        margin: 20px 0 30px 0;
        flex: none;
        padding-bottom: 30px;
    }
}

/* Стили для галереи с произвольными размерами изображений */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 0;
    align-items: stretch;
    position: relative;
}

.photo-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    min-height: 0;
    min-width: 0;

    /* Убираем возможность карточки расширять контейнер */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.photo-card .photo-caption {
    display: none;
    margin: 10px 12px 0;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
    border-radius: 12px;
    max-width: 90%;
    word-break: break-word;
}

.photo-card:hover img {
    filter: brightness(1.05);
}

.photo-card.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    width: 90vw;
    height: auto;
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 0 16px;
    animation: expandImage 0.3s ease;
}

@keyframes expandImage {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

body.photo-modal-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    pointer-events: all;
}

.photo-card.expanded img {
    width: auto;
    max-width: 90%;
    max-height: calc(90vh - 140px);
    object-fit: contain;
    z-index: 1;
}

.photo-card.expanded .photo-caption {
    display: block;
    width: 90%;
    margin-top: 16px;
}

.photo-card.expanded::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
}

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

.photo-card--wide {
    grid-column: span 2;
}

.photo-card--tall {
    grid-row: span 2;
}

.photo-card--large-vertical {
    grid-column: span 2;
    grid-row: span 2;
}

.photo-card--large-horizontal {
    grid-column: span 3;
}

@media (max-width: 1024px) {
    .photo-gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-auto-rows: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .photo-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(0, 1fr);
    }

    .photo-card--wide,
    .photo-card--tall,
    .photo-card--large-vertical,
    .photo-card--large-horizontal {
        grid-column: span 2 !important;
        grid-row: span 1 !important;
    }
}

@media (max-width: 480px) {
    .photo-gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: 180px;
    }
}

