/* =============================================
   NEWS PAGE - Page-Specific Styles
   Extracted from newStyle.css lines 8335-8764

   Carved wood text effect + parchment detail styles.
   Component layout lives in:
     - layout/components/news-cards.css   (card grid, filters, pagination)
     - layout/components/news-display.css (article shell, language bar, toggle)
   ============================================= */


/* ===========================================
   CARVED WOOD TEXT EFFECT
   Dark text with gold highlight shadow that
   looks chiselled into a wooden surface.
   =========================================== */

/* Main news article container - transparent so site background shows */
.news-article-container {
    background: transparent;
    padding: var(--spacing-lg) var(--spacing-xl);
    margin: var(--spacing-base) 0;
    position: relative;
}

/* --- Header (carved) -------------------------------------------------- */
.news-content-header {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: bold;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-base);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(139, 90, 43, 0.3);
    /* Carved / engraved text */
    color: #1a1209;
    text-shadow:
        1px 1px 1px rgba(201, 165, 92, 0.4),
        0 0 1px rgba(0, 0, 0, 0.3);
}

.news-content-header a {
    color: #4a3020;
    text-shadow:
        1px 1px 1px rgba(201, 165, 92, 0.5),
        0 0 1px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-base);
}

.news-content-header a:hover {
    color: #2d1f15;
    text-shadow:
        1px 1px 2px rgba(201, 165, 92, 0.7),
        0 0 3px rgba(139, 90, 43, 0.3);
}

.news-content-header b {
    color: #1a0f08;
    text-shadow:
        1px 1px 1px rgba(201, 165, 92, 0.6),
        2px 2px 3px rgba(0, 0, 0, 0.2);
}

/* --- Body (carved, softer) -------------------------------------------- */
.news-content-body {
    font-family: var(--font-body-alt);
    font-size: var(--font-size-md);
    line-height: 1.7;
    color: #2d1f15;
    text-shadow:
        1px 1px 0 rgba(201, 165, 92, 0.35),
        0 0 1px rgba(0, 0, 0, 0.15);
}

/* Override global * { color: #fff; font-family: Verdana } */
.news-content-body * {
    color: inherit;
    font-family: inherit;
    text-shadow: inherit;
}

.news-content-body p {
    margin: 10px 0;
    color: inherit;
    text-shadow: inherit;
}

.news-content-body a {
    color: #1a0a00;
    font-weight: 600;
    text-shadow: 1px 1px 1px rgba(201, 165, 92, 0.5);
    border-bottom: 1px dotted rgba(26, 10, 0, 0.3);
    transition: all var(--transition-base);
}

.news-content-body a:hover {
    color: #000;
    text-shadow: 1px 1px 2px rgba(201, 165, 92, 0.7);
}

.news-content-body b,
.news-content-body strong {
    color: #1a0f08;
    text-shadow:
        1px 1px 1px rgba(201, 165, 92, 0.5),
        1px 1px 2px rgba(0, 0, 0, 0.1);
}

.news-content-body li {
    color: #2d1f15;
    text-shadow: 1px 1px 0 rgba(201, 165, 92, 0.35);
    margin: var(--spacing-sm) 0;
}

/* Images inside news body */
.news-content-body img {
    border-radius: var(--radius-base);
    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.3),
        0 3px 10px rgba(0, 0, 0, 0.4);
    border: 2px solid #4a3728;
}

/* Strip editor chrome from video slider when displayed publicly */
.news-content-body .news-video-slider-wrap,
.postHolder .news-video-slider-wrap {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}

.news-video-slider-wrap [data-mce-bogus],
.news-video-slider-wrap .news-video-slider-label {
    display: none !important;
}

/* --- Separator between news articles ---------------------------------- */
.news-separator {
    margin: var(--spacing-2xl) 0;
}

.news-separator::before,
.news-separator::after {
    background: linear-gradient(90deg,
        transparent,
        rgba(92, 64, 51, 0.5),
        rgba(139, 90, 43, 0.4),
        rgba(92, 64, 51, 0.5),
        transparent
    );
}

