/* Artigo (single) - Clone do site original */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Astra Global Colors */
    --ast-global-color-0: #00CEB1;
    --ast-global-color-1: #00CEB1;
    --ast-global-color-2: #000000;
    --ast-global-color-3: rgba(1, 17, 32, 0.75);
    /* Primary Text Color */
    --ast-global-color-4: #f9f8f8;
    --ast-global-color-5: #ffffff;
    --ast-global-color-6: #f2f5f7;
    --ast-global-color-7: #424242;
    --ast-global-color-8: #000000;

    --primary-color: var(--ast-global-color-0);
    --primary-dark: #00a088;
    --text-dark: #011120;
    --text-body: var(--ast-global-color-3);
    --text-muted: var(--ast-global-color-3);
    --white: var(--ast-global-color-5);
    --black: var(--ast-global-color-2);
    --bg-body: var(--ast-global-color-4);
    --border-teal: #23D2BA;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 112.5%;
    /* 112.5% of 16px = 18px base, so 1rem = 18px */
}

html,
body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-dark);
    background-color: var(--bg-body);
    font-size: 1rem;
    line-height: 1.85714285714286;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: #00CEB1;
}

a:hover,
a:focus {
    color: #008f7b;
    text-decoration: underline;
}

ol,
ul {
    margin: 0 0 1.5em 3em;
    box-sizing: border-box;
}

ul {
    list-style: disc;
}

li>ol,
li>ul {
    margin-bottom: 0;
    margin-left: 1.5em;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

pre {
    display: block;
    padding: 9.5px;
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.42857143;
    color: #333;
    word-break: break-all;
    word-wrap: break-word;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* ===================== HEADER ===================== */
#masthead {
    position: relative;
    width: 100%;
    z-index: 1000;
    font-size: 16px;
    line-height: 1.6;
}

.main-header-bar {
    background: #000000;
    padding: 20px 0;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: 350px;
    height: auto;
}

.logo {
    display: flex;
    flex-direction: column;
}

@media (min-width: 1201px) {
    .logo {
        margin-left: 25px;
    }
}

.logo-tagline {
    color: #ffffff;
    font-size: 18px;
    font-weight: 400;
    margin-top: -5px;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-list li {
    padding: 0;
}

.nav-list a {
    font-size: 18px;
    font-weight: 400;
    color: var(--white);
    padding: 0 18px;
    transition: transform 0.3s;
    display: inline-block;
}

.nav-list a:hover {
    transform: scale(1.2);
}

.nav-list a.current {
    text-decoration: none;
}

/* Publique Button - Teal Pill */
.nav-list a.nav-btn-teal {
    background-color: var(--primary-color);
    color: var(--black);
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 700;
}

.nav-list a.nav-btn-teal:hover {
    transform: scale(1.2);
}

/* ===================== MAIN CONTENT ===================== */
#content {
    background-color: var(--bg-body);
}

#primary {
    max-width: 1200px;
    margin: 0 auto;
}

.ast-container {
    padding: 96px 120px 80px;
    background-color: var(--white);
    /* White background */
    border: 1px solid rgba(0, 0, 0, 0.02);
    /* Extremely subtle border */
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
    /* Very soft shadow */
    margin: 80px auto;
    /* Increased vertical spacing */
    /* Vertical margins for spacing */
}



.ast-article-single {
    width: 100%;
}

.entry-header {
    margin-bottom: 35px;
    text-align: center;
    /* Center all header content */
}

.entry-title {
    font-size: 50px;
    /* 50px at desktop per original */
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    color: #000000;
    /* Black per original */
    margin-bottom: 20px;
    text-align: center;
}

.entry-subtitle {
    font-size: 18px;
    /* 18px at desktop per original */
    /* Slightly lighter per user feedback */
    color: #808080;
    /* Grey - also applied via inline style on b tag */
    margin-bottom: 28.8px;
    /* Per original */
    text-align: center;
    line-height: 1.45;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
    /* Center meta info */
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 22px;
}

.meta-sep {
    color: var(--primary-color);
    font-size: 0.8em;
    font-weight: bold;
    vertical-align: middle;
    opacity: 0.6;
}

.cat-links a {
    color: var(--primary-color);
    font-size: 18px;
    transition: color 0.3s;
}

.cat-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.entry-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    /* Center DOI and PDF button */
    gap: 16px 22px;
    padding: 22px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 30px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
    transition: all 0.3s;
    white-space: nowrap;
}

.pdf-btn:hover {
    background-color: var(--primary-color);
    color: var(--black);
}

