﻿/* PAGINA FOTO */

.foto-page {
    background: #fbf3e6;
    padding: 55px 0 80px;
    min-height: 75vh;
}

.foto-intro {
    text-align: center;
    position: relative;
    max-width: 680px;
    margin: 0 auto 55px;
}

.foto-date {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #d84b23;
    margin-bottom: 14px;
}

.foto-intro h1 {
    font-family: 'Caveat', cursive;
    font-size: clamp(48px, 6vw, 80px);
    line-height: 0.95;
    color: #181513;
    margin: 0 0 25px;
}

    .foto-intro h1 span {
        display: inline-block;
        font-family: 'Permanent Marker', cursive;
        font-size: 0.85em;
        color: #d84b23;
        background: linear-gradient( transparent 48%, #f7c7b4 48%, #f7c7b4 82%, transparent 82% );
        transform: rotate(-2deg);
    }

.foto-intro > p {
    font-size: 15px;
    line-height: 1.8;
    max-width: 490px;
    margin: 0 auto;
}

.foto-intro-heart {
    position: absolute;
    width: 48px;
    right: 25px;
    top: 15px;
    transform: rotate(15deg);
}

/* LAYOUT */

.foto-upload-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.8fr);
    gap: 55px;
    align-items: start;
}

/* BOX CARICAMENTO */

.foto-upload-box {
    background: #fffdf7;
    border: 1px solid #f2e4d6;
    border-radius: 8px;
    padding: 35px;
    box-shadow: 0 12px 35px rgba(60, 35, 20, 0.055);
}

.foto-upload-heading h2 {
    font-family: 'Caveat', cursive;
    font-size: 39px;
    line-height: 1;
    margin: 0 0 10px;
}

.foto-upload-heading p {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 30px;
}

.foto-field {
    margin-bottom: 24px;
}

    .foto-field label {
        display: block;
        font-family: 'Caveat', cursive;
        font-size: 27px;
        font-weight: 700;
        margin-bottom: 9px;
    }

    .foto-field input {
        display: block;
        width: 100%;
        box-sizing: border-box;
        border: 1px solid #e7d7c8;
        border-radius: 6px;
        padding: 14px 16px;
        font-family: 'DM Sans', sans-serif;
        font-size: 14px;
        background: #fff;
        color: #211c19;
        outline: none;
    }

        .foto-field input:focus {
            border-color: #d84b23;
        }

/* AREA SELEZIONE */

.foto-dropzone {
    border: 2px dashed #e6a48b;
    background: #fff5ed;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

    .foto-dropzone:hover,
    .foto-dropzone.dragover {
        background: #ffebdf;
        border-color: #d84b23;
    }

.foto-drop-camera {
    display: block;
    width: 65px;
    height: 65px;
    object-fit: contain;
    margin: 0 auto 15px;
    background: #d84b23;
    padding: 12px;
    box-sizing: border-box;
    border-radius: 50%;
}

.foto-dropzone h3 {
    font-family: 'Caveat', cursive;
    font-size: 34px;
    margin: 0 0 8px;
}

.foto-dropzone p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 auto 22px;
    max-width: 280px;
}

.foto-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 13px 22px;
    background: #f7c7b4;
    border-radius: 7px;
    font-family: 'Caveat', cursive;
    font-size: 24px;
    font-weight: 700;
    color: #171412;
}

.foto-dropzone small {
    display: block;
    margin-top: 20px;
    color: #8e7770;
    font-size: 11px;
}

/* ANTEPRIME */

.foto-preview-section {
    margin-top: 30px;
}

    .foto-preview-section[hidden] {
        display: none !important;
    }

.foto-preview-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

    .foto-preview-heading h3 {
        font-family: 'Caveat', cursive;
        font-size: 30px;
        margin: 0;
    }

    .foto-preview-heading span {
        font-size: 12px;
        color: #8b756b;
    }

.foto-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.foto-preview-item {
    position: relative;
    background: white;
    padding: 8px 8px 20px;
    box-shadow: 0 4px 13px rgba(0, 0, 0, 0.11);
    transform: rotate(-2deg);
}

    .foto-preview-item:nth-child(even) {
        transform: rotate(2deg);
    }

    .foto-preview-item img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        display: block;
    }

.foto-preview-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 29px;
    height: 29px;
    border: 0;
    border-radius: 50%;
    background: #d84b23;
    color: white;
    font-size: 19px;
    cursor: pointer;
}

/* PULSANTE PUBBLICA */

.foto-upload-actions {
    margin-top: 30px;
}

.foto-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    width: 100%;
    padding: 17px;
    background: #d84b23;
    color: white;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Caveat', cursive;
    font-size: 28px;
    font-weight: 700;
    transition: background 0.2s;
}

    .foto-submit:hover {
        background: #b83e1c;
    }

    .foto-submit:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.foto-message {
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
}

    .foto-message:empty {
        display: none;
    }

/* COLONNA DESTRA */

.foto-side {
    padding-top: 25px;
}

.foto-side-polaroid {
    position: relative;
    width: 85%;
    margin: 0 auto 50px;
    padding: 12px 12px 24px;
    box-sizing: border-box;
    background: #fffdf7;
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
    transform: rotate(5deg);
}

    .foto-side-polaroid > img:first-child {
        display: block;
        width: 100%;
        aspect-ratio: 4 / 5;
        object-fit: cover;
    }

    .foto-side-polaroid > span {
        display: block;
        font-family: 'Caveat', cursive;
        font-size: 29px;
        text-align: center;
        margin-top: 10px;
    }

