/* ==========================================================================
   STYLESFRAMES.CSS - ESTILOS CONSOLIDADOS PARA IFRAMES
   ==========================================================================
   Este arquivo consolida todos os estilos comuns dos frames,
   eliminando redundâncias e organizando por seções
   ========================================================================== */

/* ==========================================================================
   1. VARIÁVEIS CSS E CONFIGURAÇÕES GLOBAIS
   ========================================================================== */
:root {
    --primary-color: #8B7355;
    --secondary-color: #6D5940;
    --tertiary-color: #5A4A3A;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --bg-highlight: #f8f8f8;
    --text-primary: #333;
    --text-secondary: #444;
    --text-light: #555;
    --text-muted: #666;
    --border-light: #f0f0f0;
    --border-accent: rgba(0, 0, 0, 0.1);
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 8px 15px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --border-radius-small: 4px;
    --border-radius-large: 12px;
    --max-width: 1380px;
    --transition: all 0.3s ease;
}

/* ==========================================================================
   2. LAYOUT BASE E CONTAINERS
   ========================================================================== */

/* Container principal para páginas */
.content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px;
}

/* Container para páginas de pastoral */
body.pastoral-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px;
    background-color: var(--bg-light);
}

/* Grid layout responsivo */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* ==========================================================================
   3. SISTEMA DE BOTÕES
   ========================================================================== */

/* Container de botões principais */
.btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: var(--bg-light);
    margin: 0;
    flex-wrap: wrap;
}

.btn ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    max-width: var(--max-width);
}

.btn li {
    margin: 0;
    flex: 1;
}

.btn a {
    display: block;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 16px;
    background-color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 6px;
    transition: var(--transition);
    text-align: center;
    width: 100%;
    box-shadow: var(--shadow-light);
    box-sizing: border-box;
    white-space: nowrap;
}

.btn a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ==========================================================================
   4. SISTEMA DE CARDS
   ========================================================================== */

/* Card padrão */
.card {
    background: var(--bg-white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border-left: 4px solid var(--primary-color);
    min-height: 120px;
}

/* Card vazio/placeholder */
.card.empty {
    background: var(--bg-light);
    border-left: 4px solid #ccc;
    opacity: 0.7;
}

/* Títulos dos cards */
.card h2,
.card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold;
}

.card h2 {
    font-size: 1.4em;
}

.card h3 {
    font-size: 1.2em;
}

.card p {
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
}

/* ==========================================================================
   5. SEÇÕES E CONTAINERS ESPECIAIS
   ========================================================================== */

/* Seção principal (usado em várias páginas) */
section {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    margin-bottom: 40px;
}

/* Seção com efeito hover */
section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    transition: var(--transition);
}

/* Seções específicas com cores diferentes */
section.primary {
    border-left: 4px solid var(--primary-color);
}

section.secondary {
    border-left: 4px solid var(--secondary-color);
}

section.secondary h2 {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

section.tertiary {
    border-left: 4px solid var(--tertiary-color);
}

section.tertiary h2 {
    color: var(--tertiary-color);
    border-bottom-color: var(--tertiary-color);
}

/* Containers especiais */
.evangelismo,
.familia-section {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    margin-bottom: 40px;
}

/* ==========================================================================
   6. SISTEMA DE TIPOGRAFIA
   ========================================================================== */

/* Títulos principais das seções */
section h2,
.evangelismo h1,
.familia-section h1 {
    color: var(--primary-color);
    font-size: 2.2em;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
    margin-top: 0;
}

/* Títulos secundários */
.familia-section h2,
.service-item h3 {
    color: var(--primary-color);
    font-size: 1.6em;
    margin-bottom: 20px;
    margin-top: 30px;
}

.service-item h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 8px;
}

/* Texto introdutório destacado */
.intro-text {
    font-size: 1.1em;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 500;
}

/* Texto de descrição padrão */
.description-text,
section p {
    font-size: 1.05em;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: justify;
}

/* Primeiro parágrafo destacado */
section p:first-of-type {
    font-size: 1.1em;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    background: var(--bg-highlight);
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius-small);
    margin-bottom: 30px;
}

/* Listas */
section ul {
    margin: 20px 0;
    padding-left: 25px;
}

section li {
    font-size: 1.05em;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 10px;
}

section li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

/* ==========================================================================
   7. ELEMENTOS DESTACADOS E ESPECIAIS
   ========================================================================== */

/* Citações bíblicas */
.bible-verse {
    background: var(--bg-highlight);
    padding: 20px;
    margin: 25px 0;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius-small);
    font-style: italic;
}

.bible-verse p {
    margin: 0;
    font-size: 1.05em;
    line-height: 1.6;
    color: var(--text-light);
}