/* DOI Section - matches original site */
.doi-section {
    text-align: center;
    font-size: 18px;
    font-weight: 400;
    color: rgba(1, 17, 32, 0.75);
    /* Semi-transparent dark per original */
    margin-top: 0;
    margin-bottom: 28.8px;
}

.doi-section a {
    color: var(--primary-color);
    /* Teal #00CEB1 */
    text-decoration: none;
    font-weight: 400;
}

.doi-section a:hover {
    text-decoration: underline;
}

.entry-content {
    margin-top: 35px;
    font-family: var(--font-body);
    font-size: 18px;
    /* Adjusted to 18px per feedback */
    line-height: 1.85714285714286;
    color: var(--text-body);
    text-align: justify;
    word-wrap: break-word;
}

.entry-content p {
    margin-bottom: 1.6em;
}

/* H2 styles removed as they are just strong tags now */

.entry-content strong {
    font-weight: 700;
    color: var(--ast-global-color-3);
    /* Dark Blue-Gray from Astra theme */
}

.entry-content ul {
    list-style: none;
    margin: 0 0 24px 20px;
}

.entry-content ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
}

.entry-content ul li::before {
    content: '•';
    color: inherit;
    font-weight: bold;
    font-size: 24px;
    position: absolute;
    left: 0;
    top: -5px;
}

.entry-content .table>figcaption {
    display: table-caption;
    caption-side: top;
    word-break: break-word;
    text-align: center;
    color: hsl(0, 0%, 20%);
    background-color: hsl(0, 0%, 97%);
    padding: .6em;
    font-size: .75em;
    outline-offset: -1px;
}

.entry-content .image.image_resized>figcaption {
    display: block;
}

.entry-content .image>figcaption {
    display: block;
    caption-side: bottom;
    word-break: break-word;
    color: hsl(0, 0%, 20%);
    background-color: hsl(0, 0%, 97%);
    padding: .6em;
    margin-bottom: 8px;
    font-size: .75em;
    outline-offset: -1px;
    text-align: center;
}

.entry-content .table .ck-table-resized {
    table-layout: fixed;
}

.entry-content img.image_resized {
    height: auto;
}

.entry-content .image.image_resized {
    max-width: 100%;
    display: block;
    box-sizing: border-box;
}

.entry-content .image.image_resized img {
    width: 100%;
}

.author-line {
    font-size: 16.416px;
    /* Per original */
    text-align: right;
    /* Right-aligned per original */
    margin-bottom: 26px;
}

.affiliation {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: -8px;
    text-align: center;
}

/* Dividers / HR */
hr {
    display: block;
    height: 0px;
    border: 0;
    border-top: 3px solid #00CEB1;
    margin: 1em 0;
    padding: 0;
    width: 100%;
}

table {
    border-collapse: separate;
    border-spacing: 0px;
    border: 1px solid var(--ast-border-color, #dddddd);
    border-width: 1px 0px 0px 1px;
    margin: 0px 0px 27px;
    padding: 0px;
    width: 100%;
    background-color: transparent;
    color: rgba(1, 17, 32, 0.75);
    text-align: center;
}

th,
td {
    border: 1px solid var(--ast-border-color, #dddddd);
    border-width: 0 1px 1px 0;
    padding: 8px;
    vertical-align: middle;
    line-height: 33.4px;
}

th {
    background-color: transparent;
    color: rgba(1, 17, 32, 0.75);
    font-weight: 700;
    text-align: center;
}

td {
    background-color: transparent;
    color: rgba(1, 17, 32, 0.75);
    font-weight: 400;
    text-align: center;
}

/* P tags inside table cells - creates the tall row effect */
td p,
th p {
    margin: 0 0 28.8px 0;
    font-size: 18px;
    line-height: 33.4px;
}

tr {
    display: table-row;
    vertical-align: inherit;
    unicode-bidi: isolate;
    border-color: inherit;
    background-color: transparent;
}

tbody {
    display: table-row-group;
    vertical-align: middle;
    unicode-bidi: isolate;
    border-color: inherit;
}

/* Table Wrapper for Horizontal Scroll on Mobile */
/* Table Wrapper for Horizontal Scroll */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 27px;
    /* position: relative removed - handled by container */
}

.table-wrapper table {
    margin-bottom: 0;
}

/* New Scroll Container injected via JS */
.table-scroll-container {
    position: relative;
    display: block;
    width: 100%;
}

/* Fade overlay attached to the immobile container */
.table-scroll-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    /* Increased to 130px */
    height: 100%;
    /* Smoother gradient starting earlier */
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
    z-index: 5;
    opacity: 0.7;
    transition: opacity 0.5s ease;
}

