/* wide-fisf-style.css - put under assets/css (greeninteriosite plugin) */


/* ===== BASE RESET ===== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* ===== VISIBILITY CLASSES ===== */

.wide-fisf-section-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.wide-fisf-section-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.wide-fisf-grid-visible {
    display: grid !important;
    opacity: 1 !important;
    transform: scale(1) !important;
}

.wide-fisf-grid-hidden {
    display: grid !important;
    opacity: 0 !important;
    transform: scale(0.97) !important;
}


/* ===== CONTAINERS ===== */

.wide-fisf-albums-section,
.wide-fisf-gallery-section {
    width: 100%;
    background-color: #ffffff;
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    padding: 20px 0;
}


/* ===== BACK BUTTON ===== */

.wide-fisf-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px!important;
    padding: 10px 20px!important;
    background-color: #f5f5f5!important;
    border: 1px solid #ddd!important;
    border-radius: 25px!important;
    font-size: 0.95rem!important;
    font-weight: 500!important;
    color: #333!important;
    cursor: pointer!important;
    transition: all .2s ease!important;
    margin-bottom: 20px!important;
    border: none!important;
    outline: none!important;
    align-self: flex-start!important;
    margin-bottom: 0px!important;
}

.wide-fisf-back-button:hover {
    background-color: #e8e8e8;
    transform: translateY(-1px);
}

.wide-fisf-back-arrow {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}


/* ===== ALBUMS GRID ===== */

.wide-fisf-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    opacity: 0;
    transform: scale(.97);
    transition: opacity .3s ease, transform .3s ease;
}

.wide-fisf-album-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.wide-fisf-album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.wide-fisf-album-card:focus {
    outline: 3px solid #333;
    outline-offset: 2px;
}

.wide-fisf-album-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    overflow: hidden;
}

.wide-fisf-album-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%!important;
    object-fit: cover;
    transition: transform .3s ease;
    filter: brightness(.6);
}

.wide-fisf-album-card:hover .wide-fisf-album-image {
    transform: scale(1.05);
}

.wide-fisf-album-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .7) 70%, transparent 100%);
    padding: 20px;
    color: white;
    z-index: 2;
}

.wide-fisf-album-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #FFF!important;
}

.wide-fisf-album-description {
    font-size: .9rem;
    opacity: .9;
}

.wide-fisf-album-hover-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.85);
    padding: 12px 20px;
    border-radius: 25px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.wide-fisf-album-card:hover .wide-fisf-album-hover-icon {
    opacity: 1;
}


/* ===== GALLERY SECTION ===== */

.wide-fisf-gallery-section {
    display: none;
}

.wide-fisf-gallery-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 0px;
}

.wide-fisf-gallery-info {
    flex: 1;
    width: 100%;
}

.wide-fisf-gallery-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.wide-fisf-gallery-subtitle {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
}


/* ===== GALLERY GRID ===== */

.wide-fisf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 5px;
    opacity: 0;
    transform: scale(.97);
    transition: opacity .3s ease, transform .3s ease;
}

.wide-fisf-gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.wide-fisf-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

.wide-fisf-gallery-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    overflow: hidden;
}

.wide-fisf-gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform .3s ease;
    filter: brightness(.8);
}

.wide-fisf-gallery-item:hover .wide-fisf-gallery-image {
    transform: scale(1.05);
}

.wide-fisf-gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .6) 70%, transparent 100%);
    padding: 12px;
    color: white;
    z-index: 2;
}

.wide-fisf-gallery-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: white;
}

.wide-fisf-gallery-item-caption {
    font-size: 0.85rem;
    opacity: 0.9;
    color: white;
}


/* ===== LOADER ===== */

.wide-fisf-gallery-loader {
    display: none;
    text-align: center;
    padding: 60px 20px;
}

.wide-fisf-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: wide-fisf-spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes wide-fisf-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* ===== LIGHTBOX - FULL SCREEN ===== */

.wide-fisf-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.98);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wide-fisf-lightbox.visible {
    display: flex !important;
    opacity: 1;
}