.bible-verse cite {
    display: block;
    text-align: right;
    margin-top: 10px;
    font-weight: bold;
    color: var(--primary-color);
    font-style: normal;
}

/* Texto destacado */
.highlight-text {
    background: var(--bg-highlight);
    padding: 20px;
    margin: 25px 0;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius-small);
}

.highlight-text p {
    margin: 0;
    font-size: 1.05em;
    line-height: 1.6;
    color: var(--text-light);
}

/* Seção de citações */
.quote-section {
    margin-top: 40px;
}

.quote-section p {
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--text-secondary);
    text-align: justify;
    font-size: 1.05em;
}

.quote-section .author {
    display: block;
    text-align: right;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 25px;
    font-style: italic;
    font-size: 1.1em;
}

/* Itens de serviço */
.service-item {
    margin-bottom: 30px;
}

.service-item p {
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* Links de contato */
.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.contact-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   8. ESTILOS ESPECÍFICOS DO BOLETIM
   ========================================================================== */

/* Body específico do boletim */
body.boletim-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Container do boletim */
.container.boletim {
    display: flex;
    width: 100%;
    max-width: var(--max-width);
    flex: 1;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Carrossel do boletim */
.carrossel {
    position: relative;
    flex: 0 0 55%;
    max-width: 759px;
    margin: 30px 0;
    text-align: center;
    box-sizing: border-box;
    height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrossel-img {
    max-height: calc(100vh - 60px);
    max-width: 100%;
    width: auto;
    object-fit: contain;
    cursor: pointer;
    display: none;
}

.carrossel-img.ativa {
    display: block;
}

/* Botões do carrossel */
.carrossel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 2em;
    padding: 0 10px;
    cursor: pointer;
    border-radius: var(--border-radius-small);
    z-index: 2;
}

.carrossel-btn.esq {
    left: 10px;
}

.carrossel-btn.dir {
    right: 10px;
}

/* Container da agenda */
.agenda-container {
    flex: 0 0 45%;
    max-width: 621px;
    margin: 30px 0;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    min-height: 300px;
    height: 100vh;
}

.agenda-container iframe {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    max-width: 75%;
    border: 0;
    border-radius: var(--border-radius);
    object-fit: contain;
}

/* ==========================================================================
   9. SISTEMA DE POPUP (BOLETIM)
   ========================================================================== */

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.popup-wrapper {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    padding-bottom: 100px;
}

.popup-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background-color: transparent;
    border-radius: var(--border-radius);
}

.popup-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--border-radius);
}

/* Controles do popup */
.popup-nav {
    position: fixed;
    width: 100%;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1005;
    pointer-events: none;
    box-sizing: border-box;
}

.popup-nav-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    pointer-events: auto;
    position: relative;
    margin: 0 10px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.popup-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-1px);
}

.popup-nav-btn i {
    font-size: 24px;
}

.popup-header {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    gap: 15px;
    z-index: 1002;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px;
    border-radius: var(--border-radius-large);
}

.popup-close,
.share-toggle {
    color: #fff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
    margin: 0;
    transition: var(--transition);
    flex-shrink: 0;
}

.popup-close {
    font-size: 32px;
}

.share-toggle {
    font-size: 20px;
}

.popup-close:hover,
.share-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
}

.share-toggle.active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.popup-controls {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    z-index: 1001;
}

.share-buttons {
    position: fixed;
    top: 80px;
    right: 20px;
    display: none;
    flex-direction: column;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.85);
    padding: 15px;
    border-radius: var(--border-radius-large);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1002;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

.share-buttons.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.popup-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 16px;
    transition: opacity 0.3s;
}

.popup-btn:hover {
    opacity: 0.8;
}

