/* pages/gallery-style.css */

@font-face {
    font-family: "Fixedsys";
    src: url("../Fonts/Fixedsys Excelsior 3.01 Regular/Fixedsys Excelsior 3.01 Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden; /* Zabráníme scrollování celého body, scroll bude v gallery-content */
    background-color: #fff;
    font-family: 'Inter', sans-serif;
}

/* Zajištění skrytí kurzoru i na interaktivních prvcích */
a, button, .filter-item, .gallery-item {
}

main {
    padding-top: 30px;
    height: calc(100vh - 30px);
    display: flex;
    flex-direction: column;
}

/* Header styly (přeneseno ze style.css) */
.block-header {
    --block-header-height: 1.875rem;
    width: 100%;
    height: 1.875rem;
    border-bottom: 1px dashed #ccc;
    box-sizing: border-box;
    text-align: left;
    padding-left: 0.625rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-family: "Fragment Mono", monospace;
    background: #ffffff;
}

.block-header-1 {
    border-left: 3px solid #ff790b;
}

.header-icon-container {
    width: 1.125rem;
    height: 1.125rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 0.625rem;
    flex-shrink: 0;
}

.header-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.block-header-title {
    font-weight: 100;
    font-size: 0.5625rem;
    transition: font-size 0.25s ease;
    letter-spacing: -0.05em;
    color: #000000;
    text-transform: uppercase;   
    flex-shrink: 0;
}

.block-header-extra {
    margin-left: 0.3125rem;
    font-size: 0.5625rem;
    transition: font-size 0.25s ease;
    font-weight: 200;
    color: #888;
    text-transform: uppercase;   
    flex-shrink: 0;
    letter-spacing: -0.05em;
}

.header-center-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Fragment Mono', monospace;
    font-size: 0.5625rem; /* Sjednoceno s .block-header-title */
    transition: font-size 0.25s ease;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    color: #000;
}

.header-back-link {
    text-decoration: none;
    color: inherit;
    font-family: 'Fragment Mono', monospace;
    font-size: 0.5625rem; /* Sjednoceno s .block-header-title */
    text-transform: uppercase;
    letter-spacing: -0.05em;
    transition: color 0.1s ease, font-size 0.25s ease;
}

.header-back-link:hover {
    color: #747474 !important;
}

/* Gallery header – fixní pozice, rozložení */
.gallery-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 20px;  
    padding-right: 20px;  
    box-sizing: border-box;
    transition: height 0.25s ease;
}
.gallery-header:hover {
    height: 3.75rem;
}


.gallery-header .header-left {
    display: flex;
    align-items: center;
}

.gallery-header .header-icon-container {
    width: 1.125rem;
    height: 1.125rem;
    transition: width 0.25s ease, height 0.25s ease;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-header .header-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Filtry (těch 15 % výšky) – flex-shrink: 0 zabrání zmizení při reloadu */
.gallery-filters {
    height: 15%;
    min-height: 60px;
    border-bottom: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    color: rgb(151, 151, 151);
    text-transform: uppercase;
    font-size: 2rem;
    font-weight: 400;
    gap: 1rem;
    font-family: 'Inter', sans-serif;
    border-bottom: 1px solid #ccc;

}
main:has(.gallery-content.project-scroll) .gallery-filters {
    border-bottom: 1px solid #ccc;
    height: 0%;
}

/* V režimu Projects skrýt filtry kromě ALL (opacity transition) */
.gallery-filters .filter-item:not(.filter-all) {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease, opacity 0.3s ease;
}
main:has(.gallery-content.project-scroll) .gallery-filters .filter-item {
    opacity: 0;
    pointer-events: none;
    position: absolute; /* Zmizí z toku a nepřekáží přepínači */
    visibility: hidden;
}

#layoutSwitch {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: default;
    border-left: 1px solid #cccccc00;
    padding-left: 1.5rem;
}

.layout-switch .switch-label {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    color: rgb(151, 151, 151);
    text-transform: uppercase;
    transition: color 0.3s ease;
    cursor: pointer;
    display: inline-block;
    will-change: transform;
}

.layout-switch .switch-label.is-active {
    color: #000;
    cursor: default;
    pointer-events: none;
}

