﻿/* PAGINA ALBUM */

.album-page {
    background: #fbf3e6;
    min-height: 75vh;
    padding: 55px 0 95px;
}

.album-intro {
    text-align: center;
    position: relative;
    margin-bottom: 55px;
}

.album-date {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #d84b23;
    margin-bottom: 15px;
}

.album-intro h1 {
    font-family: 'Caveat', cursive;
    font-size: clamp(55px, 7vw, 95px);
    line-height: 1;
    margin: 0 0 20px;
    color: #181513;
}

    .album-intro h1 span {
        font-family: 'Permanent Marker', cursive;
        font-size: 0.85em;
        color: #d84b23;
        display: inline-block;
        transform: rotate(-3deg);
    }

.album-intro > p {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    max-width: 500px;
    margin: 0 auto;
}

.album-intro-heart {
    position: absolute;
    width: 55px;
    top: 0;
    right: 16%;
    transform: rotate(15deg);
}

/* BARRA SUPERIORE */

.album-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
}

.album-count {
    font-family: 'Caveat', cursive;
    font-size: 30px;
    font-weight: 700;
}

.album-add {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: #d84b23;
    color: white;
    text-decoration: none;
    border-radius: 7px;
    padding: 11px 18px;
    font-family: 'Caveat', cursive;
    font-size: 25px;
    font-weight: 700;
}

    .album-add:hover {
        background: #b83e1c;
    }

    .album-add img {
        width: 35px;
        height: 35px;
        object-fit: contain;
    }

/* GRIGLIA POLAROID */

.album-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 45px 25px;
    padding: 15px 10px 35px;
}

.album-polaroid {
    display: block;
    min-width: 0;
    padding: 12px 12px 20px;
    background: #fffdf7;
    border: 0;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 10px 25px rgba(35, 22, 15, 0.12);
    transform: rotate(-3deg);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .album-polaroid:nth-child(4n+2) {
        transform: rotate(3deg);
    }

    .album-polaroid:nth-child(4n+3) {
        transform: rotate(-1deg);
    }

    .album-polaroid:nth-child(4n+4) {
        transform: rotate(4deg);
    }

    .album-polaroid:hover {
        transform: rotate(0deg) translateY(-7px);
        box-shadow: 0 15px 30px rgba(35, 22, 15, 0.18);
    }

    .album-polaroid > img {
        display: block;
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }

.album-polaroid-name {
    display: block;
    font-family: 'Caveat', cursive;
    font-size: 25px;
    font-weight: 700;
    margin-top: 13px;
    overflow-wrap: anywhere;
}

/* ALBUM VUOTO */

.album-empty {
    text-align: center;
    padding: 70px 20px;
}

    .album-empty[hidden],
    .album-error[hidden],
    .album-lightbox[hidden] {
        display: none !important;
    }

    .album-empty > img {
        width: 75px;
        margin-bottom: 20px;
    }

    .album-empty h2 {
        font-family: 'Caveat', cursive;
        font-size: 45px;
        margin: 0 0 12px;
    }

    .album-empty p {
        max-width: 420px;
        margin: 0 auto 25px;
        line-height: 1.7;
    }

    .album-empty a {
        font-family: 'Caveat', cursive;
        font-size: 30px;
        color: #d84b23;
        font-weight: 700;
    }

.album-error {
    padding: 40px;
    text-align: center;
}

/* VISUALIZZAZIONE FOTO INGRANDITA */

.album-modal-open {
    overflow: hidden;
}

.album-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(20, 15, 12, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 70px;
    box-sizing: border-box;
}

.album-lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
    gap: 10px;
}

    .album-lightbox-content img {
        display: block;
        max-width: 100%;
        max-height: 70vh;
        object-fit: contain;
        border: 8px solid #fffdf7;
    }

#albumLightboxName {
    font-family: 'Caveat', cursive;
    font-size: 31px;
    color: white;
}

#albumLightboxPosition {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #c9c0bb;
}

.album-lightbox-close,
.album-lightbox-arrow {
    position: absolute;
    border: 0;
    color: white;
    background: transparent;
    cursor: pointer;
}

