/**
 * AruGallery — Style frontowe galerii.
 *
 * Responsywne, BEM, CSS Custom Properties.
 * Nowoczesny, dopracowany design z płynnymi animacjami.
 *
 * @package AruGallery
 */

/* === Zmienne === */
:root {
    --arugallery-gap: 0;
    --arugallery-radius: 0px;
    --arugallery-overlay-bg: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.05) 60%, transparent 100%);
    --arugallery-overlay-icon: #fff;
    --arugallery-caption-bg: rgba(0, 0, 0, 0.55);
    --arugallery-caption-color: #fff;
    --arugallery-transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --arugallery-columns: 3;
    --arugallery-btn-bg: #fff;
    --arugallery-btn-color: #444;
    --arugallery-btn-active-bg: #8B1A1A;
    --arugallery-btn-active-color: #fff;
    --arugallery-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --arugallery-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --arugallery-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.16);
    --arugallery-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* === Container === */
.arugallery {
    margin: 1.5em 0;
    position: relative;
    animation: arugallery-containerFadeIn 0.5s ease both;
}

.arugallery *,
.arugallery *::before,
.arugallery *::after {
    box-sizing: border-box;
}

/* Fade-in for gallery container on page load */
@keyframes arugallery-containerFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Fade-in for loaded images */
@keyframes arugallery-fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.arugallery figure {
    animation: arugallery-fadeInUp 0.4s ease both;
}

/* ==========================================================================
   GRID LAYOUT
   ========================================================================== */

.arugallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--arugallery-columns), 1fr);
    gap: 2px;
}

.arugallery-grid__item {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 0;
}

.arugallery-grid__link {
    display: block;
    position: relative;
    padding-top: 66.67%; /* 3:2 domyslne proporcje */
    overflow: hidden;
    text-decoration: none;
    background: #f0f0f1;
}

.arugallery-grid__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--arugallery-transition);
}

.arugallery-grid__link:hover .arugallery-grid__img,
.arugallery-grid__link:focus .arugallery-grid__img {
    transform: scale(1.06);
}

/* Overlay z ikona lupy — gradient zamiast solid */
.arugallery-grid__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--arugallery-overlay-bg);
    opacity: 0;
    transition: opacity var(--arugallery-transition);
}

.arugallery-grid__link:hover .arugallery-grid__overlay,
.arugallery-grid__link:focus .arugallery-grid__overlay {
    opacity: 1;
}

.arugallery-grid__icon {
    color: var(--arugallery-overlay-icon);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.arugallery-grid__link:hover .arugallery-grid__icon {
    transform: scale(1.15);
}

/* Podpis pod zdjeciem — slide-up z blur */
.arugallery-grid__caption {
    padding: 8px 10px;
    font-size: 13px;
    color: #555;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

/* ==========================================================================
   MASONRY LAYOUT
   ========================================================================== */

.arugallery-masonry {
    display: flex;
    gap: 2px;
}

.arugallery-masonry__column {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.arugallery-masonry__item {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    width: 100%;
    animation: arugallery-fadeInUp 0.4s ease both;
}

.arugallery-masonry__link {
    display: block;
    position: relative;
    text-decoration: none;
    overflow: hidden;
    background: #f0f0f1;
}

.arugallery-masonry__img-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.arugallery-masonry__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--arugallery-transition);
}

.arugallery-masonry__link:hover .arugallery-masonry__img,
.arugallery-masonry__link:focus .arugallery-masonry__img {
    transform: scale(1.06);
}

/* Overlay — gradient */
.arugallery-masonry__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--arugallery-overlay-bg);
    opacity: 0;
    transition: opacity var(--arugallery-transition);
}

.arugallery-masonry__link:hover .arugallery-masonry__overlay,
.arugallery-masonry__link:focus .arugallery-masonry__overlay {
    opacity: 1;
}