.popup-btn.share {
    width: 45px;
    height: 45px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.popup-btn.share:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

.popup-btn.share i {
    line-height: 1;
}

/* ==========================================================================
   10. RESPONSIVIDADE TABLET (768px)
   ========================================================================== */
@media (max-width: 768px) {

    .content,
    body.pastoral-page {
        padding: 20px 15px;
    }

    .btn {
        padding: 15px 10px;
        gap: 10px;
    }

    .btn ul {
        gap: 10px;
    }

    .btn a {
        font-size: 14px;
        padding: 10px 16px;
        min-width: 120px;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }

    .card,
    section,
    .evangelismo,
    .familia-section {
        padding: 20px;
        margin-bottom: 30px;
    }

    section h2,
    .evangelismo h1,
    .familia-section h1 {
        font-size: 1.8em;
    }

    section p,
    section li {
        font-size: 1em;
    }

    section p:first-of-type {
        font-size: 1.05em;
        padding: 15px;
    }

    /* Boletim responsivo para tablet */
    .container.boletim {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 20px;
        flex: 1;
        min-height: 0;
    }

    .carrossel {
        position: relative;
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .carrossel-img {
        display: none;
        max-width: 100%;
        height: auto;
        margin: 0 auto;
        object-fit: contain;
    }

    .carrossel-img.ativa {
        display: block;
    }

    .carrossel .popup-controls {
        display: none !important;
    }

    .agenda-container {
        width: 100%;
        max-width: 100%;
        margin: 20px auto 0;
        display: flex;
        justify-content: center;
        align-items: center;
        background: var(--bg-light);
        border-radius: var(--border-radius);
        min-height: 600px;
    }

    .agenda-container iframe {
        width: 100%;
        max-width: 100%;
        border: 0;
        border-radius: var(--border-radius);
        object-fit: contain;
        display: block;
        height: 600px;
        min-height: 600px;
    }
}

/* ==========================================================================
   11. RESPONSIVIDADE MOBILE (480px)
   ========================================================================== */
@media (max-width: 480px) {
    .btn ul {
        flex-direction: column;
        width: 100%;
    }

    .btn a {
        width: 100%;
        min-width: auto;
    }

    .card,
    section,
    .evangelismo,
    .familia-section {
        padding: 15px;
        margin-bottom: 25px;
    }

    section h2,
    .evangelismo h1,
    .familia-section h1 {
        font-size: 1.6em;
        text-align: left;
    }

    section p,
    section li {
        font-size: 0.95em;
        text-align: left;
    }

    section ul {
        padding-left: 20px;
    }

    section p:first-of-type {
        font-size: 1em;
        padding: 15px;
        text-align: left;
    }

    .highlight-text,
    .bible-verse {
        padding: 15px;
    }

    /* Popup responsivo para mobile */
    .popup-wrapper {
        padding: 10px;
        padding-bottom: 100px;
    }

    .popup-content {
        width: 95vw;
        margin: 0 auto;
        position: relative;
        z-index: 1003;
    }

    .popup-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.7);
    }

    .popup-controls {
        bottom: 10px;
    }

    .share-buttons {
        padding: 12px 20px;
        margin: 0 10px;
    }

    body.popup-open {
        overflow: hidden;
    }

    .popup-nav {
        position: fixed;
        width: 100%;
        padding: 0 5px;
        box-sizing: border-box;
    }

    .popup-nav-btn {
        width: 48px;
        height: 48px;
        background: rgba(0, 0, 0, 0.8);
        box-shadow: var(--shadow-light);
        margin: 0;
    }

    .popup-nav-btn:active {
        background: rgba(0, 0, 0, 0.95);
        transform: scale(0.95);
    }

    .popup-btn.share {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* ==========================================================================
   12. CLASSES UTILITÁRIAS
   ========================================================================== */

/* Classes de cor para diferentes seções */
.color-primary {
    color: var(--primary-color) !important;
}

.color-secondary {
    color: var(--secondary-color) !important;
}

.color-tertiary {
    color: var(--tertiary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.bg-tertiary {
    background-color: var(--tertiary-color) !important;
}

.border-primary {
    border-left-color: var(--primary-color) !important;
}

.border-secondary {
    border-left-color: var(--secondary-color) !important;
}

.border-tertiary {
    border-left-color: var(--tertiary-color) !important;
}

/* Classes de spacing */
.mb-20 {
    margin-bottom: 20px !important;
}

.mb-30 {
    margin-bottom: 30px !important;
}

.mb-40 {
    margin-bottom: 40px !important;
}

.p-20 {
    padding: 20px !important;
}

.p-30 {
    padding: 30px !important;
}

.p-40 {
    padding: 40px !important;
}

/* Classes de texto */
.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.text-justify {
    text-align: justify !important;
}

.font-weight-bold {
    font-weight: bold !important;
}

.font-weight-normal {
    font-weight: normal !important;
}

/* Classes de visibilidade */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ==========================================================================
   CORREÇÕES PARA SCROLL EM IFRAME
   ========================================================================== */

/* Garantir scroll adequado quando o conteúdo está em iframe */
body {
    overflow-y: auto !important;
    overflow-x: hidden;
    height: auto !important;
    min-height: 100vh !important; /* Altura mínima adequada */
}

/* Específico para containers que estavam com 100vh */
.agenda-container {
    height: auto !important;
    min-height: 300px;
    max-height: none !important;
}

.container.boletim {
    min-height: 100vh !important; /* Altura adequada para conteúdo real */
    height: auto !important;
}

/* Garantir que iframes dentro de frames funcionem */
.agenda-container iframe {
    height: 400px !important;
    max-height: none !important;
}

/* ==========================================================================
   FIM DO ARQUIVO - STYLESFRAMES.CSS
   ========================================================================== */