.news-separator-ornament {
    color: #5c4033;
    text-shadow: 1px 1px 1px rgba(201, 165, 92, 0.4);
}

/* --- Headings inside news body ---------------------------------------- */
.news-content-body h1,
.news-content-body h2,
.news-content-body h3,
.news-content-body h4 {
    color: #1a0a00;
    text-shadow:
        2px 2px 1px rgba(201, 165, 92, 0.5),
        1px 1px 3px rgba(0, 0, 0, 0.2);
    margin: var(--spacing-base) 0 10px 0;
}

/* --- Utility classes -------------------------------------------------- */
.carved-text {
    color: #2d1f15;
    text-shadow:
        1px 1px 0 rgba(201, 165, 92, 0.4),
        0 0 1px rgba(0, 0, 0, 0.2);
}

.carved-text-deep {
    color: #1a0f08;
    text-shadow:
        2px 2px 1px rgba(201, 165, 92, 0.5),
        1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* --- Single news view (.postHolder) ----------------------------------- */
.postHolder .well {
    background: transparent;
    padding: var(--spacing-lg) var(--spacing-xl);
}

.postHolder .well .header {
    font-family: var(--font-body-alt);
    font-size: var(--font-size-base);
    font-weight: bold;
    color: #1a1209;
    text-shadow:
        1px 1px 1px rgba(201, 165, 92, 0.4),
        0 0 1px rgba(0, 0, 0, 0.3);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(139, 90, 43, 0.3);
    margin-bottom: var(--spacing-base);
}

.postHolder .well .header a {
    color: #4a3020;
    text-shadow: 1px 1px 1px rgba(201, 165, 92, 0.5);
}

.postHolder .well .header b {
    color: #1a0f08;
    text-shadow:
        1px 1px 1px rgba(201, 165, 92, 0.6),
        2px 2px 3px rgba(0, 0, 0, 0.2);
}

.postHolder .well .body {
    font-family: var(--font-body-alt);
    font-size: var(--font-size-md);
    line-height: 1.7;
    color: #2d1f15;
    text-shadow:
        1px 1px 0 rgba(201, 165, 92, 0.35),
        0 0 1px rgba(0, 0, 0, 0.15);
}

/* Override global * { color: #fff; font-family: Verdana } */
.postHolder .well .body * {
    color: inherit;
    font-family: inherit;
    text-shadow: inherit;
}

.postHolder .well .body a {
    color: #1a0a00;
    font-weight: 600;
    text-shadow: 1px 1px 1px rgba(201, 165, 92, 0.5);
}

.postHolder .well .body b,
.postHolder .well .body strong {
    color: #1a0f08;
    text-shadow: 1px 1px 1px rgba(201, 165, 92, 0.5);
}


/* ===========================================
   NEWS DETAIL TEXT - Parchment Style
   Rich-text content rendered on the parchment
   background (.news-article-content.news-detail-text).
   =========================================== */

.news-detail-text {
    font-size: var(--font-size-base);
    color: #3d2b1f;
    line-height: 1.7;
    word-wrap: break-word;
    font-family: var(--font-body);
}

/* Override global * { color: #fff; font-family: Verdana } for all children.
   Specificity (0,1,0) beats the global * (0,0,0) while still losing to
   more specific selectors (.news-detail-text strong, etc.) and inline styles. */
.news-detail-text * {
    color: inherit;
    font-family: inherit;
}

.news-detail-text p {
    margin-bottom: var(--spacing-md);
    color: #3d2b1f;
}

.news-detail-text ul,
.news-detail-text ol {
    margin: var(--spacing-md) 0;
    padding-left: 24px;
    color: #3d2b1f;
}

.news-detail-text li {
    margin-bottom: var(--spacing-base, 6px);
}

.news-detail-text strong,
.news-detail-text b {
    color: #4a3728;
    font-weight: bold;
}

.news-detail-text a {
    color: #6b4423;
    text-decoration: underline;
}

.news-detail-text a:hover {
    color: #8b5a2b;
}

.news-detail-text h1,
.news-detail-text h2,
.news-detail-text h3,
.news-detail-text h4 {
    color: #4a3728;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
    margin: var(--spacing-base) 0 10px 0;
}

.news-detail-text em,
.news-detail-text i {
    font-style: italic;
    color: #4a3728;
}

.news-detail-text del {
    text-decoration: line-through;
    color: #6b5a4a;
}

.news-detail-text hr {
    border: none;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(74, 55, 40, 0.3) 20%,
        rgba(74, 55, 40, 0.5) 50%,
        rgba(74, 55, 40, 0.3) 80%,
        transparent 100%
    );
    margin: var(--spacing-lg, 16px) 0;
}

