/* Acohido Photography Styles */

/* ===== LAYOUT SHIFT PREVENTION (CLS Fix) ===== */
/* Prevent Cumulative Layout Shift by reserving space for images */
/* IMPORTANT: This preserves object-fit: cover and object-position functionality */
img[width][height] {
    height: auto;
}

/* Ensure slideshow containers maintain viewport height */
.uk-slideshow-items {
    min-height: 100vh;
}

/* CRITICAL: Do NOT add aspect-ratio CSS for slideshow images */
/* It would conflict with object-fit: cover and dynamic object-position */
/* The width/height attributes alone are sufficient for CLS prevention */

/* Small devices (mobile) */
@media (max-width: 640px) {
    .uk-slideshow-items {
        min-height: calc(100svh - 30px) !important;
    }
}

/* Medium devices (tablets) */
@media (min-width: 641px) and (max-width: 960px) {
    .uk-slideshow-items {
        min-height: calc(100dvh - 30px) !important;
    }
}

/* Large devices (desktops) */
@media (min-width: 961px) {
    .uk-slideshow-items {
        min-height: calc(100vh - 30px) !important;
    }
}

.aco-frame {
    position: relative;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    border: solid 15px rgb(255, 255, 255);
    overflow: hidden;
    z-index: 1;
    margin: 0;
}

/* Navigation Styles */
.uk-navbar-nav li a,
.uk-navbar-nav li a:visited,
.uk-navbar-nav li a:active,
.uk-navbar-nav li button {
    color: white !important;
}

/* Fullscreen button styling */
#fullscreenButton {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: white !important;
}

.uk-navbar-dropdown-nav li a,
.uk-navbar-dropdown-nav li a:visited,
.uk-navbar-dropdown-nav li a:active {
    color: #999 !important;
    text-transform: capitalize;
}

#info-icon a,
#info-icon a:visited {
    color: white;
}

.uk-navbar-left h1 {
    color: white;
    padding: 0;
    margin: 0;
    font-family: Arial Black, Arial, Helvetica, sans-serif;
    font-size: .65em;
    font-weight: bold;
}

/* Info Icon Animation */
@keyframes bounceWithPause {
    0% {
        transform: translateY(0);
    }
    5% {
        transform: translateY(-11px);
    }
    10% {
        transform: translateY(3px);
    }
    15% {
        transform: translateY(-6px);
    }
    20% {
        transform: translateY(1px);
    }
    25% {
        transform: translateY(-3px);
    }
    30% {
        transform: translateY(0);
    }
    40%, 100% {
        transform: translateY(0);
    }
}

#info-icon a {
    animation: bounceWithPause 3s ease-in-out 5;
    animation-delay: 1s;
}

/* Thumbnail Modal Grid Styling */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    grid-auto-rows: minmax(100px, 1fr);
    padding: 0;
    margin: 0;
    width: 100vw;
    height: 100vh;
}

.thumbnail-grid li {
    position: relative;
    overflow: hidden;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
}

.thumbnail-grid li a {
    display: block;
    width: 100%;
    height: 100%;
}

.thumbnail-grid li a::after {
    background: none !important;
}

.thumbnail-grid li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-grid li a:hover {
    opacity: 1;
    filter: none;
}

/* Loading States */
.image-loading {
    position: relative;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.image-error {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8d7da;
    color: #721c24;
    font-family: Arial, sans-serif;
    padding: 20px;
    text-align: center;
}

/* Focus Indicators for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

.uk-navbar-nav li a:focus {
    outline-color: white;
}

/* Skip to Content Link for Screen Readers */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

/* Improved Touch Targets */
@media (max-width: 960px) {
    .uk-navbar-nav li a,
    .uk-slideshow-nav a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* WebP Support Detection */
.no-webp .webp-image {
    display: none;
}

.webp .fallback-image {
    display: none;
}