.foto-side-tape {
    position: absolute;
    width: 85px;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
}

.foto-side-note {
    position: relative;
    background: #f7c7b4;
    padding: 25px;
    transform: rotate(-3deg);
}

    .foto-side-note h3 {
        font-family: 'Caveat', cursive;
        font-size: 35px;
        margin: 0 0 10px;
    }

    .foto-side-note p {
        font-family: 'Caveat', cursive;
        font-size: 25px;
        line-height: 1.25;
        margin: 0;
    }

    .foto-side-note > img {
        position: absolute;
        width: 36px;
        bottom: -15px;
        right: 12px;
    }

/* LINK ALBUM */

.foto-bottom {
    text-align: center;
    margin-top: 75px;
}

    .foto-bottom p {
        font-family: 'Caveat', cursive;
        font-size: 32px;
        margin: 0 0 10px;
    }

    .foto-bottom a {
        display: inline-flex;
        gap: 15px;
        align-items: center;
        color: #d84b23;
        text-decoration: none;
        border-bottom: 2px solid #d84b23;
        padding-bottom: 5px;
        font-family: 'Caveat', cursive;
        font-size: 29px;
        font-weight: 700;
    }

/* RESPONSIVE */

@media (max-width: 850px) {
    .foto-upload-layout {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .foto-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
        align-items: center;
        padding: 0;
    }

    .foto-side-polaroid {
        margin-bottom: 0;
    }
}

@media (max-width: 600px) {
    .foto-page {
        padding: 35px 0 55px;
    }

    .foto-intro {
        margin-bottom: 35px;
    }

        .foto-intro h1 {
            font-size: 52px;
        }

        .foto-intro > p {
            font-size: 13px;
            line-height: 1.7;
        }

    .foto-intro-heart {
        width: 30px;
        right: 0;
        top: 5px;
    }

    .foto-upload-box {
        padding: 24px 18px;
    }

    .foto-upload-heading h2 {
        font-size: 34px;
    }

    .foto-dropzone {
        padding: 32px 15px;
    }

    .foto-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .foto-side {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
        gap: 40px;
    }

    .foto-side-polaroid {
        width: 75%;
    }

    .foto-bottom {
        margin-top: 55px;
    }
}
/* Evita lo sfondo giallo dell'autocompletamento */
.foto-field input:-webkit-autofill,
.foto-field input:-webkit-autofill:hover,
.foto-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #211c19 !important;
    caret-color: #211c19;
}

/* Colore del campo quando viene selezionato */
.foto-field input:focus {
    background-color: #ffffff !important;
    border-color: #d84b23 !important;
    outline: none !important;
}
/* Evita lo zoom automatico di Safari quando si scrive il nome */
@media (max-width: 700px) {

    .foto-field input {
        font-size: 16px !important;
        width: 100%;
        box-sizing: border-box;
    }

        .foto-field input:focus {
            font-size: 16px !important;
        }
}
/* Correzione campo nome su iPhone */
@media (max-width: 700px) {

    .foto-field input,
    .foto-field input:focus {
        font-size: 16px !important;
        line-height: 24px !important;
        min-height: 48px;
        transform: none !important;
    }

    .foto-upload-box {
        transform: none !important;
    }
}
/* Evita lo zoom automatico del campo nome su iPhone */
@media (max-width: 700px) {

    #nomeInvitato,
    #nomeInvitato:focus,
    #nomeInvitato:active {
        font-size: 18px !important;
        line-height: 24px !important;
        min-height: 50px !important;
        -webkit-text-size-adjust: 100%;
        transform: none !important;
    }

    .foto-field {
        transform: none !important;
        zoom: 1;
    }
}
/* =========================================
   PAGINA FOTO - MOBILE COMPATTA
   ========================================= */

@media (max-width: 700px) {

    /* Riduce lo spazio sopra il contenuto */
    .foto-page {
        padding-top: 12px;
    }

    /* Avvicina il modulo al titolo */
    .foto-intro {
        margin-bottom: 18px;
    }

    /* Data */
    .foto-date {
        font-size: 10px;
        margin-bottom: 7px;
    }

    /* Titolo principale */
    .foto-intro h1 {
        font-size: 35px;
        line-height: 0.95;
        margin-bottom: 0;
    }

        /* Scritta RICORDI */
        .foto-intro h1 span {
            font-size: 0.78em;
        }

    /* Cuoricino decorativo */
    .foto-intro-heart {
        width: 23px;
        top: 0;
        right: 8px;
    }

    /* Modulo più compatto */
    .foto-upload-box {
        padding: 18px 16px;
    }

    /* Titolo del modulo */
    .foto-upload-heading h2 {
        font-size: 28px;
        margin-bottom: 5px;
    }

    /* Descrizione del modulo */
    .foto-upload-heading p {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 15px;
    }

    /* Campo nome */
    .foto-field {
        margin-bottom: 15px;
    }

        .foto-field label {
            font-size: 24px;
            margin-bottom: 5px;
        }

    /* Area scelta fotografie */
    .foto-dropzone {
        padding: 20px 12px;
    }

    .foto-drop-camera {
        width: 50px;
        height: 50px;
        margin-bottom: 8px;
    }

    .foto-dropzone h3 {
        font-size: 27px;
    }
}
/* Paragrafi uguali alla pagina Album */
.foto-intro > p,
.foto-upload-heading p{
    font-family: 'DM Sans', sans-serif;
}