/* Reduce fade intensity when scrolled to end, but keep it visible (0.6) */
.table-scroll-container.scrolled-end::after {
    opacity: 0 !important;
    /* Minimum opacity increased to 0.6 */
}

/* Still hide completely if no scroll is needed at all */
.table-scroll-container.no-scroll::after {
    opacity: 0 !important;
}

/* Hide print table notice on screen - only show in print */
.print-table-notice {
    display: none;
}

/* Custom Scrollbar Styling - Teal Color */
.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-color, #00CEB1);
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #00b59d;
}

/* Firefox Scrollbar */
.table-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color, #00CEB1) #f1f1f1;
}

/* Blockquote Styles - extracted from benzedeiras article */
blockquote {
    border-left: 5px solid #dddddd;
    padding: 23.76px;
    margin: 29.7px 19.8px 29.7px 59.4px;
    background-color: transparent;
    font-size: 18px;
    font-style: italic;
    font-weight: 400;
    color: rgba(1, 17, 32, 0.75);
    text-align: justify;
    line-height: 36.77px;
    position: relative;
}

blockquote::before,
blockquote::after {
    content: "";
}

/* Blockquote & Table Mobile Styles */
@media (max-width: 768px) {
    blockquote {
        margin: 3px;
        padding: 21.67px;
        line-height: 33.5px;
    }

    table {
        margin: 0px 0px 24.6px;
        min-width: 500px;
        /* Force horizontal scroll if needed */
    }

    th,
    td {
        line-height: 30.5px;
    }
}


.divider {
    text-align: center;
    font-size: 24px;
    letter-spacing: 12px;
    color: var(--primary-color);
    margin: 30px 0;
    font-weight: 300;
}

.source-note {
    font-size: 16px;
    color: var(--text-muted);
}

.source-note a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===================== FOOTER ===================== */
#main-footer {
    background-color: #000000;
    color: var(--white);
    padding: 100px 30px 45px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

.footer-col .footer-title {
    font-size: 25px;
    font-weight: 400;
    margin-bottom: 25px;
    line-height: 1.5;
    color: #f9f8f8;
    font-family: inherit;
    display: block;
}

.footer-col p {
    font-size: 18px;
    line-height: 1.85;
    color: var(--white);
    margin-bottom: 1.75em;
}

.footer-col p:last-child {
    margin-bottom: 0;
}

.footer-col b,
.footer-col strong {
    font-weight: 700;
}

