/* Globální scaling pro mobilní zařízení - aby design dýchal */
html {
    font-size: 93%; /* O něco menší základ pro mobil */
}

@media (min-width: 768px) {
    html {
        font-size: 100%; /* Návrat k standardu na desktopu */
    }
}

/* Úprava kontejnerů pro větší boční prostor na mobilu */
.max-w-7xl {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

@media (min-width: 768px) {
    .max-w-7xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Jemnější nadpisy na mobilu */
h1 { font-size: 2.25rem !important; line-height: 1.2 !important; }
h2 { font-size: 1.875rem !important; line-height: 1.3 !important; }

@media (min-width: 768px) {
    h1 { font-size: 3rem !important; }
    h2 { font-size: 2.5rem !important; }
}

/* Custom scrollbar pro hezčí vzhled */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #F9F8F6;
}
::-webkit-scrollbar-thumb {
    background: #8C7B6C;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2C2A26;
}

/* Skrytí scrollbaru pro horizontální navigaci */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Sub-filter styles */
.sub-filter-btn {
    padding: 0.6rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #f3f4f6; /* gray-100 */
    color: #4b5563; /* gray-600 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .sub-filter-btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.875rem;
    }
}

.sub-filter-btn:hover {
    background-color: #e5e7eb; /* gray-200 */
    color: #111827; /* gray-900 */
}

.sub-filter-btn.active {
    background-color: #2C2A26; /* primary */
    color: white;
    box-shadow: 0 4px 12px rgba(44, 42, 38, 0.2);
}

.sub-filter-container.show {
    opacity: 1;
    transform: translateY(0);
}

.sub-filter-container {
    transform: translateY(10px);
}

.main-filter-btn.active {
    background-color: white;
    color: #2C2A26;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Lightbox navigation improvements */
.lightbox-info {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    max-width: 80%;
}

.lightbox-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

/* Smooth transitions for navigation */
.nav-link {
    transition: color 0.3s ease;
}

/* Page transitions */
.page-transition {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Portfolio Grid Styles */
.portfolio-grid {
    transition: height 0.5s ease-in-out;
}

.portfolio-item {
    margin-bottom: 24px;
    break-inside: avoid-column;
}

.portfolio-item a {
    display: block;
    overflow: hidden;
    border-radius: 1.5rem; /* rounded-3xl */
    position: relative;
}

.portfolio-item-image-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.portfolio-item--height1 .portfolio-item-image-wrapper {
    padding-top: 75%; /* 4:3 Aspect Ratio */
}

.portfolio-item--height2 .portfolio-item-image-wrapper {
    padding-top: 125%; /* 4:5 Aspect Ratio */
}

.portfolio-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.portfolio-item.is-loading {
    opacity: 0;
}

.portfolio-item.is-loaded {
    animation: fadeInItem 0.5s ease-in-out forwards;
}

@keyframes fadeInItem {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 30px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.lightbox-counter {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-info {
        bottom: 20px;
        padding: 10px 20px;
        font-size: 14px;
    }
}
