/* ============================================================
   1. ZÁKLADNÍ NASTAVENÍ MOJÍ STRÁNKY
   ============================================================ */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #000;
    color: white;
    overflow-x: hidden;
}

#loader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
}

#loader-video {
    width: 100%; height: 100%;
    object-fit: cover; 
}

/* ============================================================
   2. LOGO A NAVIGACE
   ============================================================ */
.fixed-corner-logo {
    position: fixed;
    top: 30px;
    left: 40px;
    width: 60px;
    height: auto;
    z-index: 1001;
    pointer-events: auto;
    opacity: 0.8;
    transition: all 0.4s ease;
    filter: brightness(1);
}

.fixed-corner-logo:hover {
    opacity: 1;
    transform: scale(1.1);
}

.main-nav {
    position: absolute; 
    top: 30px;
    right: 60px;
    z-index: 1000;
    background: none; 
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 45px;
}

.main-nav ul li a {
    font-family: 'MedievalSharp', cursive;
    text-decoration: none;
    color: #ffffff; 
    font-size: 1.3rem; 
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
}

.main-nav ul li a:hover {
    transform: scale(1.1);
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 0;
    height: 15px;
    background-image: url('menu/sword3.png'); 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    transition: width 0.5s ease-out; 
}

.main-nav ul li a:hover::after {
    width: 100%;
}

/* ============================================================
   3. PARALLAX SYSTÉM 
   ============================================================ */
.parallax-wrapper {
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 100px;
    perspective-origin: 50% 50%;
}

.parallax {
    position: relative;
    height: 100vh;
    transform-style: preserve-3d;
    z-index: -10;
}

.layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    pointer-events: none;
    backface-visibility: hidden;
    will-change: transform;
}


.layer1 { transform: translateZ(-190px) scale(3.0); }
.layer2 { transform: translateZ(-180px) scale(2.8); }
.layer3 { transform: translateZ(-150px) scale(2.5); }
.layer4 { transform: translateZ(-120px) scale(2.2); }
.layer5 { transform: translateZ(-90px) scale(1.9); }
.layer6 { transform: translateZ(-60px) scale(1.6); }


.layer-intro-text {
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    padding-top: 35vh; 
    transform: translateZ(-40px) scale(1.4);
}

.intro-text-content {
    text-align: center;
    width: 100%;
}

.intro-text-content h1 {
    font-family: 'MedievalSharp', cursive;
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 100;
    text-transform: none;
    letter-spacing: 2px;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 212, 255, 0.3);
    line-height: 1.2;
}


.layer8  { transform: translateZ(-20px) scale(1.2); }
.layer9  { transform: translateZ(-10px) scale(1.1); }
.layer10 { transform: translateZ(-5px) scale(1.05); }
.layer11 { transform: translateZ(0) scale(1); }

.video-layer { 
    transform: translateZ(0) scale(1); 
    z-index: 1; 
}
/* ============================================================
   4. STUDIO SINTRA - ČÁSTICE A TEXT
   ============================================================ */
.particle-morph-section {
    position: relative;
    width: 100%;
    height: 200vh;
    background: linear-gradient(
        to bottom,
        #000000 0%,
        #020408 15%,
        #0b1a2e 30%,
        #1b4f72 45%,
        #0b1a2e 80%,
        #020408 90%,
        #000000 100%
    );
    overflow: visible;
}

#particleCanvas {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
}

.particle-content {
    position: relative;
    z-index: 101;
    text-align: center;
    pointer-events: none;
    opacity: 0.6;
}

.pribeh-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.pribeh-text-overlay .overlay-inner {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    justify-content: left; 
    margin-left: 20%;
    box-sizing: border-box;
}

.phase {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    max-width: 380px; 
    transition: opacity 0.8s ease-in-out;
    pointer-events: auto;
}

.first-phase {
    opacity: 1;
}

.second-phase {
    position: absolute;
    top: 30%;
    left: 0%;
    width: 35%;
    text-align: left;
    z-index: 20;
    pointer-events: none;
}

#text-uvod h2 {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 900;
    font-size: 10rem;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: #ffffff;
    margin-bottom: 10px;
    margin-top: -20%;
}