.arugallery-masonry__icon {
    color: var(--arugallery-overlay-icon);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.arugallery-masonry__link:hover .arugallery-masonry__icon {
    transform: scale(1.15);
}

.arugallery-masonry__caption {
    padding: 8px 10px;
    font-size: 13px;
    color: #555;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

/* ==========================================================================
   LAZY LOADING
   ========================================================================== */

.arugallery-lazy:not(.arugallery-lazy--loaded) {
    opacity: 0;
    transform: translateY(6px);
}

.arugallery-lazy {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.arugallery-lazy.arugallery-lazy--loaded {
    opacity: 1 !important;
    transform: translateY(0);
}

/* Modern shimmer for lazy loading */
@keyframes arugallery-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.arugallery-lazy-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: arugallery-shimmer 1.5s infinite;
}

/* Placeholder shimmer on containers */
.arugallery-grid__link,
.arugallery-masonry__img-wrap {
    background: linear-gradient(90deg, #f0f0f1 25%, #e4e4e6 50%, #f0f0f1 75%);
    background-size: 200% 100%;
    animation: arugallery-shimmer 1.5s ease infinite;
}

.arugallery-grid__link:has(.arugallery-grid__img:not(.arugallery-lazy)),
.arugallery-grid__link:has(.arugallery-lazy--loaded),
.arugallery-masonry__img-wrap:has(.arugallery-masonry__img:not(.arugallery-lazy)),
.arugallery-masonry__img-wrap:has(.arugallery-lazy--loaded) {
    animation: none;
    background: transparent;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.arugallery-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    padding: 18px 0;
}

.arugallery-pagination__counter {
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.arugallery-pagination__buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.arugallery-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: var(--arugallery-btn-bg);
    color: var(--arugallery-btn-color);
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    line-height: 1;
    box-shadow: var(--arugallery-shadow-sm);
}

.arugallery-pagination__btn:hover:not(:disabled),
.arugallery-pagination__btn:focus-visible:not(:disabled) {
    background: #fafafa;
    border-color: #bbb;
    transform: translateY(-2px);
    box-shadow: var(--arugallery-shadow-md);
}

.arugallery-pagination__btn--active {
    background: var(--arugallery-btn-active-bg);
    color: var(--arugallery-btn-active-color);
    border-color: var(--arugallery-btn-active-bg);
    box-shadow: 0 2px 8px rgba(139, 26, 26, 0.3);
}

.arugallery-pagination__btn--active:hover {
    background: var(--arugallery-btn-active-bg);
    border-color: var(--arugallery-btn-active-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(139, 26, 26, 0.35);
}

.arugallery-pagination__btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

.arugallery-pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 40px;
    color: #aaa;
    font-size: 14px;
    letter-spacing: 2px;
}

/* Loading state during AJAX */
.arugallery--loading {
    position: relative;
    min-height: 100px;
    pointer-events: none;
}

.arugallery--loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(2px);
    z-index: 10;
    border-radius: var(--arugallery-radius);
}

.arugallery--loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid #e0e0e0;
    border-top-color: #8B1A1A;
    border-radius: 50%;
    z-index: 11;
    animation: arugallery-spin 0.6s linear infinite;
}

@keyframes arugallery-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   MOSAIC LAYOUT (Justified / Flickr-style)
   ========================================================================== */

.arugallery-mosaic {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    /* Gap jest zarządzany przez JS na elementach (margin-right/bottom) */
}

.arugallery-mosaic__item {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: var(--arugallery-radius);
    flex-grow: 0;
    flex-shrink: 0;
    /* Wymiary ustawiane przez JS */
}

.arugallery-mosaic__link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
    background: #f0f0f1;
}

.arugallery-mosaic__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--arugallery-transition);
}

.arugallery-mosaic__link:hover .arugallery-mosaic__img,
.arugallery-mosaic__link:focus .arugallery-mosaic__img {
    transform: scale(1.05);
}

.arugallery-mosaic__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--arugallery-overlay-bg);
    opacity: 0;
    transition: opacity var(--arugallery-transition);
}

.arugallery-mosaic__link:hover .arugallery-mosaic__overlay,
.arugallery-mosaic__link:focus .arugallery-mosaic__overlay {
    opacity: 1;
}

.arugallery-mosaic__icon {
    color: var(--arugallery-overlay-icon);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.arugallery-mosaic__link:hover .arugallery-mosaic__icon {
    transform: scale(1.15);
}

/* ==========================================================================
   CAROUSEL / SLIDER LAYOUT
   ========================================================================== */

.arugallery-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--arugallery-radius);
    background: #1a1a1a;
}

.arugallery-carousel__viewport {
    overflow: hidden;
    width: 100%;
}

.arugallery-carousel__track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.arugallery-carousel__slide {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.arugallery-carousel__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    text-decoration: none;
    overflow: hidden;
}

.arugallery-carousel__img {
    width: 100%;
    height: 65vh;
    object-fit: cover;
    display: block;
}

.arugallery-carousel__caption {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-align: center;
    padding: 12px 20px;
    margin: 0;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

/* Strzalki karuzeli — nowoczesne okragle przyciski */
.arugallery-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 5;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
}

.arugallery-carousel__nav:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.arugallery-carousel__nav--prev { left: 16px; }
.arugallery-carousel__nav--next { right: 16px; }

/* Dots */
.arugallery-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 14px 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
}

.arugallery-carousel__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s ease, transform 0.3s ease, width 0.3s ease;
}

.arugallery-carousel__dot:hover {
    background: rgba(255, 255, 255, 0.75);
    transform: scale(1.15);
}

.arugallery-carousel__dot--active {
    background: #fff;
    transform: scale(1.2);
    width: 22px;
    border-radius: 5px;
}

