/**
 * CSS Álbuns Premium - Design estilo Casas/Pinterest
 * @author Maicon Souza – Jmtechnology
 */

/* =========================================
   BASE STYLES (Mobile First / Default)
   Design Vertical (3/4) - "Full Card"
   ========================================= */

.gpg-albums-gallery {
    display: grid;
    grid-template-columns: repeat(var(--gpg-albums-columns, 3), 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.gpg-album-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3/4;
    /* Mobile Default */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: #000;
    isolation: isolate;
}

.gpg-album-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.gpg-album-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.gpg-album-thumb {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.gpg-album-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.gpg-album-card:hover .gpg-album-thumb img {
    transform: scale(1.1);
}

/* Overlay Gradiente */
.gpg-album-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px 20px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 35%, rgba(0, 0, 0, 0.2) 65%, transparent 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 2;
    pointer-events: none;
}

.gpg-album-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.25;
    color: #fff;
    text-transform: none;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gpg-album-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gpg-album-count {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gpg-album-card:hover .gpg-album-count {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.gpg-album-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1f2937;
    color: #4b5563;
    font-size: 3rem;
}

/* =========================================
   DESKTOP OVERRIDES (min-width: 1024px)
   Design Paisagem (3/2) - "Classic Landscape"
   ========================================= */

@media (min-width: 1024px) {
    .gpg-albums-gallery {
        gap: 32px;
        /* Força grid responsivo no desktop */
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    }

    .gpg-album-card {
        aspect-ratio: 3/2;
        /* Landscape for Desktop */
    }

    .gpg-album-info {
        padding: 32px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.4) 80%, transparent 100%);
    }

    .gpg-album-title {
        font-size: 1.25rem;
        margin-bottom: 6px;
        max-width: 100%;
    }

    .gpg-album-date {
        font-size: 0.85rem;
    }

    .gpg-album-count {
        top: 20px;
        right: 20px;
    }

    /* FIX: Alinha imagem ao topo para não cortar cabeças */
    .gpg-album-thumb img {
        object-position: top;
    }
}

/* =========================================
   TABLET ADJUSTMENTS (max-width: 1023px)
   ========================================= */

@media (max-width: 1023px) and (min-width: 601px) {
    .gpg-albums-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }

    .gpg-album-card {
        aspect-ratio: 4/5;
    }
}

/* =========================================
   MOBILE ADJUSTMENTS (max-width: 600px)
   ========================================= */

@media (max-width: 600px) {
    .gpg-albums-gallery {
        grid-template-columns: 1fr !important;
        padding: 0 16px;
    }

    .gpg-album-title {
        font-size: 1rem;
    }
}