.gallery-modern-block {
    --primary-color: {{ value.cor_principal }};
    --secondary-color: #1e293b;
    --accent-color: {{ value.cor_secundaria }};
    --light-color: #f8fafc;
    --dark-color: {{ value.cor_principal }};
    --border-color: #e2e8f0;
    --transition: all 0.3s ease;
}

.gallery-modern-block * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.gallery-modern-block {
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.5;
    overflow-x: hidden;
    padding-bottom: 2rem;
}

.h2-gallery{
    text-align: center;
}

.gallery-modern-block header {
    padding: 2rem 0;
    position: relative;
    z-index: 10;
}

.gallery-modern-block .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.gallery-modern-block h2 {
    font-size: 40px;
    font-weight: 600;
    color: #024248;
    margin-bottom: 0.5rem;
}

.gallery-modern-block .subtitle {
    font-size: 22px;
    color: #64748b;
    font-weight: 400;
    text-align: center;
}

.gallery-modern-block .filters-container {
    padding: 1.5rem 0;
    position: relative;
    z-index: 5;
}

.gallery-modern-block .filters-wrapper {
    position: relative;
}

.filters-wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.gallery-modern-block .filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
    position: relative;
    margin: auto;
}

.gallery-modern-block .filters::-webkit-scrollbar {
    display: none;
}

.gallery-modern-block .scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--primary-color);
    transition: var(--transition);
}

.gallery-modern-block .scroll-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.gallery-modern-block .scroll-btn.left {
    left: 0;
}

.gallery-modern-block .scroll-btn.right {
    right: 0;
}

.gallery-modern-block .filter-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    min-width: fit-content;
}

.gallery-modern-block .filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.gallery-modern-block .filter-btn:hover:not(.active) {
    background-color: #f1f5f9;
}

.gallery-modern-block .gallery-carousel {
    position: relative;
    height: 500px;
    margin: 2rem 0;
    overflow: hidden;
}

.gallery-modern-block .carousel-container {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-modern-block .carousel-item {
    position: absolute;
    width: 66%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.85) translateX(0);
    z-index: 1;
}

.gallery-modern-block .carousel-item.active {
    opacity: 1;
    transform: scale(0.3) translateX(0);
    z-index: 5;
}

.gallery-modern-block .carousel-item.prev {
    opacity: 0.7;
    transform: scale(0.85) translateX(-60%);
    z-index: 4;
}

.gallery-modern-block .carousel-item.next {
    opacity: 0.7;
    transform: scale(0.85) translateX(60%);
    z-index: 4;
}

.gallery-modern-block .carousel-item.prev-out {
    opacity: 0.3;
    transform: scale(0.7) translateX(-120%);
    z-index: 3;
}

.gallery-modern-block .carousel-item.next-out {
    opacity: 0.3;
    transform: scale(0.7) translateX(120%);
    z-index: 3;
}

.gallery-modern-block .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-modern-block .carousel-item:hover img {
    transform: scale(1.05);
}

.gallery-modern-block .carousel-item .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255,255,255,0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.gallery-modern-block .carousel-item .item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent);
    color: white;
    opacity: 1;
}

.gallery-modern-block .carousel-item .item-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-modern-block .carousel-item .item-date {
    font-size: 0.9rem;
    opacity: 0.8;
}

.gallery-modern-block .carousel-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-modern-block .carousel-nav button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-modern-block .carousel-nav button:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.gallery-modern-block .lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 2rem;
}

.gallery-modern-block .lightbox.active {
    display: flex;
}

.gallery-modern-block .lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.gallery-modern-block .lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 5px;
}

.gallery-modern-block .lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 2rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

.gallery-modern-block .lightbox-caption {
    color: white;
    text-align: center;
    padding: 1rem 0;
    font-size: 1.2rem;
}

.gallery-modern-block .lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-modern-block .lightbox-nav button {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-modern-block .lightbox-nav button:hover {
    background: rgba(255,255,255,0.4);
}

.gallery-modern-block .add-event {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--accent-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.gallery-modern-block .add-event:hover {
    transform: scale(1.1);
}

.gallery-modern-block .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.gallery-modern-block .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.gallery-modern-block .empty-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.gallery-modern-block .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-modern-block .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.gallery-modern-block .btn-primary:hover {
    background-color: var(--secondary-color);
}

/* Ajustes no CSS para mobile */

@media (max-width: 768px) {
.gallery-modern-block .carousel-item {
width: 80%; /* Reduzido para mostrar itens laterais */
}

.gallery-modern-block .gallery-carousel {
height: 400px;
}

/* Em vez de esconder, mostramos parcialmente os itens laterais */
.gallery-modern-block .carousel-item.prev {
opacity: 0.5;
transform: scale(0.8) translateX(-40%);
display: block; /* Garantindo que esteja visível */
}

.gallery-modern-block .carousel-item.next {
opacity: 0.5;
transform: scale(0.8) translateX(40%);
display: block; /* Garantindo que esteja visível */
}

/* Mantemos os itens mais distantes ocultos */
.gallery-modern-block .carousel-item.prev-out,
.gallery-modern-block .carousel-item.next-out {
display: none;
}

.gallery-modern-block .carousel-item .item-title {
font-size: 1.2rem;
}
}

@media (max-width: 576px) {
.gallery-modern-block .gallery-carousel {
height: 340px;
}

.gallery-modern-block .carousel-item {
width: 75%; /* Ainda mais estreito para mostrar mais dos itens laterais */
}

/* Ajustes nos itens laterais para telas muito pequenas */
.gallery-modern-block .carousel-item.prev {
opacity: 0.4;
transform: scale(0.7) translateX(-35%);
}

.gallery-modern-block .carousel-item.next {
opacity: 0.4;
transform: scale(0.7) translateX(35%);
}
}