/* Zavier theme-owned stylesheet; visual tokens are finalized by css/theme.css. */
/* Source: app/Modules/News/Views/detail.php */

.news-detail-page {
    --news-blue: #1f5fae;
    --news-blue-dark: #174a87;
    --news-blue-soft: #eaf2fb;
    --news-blue-pale: #f4f8fd;
    --news-border: #d8e3ef;
    --news-text: #172b43;
    --news-muted: #64748b;
    min-height: 100vh;
    padding: 104px 20px 76px;
    color: var(--news-text);
    background: #f4f7fa;
}

.news-detail-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.news-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding: 20px 24px;
    border: 1px solid var(--news-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 43, 67, 0.05);
}

.news-detail-back,
.news-detail-heading-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
}

.news-detail-back {
    color: var(--news-blue);
    border: 1px solid var(--news-border);
    background: #fff;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.news-detail-back:hover,
.news-detail-back:focus-visible {
    color: var(--news-blue-dark);
    border-color: #a9c5e5;
    background: var(--news-blue-pale);
}

.news-detail-heading-icon {
    color: #fff;
    background: var(--news-blue);
}

.news-detail-back svg,
.news-detail-heading-icon svg {
    width: 20px;
    height: 20px;
}

.news-detail-heading-copy h1,
.news-detail-heading-copy p,
.news-article-header h2,
.news-side-heading h2,
.news-side-heading p,
.news-gallery-heading h3,
.news-gallery-heading p {
    margin: 0;
}

.news-detail-heading-copy h1 {
    color: var(--news-text);
    font-size: 1.18rem;
    font-weight: 750;
    line-height: 1.25;
}

.news-detail-heading-copy p {
    margin-top: 3px;
    color: var(--news-muted);
    font-size: 0.88rem;
}

.news-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: start;
    gap: 22px;
}

.news-article-card,
.news-side-card {
    border: 1px solid var(--news-border);
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 43, 67, 0.05);
}

.news-article-card {
    min-width: 0;
    padding: 34px;
    border-radius: 10px;
}

.news-article-header {
    max-width: 820px;
}

.news-article-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    padding: 7px 11px;
    color: var(--news-blue-dark);
    border: 1px solid #c8daed;
    border-radius: 999px;
    background: var(--news-blue-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.news-article-label svg {
    width: 15px;
    height: 15px;
}

.news-article-header h2 {
    color: #132840;
    font-size: clamp(1.7rem, 3vw, 2.55rem);
    font-weight: 780;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.news-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 18px;
    color: var(--news-muted);
    font-size: 0.86rem;
}

.news-article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.news-article-meta svg {
    width: 16px;
    height: 16px;
    color: var(--news-blue);
}

.news-article-cover {
    overflow: hidden;
    margin: 28px 0 30px;
    border: 1px solid var(--news-border);
    border-radius: 10px;
    background: var(--news-blue-pale);
}

.news-article-cover img {
    display: block;
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.news-article-content {
    max-width: 820px;
    color: #33475d;
    font-size: 1rem;
    line-height: 1.78;
    overflow-wrap: anywhere;
}

.news-article-content > :first-child {
    margin-top: 0;
}

.news-article-content > :last-child {
    margin-bottom: 0;
}

.news-article-content p,
.news-article-content ul,
.news-article-content ol,
.news-article-content blockquote,
.news-article-content table,
.news-article-content figure {
    margin: 0 0 1.2em;
}

.news-article-content h1,
.news-article-content h2,
.news-article-content h3,
.news-article-content h4,
.news-article-content h5,
.news-article-content h6 {
    margin: 1.7em 0 0.65em;
    color: var(--news-text);
    font-weight: 750;
    line-height: 1.3;
}

.news-article-content h2 { font-size: 1.45rem; }
.news-article-content h3 { font-size: 1.25rem; }
.news-article-content h4 { font-size: 1.08rem; }

.news-article-content a {
    color: var(--news-blue);
    text-decoration: underline;
    text-decoration-color: #9dbce0;
    text-underline-offset: 3px;
}

.news-article-content img,
.news-article-content video,
.news-article-content iframe {
    max-width: 100%;
}

.news-article-content img {
    height: auto;
    border-radius: 10px;
}

.news-article-content blockquote {
    padding: 15px 18px;
    color: #40566f;
    border-left: 4px solid var(--news-blue);
    border-radius: 0 10px 10px 0;
    background: var(--news-blue-pale);
}

.news-article-content ul,
.news-article-content ol {
    padding-left: 1.4rem;
}

.news-article-content li + li {
    margin-top: 0.35rem;
}

.news-article-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.news-article-content th,
.news-article-content td {
    padding: 10px 12px;
    border: 1px solid var(--news-border);
    text-align: left;
}

.news-article-content th {
    color: var(--news-text);
    background: var(--news-blue-pale);
}

.news-gallery {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid var(--news-border);
}

.news-gallery-heading,
.news-side-heading {
    display: flex;
    align-items: center;
    gap: 11px;
}

.news-gallery-heading > span,
.news-side-heading > span {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--news-blue);
    border-radius: 10px;
    background: var(--news-blue-soft);
}

.news-gallery-heading svg,
.news-side-heading svg {
    width: 18px;
    height: 18px;
}

.news-gallery-heading h3,
.news-side-heading h2 {
    color: var(--news-text);
    font-size: 0.98rem;
    font-weight: 750;
    line-height: 1.3;
}

.news-gallery-heading p,
.news-side-heading p {
    margin-top: 2px;
    color: var(--news-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.news-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.news-gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--news-blue-pale);
    cursor: pointer;
}

.news-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.news-gallery-item span {
    position: absolute;
    right: 9px;
    bottom: 9px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    color: #fff;
    border-radius: 8px;
    background: rgba(15, 34, 56, 0.82);
    font-size: 0.72rem;
    font-weight: 650;
}

.news-gallery-item span svg {
    width: 13px;
    height: 13px;
}

.news-gallery-item:hover img,
.news-gallery-item:focus-visible img {
    transform: scale(1.035);
}

.news-gallery-item:focus-visible {
    outline: 3px solid rgba(31, 95, 174, 0.28);
    outline-offset: 3px;
}

.news-detail-sidebar {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 16px;
}

.news-side-card {
    padding: 20px;
    border-radius: 10px;
}

.news-share-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 17px;
}