#text-uvod p {
    font-family: 'Indie Flower', sans-serif !important;
    font-style: italic;
    font-weight: 100;
    font-size: 1.3rem;
    color: rgb(137, 194, 217);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.5px;
}

/* ============================================================
   5. SOCIÁLNÍ SÍTĚ, MAPA A DOVEDNOSTI
   ============================================================ */
.social-icons {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.social-icons a {
    color: rgba(204, 204, 204, 0.7);
    font-size: 1.4rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icons a:hover {
    color: rgb(137, 194, 217);
    transform: translateY(-3px);
}

.map-container {
    width: 100%;
    filter: grayscale(0) invert(0);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.map-container iframe {
    filter: grayscale(100%) invert(90%) contrast(150%) brightness(90%) sepia(10%);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 100%;
    max-width: 300px;
    height: 200px;
    margin-top: 10%;
}

.map-container span {
    display: block;
    margin-top: 8px;
    font-family: 'Roboto', sans-serif;
    font-weight: 100;
    font-style: italic;
    font-size: 0.8rem;
    color: rgb(137, 194, 217);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.map-container:hover {
    opacity: 1;
    transform: scale(1.02);
}

.map-container:hover iframe {
    filter: grayscale(100%) invert(95%) contrast(160%) brightness(100%);
}

.center-tags {
    position: fixed;
    top: 70%;
    left: 150%;
    transform: translate(-50%, -50%) rotate(-7deg);
    font-family: 'Indie Flower', sans-serif !important;
    font-weight: 300;
    font-style: italic;
    font-size: 2rem;
    color: rgb(137, 194, 217);
    white-space: nowrap;
    pointer-events: none;
    z-index: -1;
    letter-spacing: 0px;
}

#text-legenda h2 {
    font-family: 'MedievalSharp', cursive !important;
    font-size: 3.5rem;
    color: #ffffff;
    margin-bottom: 20px;
}

#text-legenda p {
    font-family: 'Inter', sans-serif !important;
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgb(137, 194, 217);
    font-style: normal;
    max-width: 450px;
}

.ig-link {
    display: inline-flex;
    align-items: center;
    color: rgb(255, 255, 255);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    transition: color 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.ig-link i, .ig-link svg {
    margin-right: 8px;
    font-size: 1.4rem;
}

.ig-link:hover {
    color: rgb(137, 194, 217);
    transform: translateY(-2px);
}

.skill-panel {
    position: absolute;
    bottom: -120%;
    right: -200%;
    text-align: right;
    pointer-events: auto;
}

.skill-panel h3 {
    font-family: 'MedievalSharp', cursive !important;
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    justify-items: end;
}

.skill-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: default;
    text-decoration: none;
}

.skill-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.adobe-ps:hover { 
    color: #31A8FF; 
    border-color: #31A8FF; 
    box-shadow: 0 0 15px rgba(49, 168, 255, 0.4);
}

.adobe-ai:hover { 
    color: #FF9A00; 
    border-color: #FF9A00; 
    box-shadow: 0 0 15px rgba(255, 154, 0, 0.4);
}

.adobe-pr:hover { 
    color: #EA77FF; 
    border-color: #EA77FF; 
    box-shadow: 0 0 15px rgba(234, 119, 255, 0.4);
}

.skill-item[title="HTML5"]:hover { 
    color: #E34F26; 
    border-color: #E34F26; 
    box-shadow: 0 0 15px rgba(227, 79, 38, 0.4);
}

.skill-item[title="CSS3"]:hover { 
    color: #1572B6; 
    border-color: #1572B6; 
    box-shadow: 0 0 15px rgba(21, 114, 182, 0.4);
}

.skill-item[title="JavaScript"]:hover { 
    color: #F7DF1E; 
    border-color: #F7DF1E; 
    box-shadow: 0 0 15px rgba(247, 223, 30, 0.4);
}

.final-statue-img {
    position: sticky;
    margin-top: 10%;
    left: 50%;
    transform: translate(-50%, -50%); 
    height: 100vh;
    width: auto;
    z-index: 2;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

/* ============================================================
   6. SEKCE 3D MODELY A INTERAKTIVNÍ POZADÍ
   ============================================================ */
.models-section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
    margin-top: -1px; 
    position: relative; 
    overflow: hidden;
    z-index: 1;
    background: linear-gradient(to bottom, 
        #00000069 0%,
        #131313 40%,
        #1a1a1a 60%,
        #000000 100%
    );
}

.models-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}

.models-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    position: relative;
    z-index: 10;
}

