/*
Theme Name: Meu Terço
Theme URI: https://misteriosdorosario.com
Author: Antigravity Agent
Author URI: https://deepmind.google/
Description: Devocionário e Meditações Oficiais da marca Meu Terço.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: misterios
*/

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --primary-catholic: #4b0082;
    --primary-catholic-hover: #3f006d;
    --accent-red: #d2003f;
    --accent-red-hover: #af0035;
    --gold-sacred: #cfad2e;
    --gold-sacred-hover: #b9971f;
    --light-bg: #fdfcf9;

    --bg-base: var(--light-bg);
    --bg-surface: #ffffff;
    --bg-subtle: #f5f1ea;
    --bg-raised: #ffffff;

    --text-strong: #231f20;
    --text-body: #4a4445;
    --text-muted: #736d6f;
    --text-inverse: #ffffff;

    --border-soft: rgba(35, 31, 32, 0.08);
    --border-strong: rgba(75, 0, 130, 0.18);
    --shadow-soft: 0 10px 30px rgba(35, 31, 32, 0.06);
    --shadow-hover: 0 16px 40px rgba(35, 31, 32, 0.1);

    --header-bg: var(--primary-catholic);
    --surface-overlay: rgba(255, 255, 255, 0.98);

    --primary-container: var(--primary-catholic);
    --primary-accent: var(--accent-red);
    --surface: var(--bg-base);
    --on-surface: var(--text-strong);
    --secondary: var(--primary-catholic);
    --gold-accent: var(--gold-sacred);
    --orange-action: var(--accent-red);

    --font-inter: "Inter", sans-serif;
}

body.dark-mode {
    --bg-base: #16121d;
    --bg-surface: #21192b;
    --bg-subtle: #2a2036;
    --bg-raised: #241c2f;

    --text-strong: #ffffff;
    --text-body: #e2d9e8;
    --text-muted: #b9acbf;
    --text-inverse: #ffffff;

    --border-soft: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(186, 153, 255, 0.3);
    --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.24);
    --shadow-hover: 0 18px 44px rgba(0, 0, 0, 0.3);

    --header-bg: #12061f;
    --surface-overlay: rgba(33, 25, 43, 0.98);

    --primary-container: #ba99ff;
    --primary-accent: #ff4d88;
    --gold-accent: #ffdb58;

    color-scheme: dark;
}

body {
    margin: 0;
    padding-top: var(--header-offset, 0px);
    overflow-x: hidden;
    background-color: var(--bg-base);
    color: var(--text-body);
    font-family: var(--font-inter);
    line-height: 1.65;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-strong);
    font-family: var(--font-inter);
    letter-spacing: -0.02em;
}

a {
    color: var(--primary-catholic);
    text-decoration: none;
    transition: color 0.25s ease;
}

@media (hover: hover) {
    a:hover {
        color: var(--primary-catholic-hover);
    }
}

h1 a:hover,
h2 a:hover,
h3 a:hover,
h4 a:hover,
h5 a:hover,
h6 a:hover,
.text-dark.stretched-link:hover {
    color: inherit !important;
}

.text-dark,
body.dark-mode .text-dark {
    color: var(--text-strong) !important;
}

body.dark-mode .entry-content h1,
body.dark-mode .entry-content h2,
body.dark-mode .entry-content h3,
body.dark-mode .entry-content h4,
body.dark-mode .entry-content h5,
body.dark-mode .entry-content h6,
body.dark-mode .article-body-premium__content h1,
body.dark-mode .article-body-premium__content h2,
body.dark-mode .article-body-premium__content h3 {
    color: #ffffff !important;
}