.album-lightbox-close {
    top: 15px;
    right: 25px;
    font-size: 48px;
}

.album-lightbox-arrow {
    top: 50%;
    transform: translateY(-50%);
    font-size: 65px;
    padding: 10px;
}

    .album-lightbox-arrow.prev {
        left: 15px;
    }

    .album-lightbox-arrow.next {
        right: 15px;
    }

/* TABLET */

@media (max-width: 1000px) {
    .album-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* TELEFONO */

@media (max-width: 700px) {

    .album-page {
        padding: 35px 0 65px;
    }

    .album-intro {
        margin-bottom: 40px;
    }

        .album-intro h1 {
            font-size: 56px;
        }

        .album-intro > p {
            font-size: 13px;
        }

    .album-intro-heart {
        width: 35px;
        right: 0;
        top: -5px;
    }

    .album-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin-bottom: 30px;
    }

    .album-count {
        font-size: 27px;
    }

    .album-add {
        justify-content: center;
        font-size: 24px;
    }

    .album-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px 15px;
        padding: 10px 4px 30px;
    }

    .album-polaroid {
        padding: 7px 7px 12px;
    }

    .album-polaroid-name {
        font-size: 21px;
        margin-top: 8px;
    }

    .album-lightbox {
        padding: 65px 12px;
    }

    .album-lightbox-content img {
        max-height: 65vh;
        border-width: 5px;
    }

    .album-lightbox-arrow {
        font-size: 43px;
        background: rgba(0,0,0,0.35);
        border-radius: 50%;
        line-height: 1;
    }

        .album-lightbox-arrow.prev {
            left: 5px;
        }

        .album-lightbox-arrow.next {
            right: 5px;
        }
}

@media (max-width: 380px) {
    .album-grid {
        gap: 25px 10px;
    }

    .album-polaroid-name {
        font-size: 19px;
    }
}
/* Polaroid più piccole su telefono */
@media (max-width: 700px) {

    .album-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 18px;
        padding: 12px 14px 35px;
    }

    .album-polaroid {
        width: 92%;
        justify-self: center;
        padding: 7px 7px 12px;
        box-sizing: border-box;
    }

    .album-polaroid-name {
        font-size: 19px;
        margin-top: 8px;
    }
}
/* =========================================
   PAGINA ALBUM - MOBILE COMPATTA
   ========================================= */

@media (max-width: 700px) {

    /* Riduce lo spazio sopra il titolo */
    .album-page {
        padding-top: 12px;
    }

    /* Avvicina le fotografie al titolo */
    .album-intro {
        margin-bottom: 22px;
    }

    /* Data */
    .album-date {
        font-size: 10px;
        margin-bottom: 7px;
    }

    /* Titolo principale */
    .album-intro h1 {
        font-size: 35px;
        line-height: 1;
        margin-bottom: 8px;
    }

        /* Scritta ALBUM */
        .album-intro h1 span {
            font-size: 0.78em;
        }

    /* Descrizione */
    .album-intro > p {
        font-size: 12px;
        line-height: 1.4;
        max-width: 310px;
        margin: 8px auto 0;
    }

    /* Cuoricino decorativo */
    .album-intro-heart {
        width: 23px;
        top: -3px;
        right: 8px;
    }

    /* Barra con numero fotografie e pulsante */
    .album-toolbar {
        gap: 10px;
        margin-bottom: 18px;
    }

    /* Numero fotografie */
    .album-count {
        font-size: 23px;
    }

    /* Pulsante aggiungi foto più compatto */
    .album-add {
        font-size: 21px;
        padding: 9px 14px;
        gap: 10px;
    }

        .album-add img {
            width: 27px;
            height: 27px;
        }
}
/* Evidenziatore rosa sotto ALBUM */
.album-intro h1 span {
    background: linear-gradient( transparent 52%, #f7c7b4 52%, #f7c7b4 85%, transparent 85% );
}
/* Nome di chi ha pubblicato la fotografia */
.album-polaroid-name {
    color: #d84b23 !important;
}
.album-polaroid {
    color: #181513;
}