/* ==========================================================================
   LIST LAYOUT
   ========================================================================== */

.arugallery-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.arugallery-list__item {
    margin: 0;
}

.arugallery-list__figure {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: var(--arugallery-radius);
    background: #fafafa;
    box-shadow: var(--arugallery-shadow-sm);
    transition: box-shadow var(--arugallery-transition);
}

.arugallery-list__figure:hover {
    box-shadow: var(--arugallery-shadow-md);
}

.arugallery-list__link {
    display: block;
    text-decoration: none;
    overflow: hidden;
}

.arugallery-list__img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    transition: transform var(--arugallery-transition);
    background: #f0f0f1;
    border-radius: var(--arugallery-radius) var(--arugallery-radius) 0 0;
}

.arugallery-list__link:hover .arugallery-list__img {
    transform: scale(1.02);
}

.arugallery-list__meta {
    padding: 16px 20px;
}

.arugallery-list__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1d2327;
    line-height: 1.3;
}

.arugallery-list__caption {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   FILMSTRIP LAYOUT
   ========================================================================== */

.arugallery-filmstrip {
    position: relative;
    overflow: hidden;
}

.arugallery-filmstrip__track {
    display: flex;
    gap: var(--arugallery-gap);
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
}

.arugallery-filmstrip__track::-webkit-scrollbar {
    height: 6px;
}

.arugallery-filmstrip__track::-webkit-scrollbar-track {
    background: transparent;
}

.arugallery-filmstrip__track::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.arugallery-filmstrip__track::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.arugallery-filmstrip__item {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    width: 210px;
    overflow: hidden;
    border-radius: var(--arugallery-radius);
    background: #fafafa;
    box-shadow: var(--arugallery-shadow-sm);
    transition: box-shadow var(--arugallery-transition), transform var(--arugallery-transition);
    scroll-snap-align: start;
}

.arugallery-filmstrip__item:hover {
    box-shadow: var(--arugallery-shadow-md);
    transform: translateY(-3px);
}

.arugallery-filmstrip__link {
    display: block;
    height: 155px;
    overflow: hidden;
    text-decoration: none;
    background: #f0f0f1;
    border-radius: var(--arugallery-radius) var(--arugallery-radius) 0 0;
}

.arugallery-filmstrip__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--arugallery-transition);
}

.arugallery-filmstrip__link:hover .arugallery-filmstrip__img {
    transform: scale(1.08);
}

.arugallery-filmstrip__label {
    padding: 8px 10px;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1.4;
}

/* Strzalki filmstrip — nowoczesne przyciski */
.arugallery-filmstrip__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    z-index: 5;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.arugallery-filmstrip__nav:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.08);
}

.arugallery-filmstrip__nav--prev { left: 10px; }
.arugallery-filmstrip__nav--next { right: 10px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Desktop */
@media (min-width: 1025px) {
    .arugallery--cols-2 { --arugallery-columns: 2; }
    .arugallery--cols-3 { --arugallery-columns: 3; }
    .arugallery--cols-4 { --arugallery-columns: 4; }
    .arugallery--cols-5 { --arugallery-columns: 5; }
    .arugallery--cols-6 { --arugallery-columns: 6; }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --arugallery-gap: 0;
        --arugallery-radius: 0px;
    }

    .arugallery--cols-5,
    .arugallery--cols-6 { --arugallery-columns: 4; }
    .arugallery--cols-4 { --arugallery-columns: 3; }
    .arugallery--cols-3 { --arugallery-columns: 3; }
    .arugallery--cols-2 { --arugallery-columns: 2; }
}

