/* GLOBÁLNÍ NASTAVENÍ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

@import url('https://fonts.googleapis.com/css2?family=Eagle+Lake&display=swap');
hr {
    border: none;         
    height: 50px;          
    background-image: url('../data/cara.webp');
    background-repeat: no-repeat;
    background-position: center;
    opacity: 100%;
}
body{
    font-family: "Eagle Lake", serif;
    background-image: url('../data/pozadi.webp'); 
    background-size: cover;
}

/* SEKCE MENU --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

.nav-item a, .navbar-brand, .modern-burger {
    color: white !important;
    transition: all 0.5s ease-in-out;
    position: relative;
}
.navbar-nav .nav-link {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0.5rem;  
    margin-right: 0.5rem;  
    display: inline-block; 
}
        .navbar-nav .nav-link::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: 0px;      
            left: 0;
            background-color: white; 
            transition: width 0.5s ease-in-out;
        }
        .navbar-nav .nav-link:hover::after {
            width: 100%;
        }
.modern-burger {
    width: 30px;
    height: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}
        .modern-burger span {
            display: block;
            height: 3px;
            width: 100%;
            background-color: currentColor;
            border-radius: 3px;
            transition: all 0.3s ease-in-out;
        }
.navbar-toggler:not(.collapsed) .modern-burger span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}
.navbar-toggler:not(.collapsed) .modern-burger span:nth-child(2) {
    opacity: 0;
}
.navbar-toggler:not(.collapsed) .modern-burger span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* HERO Sekce ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

.hero-overlay {
    background: radial-gradient(circle, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
}
.hero-nadpis {
    font-size: clamp(3rem, 10vw, 7rem); 

}
.hero-subtext {
    font-weight: 300;
    letter-spacing: 1px;
    max-width: 600px; 
    margin-left: auto;
    margin-right: auto;
}
.hero-divider {
    height: 2px;
    width: 130px;
    background-color: #fff;
    transition: width 1s ease-in-out;
}
.scroll-arrow {
    display: block;
    width: 60px;
    height: 100px;
}
        .scroll-arrow span {
            left: 50% !important;
            position: absolute;
            width: 30px;
            height: 30px;
            border-left: 2px solid #fff; 
            border-bottom: 2px solid #fff;
            transform: rotate(-45deg);
            animation: sdb-fluid 2s infinite; 
            opacity: 0;
        }
                .scroll-arrow span:nth-of-type(1) {
                    top: 0;
                    animation-delay: 0s;
                }
                .scroll-arrow span:nth-of-type(2) {
                    top: 15px;
                    animation-delay: .15s;
                }
@keyframes sdb-fluid {
    0% { transform: rotate(-45deg) translate(0, 0); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: rotate(-45deg) translate(-20px, 20px); opacity: 0; }
}
.custom-ribbon {
    background-color: #790409;
    color: white;
}

/* Informační sekce --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */

.info-section {
    background-size: auto;
    position: relative;
    overflow: hidden;
}
.main-header-img {
    max-height: 200px;
    filter: drop-shadow(0px 5px 15px rgba(0,0,0,0.3));
}

/*Vizuální styl ilustrací, animace vznášení postav a jejich responzivní pozicování. -----------------------------------------------------------------------------------------------------------------*/

.parchment-container {
    display: flex;
    justify-content: center; 
}
        .parchment-container img {
            width: 100%;
            max-width: 600px;
            filter: drop-shadow(3px 3px 10px rgba(0,0,0,0.2));
            transition: transform 0.3s ease;
            width: 100%;
            max-width: 600px; 
            height: auto;
        }
                .parchment-container img:hover {
                    transform: scale(1.02);
                }
.character-img {
    max-height: 300px;
    object-fit: contain;
    animation: float 4s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Styling interaktivní 3D kroniky, mechanika listování stran a její kompletní responzivní transformace pro mobilní zařízení. -----------------------------------------------------------------------*/

:root {
    --book-bg: #fdf6e3;
    --border-color: #d3c4a8;
    --transition-speed: 1.4s;
}
.kronika-section {
    padding: 60px 0;
}
.kronika-header {
    max-height: 200px;
    filter: drop-shadow(0px 5px 10px rgba(0,0,0,0.3));
}
.parchment-frame {
    background: url('../data/pergamen2.webp') no-repeat center center;
    background-size: contain;
    width: 100%;
    max-width: 1050px;
    height: 650px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Nastavení 3D prostoru a hloubky pro realistický efekt listování knihou. --------------------------------------------------------------------------------------------------------------------------*/

.book-viewport {
    perspective: 2500px;
    width: 380px; 
    height: 520px;
    position: relative;
    margin-left: 380px; 
    z-index: 10;
}
.book-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}
.page-static-left, .page-static-right {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--book-bg);
    padding: 25px; 
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}
.page-static-left { 
    left: -100%; 
    border-radius: 5px 0 0 5px; 
    z-index: 1; 
    box-shadow: inset -20px 0 30px -15px rgba(0,0,0,0.1); 
}
.page-static-right { 
    left: 0; 
    border-radius: 0 5px 5px 0; 
    z-index: 0; 
    box-shadow: inset 20px 0 30px -15px rgba(0,0,0,0.05); 
}

