/* --- max-width: 1024px --- */
@media (max-width: 1024px) {
    .blanik-wrap, 
    .vaclav-bigtext-container {
        width: 85%;
        padding: 2rem;
    }

    .carousel-container {
        user-select: none; /* Zabrání výběru textu při swipu */
        -webkit-user-drag: none; /* Zabrání draggingu obrázků v Safari */
    }

    .main-text-section, 
    .blanik-container {
        padding: 4rem 2rem;
    }

    .vaclav-bigtext-container {
        margin-left: 2rem;
        flex-direction: column;
        height: auto;
    }

    .vaclav-text-container {
        width: 100%;
    }

    .rytiri-nadpis {
        font-size: 40px;
    }

    .carousel-track {
        width: 100%;
        height: 300px;
    }

    .brand-name {
        font-size: 2.5rem;
    }

    .card-label {
        font-size: 1.2rem;
    }

    .brand-name {
        font-size: 3rem;
    }
    
    .lev-image {
        width: 220px;
    }

    .mec-text {
        gap: 2rem;
        width: 95%; /* Vráceno na tvých 95 % */
    }

    .text-block p {
        font-size: 1rem;
    }

    footer {
        flex-wrap: wrap;
        height: auto;
        padding: 40px 5%;
        gap: 2rem;
        justify-content: center;
    }

    .contact-info {
        flex: 1 1 100%;
        text-align: center;
    }

    .footer-container {
        flex: 1 1 100%;
    }

    .scroll-window {
        height: 260px !important;
    }

    .slide {
        min-height: 260px !important;   /* srovnat s výškou okna */
        padding: 20px 16px !important;
    }

    .slide-text {
        font-size: 16px;
        line-height: 1.7;
    }

    .carousel-wrapper {
        height: auto !important;
        min-height: 520px;
    }

    .static-border-svg{
        display: none ;
    }

    /* Zrušení černých postranních přetahů */
    .carousel-wrapper::before,
    .carousel-wrapper::after {
        display: none !important;
    }

    .carousel-container {
        clip-path: none !important;
        height: auto !important;
        overflow: hidden;
    }

    .carousel-track {
        height: auto !important;
    }

    .card {
        height: auto !important;
        min-height: 480px;
        padding: 40px 20px;
    }

    .card-content {
        flex-direction: column !important;
        align-items: center !important;
        padding: 0 !important;
        gap: 1.5rem !important;
        width: 100% !important;
        text-align: center;
    }

    /* Image side – z absolutní na relativní layout */
    .card-image-side {
        flex: none !important;
        width: 100% !important;
        height: 220px !important;
        position: relative !important;
    }

    .card-image-side img {
        position: absolute !important;
        max-height: 190px !important;
        width: auto !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) rotate(-15deg) !important;
    }

    .card-image-side.small-image img {
        max-height: 130px !important;
    }

    .card-text-side {
        flex: none !important;
        width: 90% !important;
    }

    .card-text-side h3 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }

    .card-text-side p {
        font-size: 0.95rem;
        max-width: 100%;
        max-width: 350px;
    }

    .carousel-nav-btn {
        display: none !important;
    }

    .divider1{
        width: 60% !important;
    }

    .divider2{
        width: 60% !important;
    }
}