body.dark-mode .entry-content a,
body.dark-mode .article-body-premium__content a {
    color: var(--primary-container);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.text-muted,
.text-body-secondary,
.text-white-50 {
    color: var(--text-muted) !important;
}

.bg-white,
.modal-content,
.offcanvas,
.ambient-shadow {
    background-color: var(--bg-raised) !important;
    color: var(--text-body);
}

.transition-all {
    transition: all 0.25s ease;
}

.no-line-section,
.c-surface {
    background-color: var(--bg-surface);
}

.no-line-section-alt,
.c-surface-subtle {
    background-color: var(--bg-subtle);
}

.ambient-shadow {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}

.main-content-area {
    padding: 3rem 0;
}

.entry-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.entry-content h1 {
    color: var(--text-strong);
    font-size: 2.2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content h2 {
    position: relative;
    padding-bottom: 0.75rem;
    color: var(--primary-catholic);
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
}

.entry-content h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 64px;
    height: 2px;
    border-radius: 999px;
    background-color: var(--gold-sacred);
}

.entry-content h3 {
    color: var(--text-strong);
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content h4 {
    color: var(--text-strong);
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.btn-primary-nocturne,
.btn-sacred-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-width: 190px;
    border: none;
    border-radius: 999px !important;
    background-color: var(--accent-red);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    padding: 0.85rem 1.65rem !important;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.btn-sacred-primary--compact {
    min-width: 0;
    padding: 0.8rem 1.15rem !important;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}

#mt-push-banner {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #4B0082 !important; /* Roxo sólido para garantir visibilidade */
    color: #fff !important;
    border-bottom: 2px solid #FFD700 !important;
    padding: 1rem !important;
    z-index: 999999 !important;
    display: block !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
    animation: mtSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mt-push-banner__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    color: #fff !important;
}

.btn-primary-nocturne:hover,
.btn-sacred-primary:hover {
    background-color: var(--accent-red-hover);
    box-shadow: 0 12px 28px rgba(210, 0, 63, 0.22);
    color: #fff;
    transform: translateY(-2px);
}

.btn-secondary-sacred {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-width: 220px;
    border: 1px solid rgba(207, 173, 46, 0.45);
    border-radius: 999px !important;
    background-color: rgba(207, 173, 46, 0.12);
    color: var(--text-strong);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    padding: 0.95rem 2rem !important;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.btn-secondary-sacred:hover {
    background-color: rgba(207, 173, 46, 0.2);
    border-color: rgba(207, 173, 46, 0.7);
    color: var(--text-strong);
    transform: translateY(-2px);
}

.misterios-faq-item {
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background-color: var(--bg-surface);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.misterios-faq-item:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.misterios-faq-item .accordion-button {
    background-color: var(--bg-surface);
    box-shadow: none !important;
    color: var(--text-strong);
    font-family: var(--font-inter);
    font-size: 1.05rem;
}

.misterios-faq-item .accordion-button:not(.collapsed) {
    background-color: var(--bg-subtle);
    color: var(--primary-catholic);
}

.misterios-faq-item .accordion-body {
    color: var(--text-body);
    font-size: 1rem;
    line-height: 1.75;
}

.form-control,
.form-select {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background-color: var(--bg-surface);
    color: var(--text-body);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(75, 0, 130, 0.25);
    box-shadow: 0 0 0 0.2rem rgba(75, 0, 130, 0.08);
    background-color: var(--bg-surface);
    color: var(--text-body);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.main-footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-soft);
}

.footer-brand__title,
.main-footer h5 {
    color: var(--text-strong);
}

.footer-links a {
    display: inline-flex;
    color: var(--text-muted) !important;
    transition: color 0.25s ease, transform 0.25s ease;
}

.footer-links a:hover {
    color: var(--primary-catholic) !important;
    transform: translateX(4px);
}

.footer-social a {
    color: var(--text-muted) !important;
    font-size: 1.15rem;
    transition: color 0.25s ease, transform 0.25s ease;
}

.footer-social a:hover {
    color: var(--gold-sacred) !important;
    transform: translateY(-2px);
}

.footer-divider {
    border-color: var(--border-soft);
    opacity: 1;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.modal-content {
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-hover);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal.show {
    display: block;
}

.modal-dialog {
    position: relative;
    z-index: 1065;
    margin: 1.75rem auto;
    pointer-events: none;
}

.modal-dialog .modal-content {
    pointer-events: auto;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1055;
    background-color: rgba(17, 13, 22, 0.62);
}

.modal-backdrop.fade.show {
    opacity: 1;
}

body.dark-mode .btn-close {
    filter: invert(1) grayscale(1);
}

.carousel-item {
    transition: transform 1s ease !important;
}

@media (max-width: 767px) {
    .btn-primary-nocturne,
    .btn-secondary-sacred,
    .btn-sacred-primary {
        min-width: unset;
        width: 100%;
        padding: 0.85rem 1.35rem !important;
    }

    .btn-sacred-primary--compact {
        padding: 0.76rem 1rem !important;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    h1.display-4 {
        font-size: 1.8rem !important;
    }

    h1 {
        font-size: 1.55rem !important;
    }

    h2 {
        font-size: 1.35rem !important;
    }

    .entry-content {
        padding: 0 0.8rem !important;
    }
}