/* Logika rotace stránek kolem levé osy s využitím zpětné viditelnosti. -----------------------------------------------------------------------------------------------------------------------------*/

.page {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform-origin: left;
    transition: transform 1.6s cubic-bezier(0.4, 0, 0.2, 1); 
    cursor: pointer;
    overflow: visible; 
}
.page-shadow {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%);
    opacity: 0; 
    transition: opacity 1.6s ease;
    z-index: 10;
    pointer-events: none;
    border-radius: 0 5px 5px 0;
}
.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: var(--book-bg);
    padding: 25px; 
    box-sizing: border-box;
    border: 1px solid var(--border-color);
}
.back { 
    transform: rotateY(180deg); 
    left: 0; border-radius: 5px 0 0 5px; 
    box-shadow: inset -20px 0 30px -15px rgba(0,0,0,0.15); 
}
.front { 
    border-radius: 0 5px 5px 0; 
    box-shadow: inset 20px 0 30px -15px rgba(0,0,0,0.1); 
}
.page.flipped {
    transform: rotateY(-180deg) skewY(1deg);
}
.page-static-left h2, .front h2, .back h2 {
    font-size: 1.4rem;
    color: #5d4037;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}
.page-static-left p, .front p, .back p {
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
    color: #333;
    margin-bottom: 10px;
}
.page-num { 
    position: absolute; 
    bottom: 15px; 
    font-size: 0.8rem; 
    color: #999; 
}
.left-page-num { 
    left: 20px; 
}
.right-page-num { 
    right: 20px; 
}
.end-content { 
    text-align: center; 
    margin-top: 60px; 
    border: 2px double #d3c4a8; 
    padding: 25px; 
}

/*Vizuální styl interaktivní mapy, historické efekty textur a dobový design vyskakovacích oken. -----------------------------------------------------------------------------------------------------*/

.mapa-section {
    padding-bottom: 100px;
}
.mapa-header {
    max-height: 200px;
    filter: drop-shadow(0px 5px 10px rgba(0,0,0,0.3));
}
.old-school-container {
    width: 100%;
    max-width: 1000px;
    border: 15px solid #3d2b1f;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    position: relative;
    background: #e4d5b7;
    overflow: hidden;
}
#map {
    width: 100%;
    height: 600px;
    z-index: 1;
    filter: sepia(0.8) contrast(0.9) brightness(0.9) grayscale(0.2);
}
.map-overlay-texture {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/parchment.png');
    opacity: 0.4;
    mix-blend-mode: multiply;
    pointer-events: none; 
    z-index: 1000;
}
.inner-shadow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    box-shadow: inset 0 0 60px rgba(0,0,0,0.5);
    pointer-events: none;
    z-index: 1001;
}
.leaflet-popup-content-wrapper {
    background: #f4ecd8 !important;
    color: #3d2b1f !important;
    border-radius: 0 !important;
    border: 1px solid #3d2b1f;
    font-family: 'Georgia', serif;
}
.leaflet-popup-tip {
    background: #f4ecd8 !important;
}
.leaflet-marker-icon {
    filter: hue-rotate(160deg) saturate(0.5) brightness(0.7);
}

/* SEKCE S MAPOU A RECENZEMI - Nastavení pozice bodů na mapě, Nastavení vzhledu popisků -------------------------------------------------------------------------------------------------------------*/
.nadpis-mapa {
    height: 140px; /* Vyzkoušejte hodnotu mezi 60px - 100px */
    width: auto;
    object-fit: contain;
}
.map-wrapper {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden; 
}
.map-image {
    width: 100%;
    height: auto;
    display: block;
}
.map-point {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    text-decoration: none !important;
    transform: translate(-50%, -100%);
    transition: transform 0.2s ease-in-out;
}
.map-point i {
    color: #790409;
    font-size: 35px; 
    line-height: 0.8; 
    display: block;

}
.custom-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%; 
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background-color: #ffffff;
    color: #212529;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none; 
}
.custom-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}
.map-point:hover .custom-tooltip {
    visibility: visible;
    opacity: 1;
}
.pos-1 { top: 23%; left: 32%; }
.pos-2 { top: 33%; left: 32%; }
.pos-3 { top: 40%; left: 35%; }
.pos-4 { top: 43%; left: 38%; }
.pos-5 { top: 51%; left: 37%; }
.pos-6 { top: 50%; left: 48%; }
.pos-7 { top: 62%; left: 42%; }
.pos-8 { top: 67%; left: 40%; }

