/*
|--------------------------------------------------------------------------
| Funerária LaPaz - Memorial
|--------------------------------------------------------------------------
| Layout público do memorial individual.
|
| Este arquivo foi refeito para acompanhar o Blade copiado do memorial.php
| original da Lapaz:
| - foto circular centralizada;
| - nome e ícones abaixo da foto;
| - seções simples com divisórias;
| - áudio/vídeo em card central;
| - livro de mensagens por modal;
| - cerimônias em lista;
| - galeria com lightbox.
|--------------------------------------------------------------------------
*/

/*--------------------------------------------------------------
# Base da página memorial
--------------------------------------------------------------*/
main.main {
    background: #ffffff;
}

main.main>.container.py-4 {
    padding-top: 48px;
    padding-bottom: 64px;
}

main.main section {
    padding: 0;
    overflow: visible;
    background: transparent;
}

/*--------------------------------------------------------------
# Foto principal / Perfil
--------------------------------------------------------------*/
.memorial-photo {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid #ffffff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef6ff;
    color: #106eea;
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 18px;
}

.memorial-photo-placeholder {
    font-family: var(--heading-font);
}

main.main h1 {
    font-family: var(--heading-font);
    font-size: 2.55rem;
    font-weight: 700;
    color: #222222;
    line-height: 1.15;
}

/*--------------------------------------------------------------
# Ícones abaixo do nome
--------------------------------------------------------------*/
.info-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    color: #555555;
    font-size: 0.98rem;
    margin-top: 10px;
}

.info-icons span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.info-icons i {
    font-size: 1rem;
    line-height: 1;
}

/*--------------------------------------------------------------
# Cards centrais de áudio e vídeo
--------------------------------------------------------------*/
.mem-audio .card,
main.main .card.shadow-sm {
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.mem-audio h6,
main.main .card.shadow-sm h6 {
    font-family: var(--heading-font);
    font-size: 1rem;
    font-weight: 700;
}

.mem-audio audio,
main.main audio {
    min-height: 44px;
}

.js-youtube-embed {
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #000000;
}

/*--------------------------------------------------------------
# Conteúdo central
--------------------------------------------------------------*/
main.main .mx-auto[style*="max-width: 900px"] {
    color: #333333;
    font-family: var(--default-font);
}

main.main .mx-auto[style*="max-width: 900px"] section {
    margin-top: 36px;
    margin-bottom: 36px;
}

main.main .mx-auto[style*="max-width: 900px"] p {
    color: #444444;
    font-size: 1rem;
    line-height: 1.75;
}

/*--------------------------------------------------------------
# Títulos das seções do memorial
--------------------------------------------------------------*/
main.main h4.section-title,
main.main h5.section-title {
    display: block;
    text-align: center;
    color: #222222;
    font-family: var(--heading-font);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    background: transparent;
    padding: 0;
    margin: 0 0 18px 0;
    border-radius: 0;
}

main.main h5.section-title {
    font-size: 1.15rem;
    margin-top: 22px;
}

/*--------------------------------------------------------------
# Divisórias entre seções
--------------------------------------------------------------*/
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right,
            transparent,
            rgba(0, 0, 0, 0.16),
            transparent);
    margin: 34px auto;
}

/*--------------------------------------------------------------
# Nota e biografia
--------------------------------------------------------------*/
.bio-text {
    text-align: center;
    color: #444444;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 0;
}

.placeholder-text {
    text-align: center;
    color: #777777;
    font-style: italic;
}

/*--------------------------------------------------------------
# Botão Assinar Livro
--------------------------------------------------------------*/
.assinar-cta {
    border-radius: 999px;
    padding: 9px 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 5px 14px rgba(13, 110, 253, 0.22);
}

.assinar-cta:hover {
    transform: translateY(-1px);
}

/*--------------------------------------------------------------
# Lista de mensagens / assinaturas
--------------------------------------------------------------*/
#mensagem-box {
    max-width: 840px;
    margin-left: auto;
    margin-right: auto;
}

#mensagem-box .list-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-radius: 0;
}

#mensagem-box .list-group-item.memorial-message-card {
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 14px;
    padding: 22px 26px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.memorial-message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 14px;
}

.memorial-message-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.memorial-message-author strong {
    color: #172033;
    font-size: 1rem;
    font-weight: 700;
}

.memorial-message-author small {
    color: #6b7280;
    font-size: 0.85rem;
}

.memorial-message-date {
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.memorial-message-text {
    color: #3f4654;
    font-size: 1rem;
    line-height: 1.75;
    margin: 0;
}

.msg-email {
    word-break: break-word;
}

@media (max-width: 575.98px) {
    #mensagem-box .list-group-item.memorial-message-card {
        padding: 18px;
    }

    .memorial-message-header {
        flex-direction: column;
        gap: 8px;
    }

    .memorial-message-date {
        white-space: normal;
        font-size: 0.85rem;
    }

    .memorial-message-text {
        font-size: 0.95rem;
    }
}

/*--------------------------------------------------------------
# Modal de mensagem
--------------------------------------------------------------*/
#msgModal .modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}

#msgModal .modal-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

#msgModal .modal-title {
    font-family: var(--heading-font);
    font-weight: 700;
    color: #222222;
}

#msgModal .form-label {
    font-weight: 600;
    color: #333333;
}

