.dynamic-gallery-wrapper {
position: relative;
margin: 20px 0;
}
.dynamic-gallery-empty {
text-align: center;
padding: 40px;
color: #666;
font-style: italic;
border: 2px dashed #ddd;
border-radius: 8px;
} .dynamic-gallery-wrapper .swiper {
border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.dynamic-gallery-wrapper .swiper-slide {
display: flex;
align-items: center;
justify-content: center;
background: #f5f5f5;
}
.dynamic-gallery-wrapper .swiper-slide img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
cursor: pointer;
}
.dynamic-gallery-wrapper .swiper-slide:hover img {
transform: scale(1.05);
} .dynamic-gallery-wrapper .swiper-button-next,
.dynamic-gallery-wrapper .swiper-button-prev {
width: 50px;
height: 50px;
background: rgba(255, 255, 255, 0.9);
border-radius: 50%;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
z-index: 1;
}
.dynamic-gallery-wrapper .swiper-button-next:hover,
.dynamic-gallery-wrapper .swiper-button-prev:hover {
background: white;
transform: scale(1.1);
}
.dynamic-gallery-wrapper .swiper-button-next::after,
.dynamic-gallery-wrapper .swiper-button-prev::after {
font-size: 18px;
font-weight: bold;
color: #333;
transition: all .3s ease;
}
.dynamic-gallery-wrapper .swiper-button-next:hover::after,
.dynamic-gallery-wrapper .swiper-button-prev:hover::after{
color: black;
} .dynamic-gallery-wrapper .swiper-pagination {
bottom: 20px;
}
.dynamic-gallery-wrapper .swiper-pagination-bullet {
width: 12px;
height: 12px;
background: rgba(255, 255, 255, 0.8);
border: 2px solid transparent;
transition: all 0.3s ease;
}
.dynamic-gallery-wrapper .swiper-pagination-bullet-active {
background: white;
border-color: #007cba;
transform: scale(1.2);
} .dynamic-gallery-grid {
display: grid;
grid-template-columns: repeat(var(--columns, 3), 1fr);
gap: 20px;
}
.dynamic-gallery-grid .gallery-item {
position: relative;
overflow: hidden;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
aspect-ratio: 1;
}
.dynamic-gallery-grid .gallery-item:hover {
transform: translateY(-5px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.dynamic-gallery-grid .gallery-item img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}
.dynamic-gallery-grid .gallery-item:hover img {
transform: scale(1.1);
} .dynamic-gallery-masonry {
column-count: var(--columns, 3);
column-gap: 20px;
}
.dynamic-gallery-masonry .gallery-item {
display: inline-block;
width: 100%;
margin-bottom: 20px;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
}
.dynamic-gallery-masonry .gallery-item:hover {
transform: translateY(-3px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.dynamic-gallery-masonry .gallery-item img {
width: 100%;
height: auto;
display: block;
transition: transform 0.3s ease;
}
.dynamic-gallery-masonry .gallery-item:hover img {
transform: scale(1.05);
} @media (max-width: 768px) {
.dynamic-gallery-grid {
grid-template-columns: repeat(2, 1fr);
gap: 15px;
}
.dynamic-gallery-masonry {
column-count: 2;
column-gap: 15px;
}
.dynamic-gallery-masonry .gallery-item {
margin-bottom: 15px;
}
.dynamic-gallery-wrapper .swiper-button-next,
.dynamic-gallery-wrapper .swiper-button-prev {
width: 40px;
height: 40px;
}
.dynamic-gallery-wrapper .swiper-button-next::after,
.dynamic-gallery-wrapper .swiper-button-prev::after {
font-size: 14px;
}
}
@media (max-width: 480px) {
.dynamic-gallery-grid {
grid-template-columns: 1fr;
gap: 10px;
}
.dynamic-gallery-masonry {
column-count: 1;
column-gap: 0;
}
.dynamic-gallery-wrapper {
margin: 15px 0;
}
} .swiper-lazy-preloader {
width: 40px;
height: 40px;
border: 4px solid #f3f3f3;
border-top: 4px solid #007cba;
border-radius: 50%;
animation: spin 1s linear infinite;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
@keyframes spin {
0% { transform: translate(-50%, -50%) rotate(0deg); }
100% { transform: translate(-50%, -50%) rotate(360deg); }
} .dynamic-gallery-wrapper .gallery-item {
cursor: pointer;
}
.dynamic-gallery-wrapper .gallery-item::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0);
transition: background 0.3s ease;
pointer-events: none;
}
.dynamic-gallery-wrapper .gallery-item:hover::before {
background: rgba(0, 0, 0, 0.1);
} @media (prefers-color-scheme: dark) {
.dynamic-gallery-empty {
color: #ccc;
border-color: #555;
}
.dynamic-gallery-wrapper .swiper-button-next,
.dynamic-gallery-wrapper .swiper-button-prev {
background: rgba(0, 0, 0, 0.8);
}
.dynamic-gallery-wrapper .swiper-button-next::after,
.dynamic-gallery-wrapper .swiper-button-prev::after {
color: white;
}
.dynamic-gallery-wrapper .swiper-pagination-bullet {
background: rgba(255, 255, 255, 0.6);
}
.swiper-lazy-preloader {
border-color: #555;
border-top-color: #007cba;
}
}  .dynamic-gallery-lightbox {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10000;
display: none;
opacity: 0;
transition: opacity 0.3s ease;
backdrop-filter: blur(2px);
}
.dynamic-gallery-lightbox.active {
opacity: 1;
}
.lightbox-backdrop {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.92);
cursor: pointer;
transition: background 0.3s ease;
}
.lightbox-container {
position: relative;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
box-sizing: border-box;
} .lightbox-content {
position: relative;
max-width: 95%;
max-height: 95%;
text-align: center;
transform: scale(0.8);
transition: transform 0.3s ease;
}
.dynamic-gallery-lightbox.active .lightbox-content {
transform: scale(1);
}
.lightbox-image {
max-width: 100%;
max-height: 85vh;
width: auto;
height: auto;
object-fit: contain;
border-radius: 8px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
transition: all 0.3s ease;
} .lightbox-info {
margin-top: 20px;
color: white;
max-width: 600px;
margin-left: auto;
margin-right: auto;
}
.lightbox-title {
font-size: 1.4em;
font-weight: 600;
margin: 0 0 10px 0;
line-height: 1.3;
}
.lightbox-description {
margin: 0 0 15px 0;
opacity: 0.9;
font-size: 1em;
line-height: 1.5;
}
.lightbox-counter {
opacity: 0.7;
font-size: 0.9em;
font-weight: 500;
padding: 8px 16px;
background: rgba(255, 255, 255, 0.1);
border-radius: 20px;
display: inline-block;
backdrop-filter: blur(10px);
} .lightbox-close,
.lightbox-prev,
.lightbox-next {
position: absolute;
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
color: white;
font-size: 24px;
width: 55px;
height: 55px;
border-radius: 50%;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
user-select: none;
outline: none;
}
.lightbox-close, .lightbox-prev, .lightbox-next{
z-index: 1;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
background: rgba(255, 255, 255, 0.25);
transform: scale(1.05);
border-color: rgba(255, 255, 255, 0.4);
}
.lightbox-close:active,
.lightbox-prev:active,
.lightbox-next:active {
transform: scale(0.95);
}
.lightbox-close {
top: 25px;
right: 25px;
font-size: 28px;
font-weight: 300;
}
.lightbox-prev {
left: 25px;
top: 50%;
transform: translateY(-50%);
font-size: 28px;
font-weight: bold;
}
.lightbox-next {
right: 25px;
top: 50%;
transform: translateY(-50%);
font-size: 28px;
font-weight: bold;
}
.lightbox-close:hover{
transform: scale(1.1) translateY(0) !important;
}
.lightbox-prev:hover, .lightbox-next:hover{
transform: scale(1.1) translateY(-50%) !important;
} .lightbox-loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 50px;
height: 50px;
border: 3px solid rgba(255, 255, 255, 0.3);
border-top: 3px solid white;
border-radius: 50%;
animation: lightbox-spin 1s linear infinite;
}
@keyframes lightbox-spin {
0% { transform: translate(-50%, -50%) rotate(0deg); }
100% { transform: translate(-50%, -50%) rotate(360deg); }
} .lightbox-zoom-controls {
position: absolute;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 10px;
background: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(10px);
padding: 10px;
border-radius: 25px;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.lightbox-zoom-btn {
width: 40px;
height: 40px;
border: none;
background: rgba(255, 255, 255, 0.2);
color: white;
border-radius: 50%;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
}
.lightbox-zoom-btn:hover {
background: rgba(255, 255, 255, 0.3);
transform: scale(1.1);
} @media (max-width: 768px) {
.lightbox-container {
padding: 15px;
}
.lightbox-content {
max-width: 100%;
max-height: 100%;
}
.lightbox-image {
max-height: 75vh;
border-radius: 6px;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
width: 45px;
height: 45px;
font-size: 20px;
}
.lightbox-close {
top: 15px;
right: 15px;
}
.lightbox-prev {
left: 15px;
}
.lightbox-next {
right: 15px;
}
.lightbox-info {
margin-top: 15px;
}
.lightbox-title {
font-size: 1.2em;
}
.lightbox-description {
font-size: 0.9em;
}
.lightbox-zoom-controls {
bottom: 20px;
padding: 8px;
}
.lightbox-zoom-btn {
width: 35px;
height: 35px;
font-size: 16px;
}
}
@media (max-width: 480px) {
.lightbox-container {
padding: 10px;
}
.lightbox-image {
max-height: 70vh;
border-radius: 4px;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
width: 40px;
height: 40px;
font-size: 18px;
}
.lightbox-close {
top: 10px;
right: 10px;
}
.lightbox-prev {
left: 10px;
}
.lightbox-next {
right: 10px;
}
.lightbox-title {
font-size: 1.1em;
}
.lightbox-description {
font-size: 0.85em;
}
.lightbox-counter {
font-size: 0.8em;
padding: 6px 12px;
}
} @media (hover: none) and (pointer: coarse) {
.lightbox-prev,
.lightbox-next {
opacity: 0.8;
}
.lightbox-close {
background: rgba(255, 255, 255, 0.2);
}
} @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.lightbox-image {
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
}
} .lightbox-close:focus,
.lightbox-prev:focus,
.lightbox-next:focus,
.lightbox-zoom-btn:focus {
outline: 2px solid #007cba;
outline-offset: 2px;
} @media print {
.dynamic-gallery-lightbox {
display: none !important;
}
} @media print {
.dynamic-gallery-wrapper .swiper-button-next,
.dynamic-gallery-wrapper .swiper-button-prev,
.dynamic-gallery-wrapper .swiper-pagination {
display: none;
}
.dynamic-gallery-grid,
.dynamic-gallery-masonry {
break-inside: avoid;
}
}