/* ==========================================================================
   Escon Drive Gallery — Grid Responsivo
   ========================================================================== */

.escon-gallery {
    display: grid;
    grid-template-columns: repeat(var(--escon-columns, 3), 1fr);
    gap: 14px;
    margin: 20px 0;
}

.escon-gallery-item {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.escon-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.escon-gallery-item a {
    display: block;
    line-height: 0;
    overflow: hidden;
}

.escon-gallery-item img {
    width: 100%;
    height: 200px; /* padrão (medium) */
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, opacity 0.3s ease;
}

.escon-gallery-item:hover img {
    transform: scale(1.05);
    opacity: 0.92;
}

.escon-gallery--thumbnail .escon-gallery-item img {
    height: 140px;
}

.escon-gallery--medium .escon-gallery-item img {
    height: 200px;
}

.escon-gallery--large .escon-gallery-item img {
    height: 320px;
}

.escon-gallery-caption {
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.3;
    color: #495057;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eee;
}

/* Mensagem de erro */
.escon-drive-error,
.escon-error {
    padding: 12px 16px;
    border: 1px solid #f5c6cb;
    background: #fff5f5;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 14px;
    color: #721c24;
}

/* Mensagem de vazio */
.escon-empty {
    padding: 2rem;
    text-align: center;
    color: #adb5bd;
    font-size: 0.9rem;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 6px;
    margin: 0;
}

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media (max-width: 1024px) {
    .escon-gallery {
        grid-template-columns: repeat(min(var(--escon-columns, 3), 3), 1fr);
    }
}

@media (max-width: 768px) {
    .escon-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .escon-gallery--thumbnail .escon-gallery-item img { height: 110px; }
    .escon-gallery--medium   .escon-gallery-item img { height: 160px; }
    .escon-gallery--large    .escon-gallery-item img { height: 220px; }
    .escon-gallery-item img { height: 160px; }
}

@media (max-width: 480px) {
    .escon-gallery {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .escon-gallery--thumbnail .escon-gallery-item img { height: 200px; }
    .escon-gallery--medium   .escon-gallery-item img { height: 220px; }
    .escon-gallery--large    .escon-gallery-item img { height: 260px; }
    .escon-gallery-item img { height: 220px; }
}
