/* Responsive Gallery Plugin Styles */

.responsive-gallery {
    margin: 20px 0;
    overflow: hidden;
}

/* Layout Grid */
.rg-layout-grid {
    display: grid;
    gap: 15px;
}

.rg-layout-grid.rg-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.rg-layout-grid.rg-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.rg-layout-grid.rg-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.rg-layout-grid.rg-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Layout Masonry */
.rg-layout-masonry {
    column-count: 3;
    column-gap: 15px;
}

.rg-layout-masonry.rg-columns-2 {
    column-count: 2;
}

.rg-layout-masonry.rg-columns-4 {
    column-count: 4;
}

.rg-layout-masonry.rg-columns-5 {
    column-count: 5;
}

.rg-layout-masonry .rg-gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
    background-color: #000000; /* Fundo preto */
}

/* Layout Mosaic */
.rg-layout-mosaic {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rg-layout-mosaic .rg-gallery-item {
    flex: 1 1 auto;
    min-width: 200px;
    max-width: 400px;
    background-color: #000000;
}

/* Gallery Item - Estilos com maior especificidade */
.responsive-gallery .rg-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #000000; /* Fundo preto */
}

.responsive-gallery .rg-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Força aplicação de background em casos de conflito */
.responsive-gallery .rg-gallery-item,
.rg-gallery-item {
    background-color: #000000 !important; /* Fundo preto forçado */
}

/* Imagens não clicáveis não devem ter cursor pointer */
.responsive-gallery .rg-gallery-item .rg-image:not([data-clickable="true"]) {
    cursor: default;
}

/* Links clicáveis mantêm o cursor pointer */
.responsive-gallery .rg-gallery-item a {
    cursor: pointer;
}