/* Animace pro Grid (povyskočení dolů) */
@keyframes grid-pop {
    0% { transform: translateY(0) scale(1); }
    30% { transform: translateY(8px) scale(1.1); }
    60% { transform: translateY(-2px) scale(0.95); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Animace pro Projects (povyskočení nahoru) */
@keyframes projects-pop {
    0% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-8px) scale(1.1); }
    60% { transform: translateY(2px) scale(0.95); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.animate-grid {
    animation: grid-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.animate-projects {
    animation: projects-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.layout-switch-svg {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layout-switch-svg-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    justify-items: center;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.layout-switch-svg svg {
    width: 100%;
    height: 100%;
}

.filter-item {
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
    display: inline-block;
}

.filter-item:hover {
    transform: translateY(-3px);
}

.filter-item:active {
    transform: translateY(-1px);
}

/* Aktivní filtr */
.filter-item.is-active {
    color: rgb(0, 0, 0);
}

/* Obsah galerie (zbývající výška) */
.gallery-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0px 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 50px;
    transition: all 0.5s ease;
    padding-bottom: 10vh;
}

/* Gallery footer – na spodku v režimu Projects (přidává se JS) */
.gallery-footer {
    padding-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.gallery-footer .block-thats-all {
    opacity: 0.5;
    width: 20%;
    display: block;
}

/* Režim Project Scroll */
.gallery-content.project-scroll {
    gap: 80px; /* Mezera mezi projekty */
    padding-top: 40px;
}

.gallery-content.project-scroll .gallery-row {
    align-items: flex-start;
    padding-left: 20px;
    box-sizing: border-box;
    position: relative;
    padding-top: 60px; /* Zvětšeno z 30px pro větší mezeru mezi nadpisem a obrázky */
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Zvětšený stav řádku */
.gallery-content.project-scroll .gallery-row.is-expanded {
    padding-left: 600px; /* Zvětšeno pro oba sloupce textu */
    margin: 40px 0;
}

.gallery-content.project-scroll .gallery-row.is-expanded .gallery-item {
    height: 50vh; /* Zvětšení obrázků při rozkliknutí */
    border: 1px solid #ffffff;
}
.gallery-content.project-scroll .gallery-row.is-expanded .gallery-item:hover {
    border-color: #ccc;
}



/* Kontejner pro detaily projektu */
.project-details {
    position: absolute;
    left: 40px;
    top: 100px;
    display: flex;
    gap: 40px; /* Mezera mezi sloupci meta a description */
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 120px;
}

.project-description {
    max-width: 300px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #333;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.description-label {
    font-size: 0.6rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.description-text {
    color: #000;
    padding-right: 5rem;
}

.gallery-row.is-expanded .project-details {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.detail-item {
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
}

.detail-label {
    font-size: 0.6rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.detail-value {
    font-size: 1rem;
    color: #000;
    font-weight: 600;
    text-transform: uppercase;
}

/* Popping animace pro jednotlivé položky */
.gallery-row.is-expanded .detail-item,
.gallery-row.is-expanded .project-description {
    opacity: 0; /* Výchozí stav pro animaci */
    animation: detail-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.gallery-row.is-expanded .detail-item:nth-child(1) { animation-delay: 0.2s; }
.gallery-row.is-expanded .detail-item:nth-child(2) { animation-delay: 0.3s; }
.gallery-row.is-expanded .detail-item:nth-child(3) { animation-delay: 0.4s; }
.gallery-row.is-expanded .detail-item:nth-child(4) { animation-delay: 0.5s; }
.gallery-row.is-expanded .project-description { animation-delay: 0.7s; }

@keyframes detail-pop {
    0% { opacity: 0; transform: scale(0.5) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.project-title {
    position: absolute;
    top: 0;
    left: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    text-transform: uppercase;
    color: #000;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 15px;
}

.project-info-btn {
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.project-info-btn:hover {
    transform: scale(1.1);
}

.gallery-content:not(.project-scroll) .project-title {
    display: none;
}

.project-info-btn svg {
    width: 100%;
    height: 100%;
}

.gallery-content.project-scroll .gallery-item {
    aspect-ratio: auto; /* Zrušíme čtverec */
    height: 35vh; /* Nastavíme fixní výšku, aby řádek byl zarovnaný */
    flex: 0 0 auto; /* Šířka se přizpůsobí obsahu */
    width: auto;
    background: transparent;
}

.gallery-content.project-scroll .gallery-item img,
.gallery-content.project-scroll .gallery-item video {
    height: 100%; /* Vyplní výšku boxu */
    width: auto;
    object-fit: contain;
    display: block;
}

.gallery-content.project-scroll .gallery-item video {
    background: #ffffff;
}

.gallery-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    width: 100%;
    transition: all 0.4s ease;
}

/* Nový kontejner pro obrázky v Project módu */
.project-images-strip {
    position: relative;
    width: 100%;
    height: 35vh;
    display: flex;
    align-items: center;
}

.gallery-content.project-scroll .gallery-row.is-expanded .project-images-strip {
    height: 50vh;
}

.gallery-row-images {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    width: 100%;
    overflow-x: hidden; /* Skryje scrollbar a znemožní scroll myší */
    overflow-y: hidden;
    scroll-behavior: smooth;
}

/* Tlačítko pro posun */
.scroll-prev-btn,
.scroll-next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateZ(0) scale(1);
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 20;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: none; /* Defaultně skryté, zobrazí se jen v project módu */
    backface-visibility: hidden;
}

.scroll-prev-btn {
    left: 20px;
}

.scroll-prev-btn svg {
    transform: scaleX(-1); /* zrcadlení šipky doleva */
    shape-rendering: geometricPrecision;
}

.scroll-next-btn {
    right: 20px;
}

.gallery-content.project-scroll .gallery-row.is-expanded .scroll-prev-btn,
.gallery-content.project-scroll .gallery-row.is-expanded .scroll-next-btn {
    display: block;
}

/* Overlay na hover při at-start */
.project-images-strip .strip-overlay {
    --overlay-svg-color-dark: #202020;
    --overlay-svg-color-light: #fff;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.685);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 25;
}
.project-images-strip .strip-overlay .overlay-svg {
    width: 80px;
    height: auto;
}
.project-images-strip .strip-overlay .overlay-shape-dark {
    fill: var(--overlay-svg-color-dark);
}
.project-images-strip .strip-overlay .overlay-shape-light {
    fill: var(--overlay-svg-color-light);
}
.project-images-strip.at-start:hover .strip-overlay {
    opacity: 1;
}
.gallery-row.is-expanded .project-images-strip.at-start:hover .strip-overlay {
    opacity: 0;
}

/* Na začátku skryj levé tlačítko */
.project-images-strip.at-start .scroll-prev-btn {
    opacity: 0;
    transform: translateY(-50%) translateZ(0) scale(0.5);
    pointer-events: none;
}

/* Na konci skryj pravé tlačítko */
.project-images-strip.at-end .scroll-next-btn {
    opacity: 0;
    transform: translateY(-50%) translateZ(0) scale(0.5);
    pointer-events: none;
}

.scroll-next-btn svg,
.scroll-prev-btn svg {
    width: 100%;
    height: 100%;
    shape-rendering: geometricPrecision;
}

.scroll-prev-btn:active,
.scroll-next-btn:active {
    transform: translateY(-50%) translateZ(0) scale(0.9) !important;
    opacity: 1;
}

.scroll-prev-btn:hover {
    opacity: 1;
    transform: translateY(-50%) translateZ(0) scale(1.1);
}

.scroll-next-btn:hover {
    opacity: 1;
    transform: translateY(-50%) translateZ(0) scale(1.1);
}

/* Hover neaplikovat když je tlačítko skryté */
.project-images-strip.at-start .scroll-prev-btn:hover,
.project-images-strip.at-end .scroll-next-btn:hover {
    opacity: 0;
    transform: translateY(-50%) translateZ(0) scale(0.5);
}

.gallery-item {
    flex: 1;
    min-width: 0;
    background: #f0f0f0;
    position: relative;
    /* overflow: hidden; */ /* Odstraníme overflow: hidden, aby text mohl vyjet ven */
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: 
        transform 0.1s cubic-bezier(0.33, 1, 0.68, 1), 
        opacity 0.4s ease, 
        filter 0.4s ease,
        box-shadow 0.4s ease;
    transform-origin: top center;
}

/* REAKCE OSTATNÍCH: Když se najede na řádek, vše se ztlumí */
.gallery-row:hover .gallery-item {
    opacity: 1;
    transform: scale(1);
    filter: grayscale(0);
}

/* VÝJIMKA PRO HOVER: Ten pod myší se zvětší směrem dolů a mírně se posune */
.gallery-row:hover .gallery-item:hover:not(.is-filtering-out) {
    opacity: 1;
    transform: scale(1) translateY(0px);
    filter: grayscale(0);
    z-index: 10;
}

/* Zakázání hover efektu v režimu Projects */
.project-scroll .gallery-row:hover .gallery-item {
    opacity: 1;
    transform: none;
    filter: none;
}

.project-scroll .gallery-row:hover .gallery-item:hover {
    transform: none;
    flex: 0 0 auto; /* Vrátíme flex na původní hodnotu v Projects módu */
}

/* Hover efekt pro obrázky v rozbaleném projektu */
.gallery-content.project-scroll .gallery-row.is-expanded .gallery-item:hover {
    
    z-index: 10;
}

.project-scroll .gallery-item:hover .gallery-item-info {
    display: none; /* Skryjeme i info text v Projects módu, pokud byl požadován bez hoveru */
}

/* Položky, které nejsou v aktivním filtru, nebudou reagovat na hover */
.gallery-item.is-filtering-out {
    pointer-events: none;
}

/* Info text, který vyjede pod obrázek */
.gallery-item-info {
    position: absolute;
    top: 100%; /* Umístíme pod obrázek */
    left: 0;
    width: 100%;
    background: transparent;
    padding: 5px 0;
    box-sizing: border-box;
    transform: translateY(-5px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.33, 1, 0.68, 1);
    display: flex;
    flex-direction: column;
    gap: 0px;
    z-index: 2;
    pointer-events: none;
}

.gallery-item:hover .gallery-item-info {
    transform: translateY(0);
    opacity: 1;
}

.info-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem; /* Zvětšeno z 0.7rem */
    font-weight: 600;
    color: #111111;
    text-transform: uppercase;
}

.info-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem; /* Zvětšeno z 0.55rem */
    color: #888;
    text-transform: uppercase;
}

/* Overlay čáry na kurzoru */
.overlay-lines-orange {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

.cursor-follower {
    position: fixed;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    will-change: transform;
    z-index: 1001;
}

.overlay-line-v {
    position: absolute;
    top: -100vh;
    height: 200vh;
    width: 1px;
    background: #dfdfdfc2;
    left: 0;
}

.overlay-line-h {
    position: absolute;
    top: 0;
    left: -100vw;
    width: 200vw;
    height: 1px;
    background: #dfdfdfc2;
}

.overlay-circle {
    position: absolute;
    left: 0;
    top: 0;
    width: 40vmin;
    height: 40vmin;
    border-radius: 50%;
    border: 1px solid #dfdfdfc2;
    background: transparent;
    transform: translate(-50%, -50%);
}

/* Pulsing animace (světlo) - pouze pro položky s obrázkem, co se ještě načítají */
.gallery-item:not(.is-empty):not(.is-loaded)::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    animation: loading-pulse 1.5s infinite;
}

@keyframes loading-pulse {
    100% { left: 100%; }
}

/* Prázdné místo */
.gallery-item.is-empty {
    background: transparent;
    cursor: default;
}

.gallery-item.is-empty:hover {
    transform: none;
    box-shadow: none;
    opacity: 1;
}

.gallery-item.is-empty::after {
    display: none;
}

/* Když je obrázek načtený */
.gallery-item.is-loaded {
    background: transparent;
    aspect-ratio: auto;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-item.is-loaded img,
.gallery-item.is-loaded video {
    opacity: 1;
}

/* Efekt pro zvýraznění kategorií (filtrování) */
.gallery-content.is-filtering .gallery-item {
    opacity: 0.25;
    filter: grayscale(0.8);
}

.gallery-content.filter-design .gallery-item[data-tag="Design"],
.gallery-content.filter-architecture .gallery-item[data-tag="architecture"],
.gallery-content.filter-uxui .gallery-item[data-tag="UX/UI"],
.gallery-content.filter-others .gallery-item[data-tag="others"] {
    opacity: 1;
    filter: grayscale(0);
}

/* V Projects režimu nikdy netlumit – fotky vždy ostře */
.gallery-content.project-scroll .gallery-item {
    opacity: 1;
    filter: none;
}

/* Popup okno pro média */
.media-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.637);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.media-popup.is-active {
    display: flex;
    opacity: 1;
}

.popup-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content img,
.popup-content video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.popup-close {
    position: absolute;
    top: 30px;
    right: 40px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 2001;
    transition: transform 0.3s ease;
}

.popup-close:hover {
    transform: scale(1.1);
}

.popup-close svg {
    width: 100%;
    height: 100%;
}

/* Custom scrollbar (scroll je na main) */
main::-webkit-scrollbar {
    width: 6px;
}

main::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

main::-webkit-scrollbar-track {
    background: transparent;
}

/* =========================================
   MEDIA QUERIES PRO MOBILNÍ ZAŘÍZENÍ
   ========================================= */
@media (max-width: 768px) {
    /* Zajištění, že stránka nepřeteče horizontálně */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    main {
        overflow-x: hidden;
    }

    /* Úprava mezer pro mobilní zařízení v režimu Grid */
    .gallery-content {
        padding-top: 0px;
        gap: 20px;
        overflow-x: hidden;
        width: 100%;
        box-sizing: border-box;
    }

    .gallery-content.project-scroll {
        padding-top: 0px;
        gap: 40px;
    }

    .scroll-prev-btn, .scroll-next-btn{
        display: none !important;
    }
  
    
    .gallery-content:not(.project-scroll) .gallery-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px; /* Menší mezery mezi obrázky v řádku */
        width: 100%;
        box-sizing: border-box;
    }

    .gallery-content:not(.project-scroll) .gallery-item {
        aspect-ratio: 1 / 1;
        width: 100%;
        height: auto;
    }

    .description-text{
        padding-right: 3rem;
        display:  inline-block;
        text-align:  justify;


    }

    .layout-switch-svg-inner{
        rotate:180deg;
    }

    /* Filtry vedle sebe s možností zalomení */
    .gallery-filters {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        height: auto;
        padding-top: 20px;
        padding-bottom: 20px;
        gap: 5px;
        font-size: 1.5rem; /* Mírné zmenšení písma na telefonu */
    }

    #layoutSwitch {
        margin-left: 0;
        margin-top: 0px;
        padding-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
    
    .layout-switch .switch-label {
        font-size: 1.5rem; /* Zmenšení písma u přepínače na telefonu */
    }

    /* Na telefonu skryjeme úplně všechny filtry (i v Grid i Projects módu) */
    .gallery-filters .filter-item {
        display: none;
    }

    .gallery-filters {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    #layoutSwitch {
        margin-top: 0;
    }

    /* Skrytí overlay myši (kurzoru) na telefonu */
    .overlay-lines-orange {
        display: none !important;
    }

    /* Povolení posouvání prstem (swipování) obrázků v projektu na mobilu */
    .gallery-row-images {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    
    .gallery-row-images::-webkit-scrollbar {
        display: none;
    }
    
    .gallery-row-images {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    /* Zrušení velkého odsazení na mobilu v Project módu */
    .gallery-content.project-scroll .gallery-row.is-expanded {
        padding-left: 20px; /* Zpět na běžný padding, ne 600px */
        flex-direction: column; /* Aby texty a fotky byly pod sebou */
    }

    /* Úprava pozice a uspořádání detailů na mobilu */
    .project-details {
        left: 0;
        top: 0;
        gap: 40px;
        display: flex;
        flex-direction: row;
    }

    .gallery-content.project-scroll .gallery-row.is-expanded .project-images-strip {
        height: 35vh;
    }

    .gallery-content.project-scroll .gallery-row.is-expanded .gallery-item {
        height: 35vh;
    }

    /* Detaily zaberou místo (relative) až když se projekt rozklikne */
    .gallery-content.project-scroll .gallery-row.is-expanded .project-details {
        position: relative; 
        margin-top: 5px;
        margin-bottom: 20px;
    }

    .project-title {
        position: relative;
        left: 0;
        top: 0;
        margin-bottom: 10px;
        gap: 5px;
    }

    /* Zrušíme absolutní pozicování titulků a mezer nad ním na mobilu */
    .gallery-content.project-scroll .gallery-row {
        padding-top: 20px;
        flex-direction: column;
    }

    .gallery-footer .block-thats-all {
        opacity: 0.5;
        width: 60%;
        display: block;
    }

    .gallery-content.project-scroll .gallery-row.is-expanded .gallery-item:hover {
        border: 1px solid #ffffff00;
    }

    .gallery-content.project-scroll .gallery-row.is-expanded .gallery-item {
        border: 1px solid #ffffff00;
    }

}