#msgModal .form-control {
    border-radius: 10px;
    border-color: #d0d7de;
    min-height: 44px;
}

#msgModal textarea.form-control {
    min-height: 130px;
}

#msgModal .form-control:focus {
    border-color: #106eea;
    box-shadow: 0 0 0 0.2rem rgba(16, 110, 234, 0.12);
}

/*--------------------------------------------------------------
# Cerimônias
--------------------------------------------------------------*/
main.main .list-group {
    border-radius: 12px;
}

main.main .list-group-item {
    border-color: rgba(0, 0, 0, 0.08);
    padding: 16px;
}

.mem-item {
    color: #333333;
}

.mem-item strong {
    color: #222222;
}

.mem-item small {
    color: #555555;
}

.addr-line {
    margin: 5px 0 0;
    color: #555555;
}

.mem-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.mem-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #106eea;
    color: #106eea;
    background: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.25s ease;
}

.mem-link:hover {
    background: #106eea;
    color: #ffffff;
    text-decoration: none;
}

.mem-map {
    width: 100%;
    height: 280px;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    background: #e9ecef;
}

/*--------------------------------------------------------------
# Galeria
--------------------------------------------------------------*/
#mem-galeria-sec {
    padding-bottom: 20px;
}

.gallery-thumb-btn {
    width: 100%;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.gallery-thumb {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 10px;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.gallery-thumb:hover {
    transform: scale(1.035);
    filter: brightness(0.95);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

/*--------------------------------------------------------------
# Lightbox Memorial
--------------------------------------------------------------*/
.memorial-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.88);
    z-index: 99999;
}

.memorial-lightbox.is-open {
    display: flex;
}

.memorial-lightbox-content {
    position: relative;
    width: 100%;
    max-width: 1120px;
    text-align: center;
}

.memorial-lightbox-image {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 16px 54px rgba(0, 0, 0, 0.55);
}

.memorial-lightbox-close,
.memorial-lightbox-nav {
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #111111;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.memorial-lightbox-close:hover,
.memorial-lightbox-nav:hover {
    background: #ffffff;
    transform: scale(1.05);
}

.memorial-lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 46px;
    height: 46px;
    font-size: 1.8rem;
    line-height: 1;
}

.memorial-lightbox-nav {
    position: absolute;
    top: 50%;
    width: 52px;
    height: 52px;
    font-size: 2rem;
    line-height: 1;
}

.memorial-lightbox-prev {
    left: 14px;
}

.memorial-lightbox-next {
    right: 14px;
}

/*--------------------------------------------------------------
# Compatibilidade com classes antigas, caso alguma ainda fique no Blade
--------------------------------------------------------------*/
.memorial-page {
    background-color: #ffffff;
    color: #444444;
}

.memorial-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    font-weight: 700;
    text-decoration: none;
}

.memorial-back-link:hover {
    color: #106eea;
}

.memorial-section-title {
    color: #222222;
    font-family: var(--heading-font);
    font-weight: 700;
    text-align: center;
}

.video-list,
.audio-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-card,
.audio-card {
    background: #ffffff;
    border: 0;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.video-card-title {
    color: #0d6efd;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.video-card iframe {
    border: 0;
    border-radius: 10px;
}

/*--------------------------------------------------------------
# Responsivo
--------------------------------------------------------------*/
@media (max-width: 991.98px) {
    main.main>.container.py-4 {
        padding-top: 36px;
    }

    main.main h1 {
        font-size: 2.15rem;
    }

    .memorial-photo {
        width: 155px;
        height: 155px;
    }

    .mem-map {
        height: 240px;
    }
}

@media (max-width: 767.98px) {
    main.main>.container.py-4 {
        padding-top: 28px;
        padding-bottom: 48px;
    }

    .memorial-photo {
        width: 135px;
        height: 135px;
        font-size: 3rem;
    }

    main.main h1 {
        font-size: 1.9rem;
    }

    .info-icons {
        gap: 10px;
        font-size: 0.9rem;
    }

    .info-icons span {
        white-space: normal;
        justify-content: center;
    }

    main.main .mx-auto[style*="max-width: 900px"] section {
        margin-top: 30px;
        margin-bottom: 30px;
    }

    main.main h4.section-title {
        font-size: 1.28rem;
    }

    .gallery-thumb {
        height: 135px;
    }

    .memorial-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.55rem;
    }

    .memorial-lightbox-prev {
        left: 8px;
    }

    .memorial-lightbox-next {
        right: 8px;
    }

    .memorial-lightbox-close {
        top: -10px;
        right: -10px;
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 575.98px) {
    .info-icons {
        flex-direction: column;
        align-items: center;
        gap: 7px;
    }

    .mem-audio .card,
    main.main .card.shadow-sm {
        padding: 0.9rem;
    }

    main.main .mx-auto[style*="max-width: 900px"] p {
        font-size: 0.95rem;
    }

    .msg-toggle {
        flex-direction: column;
        gap: 8px;
    }

    .msg-toggle>.d-flex {
        width: 100%;
        justify-content: space-between;
    }

    .mem-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .mem-link {
        width: 100%;
        justify-content: center;
    }

    .mem-map {
        height: 210px;
    }

    .gallery-thumb {
        height: 120px;
    }
}