/*карусль*/
.swiper {
    width: 100%;
    height: 25vh;
    /* обязательно */
    padding: 20px 0;
    box-sizing: border-box;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    height: 100%;
    width: auto;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(0.7);
}

/*конец карусли*/

/* Travel Detail Page Styling */
.travel-hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Blur effect for background image */
.travel-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(15px);
    z-index: 0;
}

/* Overlay with darkening */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 1;
}

.travel-hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-main-photo {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.hero-main-photo img {
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.hero-main-photo img:hover {
    transform: scale(1.02);
}

.travel-header {
    color: white;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.travel-header h2 {
    font-weight: bold;
    color: white !important;
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow:
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000,
        0 0 10px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 0, 0, 0.6);
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.3);
}

.travel-header h4 {
    color: white !important;
    font-size: 1.8rem;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 0 8px rgba(0, 0, 0, 0.8);
    -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.3);
}

.travel-header .text-muted {
    color: white !important;
    font-size: 1.3rem;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 0 6px rgba(0, 0, 0, 0.8);
    -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .travel-hero-section {
        padding: 60px 0;
        min-height: 300px;
    }

    .hero-main-photo img {
        max-width: 100%;
        border-radius: 10px;
    }

    .travel-header h2 {
        font-size: 2rem;
    }

    .travel-header h4 {
        font-size: 1.3rem;
    }

    .travel-header .text-muted {
        font-size: 1rem;
    }
}

.travel-content-section {
    background: transparent;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.travel-content-section h4 {
    color: #1a2980;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #26d0ce;
    display: inline-block;
}

.travel-description {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
}

.travel-map {
    position: relative;
    width: 100%;
    height: 400px;
    /* overflow: hidden;  <-- CAUSES MAP DRIFT */
    border-radius: 20px;
    /* To apply border-radius without overflow:hidden, we might need a workaround,
       but stability is priority now. */
}

#map {
    width: 100%;
    height: 100%;
}

.map-blur {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0) 50%,
            rgb(255, 252, 252, 1.0) 100%);
}

.bookshelf-container {
    position: relative;
    margin: 4rem 0;
    perspective: 1200px;
}

.bookshelf-wrapper {
    position: relative;
    padding: 0 1rem;
    transform-style: preserve-3d;
}

.shelf {
    position: absolute;
    bottom: 0;
    left: -20px;
    right: -20px;
    height: 20px;
    background: #5d4037;
    transform: translateZ(-20px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    z-index: 1;
}

.shelf::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: #795548;
    transform-origin: top;
    transform: rotateX(90deg);
}

.bookshelf {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 15px;
    padding-bottom: 20px;
    transform-style: preserve-3d;
    flex-wrap: wrap;
}

.book-wrapper {
    position: relative;
    z-index: 2;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), z-index 0s 0.1s;
    cursor: pointer;
}

.book-wrapper:hover {
    transform: translateZ(80px) translateY(-20px) scale(1.1);
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), z-index 0s 0s;
}

.book-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transform-style: preserve-3d;
}

.book {
    position: relative;
    width: 50px;
    height: 240px;
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
    transform-origin: center bottom;
}

.book-wrapper:hover .book {
    transform: rotateX(-30deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.book-spine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--book-color);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: inset 2px 0 5px rgba(255, 255, 255, 0.1), inset -2px 0 5px rgba(0, 0, 0, 0.2);
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.1) 0%, transparent 20%, transparent 80%, rgba(0, 0, 0, 0.2) 100%);
}

.title-container {
    width: 100%;
    height: 100%;
    padding: 15px 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    font-family: 'Georgia', serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    max-height: 100%;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.book-cover {
    position: absolute;
    top: 0;
    left: 100%;
    width: 180px;
    height: 100%;
    background: var(--book-color);
    transform-origin: left;
    transform: rotateY(90deg);
    filter: brightness(0.85);
    border-radius: 0 3px 3px 0;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.3) 0%, transparent 10%);
}

.book-pages {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: #f5f5f5;
    transform-origin: top;
    transform: rotateX(-90deg);
    background-image: repeating-linear-gradient(to right, #e0e0e0 0px, #e0e0e0 1px, #f5f5f5 1px, #f5f5f5 3px);
}

.book-shadow {
    display: none;
}

.book-wrapper:nth-child(odd) .book {
    height: 230px;
}

.book-wrapper:nth-child(even) .book {
    height: 250px;
}

.book-wrapper:nth-child(3n) .book {
    height: 220px;
}

.book-wrapper:nth-child(4n) .book {
    height: 240px;
}

@media (max-width: 768px) {
    .bookshelf {
        gap: 10px;
        perspective: none;
        overflow-x: auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding: 20px 10px;
    }

    .book-wrapper:hover {
        transform: translateY(-10px);
    }

    .book-wrapper:hover .book {
        transform: none;
    }

    .book {
        width: 45px;
        height: 200px !important;
    }

    .book-cover,
    .book-pages {
        display: none;
    }
}

/* Diary Cards in Travel Detail */
.diary-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.diary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.diary-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.diary-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.diary-date {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(26, 41, 128, 0.85);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.diary-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.diary-title {
    color: #1a2980;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.diary-card:hover .diary-title {
    color: #26d0ce;
}

.diary-slogan {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-bottom: 0.75rem;
}

.diary-summary {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.diary-more {
    margin-top: auto;
    color: #1a2980;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/*строгое ограничение 20% экрана*/
.video-wrapper {
    position: relative;
    max-width: 40vw;
    max-height: 40vh;
}

.video-player {
    width: 100%;
    height: 100%;    
    max-width: 40vw;
    max-height: 40vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}
/*строгое ограничение 20% экрана*/
/* Кнопка Telegram — правый нижний угол*/
.telegram-btn {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 10;
    opacity: 0.85;
}

.telegram-btn:hover {
    opacity: 1;
}
/* Кнопка Telegram — правый нижний угол*/
/*Название видео поверх плеера*/
.video-title {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    z-index: 10;

    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.85rem;
    padding: 4px 6px;
    border-radius: 6px;
    text-align: center;
    pointer-events: none;
}

/*Название видео поверх плеера*/