/* --- Images ----------------------------------------------------------- */

/* Base reset so .news-image can override freely */
.news-detail-text img {
    max-width: 100%;
    height: auto;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

/* Block images with styled border */
.news-detail-text .news-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: var(--spacing-base) auto;
    border-radius: var(--radius-base);
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(74, 55, 40, 0.3);
}

/* --- Hover zoom for images & videos ---------------------------------- */
.news-detail-text img,
.news-detail-text video {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
}

.news-detail-text img:hover,
.news-detail-text video:hover {
    transform: scale(1.35);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
    position: relative;
}

/* Inline icons should NOT zoom */
.news-detail-text img[style*="vertical-align"] {
    transition: none;
    cursor: default;
}

.news-detail-text img[style*="vertical-align"]:hover {
    transform: none;
    box-shadow: none;
}

.news-detail-text .youtube {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
}

.news-detail-text .youtube:hover {
    transform: scale(1.35);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
    position: relative;
}

/* Inline icons with vertical-align must stay inline */
.news-detail-text img[style*="vertical-align"] {
    display: inline !important;
    margin: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

/* Floated images */
.news-detail-text img.float-left {
    float: left;
    margin: 5px 15px 10px 0;
    max-width: 60px;
    display: inline;
}

.news-detail-text img.float-right {
    float: right;
    margin: 5px 0 10px 15px;
    max-width: 60px;
    display: inline;
}

/* Clearfix for paragraphs with floated images */
.news-detail-text p::after {
    content: "";
    display: table;
    clear: both;
}

/* --- Tables ----------------------------------------------------------- */
.news-detail-text table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-base) 0;
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(74, 55, 40, 0.3) !important;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.news-detail-text table th,
.news-detail-text table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid rgba(74, 55, 40, 0.2) !important;
    border-left: none !important;
    border-right: none !important;
    color: #3d2b1f !important;
    background: transparent !important;
}

.news-detail-text table th {
    background: rgba(139, 69, 19, 0.35) !important;
    font-weight: bold;
    color: #3a2215 !important;
    text-align: center;
    border-bottom: 2px solid rgba(74, 55, 40, 0.4) !important;
}

.news-detail-text table tr {
    background: transparent !important;
}

.news-detail-text table tr:hover {
    background: rgba(139, 69, 19, 0.08) !important;
}

.news-detail-text table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Layout-only tables (no background, no borders) */
.news-detail-text table.layout,
.news-detail-text table[data-layout] {
    background: transparent !important;
    border: none !important;
    margin: 0;
}

.news-detail-text table.layout td,
.news-detail-text table.layout th,
.news-detail-text table[data-layout] td,
.news-detail-text table[data-layout] th {
    border: none !important;
    padding: var(--spacing-xs);
    background: transparent !important;
}

.news-detail-text table.layout tr:hover,
.news-detail-text table[data-layout] tr:hover {
    background: transparent !important;
}

/* --- Blockquote ------------------------------------------------------- */
.news-detail-text blockquote {
    margin: var(--spacing-base) 0;
    padding: 10px var(--spacing-base);
    border-left: 3px solid var(--color-brown-saddle);
    background: rgba(139, 69, 19, 0.08);
    color: #4a3728;
    font-style: italic;
}