/* SEKCE RÁDIO - Přehrávač pro rádio, Nastavení vzhledupřehrávače, Zajištění správné velikosti a pozice  přehrávače ------------------------------------------------------------------------------ */

.medieval-radio-container {
    position: fixed;
    bottom: 0px;
    right: 0px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    transition: bottom 0.3s ease;
}
.parchment-bg {
    background-color: #e4d1b9;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(0,0,0,0.05) 100%), url('https://www.transparenttextures.com/patterns/old-map.png');
    border: 1px solid #c4b494;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    width: 260px;
    box-shadow: -5px 5px 20px rgba(0,0,0,0.4);
    color: #4a332d;
    display: none;
}
.radio-expanded.active { 
    display: block; 
    animation: medievalSlideIn 0.3s ease-out; 
}
.controls-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}
        .controls-center button {
            background: none;
            border: none;
            color: #4a332d;
            padding: 0;
        }
.nav-btn { 
    font-size: 2rem; 
}
.main-play { 
    font-size: 3.5rem; 
}
.medieval-range {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    width: 100%;
}
        .medieval-range::-webkit-slider-runnable-track {
            background: rgba(74, 51, 45, 0.2);
            border-radius: 10px;
            height: 6px;
        }
        .medieval-range::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            height: 16px;
            width: 16px;
            background: #4a332d;
            border-radius: 50%;
            margin-top: -5px;
        }
        .medieval-range::-moz-range-track { 
            background: rgba(74, 51, 45, 0.2); 
            height: 6px; 
            border-radius: 10px; 
        }
        .medieval-range::-moz-range-thumb { 
            background: #4a332d; 
            border: none; 
            height: 16px; 
            width: 16px; 
            border-radius: 50%; 
        }
.volume-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}
.vol-slider { 
    width: 100px !important; 
}
.track-info-mini {
    font-size: 0.95rem;
    font-weight: bold;
    border-bottom: 1px dashed rgba(74, 51, 45, 0.3);
    padding-bottom: 8px;
    margin-bottom: 15px;
}
.time-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-top: 5px;
    font-weight: bold;
}
.radio-trigger-clean {
    background: none;
    border: none;
    width: 120px;
    height: 120px;
}
        .radio-trigger-clean img { 
            width: 100%; 
            height: 100%; 
            object-fit: contain; 
        }
@keyframes medievalSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SEKCE S LOADEREM - Vytvoření loaderu s animací, Zajištění správné pozice a zobrazení loaderu -----------------------------------------------------------------------------------------------------*/ 