/* Lightbox Overlay Styles */
.rg-simple-lightbox-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.9) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.rg-simple-lightbox-container {
    position: relative !important;
    max-width: 90% !important;
    max-height: 90% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.rg-simple-lightbox-container img {
    max-width: 100% !important;
    max-height: calc(100vh - 120px) !important;
    display: block !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

.rg-simple-lightbox-close {
    position: absolute !important;
    top: -40px !important;
    right: -10px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    color: white !important;
    font-size: 30px !important;
    cursor: pointer !important;
    z-index: 1000000 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.3s ease !important;
}

.rg-simple-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

.rg-simple-lightbox-caption-container {
    margin-top: 15px !important;
    text-align: center !important;
    max-width: 100% !important;
    color: white !important;
}

.rg-simple-lightbox-title {
    margin: 0 0 8px 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.rg-simple-lightbox-caption {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Previne scroll do body quando lightbox está aberto */
body.rg-lightbox-open {
    overflow: hidden !important;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .rg-simple-lightbox-overlay {
        padding: 10px !important;
    }
    
    .rg-simple-lightbox-container {
        max-width: 95% !important;
        max-height: 95% !important;
    }
    
    .rg-simple-lightbox-container img {
        max-height: calc(100vh - 80px) !important;
    }
    
    .rg-simple-lightbox-close {
        top: -35px !important;
        right: -5px !important;
        width: 35px !important;
        height: 35px !important;
        font-size: 24px !important;
    }
    
    .rg-simple-lightbox-title {
        font-size: 16px !important;
    }
    
    .rg-simple-lightbox-caption {
        font-size: 13px !important;
    }
}

/* Image */
.rg-image {
    width: 100%;
    height: auto;
    display: block; /* Remove espaço extra abaixo da imagem */
    transition: transform 0.3s ease;
}

.rg-gallery-item:hover .rg-image {
    transform: scale(1.05);
}

/* Para layout de grade com altura uniforme (opcional) */
.rg-layout-grid .rg-gallery-item {
    position: relative;
}

.rg-layout-grid .rg-image {
    height: 250px; /* Altura fixa para uniformidade */
    object-fit: cover; /* Preenche o espaço, cortando se necessário */
    object-position: center center; /* Posição padrão - pode ser sobrescrita */
}

/* Suporte para posicionamento focal personalizado */
.rg-image[data-focal-point] {
    object-position: var(--focal-point, center center);
}

/* Classes utilitárias para posicionamento focal comum */
.rg-image.focal-top {
    object-position: center top;
}

.rg-image.focal-bottom {
    object-position: center bottom;
}

.rg-image.focal-left {
    object-position: left center;
}

.rg-image.focal-right {
    object-position: right center;
}

.rg-image.focal-top-left {
    object-position: left top;
}

.rg-image.focal-top-right {
    object-position: right top;
}

.rg-image.focal-bottom-left {
    object-position: left bottom;
}

.rg-image.focal-bottom-right {
    object-position: right bottom;
}

/* Lazy Loading */
.rg-lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rg-lazy.loaded {
    opacity: 1;
}

/* Individual Social Sharing Buttons - Design Atualizado */
.rg-individual-social {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.rg-gallery-item:hover .rg-individual-social {
    opacity: 1;
}

/* Botão principal de compartilhamento */
.rg-share-main-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.rg-share-main-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Ícone do botão principal usando Unicode */
.rg-share-main-btn::before {
    content: "⤴";
    font-size: 18px;
    line-height: 1;
    font-weight: bold;
}

/* Container dos botões de redes sociais */
.rg-social-networks {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 5px;
}

.rg-social-networks.active {
    display: flex;
}

/* Botões individuais das redes sociais */
.rg-individual-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    color: white;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    font-size: 14px;
    font-weight: bold;
}

.rg-individual-social-btn:hover {
    transform: scale(1.1);
    text-decoration: none;
    color: white;
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

/* Ícones usando Unicode para melhor compatibilidade */
.rg-individual-social-btn.rg-linkedin::before {
    content: "in";
    font-size: 12px;
    font-weight: bold;
}

.rg-individual-social-btn.rg-twitter::before {
    content: "𝕏";
    font-size: 14px;
    font-weight: bold;
}

.rg-individual-social-btn.rg-facebook::before {
    content: "f";
    font-size: 16px;
    font-weight: bold;
}

.rg-individual-social-btn.rg-whatsapp::before {
    content: "⟨⟩";
    font-size: 14px;
    font-weight: bold;
    transform: rotate(45deg);
    display: inline-block;
}

/* Cores específicas para cada rede social no hover */
.rg-individual-social-btn.rg-linkedin:hover {
    background: rgba(0, 119, 181, 0.9);
}

.rg-individual-social-btn.rg-twitter:hover {
    background: rgba(0, 0, 0, 0.9);
}

.rg-individual-social-btn.rg-facebook:hover {
    background: rgba(24, 119, 242, 0.9);
}

.rg-individual-social-btn.rg-whatsapp:hover {
    background: rgba(37, 211, 102, 0.9);
}

/* Caption */
.rg-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px 15px 15px;
    font-size: 14px;
    line-height: 1.4;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.rg-gallery-item:hover .rg-caption {
    transform: translateY(0);
}

/* Lightbox Link */
.rg-lightbox {
    display: block;
    text-decoration: none;
}

/* Social Sharing */
.rg-social-sharing {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.rg-social-label {
    display: inline-block;
    margin-right: 10px;
    font-weight: 600;
    color: #333;
}

.rg-social-btn {
    display: inline-block;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    line-height: 40px;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.rg-social-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.rg-social-btn .dashicons {
    font-size: 18px;
    line-height: 40px;
}

.rg-facebook:hover {
    background: #1877f2;
}

.rg-twitter:hover {
    background: #1da1f2;
}

.rg-pinterest:hover {
    background: #bd081c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rg-layout-grid.rg-columns-3,
    .rg-layout-grid.rg-columns-4,
    .rg-layout-grid.rg-columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rg-layout-masonry.rg-columns-3,
    .rg-layout-masonry.rg-columns-4,
    .rg-layout-masonry.rg-columns-5 {
        column-count: 2;
    }
    
    .rg-layout-mosaic .rg-gallery-item {
        min-width: 150px;
        max-width: 300px;
    }
    
    /* Botões de compartilhamento sempre visíveis em mobile */
    .rg-individual-social {
        opacity: 1;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        padding: 5px;
    }
    
    .rg-individual-social-btn {
        background: rgba(0, 0, 0, 0.8);
    }
}

@media (max-width: 480px) {
    .rg-layout-grid {
        grid-template-columns: 1fr;
    }
    
    .rg-layout-masonry {
        column-count: 1;
    }
    
    .rg-layout-mosaic {
        flex-direction: column;
    }
    
    .rg-layout-mosaic .rg-gallery-item {
        min-width: 100%;
        max-width: 100%;
    }
    
    .rg-caption {
        position: static;
        transform: none;
        background: rgba(0, 0, 0, 0.8);
        padding: 10px;
    }
    
    .rg-social-btn {
        width: 35px;
        height: 35px;
        line-height: 35px;
        margin: 0 3px;
    }
    
    .rg-social-btn .dashicons {
        font-size: 16px;
        line-height: 35px;
    }
    
    /* Ajustes para botões individuais em mobile */
    .rg-individual-social {
        top: 5px;
        right: 5px;
        flex-direction: row;
        gap: 3px;
    }
    
    .rg-individual-social-btn {
        width: 28px;
        height: 28px;
    }
    
    .rg-individual-social-btn .dashicons {
        font-size: 14px;
        line-height: 28px;
    }
}

/* Loading Animation */
.rg-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: rg-spin 1s linear infinite;
}

@keyframes rg-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.rg-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px 0;
}

/* Success Message */
.rg-success {
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin: 10px 0;
}

