﻿/* PAGINA DEDICHE */

.dediche-page {
    background: #fbf3e6;
    padding: 55px 0 90px;
    min-height: 75vh;
}

.dediche-intro {
    text-align: center;
    position: relative;
    margin-bottom: 65px;
}

.dediche-date {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #d84b23;
    margin-bottom: 15px;
}

.dediche-intro h1 {
    font-family: 'Caveat', cursive;
    font-size: clamp(55px, 7vw, 90px);
    line-height: 1;
    margin: 0 0 22px;
}

    .dediche-intro h1 span {
        font-family: 'Permanent Marker', cursive;
        font-size: 0.8em;
        color: #d84b23;
        display: inline-block;
        transform: rotate(-3deg);
        background: linear-gradient( transparent 52%, #f7c7b4 52%, #f7c7b4 85%, transparent 85% );
    }

.dediche-intro > p {
    font-size: 15px;
    line-height: 1.8;
    max-width: 510px;
    margin: 0 auto;
}

.dediche-intro-heart {
    position: absolute;
    width: 50px;
    right: 15%;
    top: 0;
}

/* LAYOUT */

.dediche-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 65px;
    align-items: start;
}

/* BIGLIETTINO SCRITTURA */

.dediche-form-note {
    position: relative;
    background: #fffdf7;
    padding: 42px 35px 38px;
    box-shadow: 0 12px 30px rgba(35, 22, 15, 0.1);
    transform: rotate(-1deg);
}

.dediche-form-tape {
    position: absolute;
    width: 90px;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
}

.dediche-form-note h2 {
    font-family: 'Caveat', cursive;
    font-size: 43px;
    line-height: 1;
    margin: 0 0 10px;
}

.dediche-form-subtitle {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 30px;
}

.dediche-field {
    margin-bottom: 23px;
}

    .dediche-field label {
        display: block;
        font-family: 'Caveat', cursive;
        font-size: 28px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .dediche-field input,
    .dediche-field textarea {
        display: block;
        width: 100%;
        box-sizing: border-box;
        border: 1px solid #e6d8cb;
        background: #fff;
        border-radius: 6px;
        padding: 14px 15px;
        font-family: 'DM Sans', sans-serif;
        font-size: 16px;
        line-height: 1.5;
        color: #211c19;
        outline: none;
    }

    .dediche-field textarea {
        resize: vertical;
        min-height: 160px;
    }

        .dediche-field input:focus,
        .dediche-field textarea:focus {
            border-color: #d84b23;
        }

    /* AUTOCOMPILAZIONE IPHONE */

    .dediche-field input:-webkit-autofill,
    .dediche-field input:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
        -webkit-text-fill-color: #211c19 !important;
    }

.dediche-counter {
    text-align: right;
    font-size: 11px;
    color: #8e7770;
    margin-top: 6px;
}

/* PULSANTE */

.dediche-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    background: #d84b23;
    color: white;
    border: 0;
    border-radius: 7px;
    padding: 15px;
    font-family: 'Caveat', cursive;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
}

    .dediche-submit:hover {
        background: #b83e1c;
    }

    .dediche-submit:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.dediche-message {
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 15px;
}

    .dediche-message:empty {
        display: none;
    }

    .dediche-message.success {
        color: #637144;
    }

    .dediche-message.error {
        color: #c13e26;
    }

.dediche-form-heart {
    position: absolute;
    width: 38px;
    right: 10px;
    bottom: -20px;
}

/* ELENCO DEDICHE */

.dediche-list-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 35px;
}

    .dediche-list-heading h2 {
        font-family: 'Caveat', cursive;
        font-size: 45px;
        line-height: 1;
        margin: 0;
    }

    .dediche-list-heading span {
        font-size: 12px;
        color: #8e7770;
        white-space: nowrap;
    }

.dediche-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 22px;
}

.dedica-card {
    position: relative;
    background: #fffdf7;
    padding: 30px 23px 24px;
    box-shadow: 0 8px 20px rgba(35, 22, 15, 0.1);
    transform: rotate(-2deg);
    min-width: 0;
}

    .dedica-card:nth-child(even) {
        transform: rotate(2deg);
    }

.dedica-tape {
    position: absolute;
    width: 72px;
    height: 20px;
    top: -11px;
    left: 50%;
    transform: translateX(-50%) rotate(2deg);
    background: #f7c7b4;
    opacity: 0.85;
}

    .dedica-tape.olive {
        background: #a0a780;
    }

    .dedica-tape.peach {
        background: #f0b39b;
    }

.dedica-card-text {
    font-family: 'Caveat', cursive;
    font-size: 27px;
    line-height: 1.2;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0 0 22px;
}