#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5e6d3; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000; 
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader-medieval {
    position: relative;
    width: 100px;
    height: 100px;
}
.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 8px solid rgba(121, 4, 9, 0.1); 
    border-top: 8px solid #790409; 
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
.loader-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: auto;
    filter: sepia(0.5);
}
.loader-text {
    margin-top: 20px;
    font-family: "Eagle Lake", serif;
    color: #4a0404;
    font-size: 1.2rem;
    letter-spacing: 2px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

/* Modální okna GDPR --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

.cookie-simple-bar {
    position: fixed;
    bottom: -150px;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: #740609 !important;
    padding: 15px 0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
    transition: bottom 0.5s ease-in-out;
}
        .cookie-simple-bar.show-cookie-bar {
            bottom: 0 !important;
        }
.custom-parchment-box {
    background-color: #e4d1b9;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(0,0,0,0.05) 100%), url('https://www.transparenttextures.com/patterns/old-map.png');
    border-radius: 30px 240px 15px 180px / 180px 15px 240px 30px !important;
    box-shadow: inset 0 0 80px rgba(89, 62, 26, 0.35), 2px 3px 20px rgba(0,0,0,0.2), 0 20px 50px rgba(0,0,0,0.5) !important;
    border: 1px solid rgba(139, 115, 85, 0.4) !important;
    position: relative;
    overflow: hidden;
}
.modal-body.p-4.p-md-5 {
    padding: 3.5rem !important; 
}
.modal-title-medieval {
    color: #4a0404; 
    font-weight: bold;
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 25px;
    text-align: center;
}
.modal-text-content {
    color: #2c1a05; 
    line-height: 1.6; 
    font-size: 1.05rem;
    text-align: left;
}
.modal-text-content .lead {
    font-size: 1.15rem;
    font-style: italic;
    margin-bottom: 25px;
    opacity: 0.95;
}
.medieval-section {
    margin-bottom: 25px;
}
        .medieval-section h5 {
            font-size: 1.2rem;
            font-weight: bold;
            color: #4a0404;
            margin-bottom: 10px;
        }
        .medieval-section ul {
            list-style-type: none;
            padding-left: 15px;
        }
        .medieval-section ul li {
            position: relative;
            padding-left: 20px;
            margin-bottom: 8px;
        }
                .medieval-section ul li::before {
                    content: "•"; 
                    position: absolute;
                    left: 0;
                    color: #8b7355;
                    font-weight: bold;
                }
.medieval-section strong {
    color: #4a0404;
    font-variant: small-caps;
}
.modal-footer-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; 
    padding: 20px 0;
    width: 100%;
}
.img-btn-link {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    width: 35%; 
    max-width: 180px;
    min-width: 120px;
    transition: transform 0.2s ease-in-out;
}
        .img-btn-link img {
            width: 100%;
            height: auto;
            filter: sepia(0.2) drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
        }
        .img-btn-link:hover {
            transform: scale(1.08);
        }
#cookieSettingsModal .img-btn-link {
    width: 45%; 
    max-width: 220px; 
}

/* FOOTER -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

#responseMessage{
    display: none;
    color: green; 
    font-weight: bold; 
    margin-top: 10px;
}
#questionForm .form-control {
    background-color: transparent !important; 
    border-radius: 2px;                                      
    padding: 12px;
    box-shadow: inset 0 0 15px rgba(139, 115, 85, 0.2);
    padding-bottom: 2.5em;
}
#questionForm .btn {
    background-color: #921a1d;         
    color: #f1e9d2;
    padding: 10px;
    border-radius: 4px;
}
#historical-map {
    height: 270px; 
    width: 100%;
    border-radius: 10px;
    filter: sepia(0.4) contrast(1.1) brightness(0.9);
}
.socky-icon {
    width: 50px;     
    height: 50px;    
    object-fit: contain; 
    transition: transform 0.2s ease;
    display: block;   
}
a:hover .socky-icon {
    transform: scale(1.15); 
}
footer a, 
.footer-link {
    color: inherit !important;
    text-decoration: none !important;
}

/* MEDIA QUERIES ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

@media (max-width: 768px) {
    .hero-nadpis {
        font-size: 2rem;
        letter-spacing: 4px;
    }
    .hero-divider {
        width: 40px;
    }
        .modal-body.p-4.p-md-5 {
        padding: 2rem !important;
    }
    .modal-title-medieval {
        font-size: 1.4rem;
    }
    .custom-parchment-box {
        border-radius: 15px !important;
    }
}
@media (max-width: 991px) {
    .navbar-toggler {
        z-index: 1100 !important;
        position: relative !important;
    }
    .navbar-collapse {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        padding-top: 3em !important;
        padding-left: 1.5em !important;
        background: rgba(0, 0, 0, 0.4) !important;
        backdrop-filter: blur(12px) !important;
        display: block !important; 
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.4s ease, visibility 0.4s ease !important;
    }
    .navbar-collapse.show, 
    .navbar-collapse.collapsing {
        visibility: visible !important;
        opacity: 1 !important;
    }
    .navbar-collapse.collapsing {
        height: 100vh !important;
        transition: opacity 0.4s ease !important;
    }
    .parchment-frame{
        background: none !important;
    }
}
@media (min-width: 768px) {
    #line-rytir {
        margin-left: 35% !important; 
    }
    #line-nekdo {
        margin-left: 15% !important; 
    }
}
@media (max-width: 769px) {
    .character-img {
        max-height: 200px;
        align-items: center;
        padding-left: 0;
        animation: none;
    }
}

/* Kompletní dekonstrukce 3D knihy na plochý vertikální seznam pro mobilní zařízení. ----------------------------------------------------------------------------------------------------------------*/

@media (max-width: 768px) {
    .parchment-frame {
        height: auto;
        padding: 40px 10px;
        background: none;
    }
    .book-viewport {
        width: 100%;
        height: auto;
        margin-left: 0;
        perspective: none; 
    }
    .book-container {
        display: flex;
        flex-direction: column; 
        gap: 20px;
    }
    .page, .page-static-left, .page-static-right {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        left: 0 !important;
        transform: none !important; 
        box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
        display: block !important;
        margin-bottom: 10px;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .front, .back {
        position: relative !important;
        transform: none !important;
        backface-visibility: visible !important;
        display: block !important;
        width: 100% !important;
        height: auto !important;
        padding: 30px 20px !important;
        border-bottom: 2px dashed #d3c4a8; 
    }
    .back {
        border-radius: 0 0 5px 5px !important;
    }
    .front {
        border-radius: 5px 5px 0 0 !important;
        border-bottom: none !important;
    }
    .page-shadow {
        display: none !important;
    }
    .page:has(.front:empty) {
        display: none !important;
    }
    .mapa{
        display: none;
    }
    .radio-trigger-clean{
        display: none;
    }
}

@media (min-width: 769px) {
    summary {
        pointer-events: none;
        cursor: default;
        display: block;
    }
    summary::after {
        display: none !important;
    }
    .content-wrapper {
        display: block;
    }
}