.models-title {
    font-family: 'MedievalSharp', sans-serif;
    font-weight: 900;
    font-size: 4rem;
    text-transform: uppercase;
    color: #ffffff;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: 2px;
}

.models-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.model-box {
    flex: 1;
    min-width: 300px;
    height: 450px;
    background: rgba(0, 0, 0, 0.2); 
    backdrop-filter: blur(5px);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.model-box:hover {
    transform: translateY(-10px);
    background: rgba(60, 60, 60, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

model-viewer {
    width: 100%;
    height: 80%;
    --poster-color: transparent;
}

.hover-backgrounds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.7s ease-in-out, transform 0.7s ease-out;
    filter: brightness(0.4) blur(3px);
    transform: scale(1.05);
}

.bg-image.bg1 { 
    background-image: url('galerie/helma.png'); 
    width: auto;
    height: 200px;
}
.bg-image.bg2 { background-image: url(''); }
.bg-image.bg3 { background-image: url(''); }

.models-section:has(#mo1:hover) .bg-image.bg1 { opacity: 1; transform: scale(1); }
.models-section:has(#mo2:hover) .bg-image.bg2 { opacity: 1; transform: scale(1); }
.models-section:has(#mo3:hover) .bg-image.bg3 { opacity: 1; transform: scale(1); }

#starsCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.model-link-text {
    text-decoration: none;
    margin-top: 15px;
    z-index: 20;
}

.model-link-text span {
    font-family: 'Nothing You Could Do', sans-serif;
    font-weight: 300;
    color: rgba(204, 204, 204, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    padding-bottom: 2px;
}

.model-link-text:hover span {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* ============================================================
   7. LEGENDA O BRUNCVÍKOVI (KAPITOLY A VIDEA)
   ============================================================ */
.legend-outer-wrapper {
    position: relative;
    width: 100%;
    min-width: 100vw; 
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, 
        #000000 0%, 
        #131313 40%, 
        #1a1a1a 60%, 
        #000000 100%
    );
    overflow: hidden;
}

#legendStarsCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    object-fit: cover; 
}

.legend-section {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    line-height: 1.6;
    font-family: 'MedievalSharp', cursive;
    padding: 0 20px;
}

.bruncvik-title {
    text-align: center;
    font-size: 4rem;
    font-weight: bold;
    color: #ffffff;
    margin: 60px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    left: 50%;
    position: relative;
    transform: translateX(-50%);
}

.chapter-row {
    display: flex;
    align-items: center;
    margin-bottom: 100px;
    gap: 50px;
    z-index: 3;
    position: relative;
}

.chapter-row.reverse {
    flex-direction: row-reverse;
}

.chapter-text {
    flex: 1;
    color: #ffffff;
}

.chapter-video {
    flex: 1;
    background: #000;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 8px;
    width: 100%;
    height: 400px;
    z-index: 2;
}

h3 { color: #555; margin-bottom: 5px; }
h4 { font-size: 3rem; margin-top: 0; color: #ffffff; margin-bottom: 0%; }
p { font-size: 1rem; color: #ffffff; }

/* ============================================================
   8. FOOTER 
   ============================================================ */
.bruncvik-footer {
    background-color: #000000;
    color: #ffffff;
    padding: 60px 0 20px 0;
    font-family: 'Arial', sans-serif;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 0 40px;
}

.footer-section.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-3d-model {
    width: 350px;
    height: 350px;
    outline: none;
    --progress-bar-color: transparent;
}

.company-full-name {
    margin-top: 10px;
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.footer-section.social {
    text-align: center;
}

.footer-section.social p {
    font-size: 0.8rem;
    letter-spacing: 3px;
    margin-bottom: 20px;
    color: #888;
}

.social-links {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.social-links a {
    color: #ffffff;
    font-size: 32px;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
}

.social-links a:hover {
    transform: scale(1.2);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 
                 0 0 20px rgba(255, 255, 255, 0.4);
}

.footer-bottom {
    max-width: 1200px;
    margin: 50px auto 0 auto;
    padding: 25px 40px 10px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-bottom-left, .footer-bottom-center, .footer-bottom-right {
    flex: 1;
}

.footer-bottom-left a {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-bottom-left a:hover {
    color: #fff;
}

.footer-bottom-center {
    text-align: center;
}

.footer-bottom-center p {
    font-size: 0.85rem;
    color: #666;
}

.footer-bottom-right {
    text-align: right;
}

.designer-tag {
    font-weight: bold;
    color: #999;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.phone-number a {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.phone-number a:hover {
    color: #fff;
}















/* ============================================================
   9. RESPONZIVITA (MOBILY A TABLETY)
   ============================================================ */
@media (max-width: 992px) {
    .models-grid {
        flex-direction: column;
        align-items: center;
        gap: 50px;
    }
    .model-box {
        width: 100%;
        max-width: 500px;
        height: 500px;
        background: rgba(30, 30, 30, 0.4);
        border-radius: 25px;
        padding: 20px;
    }
    model-viewer {
        width: 100%;
        height: 85%;
        -webkit-tap-highlight-color: transparent;
    }
    .model-link-text {
        margin-top: 10px;
        padding: 10px 20px;
    }
    .model-link-text span {
        font-size: 1.4rem;
        color: #ffffff;
        opacity: 1;
    }
    .main-nav {
        right: 30px;
    }
    .main-nav ul {
        gap: 25px;
    }
    .main-nav ul li a {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .fixed-corner-logo {
        top: 20px;
        left: 20px;
        width: 40px;
    }
    .particle-morph-section {
        height: 250vh; 
    }
    .pribeh-text-overlay .overlay-inner {
        margin-left: 0;
        justify-content: center;
        padding: 0 20px;
    }
    .phase {
        max-width: 95%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* PHASE 1 (Úvodní text) */
    #text-uvod h2 {
        font-size: 3rem;
        margin-top: 0;
        line-height: 1.1;
        color: #ffffff; 
    }
    #text-uvod p {
        font-size: 1rem;
        color: rgb(137, 194, 217);
        text-align: center;
    }

    /* PHASE 2 (Legenda) */
    .second-phase {
        position: relative;
        left: 0;
        top: 0;
        width: 100%;
        margin-top: 500px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #text-legenda h2 {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    #text-legenda p {
        font-size: 0.95rem;
        padding: 0 15px;
        margin-bottom: 20px;
    }

    /* SKILL PANEL */
    .skill-panel {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: 50px;
        margin-bottom: 40px;
        text-align: center;
        width: 100%;
        z-index: 100;
    }

    .skill-panel h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
        color: #fff;
    }

    .skills-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        max-width: 300px;
        margin: 0 auto;
    }

    .skill-item {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
        border-radius: 6px;
    }

    /* SEKCE VIDEÍ (KAPITOLY) - VŽDY POD SEBOU */
    .bruncvik-title {
        font-size: 2.2rem;
        margin: 40px 0;
    }

    .chapter-row, 
    .chapter-row.reverse {
        flex-direction: column; /* Zruší řazení vedle sebe */
        gap: 20px;             /* Mezera mezi textem a videem */
        margin-bottom: 70px;    /* Větší mezera mezi jednotlivými kapitolami */
        text-align: center;
    }

    .chapter-text {
        width: 100%;
        padding: 0 10px;
    }

    .chapter-text h4 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .chapter-video {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9; /* Zachová formát videa */
        max-width: 100%;
    }

    /* Ostatní */
    .center-tags {
        display: none;
    }

    .map-container iframe {
        height: 160px;
        margin-top: 30px;
    }

    .final-statue-img {
        height: 60vh;
        margin-top: 10%;
    }

    .footer-3d-model { 
        width: 180px; 
        height: 180px; 
    }
}

@media (max-width: 600px) {
    .main-nav ul {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }
    .main-nav ul li a {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #text-uvod h2 {
        font-size: 2.4rem;
    }
    .skill-panel {
        margin-top: 40px;
    }
    .chapter-text h4 {
        font-size: 1.5rem;
    }
    .skill-item {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}