.teal-link {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===================== MOBILE MENU ===================== */
.menu-toggle {
    display: none;
    background-color: var(--primary-color);
    width: 45px;
    height: 45px;
    border: none;
    align-items: center;
    justify-content: center;
    color: #f9f8f8;
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 920px) {
    #masthead {
        position: relative;
        /* Maintain relative on mobile/tablet if needed */
    }

    .menu-toggle {
        display: flex;
        flex-shrink: 0;
    }

    .header-inner {
        padding: 0 20px;
        display: flex;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center;
    }

    .logo img {
        width: 253px !important;
        max-width: 80vw !important;
        height: auto !important;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #f9f8f8;
        flex-direction: column;
        display: none;
        border-top: 1px solid #dddddd;
        z-index: 999;
    }

    .main-nav.active {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-list li {
        width: 100%;
        padding: 0;
    }

    .nav-list a {
        display: block;
        width: 100%;
        padding: 0 20px;
        height: 50px;
        line-height: 50px;
        border-bottom: 1px solid #dddddd;
        color: rgba(1, 17, 32, 0.75);
        font-size: 16.4px;
        font-weight: 400;
        text-align: left;
    }

    .nav-list a.nav-btn-teal {
        background-color: transparent;
        color: rgba(1, 17, 32, 0.75);
        padding: 0 20px;
        border-radius: 0;
        font-weight: 400;
    }

    .nav-list a.nav-btn-teal:hover {
        background-color: transparent;
        transform: none;
        color: var(--primary-color);
    }

    .nav-list a:hover {
        color: var(--primary-color);
        transform: none;
    }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .ast-container {
        padding: 60px 40px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    #main-footer {
        padding: 75px 25px 25px;
    }

    .entry-title {
        font-size: 42px;
        /* 42px at tablet per original */
    }
}

@media (max-width: 768px) {
    .ast-container {
        padding: 40px 20px;
    }

    .entry-title {
        font-size: 42px;
        /* 42px at tablet per original */
    }

    .entry-subtitle,
    .entry-meta {
        font-size: 16px;
    }

    .entry-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .pdf-btn {
        justify-content: center;
    }

    .entry-content {
        font-size: 18px;
    }

    .entry-content h2 {
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .ast-container {
        padding: 30px 15px;
    }

    .entry-title {
        font-size: 28px;
        /* 28px at mobile per original */
    }
}

/* Print Styles */
@media print {

    /* Hide footer when printing */
    #main-footer {
        display: none !important;
    }

    /* Show header but simplified (only logo + tagline) */
    #masthead .main-header-bar {
        background: #fff !important;
        padding: 10px 0 !important;
    }

    /* Hide navigation menu and toggle button */
    #masthead .main-nav,
    #masthead .menu-toggle {
        display: none !important;
    }

    /* Keep logo at original size for print */
    #masthead .logo img {
        width: 350px !important;
        height: auto !important;
    }

    /* Make tagline standard text color for print */
    #masthead .logo-tagline {
        color: rgba(1, 17, 32, 0.75) !important;
    }

    /* Print separator - gray line after header (same thickness as green hr) */
    .print-separator {
        display: block !important;
        height: 0 !important;
        border: 0 !important;
        border-top: 3px solid #ddd !important;
        margin: 1em 0 0.66em 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    /* Adjust container padding in print mode */
    .ast-container {
        padding: 48px 51px !important;
        margin: 0 auto !important;
        box-shadow: none !important;
    }

    /* Page break after second HR (after author info) - Resumo starts on new page */
    .entry-content hr:nth-of-type(2) {
        page-break-after: always !important;
    }

    /* Allow tables to break across pages, but keep rows together */
    table {
        page-break-inside: auto !important;
        border-collapse: collapse !important;
    }

    /* Allow table rows to break across pages to avoid large empty spaces */
    tr {
        page-break-inside: auto;
        page-break-after: auto;
    }

    /* Align table cell content to top in print mode */
    td,
    th {
        vertical-align: top !important;
    }

    thead {
        display: table-header-group;
    }

    /* Remove shadows and backgrounds that cause issues */
    .ast-container {
        box-shadow: none !important;
        border: none !important;
    }

    /* Ensure borders print correctly */
    table,
    td,
    th {
        border: 1px solid #dddddd !important;
    }

    /* Normal table wrappers - no restrictions in print */
    .table-wrapper {
        overflow: visible !important;
        position: relative !important;
    }

    /* Wide table system - only for tables with 5+ columns */
    .print-overflow-table {
        overflow: hidden !important;
        max-height: 300px !important;
    }

    /* Blur effect on the table content */
    .print-overflow-table table {
        filter: blur(1.5px);
        opacity: 0.7;
    }

    /* Message after truncated table */
    .print-table-notice {
        display: block !important;
        text-align: center;
        padding: 15px 20px;
        margin-top: 10px;
        background-color: #f0f9f7;
        border: 1px solid #00CEB1;
        border-radius: 5px;
        color: #00897B;
        font-size: 13px;
        font-weight: 500;
    }

    .print-table-notice a {
        color: #00897B;
        text-decoration: underline;
        font-weight: 600;
    }

    /* Ensure blockquotes print well with proper spacing and left margin */
    blockquote {
        page-break-inside: avoid;
        margin: 29.7px 19.8px 29.7px 59.4px !important;
    }

    /* Keep figures and figcaptions together */
    figure {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    img {
        page-break-inside: avoid;
        break-inside: avoid;
        max-width: 100% !important;
    }

    figcaption {
        page-break-before: avoid;
        break-before: avoid;
    }

    /* Keep figure + figcaption as a unit */
    figure img,
    figure figcaption {
        page-break-inside: avoid;
    }
}

/* Print separator - hidden on screen */
.print-separator {
    display: none;
}

/* CKEditor Highlight Marker Styles */
mark.marker-yellow, .marker-yellow { background-color: #fdfd77; color: #000; }
mark.marker-green, .marker-green { background-color: #63f963; color: #000; }
mark.marker-pink, .marker-pink { background-color: #fc7999; color: #000; }
mark.marker-blue, .marker-blue { background-color: #72cdfd; color: #000; }
mark.marker-red, .marker-red { background-color: #ff8585; color: #000; }
mark.marker-orange, .marker-orange { background-color: #ffc875; color: #000; }
mark.marker-purple, .marker-purple { background-color: #e5b8ff; color: #000; }
mark.pen-red, .pen-red { color: #e91313; background-color: transparent; }
mark.pen-green, .pen-green { color: #118800; background-color: transparent; }
mark.pen-blue, .pen-blue { color: #0066ff; background-color: transparent; }
mark.pen-purple, .pen-purple { color: #8800cc; background-color: transparent; }
mark.pen-orange, .pen-orange { color: #ff6600; background-color: transparent; }