/* ========== HERO MENSAGENS ========== */
.mensagens-hero {
    position: relative;
    height: calc(100vh - 71px);
    min-height: 500px;
    max-height: 780px;
    margin-top: 71px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
    text-align: center;
}

.mensagens-hero__bg {
    position: absolute;
    inset: 0;
    background-image: url('images/mensagem_hero.png');
    background-size: cover;
    background-position: center 20%;
    filter: saturate(1.1) brightness(0.95) contrast(1.05);
    z-index: 1;
}

.mensagens-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(5, 10, 40, 0.65) 0%,
        rgba(5, 10, 40, 0.20) 35%,
        rgba(5, 10, 40, 0.20) 65%,
        rgba(5, 10, 40, 0.75) 100%
    );
    z-index: 2;
}

.mensagens-hero__content {
    position: relative;
    z-index: 3;
    max-width: 700px;
    padding: 20px;
}

/* ========== FILTROS ========== */
.mensagens-filtros {
    background: white;
    border-bottom: 1px solid #e8f0fe;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

/* Busca */
.mensagens-busca {
    max-width: 560px;
    margin: 0 auto;
}

.busca-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.busca-icon {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
}

.busca-input {
    width: 100%;
    padding: 12px 44px 12px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.busca-input:focus {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.busca-limpar {
    position: absolute;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #64748b;
    transition: all 0.2s ease;
}

.busca-limpar:hover {
    background: #1e3a8a;
    color: white;
}

/* Filtros */
.filter-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.mensagens-filtros .filter-btn {
    padding: 8px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mensagens-filtros .filter-btn:hover {
    border-color: #1e3a8a;
    color: #1e3a8a;
    transform: translateY(-2px);
}

.mensagens-filtros .filter-btn.active {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(59,130,246,0.3);
}

/* Contador */
.mensagens-contador {
    text-align: center;
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 600;
    margin: 8px 0 0;
    letter-spacing: 0.3px;
}

/* ========== GRID ========== */
.mensagens-section {
    background: #f1f5f9;
    min-height: 60vh;
}

.mensagens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ========== CARD ========== */
.msg-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease backwards;
}

.msg-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 48px rgba(0,0,0,0.13);
}

.msg-card--destaque {
    box-shadow: 0 8px 32px rgba(30,58,138,0.15);
}

/* Topo colorido */
.msg-card__topo {
    position: relative;
    height: 80px;
    display: flex;
    align-items: flex-end;
    padding: 12px 16px;
    overflow: hidden;
}

.msg-card__icone-bg {
    position: absolute;
    right: -8px;
    top: -8px;
    font-size: 5rem;
    color: rgba(255,255,255,0.1);
    pointer-events: none;
}

.msg-card__cat-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    z-index: 1;
}

.msg-card__destaque-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(253,230,138,0.95);
    color: #92400e;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Corpo */
.msg-card__corpo {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.msg-card__titulo {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1.3;
}

.msg-card__versiculo {
    font-size: 0.78rem;
    font-weight: 700;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.msg-card__preview {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
    flex: 1;
    font-style: italic;
    margin-bottom: 16px;
}

.msg-card__rodape {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.msg-card__autor {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 600;
}

.msg-card__btn {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(59,130,246,0.28);
}

.msg-card__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(59,130,246,0.38);
}

/* ========== VAZIO ========== */
.mensagens-vazio {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #94a3b8;
    text-align: center;
    gap: 10px;
}

.mensagens-vazio i {
    font-size: 3rem;
    opacity: 0.4;
}

.mensagens-vazio p {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.mensagens-vazio small {
    font-size: 0.88rem;
}

/* ========== MODAL ========== */
.msg-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 40, 0.75);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.msg-modal.active {
    opacity: 1;
    pointer-events: all;
}

.msg-modal__box {
    background: white;
    border-radius: 22px;
    max-width: 560px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 70px rgba(0,0,0,0.28);
    animation: modalIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.msg-modal__box::-webkit-scrollbar { width: 5px; }
.msg-modal__box::-webkit-scrollbar-track { background: transparent; }
.msg-modal__box::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.msg-modal.active .msg-modal__box {
    animation: modalIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.msg-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #64748b;
    transition: all 0.2s ease;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.msg-modal__close:hover {
    background: #1e3a8a;
    color: white;
    transform: rotate(90deg);
}

.msg-modal__categoria {
    display: inline-block;
    color: white;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 28px 28px 16px;
}

.msg-modal__titulo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    padding: 0 28px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.msg-modal__versiculo {
    margin: 0 28px 20px;
    padding: 18px 20px;
    background: #f8fafc;
    border-radius: 14px;
    border-left: 4px solid #1e3a8a;
    position: relative;
}

.msg-modal__versiculo > i {
    font-size: 2rem;
    color: #e2e8f0;
    position: absolute;
    top: 8px;
    right: 12px;
}

.msg-modal__versiculo blockquote {
    font-size: 0.97rem;
    color: #374151;
    font-style: italic;
    line-height: 1.7;
    margin: 0 0 8px;
    border: none;
    padding: 0;
}

.msg-modal__versiculo cite {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e3a8a;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.msg-modal__reflexao {
    padding: 0 28px 20px;
    font-size: 0.97rem;
    color: #4b5563;
    line-height: 1.85;
}

.msg-modal__autor {
    margin: 0 28px 28px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f4ff, #e8f0fe);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e3a8a;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 768px) {
    .mensagens-hero {
        height: 70vh;
        min-height: 400px;
    }

    .mensagens-filtros {
        top: 56px;
    }

    .mensagens-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .msg-modal__titulo { font-size: 1.2rem; }
    .msg-modal__categoria,
    .msg-modal__titulo,
    .msg-modal__versiculo,
    .msg-modal__reflexao,
    .msg-modal__autor { margin-left: 18px; margin-right: 18px; padding-left: 0; padding-right: 0; }
    .msg-modal__versiculo { padding: 14px 16px; }
}