.dedica-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 10px;
}

    .dedica-card-bottom span {
        font-family: 'Caveat', cursive;
        font-size: 23px;
        font-weight: 700;
        color: #d84b23;
        overflow-wrap: anywhere;
    }

    .dedica-card-bottom img {
        width: 30px;
        height: 30px;
        object-fit: contain;
        flex-shrink: 0;
    }

/* STATO VUOTO */

.dediche-empty,
.dediche-error {
    text-align: center;
    padding: 55px 20px;
}

    .dediche-empty[hidden],
    .dediche-error[hidden] {
        display: none !important;
    }

    .dediche-empty img {
        width: 60px;
        margin-bottom: 12px;
    }

    .dediche-empty h3 {
        font-family: 'Caveat', cursive;
        font-size: 36px;
        margin: 0 0 10px;
    }

    .dediche-empty p {
        font-size: 13px;
    }

/* TABLET */

@media (max-width: 950px) {
    .dediche-layout {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .dediche-form-column {
        max-width: 600px;
        width: 100%;
        margin: 0 auto;
    }
}

/* TELEFONO */

@media (max-width: 700px) {

    .dediche-page {
        padding: 35px 0 65px;
    }

    .dediche-intro {
        margin-bottom: 55px;
    }

        .dediche-intro h1 {
            font-size: 55px;
        }

        .dediche-intro > p {
            font-size: 13px;
        }

    .dediche-intro-heart {
        width: 33px;
        right: 0;
        top: -8px;
    }

    .dediche-form-note {
        padding: 35px 22px 30px;
        transform: none;
    }

        .dediche-form-note h2 {
            font-size: 39px;
        }

    .dediche-field input,
    .dediche-field textarea {
        font-size: 18px !important;
    }

    .dediche-list-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 30px;
    }

        .dediche-list-heading h2 {
            font-size: 42px;
        }

    .dediche-list {
        grid-template-columns: 1fr;
        gap: 35px;
        padding: 5px 8px;
    }

    .dedica-card {
        padding: 30px 25px 25px;
    }

    .dedica-card-text {
        font-size: 29px;
    }
}
/* Rifiniture pagina dediche su telefono */
@media (max-width: 700px) {

    .dediche-layout {
        gap: 85px;
    }

    .dediche-list {
        padding: 10px 16px 35px;
        gap: 38px;
    }

    .dedica-card {
        width: 96%;
        box-sizing: border-box;
        justify-self: center;
    }

    .dediche-page {
        padding-bottom: 85px;
    }
}
/* Testo dei bigliettini più piccolo */
.dedica-card-text {
    font-size: 23px;
    line-height: 1.3;
}

.dedica-card-bottom span {
    font-size: 21px;
}

/* Telefono */
@media (max-width: 700px) {

    .dedica-card-text {
        font-size: 23px;
        line-height: 1.3;
    }

    .dedica-card-bottom span {
        font-size: 20px;
    }
}
/* =========================================
   PAGINA DEDICHE - MOBILE COMPATTA
   ========================================= */

@media (max-width: 700px) {

    /* Meno spazio sopra il titolo */
    .dediche-page {
        padding-top: 12px;
    }

    /* Riduce lo spazio prima del modulo */
    .dediche-intro {
        margin-bottom: 25px;
    }

    /* Data */
    .dediche-date {
        font-size: 10px;
        margin-bottom: 7px;
    }

    /* Titolo principale */
    .dediche-intro h1 {
        font-size: 35px;
        line-height: 1;
        margin-bottom: 8px;
    }

        /* Scritta PENSIERO */
        .dediche-intro h1 span {
            font-size: 0.75em;
        }

    /* Descrizione più compatta */
    .dediche-intro > p {
        font-size: 12px;
        line-height: 1.4;
        margin: 8px auto 0;
        max-width: 310px;
    }

    /* Cuoricino decorativo */
    .dediche-intro-heart {
        width: 23px;
        top: -3px;
        right: 8px;
    }

    /* Bigliettino per scrivere */
    .dediche-form-note {
        padding: 25px 18px 22px;
    }

        /* Titolo del modulo */
        .dediche-form-note h2 {
            font-size: 30px;
            margin-bottom: 5px;
        }

    /* Descrizione del modulo */
    .dediche-form-subtitle {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 16px;
    }

    /* Campi più ravvicinati */
    .dediche-field {
        margin-bottom: 15px;
    }

        .dediche-field label {
            font-size: 24px;
            margin-bottom: 5px;
        }

        /* Riduce leggermente l'altezza del messaggio */
        .dediche-field textarea {
            min-height: 115px;
        }
}
/* Paragrafi uguali alla pagina Album */
.foto-intro > p,
.foto-upload-heading p,
.foto-side-note p,
.foto-bottom p {
    font-family: 'DM Sans', sans-serif;
}