/* --- Code ------------------------------------------------------------- */
.news-detail-text code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-mono-alt);
    font-size: 0.9em;
    color: #4a3728;
}

.news-detail-text pre {
    background: rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: var(--spacing-base) 0;
}

.news-detail-text pre code {
    background: none;
    padding: 0;
}

/* =============================================
   PARCHMENT PANEL - News panel with panel-sheet.png
   Container externo que mostra o pergaminho
   ============================================= */

/* News Panel com panel-sheet.png - Container externo */
.NewsArea .elementor-widget-wrap {
    position: relative !important;
    background: url('/layout/img/decorations/panel-sheet.png') no-repeat center center !important;
    background-size: 100% 100% !important;
    margin: 20px auto !important;
    max-width: 900px !important;
    width: 90% !important;
    aspect-ratio: 900 / 1000 !important;
    min-height: 500px !important;
    border-radius: 6px;
}

/* Area interna scrollavel */
.NewsArea .elementor-widget-wrap > div {
    position: absolute !important;
    top: 7% !important;
    bottom: 8.5% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    padding: 2% !important;
    overflow-y: auto !important;
}

/* Texto responsivo */
.NewsArea .elementor-widget-wrap > div {
    font-size: clamp(12px, 1.5vw, 16px) !important;
    line-height: 1.6 !important;
}

.NewsArea .elementor-widget-wrap > div h1,
.NewsArea .elementor-widget-wrap > div h2 {
    font-size: clamp(18px, 2.5vw, 28px) !important;
}

.NewsArea .elementor-widget-wrap > div h3,
.NewsArea .elementor-widget-wrap > div h4 {
    font-size: clamp(14px, 2vw, 20px) !important;
}

/* Scrollbar estilizada */
.NewsArea .elementor-widget-wrap > div::-webkit-scrollbar {
    width: 14px;
}

.NewsArea .elementor-widget-wrap > div::-webkit-scrollbar-track {
    background: rgba(74, 55, 40, 0.2);
    border-radius: 10px;
    margin: 10px 0;
}

.NewsArea .elementor-widget-wrap > div::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b6914 0%, #6b4423 50%, #4a3728 100%);
    border-radius: 10px;
    border: 2px solid rgba(74, 55, 40, 0.3);
    min-height: 60px;
}

.NewsArea .elementor-widget-wrap > div::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a07818 0%, #8b5a2b 50%, #5a4738 100%);
}

/* Pagination bar - positioned at bottom of parchment, outside scrollable area */
.NewsArea .elementor-widget-wrap > .news-pagination-bar {
    position: absolute !important;
    top: auto !important;
    bottom: 3.5% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    height: auto !important;
    padding: 6px 10px !important;
    overflow: visible !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

.news-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid rgba(139, 69, 19, 0.4);
    background: rgba(0, 0, 0, 0.35);
    color: #c9a55c;
    text-decoration: none;
    font-family: Georgia, serif;
    font-size: 13px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.news-page-btn:hover {
    background: rgba(0, 0, 0, 0.55);
    border-color: rgba(201, 165, 92, 0.6);
    color: #fff;
}

.news-page-ellipsis {
    color: #c9a55c;
    font-size: 14px;
    line-height: 32px;
    padding: 0 2px;
    user-select: none;
}

.news-page-btn.active {
    background: rgba(139, 69, 19, 0.35);
    border-color: #c9a55c;
    color: #fff;
    pointer-events: none;
}

/* Note: table#news base styles live in components/tables.css */

/* Mobile: parchment adapts to full width */
@media (max-width: 768px) {
    .NewsArea .elementor-widget-wrap {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0;
        margin: 10px auto !important;
    }

    .news-detail-text img:hover,
    .news-detail-text video:hover,
    .news-detail-text .youtube:hover {
        transform: scale(2);
    }
}