.wide-fisf-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: transparent;
    gap: 0;
}

.wide-fisf-lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    color: white;
    padding: 15px 0;
    min-height: 60px;
    flex-shrink: 0;
}

.wide-fisf-lightbox-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    flex: 1;
    margin: 0;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wide-fisf-lightbox-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.wide-fisf-lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.wide-fisf-lightbox-image-container {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.3);
    min-height: 300px;
}

.wide-fisf-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
}

.wide-fisf-lightbox-caption-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    color: white;
    font-size: 0.95rem;
    text-align: center;
}

.wide-fisf-lightbox-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    padding: 15px 0;
    min-height: 60px;
    flex-shrink: 0;
}

.wide-fisf-lightbox-nav {
    display: flex;
    gap: 12px;
}

.wide-fisf-lightbox-nav-button {
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wide-fisf-lightbox-nav-button:hover {
    background-color: rgba(255, 255, 255, 0.25);
}


/* ===== PREVENT BODY SCROLL WHEN LIGHTBOX IS OPEN ===== */

body.wide-fisf-no-scroll {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}


/* ===== ERROR AND NO PHOTOS MESSAGES ===== */

.wide-fisf-no-photos,
.wide-fisf-error {
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    grid-column: 1 / -1;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}


/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .wide-fisf-albums-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .wide-fisf-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 5px;
    }
    .wide-fisf-gallery-title {
        font-size: 1.4rem;
    }
    .wide-fisf-back-button {
        font-size: .85rem!important;
        padding: 8px 16px!important;
    }
    .wide-fisf-lightbox {
        padding: 10px;
    }
    .wide-fisf-lightbox-content {
        padding: 0;
    }
    .wide-fisf-lightbox-title {
        font-size: 1.1rem;
    }
    .wide-fisf-lightbox-close {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    .wide-fisf-lightbox-nav-button {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .wide-fisf-gallery-grid {
        grid-template-columns: 1fr;
    }
    .wide-fisf-gallery-title {
        font-size: 1.2rem;
    }
    .wide-fisf-gallery-subtitle {
        font-size: 0.9rem;
    }
    .wide-fisf-lightbox-header {
        padding: 10px 0;
        min-height: 50px;
    }
    .wide-fisf-lightbox-footer {
        padding: 10px 0;
        min-height: 50px;
    }
    .wide-fisf-lightbox-title {
        font-size: 1rem;
    }
}

.wide-fisf-album-image-wrapper:hover .wide-fisf-album-title {
    color: var(--e-global-color-primary)!important;
}


/* ===== ALBUM CARDS ===== */

.wide-fisf-album-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    aspect-ratio: 4/3;
    /* Better control of aspect ratio */
}

.wide-fisf-album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.wide-fisf-album-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    /* Make it fill the entire card */
    overflow: hidden;
}

.wide-fisf-album-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
    /* REMOVE: filter: brightness(.6); */
}

.wide-fisf-album-card:hover .wide-fisf-album-image {
    transform: scale(1.05);
}

.wide-fisf-album-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    /* CHANGE: Use solid semi-transparent black instead of gradient */
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    color: white;
    z-index: 2;
}

.wide-fisf-album-title {
    font-size: 1.5rem;
    /* Slightly smaller for better fit */
    font-weight: 600;
    margin-bottom: 4px;
    color: #FFF;
    text-align: center;
}

.wide-fisf-album-hover-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: rgba(0, 0, 0, 0.85);
    padding: 12px 20px;
    border-radius: 25px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.wide-fisf-album-card:hover .wide-fisf-album-hover-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}


/* For responsive design - update the grid */

@media (max-width: 768px) {
    .wide-fisf-albums-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .wide-fisf-album-card {
        aspect-ratio: 16/9;
        /* Wider on mobile */
    }
    .wide-fisf-album-title {
        font-size: 1.2rem;
    }
    .wide-fisf-album-overlay {
        padding: 15px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .wide-fisf-albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}