/* Estilos isolados para o conteúdo principal */
#main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.intro {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.intro h2 {
    font-size: 2.5rem;
    color: #193764;
    margin-bottom: 1rem;
    font-weight: 700;
}

.intro p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #4a5568;
    max-width: 800px;
    margin: 0 auto;
}

.flowchart {
    position: relative;
    padding: 2rem 0;
    margin-bottom: 4rem;
}

.flowchart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, #193764, #2c5282, #193764);
    z-index: 1;
    border-radius: 3px;
}

.step {
    position: relative;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    z-index: 2;
}

.step:nth-child(odd) {
    flex-direction: row;
}

.step:nth-child(even) {
    flex-direction: row-reverse;
}

.step-content {
    width: 45%;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-left: 6px solid #193764;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    cursor: pointer;
}

.step-content:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
}

.step-number {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: #193764;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    z-index: 3;
    border: 4px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.step-title {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.step-title i {
    font-size: 1.8rem;
    color: #193764;
    margin-right: 0.75rem;
    background: rgba(25, 55, 100, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-title h3 {
    font-size: 1.5rem;
    color: #193764;
    font-weight: 700;
}

.step-description {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.5;
    font-weight: 500;
}

.branch {
    position: relative;
    margin: 3rem 0;
    display: flex;
    justify-content: center;
}

.branch::before {
    content: '';
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 3rem;
    background: linear-gradient(to bottom, #2c5282, #193764);
    z-index: 1;
}

.branch::after {
    position: absolute;
    top: 1.5rem;
    left: 25%;
    width: 50%;
    height: 6px;
    background: linear-gradient(to right, #193764, #2c5282);
    z-index: 1;
    border-radius: 3px;
}

.branch-step {
    width: 45%;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-left: 6px solid #193764;
    margin: 0 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.branch-step:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.highlight {
    color: #ffd700;
    font-weight: 700;
}

/* Estilos para o overlay de conteúdo */
.content-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.content-overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-close {
    position: fixed;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1002;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.overlay-close:hover {
    transform: rotate(90deg);
    background: #e74c3c;
}

.overlay-content {
    width: 100%;
    height: 100%;
    max-width: 100%;
    position: relative;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transform: none;
    transition: opacity 0.4s ease;
    opacity: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.content-overlay.active .overlay-content {
    transform: translateY(0);
    opacity: 1;
}

#content-iframe {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    border: none;
    background: white;
    display: block;
    margin: 0;
    padding: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* Estilo para o conteúdo dentro do iframe */
#content-iframe {
    overflow-x: hidden !important;
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    display: block;
}

#content-iframe html,
#content-iframe body {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Estilos para garantir que o conteúdo se ajuste */
#content-iframe .slide {
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    transform-origin: top center;
    transform: scale(0.9);
    margin: 0 auto;
}

#content-iframe .content {
    flex-direction: column !important;
    padding: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

#content-iframe .left-panel,
#content-iframe .right-panel {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin-bottom: 20px;
    box-sizing: border-box;
}

#content-iframe .header {
    padding: 20px !important;
    box-sizing: border-box;
}

#content-iframe .title {
    font-size: 28px !important;
    word-wrap: break-word;
}

#content-iframe .subtitle {
    font-size: 18px !important;
    word-wrap: break-word;
}

#content-iframe .concept-card,
#content-iframe .verse-card,
#content-iframe .illustration-card {
    padding: 15px !important;
    margin-bottom: 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

#content-iframe .key-point-text {
    font-size: 16px !important;
    word-wrap: break-word;
}

#content-iframe .verse {
    font-size: 16px !important;
    word-wrap: break-word;
}

/* Garante que as imagens sejam responsivas */
#content-iframe img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* Garante que o conteúdo dentro do iframe possa rolar */
#content-iframe body {
    padding: 20px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Estilo para a barra de rolagem */
#content-iframe::-webkit-scrollbar {
    width: 8px;
}

#content-iframe::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#content-iframe::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#content-iframe::-webkit-scrollbar-thumb:hover {
    background: #555;
}

#content-iframe::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

#content-iframe::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

#content-iframe::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.overlay-content p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.overlay-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.overlay-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Responsividade */
@media (max-width: 1024px) {
    .step,
    .step:nth-child(odd),
    .step:nth-child(even) {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .step-content {
        width: 90%;
        margin-top: 30px;
    }

    .step-title {
        flex-direction: column;
        text-align: center;
    }

    .step-title i {
        margin: 0 0 1rem 0;
    }

    .branch {
        flex-direction: column;
        align-items: center;
    }

    .branch-step {
        width: 90%;
        margin: 1rem 0;
    }

    .branch::before {
        display: none;
    }

    .branch::after {
        width: 6px;
        height: 2rem;
        left: 50%;
        top: auto;
        bottom: -2rem;
        background: linear-gradient(to bottom, #193764, #2c5282);
    }
}

@media (max-width: 768px) {
    .intro h2 {
        font-size: 2rem;
    }

    .intro p {
        font-size: 1.1rem;
    }

    .step-title h3 {
        font-size: 1.3rem;
    }

    .step-description {
        font-size: 0.95rem;
    }
    
    .overlay-content {
        padding: 1.5rem;
    }
    
    .overlay-content h2 {
        font-size: 1.5rem;
    }
}