/* --- max-width: 768px --- */
@media (max-width: 768px) {
    .custom-cursor {
        display: none;
    }
    
    * {
        cursor: auto !important;
    }

    .navbar {
        z-index: 1000 !important;
        position: fixed !important;
        top: 10% !important;
        left: 35% !important;
        transform: translateY(-50%), translateX(-50%) !important;
        
        /* Reset původního pozadí, aby se nemlátilo s novým */
        background-image: none !important;
        background-color: transparent !important;
        
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
        width: 100px !important; 
        height: 40rem !important;
        padding: 40px 0 !important;
        gap: 1.5rem !important;
        flex-direction: row;
    }

    /* ── Rotační vrstva pro SVG dekor ── */
    .navbar::before {
        content: "" !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: -1 !important;
        
        background-image: url('../images/navbar-novy.svg') !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: 3.5rem !important;
        
        /* Otočení pouze této vrstvy (ikonek uvnitř se to nedotkne) */
        transform: rotate(90deg) !important;
        pointer-events: none !important;
    }

    .navbar-content {
        flex-direction: row !important;
        gap: 14px !important;
    }

    .navbar a svg {
        width: 24px !important;
        height: 24px !important;
    }

    /* ── Ikonky a interakce ── */
    .navbar a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: transform 0.3s ease !important;
    }

    .navbar a:hover {
        transform: scale(1.2) !important;
    }

    .navbar a:hover svg path {
        stroke: #ffbb00 !important;
        filter: drop-shadow(0 0 5px rgba(201, 168, 76, 0.6)) !important;
    }

    .antologie-nadpis { font-size: 20px; }
    .rytiri-nadpis { font-size: 32px; text-align: center; }

    .main-text-section, 
    .vaclav-text-section {
        height: auto;
        padding: 5rem 1rem;
    }

    .main-text-container {
        flex-direction: column;
        gap: 2rem;
    }

    .blanik-wrap {
        width: 95%;
        min-height: auto;
        margin-top: -2rem;
        border-radius: 30px;
    }

    .scroll-window {
        height: 250px;
    }

    .slide-text {
        font-size: 16px;
        line-height: 1.5;
    }

    .kone-container img {
        width: 90%;
    }

    .blanik-image img {
        height: 100vh;
    }

    .kone-container::before, 
    .vaclav-container::before, 
    .vaclav-text-container::before {
        width: 200%;
        filter: blur(50px);
    }

    .carousel-section {
        padding: 40px 0;
        perspective: 1500px; /* Snížená perspektiva pro menší displej */
    }

    .carousel-track {
        width: 75vw;  /* Karta je užší, aby zbylo místo na šipky po stranách */
        height: 200px; 
    }

    .card {
        border-radius: 15px;
    }

    /* Vypnutí hover efektu na dotykových zařízeních */
    .card.active:hover {
        transform: translate3d(0, 0, 100px) rotateY(0deg); /* Zrušení scale */
    }

    /* Šipky - posunutí blíže k okrajům a zvýraznění */
    .carousel-btn {
        font-size: 2.2rem;
        padding: 10px;
        z-index: 1001; /* Musí být nad kartami */
    }
    .prev-btn { left: 2%; }
    .next-btn { right: 2%; }

    /* Zmenšení a úprava textu uvnitř */
    .card-label {
        font-size: 0.9rem;
        left: 15px;
        top: 15px;
        max-width: 180px; /* Aby text nešel přes celou kartu */
    }

    .card-label.top-left .card-label-p {
        font-size: 0.6rem;
        margin-top: 4px;
        line-height: 1.2;
    }

    .card-button.bottom-right {
        padding: 5px 10px;
        font-size: 0.8rem;
        bottom: 12px;
        right: 12px;
    }

    /* Zmenšení obrázku, aby nevyčníval */
    .card img {
        max-width: 70%;
        transform: translateX(5%) translateY(-5%);
    }

    /* 3D pozice - boční karty jsou blíž, aby nepřetékaly z displeje */
    .card.prev { transform: translate3d(-30%, 0, -150px) rotateY(25deg); opacity: 0.4; }
    .card.next { transform: translate3d(30%, 0, -150px) rotateY(-25deg); opacity: 0.4; }

    footer {
        flex-direction: column; /* Prvky pod sebou */
        height: auto;           /* Výška se přizpůsobí obsahu */
        padding: 40px 20px;
        gap: 2rem;
        justify-content: center;
        margin-bottom: 5rem;
    }

    .footer-container {
        order: -1; /* Posune logo a název nahoru nad kontakty */
        flex: none;
        width: 100%;
    }

    .brand-name {
        font-size: 2.5rem;
        letter-spacing: 5px;
    }

    .lev-image {
        width: 180px;
    }

    .contact-info {
        flex: none;
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .social-icons img {
        width: 40px;
        height: 40px;
    }

    .mec-text {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        flex-direction: column;
        width: 80%; /* Vráceno na tvých původních 80 % */
        margin: 5rem auto;
        gap: 4rem;
        /* Odstranil jsem padding, který mohl deformovat pozadí */
    }

    .mec-text-container {
        gap: 4rem;
        width: 100%;
    }

    /* Linky sjednoceny vlevo, ale s tvým původním odsazením */
    .mec-text3 {
        text-align: left;
    }

    .mec-text3 .sub-heading::before {
        right: auto;
        left: -2rem; /* Vráceno na tvé hodnoty */
    }

    .mec-text3 .sub-heading::after {
        right: auto;
        left: -3rem; /* Vráceno na tvé hodnoty */
    }

    .antologie {
        margin-top: 4rem;
        min-height: 150vh;
    }

    .antologie-container h2 {
        font-size: 2.8rem; /* Ponecháno jen nutné zmenšení pro mobily */
        width: auto; 
    }

    /* Posuneme nadpis Antologie výše */
    .antologie-container {
        top: 10vh !important; /* Zmenšeno z 20vh/25vh na 10vh, aby byl nadpis výš */
    }

    /* Posuneme bloky s textem (Nález, Výzkum...) níže */
    .mec-text {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        flex-direction: column;
        width: 80%;
        /* Zvětšíme margin-top, aby se texty odsunuly od nadpisu dolů */
        margin: 15rem auto 5rem auto !important; 
        gap: 6rem; /* Trochu větší mezery mezi bloky pro vzdušnost */
    }

    .mec-text-container {
        gap: 6rem;
        width: 100%;
    }

    .mec-text3 {
        text-align: left;
    }

    .mec-text3 .sub-heading::before {
        right: auto;
        left: -2rem;
    }

    .mec-text3 .sub-heading::after {
        right: auto;
        left: -3rem;
    }

    footer {
        flex-direction: column;
        align-items: center;
        padding: 40px 20px;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .footer-container {
        order: -1;
        width: 100%;
    }

    .contact-info {
        font-size: 0.85rem;
        letter-spacing: 1px;
        opacity: 1; /* lépe čitelné na malém displeji */
    }

    .brand-name {
        font-size: 2.2rem;
        letter-spacing: 4px;
    }

    .lev-image {
        width: 160px;
    }

    .social-icons {
        gap: 20px;
    }

    .social-icons img {
        width: 38px;
        height: 38px;
    }

    .mec-wrapper {
        width: 60vw !important;
        max-width: 280px !important;
    }

    .carousel-wrapper {
        min-height: 460px;
    }

    .card {
        min-height: 440px;
        padding: 30px 16px;
    }

    .card-image-side {
        height: 180px !important;
    }

    .card-image-side img {
        max-height: 160px !important;
    }

    .card-image-side.small-image img {
        max-height: 110px !important;
    }

    .card-text-side h3 {
        font-size: 1.2rem;
    }

    .card-text-side p {
        font-size: 0.88rem;
        line-height: 1.55;
    }

    .card-btn {
        font-size: 0.85rem;
        padding: 8px 22px;
    }

    .divider1,
    .divider2 {
        margin: 16px 0;
    }

    .divider1 img,
    .divider2 img {
        width: 90%;
    }
}

/* --- max-width: 490px --- */
@media (max-width: 490px) {
    .carousel-section {
        padding: 30px 0;
    }

    .carousel-track {
        width: 70vw; 
        height: 150px; 
    }

    .card {
        border-radius: 12px;
        border-width: 1px;
    }

    .card-label {
        font-size: 0.75rem;
        left: 12px;
        top: 12px;
        line-height: 1.1;
        max-width: 140px;
    }

    .card-label.top-left .card-label-p {
        font-size: 0.55rem;
        margin-top: 2px;
    }

    .card-button.bottom-right {
        padding: 4px 8px;
        font-size: 0.65rem;
        bottom: 10px;
        right: 10px;
        border-radius: 10px;
    }

    .card img {
        max-width: 60%;
        transform: translateX(35%) translateY(-55%);
    }

    .carousel-btn {
        font-size: 1.6rem;
        padding: 5px;
        opacity: 0.7;
    }
    
    .prev-btn { left: 1%; }
    .next-btn { right: 1%; }

    .carousel-section h2 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    footer {
        padding: 30px 15px;
        gap: 1.5rem;
    }

    .brand-name {
        font-size: 2rem;
        letter-spacing: 3px;
    }

    .lev-image {
        width: 150px;
    }

    .copyright {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .contact-info {
        font-size: 0.75rem;
    }

    .header-cont img{
        width: 200vw;
    }
}

/* --- max-width: 480px --- */
@media (max-width: 480px) {
    .text-container .mobile-nadpis{
        display: block;
    }

    .vaclav-bigtext-container {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }

    .vaclav-1, .vaclav-2 {
        margin: 0;
    }

    .text-container h2 {
        font-size: 30px;
    }

    .dots {
        display: none;
    }

    footer {
        padding: 30px 15px;
        margin-bottom: 2rem;
    }

    .brand-name {
        font-size: 1.8rem;
        letter-spacing: 3px;
    }

    .lev-image {
        width: 130px;
    }

    .contact-info {
        font-size: 0.75rem;
    }

    .copyright {
        font-size: 0.65rem;
        letter-spacing: 2px;
        margin-top: 3px;
    }

    .navbar {
        width: 290px !important;
        gap: 0.8rem !important;
        padding: 10px 18px !important;
        left: 12%    !important;
    }

    .navbar a svg {
        width: 27px !important;
        height: 27px !important;
    }

    .scroll-window {
        height: 240px !important;
    }

    .slide {
        min-height: 240px !important;
        padding: 16px 12px !important;
    }

    .slide-text {
        font-size: 15px;
    }

    .mec-wrapper {
        width: 100vw !important;
    }

    .carousel-wrapper {
        min-height: 420px;
    }

    .card {
        min-height: 400px;
        padding: 24px 12px;
    }

    .card-image-side {
        height: 150px !important;
    }

    .card-image-side img {
        max-height: 135px !important;
    }

    .card-text-side {
        width: 100% !important;
        justify-content: center;
        align-items: center; 
        display: flex;
        flex-direction: column;
    }

    .card-text-side h3 {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

    .antologie-btn{
        text-align: center;
    }

    .antologie-btn-wrapper::before {
        left: -50px; /* Začíná vlevo */
        width: 100px;
    }

    .antologie-btn-wrapper::after {
        right: -50px; /* Končí vpravo */
        width: 100px;
    }

    .divider1{
        left: 50%;
    }
}

/* --- max-width: 400px --- */
@media (max-width: 400px) {
    .card.prev, .card.next {
        display: none !important;
    }
}

/* --- hover: none --- */
@media (hover: none) {
    .card.active:hover {
        transform: translate3d(0, 0, 100px) !important;
    }
    .carousel-btn:hover {
        transform: none !important;
    }
}