.news-share-actions button {
    display: flex;
    min-width: 0;
    min-height: 70px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 4px;
    color: var(--news-blue-dark);
    border: 1px solid var(--news-border);
    border-radius: 10px;
    background: #fff;
    font-size: 0.7rem;
    font-weight: 650;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.news-share-actions button:hover,
.news-share-actions button:focus-visible {
    border-color: #a9c5e5;
    background: var(--news-blue-pale);
}

.news-share-actions svg {
    width: 19px;
    height: 19px;
}

.news-publication-info {
    margin: 16px 0 0;
}

.news-publication-info div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-top: 1px solid #e6edf5;
}

.news-publication-info dt,
.news-publication-info dd {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
}

.news-publication-info dt {
    color: var(--news-muted);
    font-weight: 500;
}

.news-publication-info dd {
    color: var(--news-text);
    font-weight: 650;
    text-align: right;
}

.news-navigation-card nav {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.news-navigation-card nav a {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 9px;
    min-height: 43px;
    padding: 9px 11px;
    color: #33475d;
    border: 1px solid var(--news-border);
    border-radius: 10px;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 650;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.news-navigation-card nav a:hover,
.news-navigation-card nav a:focus-visible {
    color: var(--news-blue-dark);
    border-color: #a9c5e5;
    background: var(--news-blue-pale);
}

.news-navigation-card nav svg {
    width: 17px;
    height: 17px;
    color: var(--news-blue);
}

.news-gallery-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 10px;
}

.news-gallery-modal .modal-header {
    padding: 16px 20px;
    border-color: #d8e3ef;
}

.news-gallery-modal .modal-title {
    color: #172b43;
    font-size: 1rem;
    font-weight: 750;
}

.news-gallery-modal .modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 14px;
    background: #eef3f8;
}

.news-gallery-modal .modal-body img {
    display: block;
    max-width: 100%;
    max-height: 76vh;
    object-fit: contain;
    border-radius: 10px;
}

.news-detail-toast {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 1090;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 16px;
    color: #fff;
    border-radius: 10px;
    background: #334155;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2);
    font-size: 0.83rem;
    font-weight: 650;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.news-detail-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.news-detail-toast.is-success { background: #17715a; }
.news-detail-toast.is-error { background: #b33a3a; }

.news-copy-helper {
    position: fixed;
    top: 0;
    left: -9999px;
    opacity: 0;
}

@media (max-width: 991.98px) {
    .news-detail-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-detail-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-share-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .news-detail-page {
        padding: 76px 0 calc(94px + env(safe-area-inset-bottom));
        background: #f3f6f9;
    }

    .news-detail-shell {
        width: 100%;
    }

    .news-detail-header {
        gap: 10px;
        margin: 0 0 12px;
        padding: 16px;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 1px solid #e8eef4;
        box-shadow: none;
    }

    .news-detail-back,
    .news-detail-heading-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .news-detail-heading-icon {
        display: none;
    }

    .news-detail-heading-copy h1 {
        font-size: 1rem;
    }

    .news-detail-heading-copy p {
        font-size: 0.76rem;
    }

    .news-detail-layout {
        gap: 12px;
    }

    .news-article-card {
        padding: 22px 17px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .news-article-header h2 {
        font-size: clamp(1.48rem, 7vw, 1.9rem);
        line-height: 1.24;
    }

    .news-article-meta {
        display: grid;
        gap: 8px;
        margin-top: 15px;
    }

    .news-article-cover {
        margin: 22px 0 24px;
        border-radius: 10px;
    }

    .news-article-cover img {
        max-height: 360px;
    }

    .news-article-content {
        font-size: 0.94rem;
        line-height: 1.72;
    }

    .news-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .news-gallery-item {
        border-radius: 10px;
    }

    .news-detail-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 0;
    }

    .news-share-card {
        grid-column: auto;
    }

    .news-side-card {
        padding: 17px;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        border-top: 1px solid #e8eef4;
        border-bottom: 1px solid #e8eef4;
        box-shadow: none;
    }

    .news-detail-toast {
        right: 16px;
        bottom: calc(82px + env(safe-area-inset-bottom));
        left: 16px;
        max-width: none;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-detail-page *,
    .news-detail-page *::before,
    .news-detail-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .news-detail-page {
        min-height: 0;
        padding: 0;
        background: #fff;
    }

    .news-detail-header,
    .news-detail-sidebar,
    .news-gallery-item span,
    .news-detail-toast {
        display: none !important;
    }

    .news-detail-layout {
        display: block;
    }

    .news-article-card {
        padding: 0;
        border: 0;
        box-shadow: none;
    }
}