/* Mobile */
@media (min-width: 481px) and (max-width: 768px) {
    :root {
        --arugallery-gap: 0;
        --arugallery-radius: 0px;
    }

    .arugallery-grid,
    .arugallery-masonry { --arugallery-columns: 2 !important; }

    .arugallery-pagination__btn--prev,
    .arugallery-pagination__btn--next {
        font-size: 12px;
        padding: 0 10px;
    }

    .arugallery-mosaic__item {
        height: 200px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    :root {
        --arugallery-gap: 0;
        --arugallery-radius: 0px;
    }

    .arugallery-grid,
    .arugallery-masonry { --arugallery-columns: 1 !important; }

    .arugallery--cols-2,
    .arugallery--cols-3,
    .arugallery--cols-4,
    .arugallery--cols-5,
    .arugallery--cols-6 { --arugallery-columns: 1; }

    .arugallery-grid__overlay,
    .arugallery-masonry__overlay,
    .arugallery-mosaic__overlay {
        display: none;
    }

    .arugallery-mosaic__item {
        height: 160px;
        min-width: 100%;
    }

    .arugallery-carousel__nav {
        width: 38px;
        height: 38px;
    }

    .arugallery-carousel__nav--prev { left: 6px; }
    .arugallery-carousel__nav--next { right: 6px; }

    .arugallery-filmstrip__item {
        width: 160px;
    }

    .arugallery-filmstrip__link {
        height: 120px;
    }

    .arugallery-list__title {
        font-size: 15px;
    }

    .arugallery-list__meta {
        padding: 12px 14px;
    }

    .arugallery-pagination__btn {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
        padding: 0 10px;
    }

    .arugallery-grid__item:hover {
        transform: none;
        box-shadow: var(--arugallery-shadow-sm);
    }
}

/* === Accessibility === */
.arugallery-grid__link:focus-visible,
.arugallery-masonry__link:focus-visible,
.arugallery-mosaic__link:focus-visible,
.arugallery-list__link:focus-visible,
.arugallery-filmstrip__link:focus-visible,
.arugallery-carousel__link:focus-visible {
    outline: 3px solid #8B1A1A;
    outline-offset: 2px;
}

.arugallery-pagination__btn:focus-visible {
    outline: 2px solid #8B1A1A;
    outline-offset: 2px;
}

/* === No JS fallback === */
.no-js .arugallery-lazy {
    opacity: 1;
}

.no-js .arugallery-pagination__btn {
    display: none;
}

/* ==========================================================
   ALBUMY
   ========================================================== */

/* === Album Grid === */
.arugallery-album__title {
    font-size: 1.5em;
    margin-bottom: 0.4em;
    line-height: 1.3;
}

.arugallery-album__description {
    color: #555;
    margin-bottom: 1.2em;
    line-height: 1.6;
}

.arugallery-album__grid {
    display: grid;
    grid-template-columns: repeat(var(--arugallery-columns, 3), 1fr);
    gap: var(--arugallery-gap);
}

.arugallery-album__item {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--arugallery-radius);
    overflow: hidden;
    background: #f8f8f8;
    transition: box-shadow var(--arugallery-transition), transform var(--arugallery-transition);
    box-shadow: var(--arugallery-shadow-sm);
}

.arugallery-album__item:hover {
    box-shadow: var(--arugallery-shadow-lg);
    transform: translateY(-4px);
}

.arugallery-album__figure {
    margin: 0;
    position: relative;
    overflow: hidden;
}

.arugallery-album__cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform var(--arugallery-transition);
}

.arugallery-album__item:hover .arugallery-album__cover {
    transform: scale(1.04);
}

.arugallery-album__caption {
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.arugallery-album__gallery-title {
    font-weight: 600;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.arugallery-album__count {
    font-size: 0.8em;
    color: #999;
    white-space: nowrap;
}

/* === Album List === */
.arugallery-album__list {
    display: flex;
    flex-direction: column;
    gap: var(--arugallery-gap);
}

.arugallery-album__list-item {
    display: flex;
    text-decoration: none;
    color: inherit;
    border-radius: var(--arugallery-radius);
    overflow: hidden;
    background: #f9f9f9;
    border: 1px solid #ebebeb;
    transition: box-shadow var(--arugallery-transition), transform var(--arugallery-transition);
    box-shadow: var(--arugallery-shadow-sm);
}

.arugallery-album__list-item:hover {
    box-shadow: var(--arugallery-shadow-md);
    transform: translateY(-2px);
}

.arugallery-album__list-cover {
    width: 200px;
    min-height: 130px;
    flex-shrink: 0;
    overflow: hidden;
}

.arugallery-album__list-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--arugallery-transition);
}

.arugallery-album__list-item:hover .arugallery-album__list-cover img {
    transform: scale(1.04);
}

.arugallery-album__list-info {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.arugallery-album__list-info h3 {
    margin: 0 0 6px;
    font-size: 1.1em;
    line-height: 1.3;
}

.arugallery-album__gallery-desc {
    margin: 0 0 6px;
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

/* === Album RWD === */
@media (max-width: 1024px) {
    .arugallery-album__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .arugallery-album__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .arugallery-album__list-cover {
        width: 140px;
    }
}

@media (max-width: 480px) {
    .arugallery-album__grid {
        grid-template-columns: 1fr;
    }
    .arugallery-album__list-item {
        flex-direction: column;
    }
    .arugallery-album__list-cover {
        width: 100%;
        height: 180px;
    }
}

/* === Footer Credit === */
.arugallery-footer-credit {
    font-family: var(--arugallery-font);
}

/* === Print === */
@media print {
    .arugallery-grid__overlay,
    .arugallery-masonry__overlay,
    .arugallery-pagination {
        display: none;
    }

    .arugallery-grid__link {
        break-inside: avoid;
    }

    .arugallery {
        animation: none;
    }

    .arugallery figure {
        animation: none;
    }
}
