/* Trang Thông Tin Thôn Tế Tiêu - Custom Styles */

:root {
    --color-primary: #b91c1c;
    --color-primary-dark: #7f1d1d;
    --color-accent: #fbbf24;
    --color-marquee: #dc2626;
    --color-bg: #fefce8;
    --color-news: #991b1b;
    --color-announce: #92400e;
    --color-schedule: #15803d;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
    margin: 0;
    background: var(--color-bg);
    color: #1f2937;
    line-height: 1.5;
}

/* Marquee */
.marquee-bar {
    background: var(--color-marquee);
    overflow: hidden;
    padding: 0.25rem 0;
}

.marquee-text {
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    white-space: nowrap;
    animation: marquee 25s linear infinite;
    display: inline-block;
    padding-left: 100%;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Header */
.site-header {
    position: relative;
    width: 100%;
    height: 16rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    .site-header { height: 20rem; }
}

.site-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--color-accent);
    text-shadow: 0 4px 6px rgba(0,0,0,0.3);
    margin: 0;
}

@media (min-width: 768px) {
    .site-title { font-size: 1.9375rem; }
}

.site-subtitle {
    margin: 0.5rem 0 0;
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@media (min-width: 768px) {
    .site-subtitle { font-size: 1.4375rem; }
}

.header-clock {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    text-align: right;
    color: #fff;
}

.header-clock .time {
    font-weight: 600;
    font-size: 1.125rem;
}

.header-clock .visitor-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

.header-clock .visitor-count {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Navigation */
.site-nav {
    background: var(--color-primary);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-nav .nav-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    padding: 0.75rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: background 0.15s;
    white-space: nowrap;
    position: relative;
}

.nav-item-icon {
    font-size: 1rem;
    line-height: 1;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--color-accent);
    transform: translateX(-50%);
    transition: width 0.25s;
}

.nav-item:hover,
.nav-item.is-active {
    background: rgba(0, 0, 0, 0.18);
}

.nav-item:hover::after,
.nav-item.is-active::after {
    width: 60%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem 1rem;
    cursor: pointer;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:active {
    background: rgba(0, 0, 0, 0.15);
}

.hamburger-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.hamburger-text {
    user-select: none;
}

.nav-overlay {
    display: none;
}

.nav-mobile-header {
    display: none;
}

@media (max-width: 900px) {
    .site-nav .nav-inner {
        justify-content: flex-start;
    }

    .mobile-menu-toggle {
        display: flex;
        position: relative;
        z-index: 2;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 5000;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-overlay.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: min(20rem, 86vw);
        height: 100vh;
        height: 100dvh;
        margin: 0;
        background: var(--color-primary-dark, #7f1d1d);
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        z-index: 5001;
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform 0.3s ease-in-out, visibility 0.3s ease;
        overflow-y: auto;
        overflow-x: hidden;
        box-shadow: 2px 0 16px rgba(0, 0, 0, 0.28);
        padding: 0;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-menu > li {
        width: 100%;
    }

    .nav-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: #fff;
        font-weight: 700;
        font-size: 1.125rem;
        text-transform: uppercase;
        flex-shrink: 0;
    }

    .nav-close-btn {
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.25rem;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        min-width: 2rem;
        min-height: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-item {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 0.9375rem;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .nav-item::after {
        display: none;
    }

    body.nav-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* Main content */
.main-content {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* Slider */
.slider {
    position: relative;
    width: 100%;
    height: 14rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .slider { height: 18rem; }
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Grid layout */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* Content blocks */
.section-title {
    font-weight: 700;
    font-size: 1.25rem;
    padding-bottom: 0.5rem;
    margin: 0 0 1rem;
    border-bottom: 2px solid;
}

.section-title.news { color: var(--color-news); border-color: var(--color-primary); }
.section-title.announce { color: var(--color-announce); border-color: #ca8a04; }
.section-title.schedule { color: var(--color-schedule); border-color: var(--color-schedule); }

.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-list li {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.post-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.post-list a {
    color: #1f2937;
    text-decoration: none;
}

.post-list a:hover {
    color: var(--color-primary);
}

.post-date {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

.announce-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.announce-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.announce-icon {
    color: var(--color-marquee);
    flex-shrink: 0;
}

/* Calendar table */
.schedule-table {
    width: 100%;
    font-size: 0.875rem;
    border-collapse: collapse;
    margin-top: 2rem;
}

.schedule-table thead tr {
    background: var(--color-schedule);
    color: #fff;
}

.schedule-table th,
.schedule-table td {
    padding: 0.5rem;
    text-align: left;
}

.schedule-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.schedule-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.schedule-table .date-col {
    font-weight: 600;
    white-space: nowrap;
}

.schedule-table a {
    color: #1f2937;
    text-decoration: none;
}

.schedule-table a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.schedule-table .author-col {
    font-size: 0.875rem;
    color: #4b5563;
    white-space: nowrap;
}

.schedule-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.schedule-section-head .section-title {
    margin-bottom: 0;
}

.schedule-section-more {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-schedule);
    text-decoration: none;
}

.schedule-section-more:hover {
    text-decoration: underline;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.stat-card {
    background: #fff;
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Footer */
.site-footer {
    background: var(--color-primary-dark);
    color: #fef3c7;
    padding: 1.5rem 1rem;
    margin-top: 2rem;
}

.footer-inner {
    max-width: 80rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .footer-inner {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-title {
    font-weight: 700;
    color: var(--color-accent);
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.25rem;
}

.footer-links a {
    color: #fef3c7;
    opacity: 0.9;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-copyright {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Post detail */
.post-detail {
    background: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.post-detail h1 {
    color: var(--color-news);
    margin-top: 0;
}

.post-meta {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.post-content {
    line-height: 1.75;
}

.post-content p {
    margin-bottom: 1rem;
}

/* Category page */
.category-header {
    margin-bottom: 1.5rem;
}

.category-header h1 {
    color: var(--color-primary);
    margin: 0;
}

/* Admin */
.admin-body {
    background: #f3f4f6;
    min-height: 100vh;
}

.admin-header {
    background: var(--color-primary);
    color: #fff;
    padding: 1rem 2rem;
}

.admin-container {
    max-width: 60rem;
    margin: 2rem auto;
    padding: 0 1rem;
}

.admin-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-family: inherit;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.btn:hover {
    background: #991b1b;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
}

table.admin-table th,
table.admin-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

table.admin-table th {
    background: #f9fafb;
}

/* Admin layout with sidebar */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: var(--color-primary-dark);
    color: #fef3c7;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.admin-sidebar-brand {
    padding: 1.25rem 1rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-accent);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.admin-sidebar-link {
    display: block;
    padding: 0.625rem 1rem;
    color: #fef3c7;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s;
}

.admin-sidebar-link:hover,
.admin-sidebar-link.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.admin-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8125rem;
}

.admin-sidebar-footer a {
    display: block;
    color: #fef3c7;
    text-decoration: none;
    padding: 0.375rem 0;
    opacity: 0.85;
}

.admin-sidebar-footer a:hover {
    opacity: 1;
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    background: #fff;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 1.25rem;
    color: #1f2937;
}

.admin-user {
    font-size: 0.875rem;
    color: #6b7280;
}

.admin-content {
    padding: 1.5rem;
    flex: 1;
}

.admin-card + .admin-card {
    margin-top: 1.5rem;
}

.admin-card h2 {
    margin-top: 0;
    font-size: 1.125rem;
    color: #374151;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.extract-doc-box {
    border: 1px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
}

.extract-doc-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.extract-doc-row input[type="file"] {
    flex: 1;
    min-width: 12rem;
}

.extract-doc-status.is-ok {
    color: #166534;
}

.extract-doc-status.is-error {
    color: #b91c1c;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell a,
.actions-cell button {
    margin-right: 0.5rem;
}

.media-thumb {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.media-preview {
    max-width: 200px;
    max-height: 120px;
    object-fit: cover;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
}

.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section h3 {
    margin: 0 0 1rem;
    color: var(--color-primary);
    font-size: 1rem;
}

.inline-form {
    display: inline;
}

.inline-form button {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f3f4f6; color: #4b5563; }

.contact-message-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 1rem;
    line-height: 1.7;
    font-size: 0.9375rem;
    white-space: normal;
}

.contact-reply-box {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

/* Post detail — ảnh & video trong nội dung */
.post-content .post-figure {
    margin: 1.25rem 0;
    text-align: center;
}

.post-content .post-figure img {
    max-width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-content .post-figure figcaption {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.post-content .video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    margin: 1.25rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #111;
}

.post-content .video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.post-content .lead {
    font-size: 1.05rem;
    color: #374151;
}

/* Danh mục — thẻ bài viết có ảnh */
.category-header {
    margin-bottom: 1.5rem;
}

.category-desc {
    color: #6b7280;
    margin-top: 0.25rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.category-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.category-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.category-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.category-card-placeholder {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: #f3f4f6;
}

.category-card-body {
    padding: 1rem;
}

.category-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--color-primary);
    line-height: 1.4;
}

.category-card-summary {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.5rem;
    line-height: 1.5;
}

.category-card-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

.filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    align-items: center;
}

.filter-bar input[type="text"],
.filter-bar select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
}

.pagination {
    display: flex;
    gap: 0.25rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 0.35rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    text-decoration: none;
    color: #374151;
    font-size: 0.875rem;
}

.pagination-link.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.sortable-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sortable-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    cursor: grab;
}

.sortable-item.dragging {
    opacity: 0.6;
    border-color: var(--color-primary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.calendar-day {
    min-height: 80px;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    background: #fff;
}

.calendar-day.has-events {
    background: #fef2f2;
    border-color: #fecaca;
}

.calendar-day-num {
    font-weight: 700;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.calendar-event {
    display: block;
    font-size: 0.7rem;
    color: var(--color-primary);
    text-decoration: none;
    margin-top: 0.15rem;
    line-height: 1.3;
}

.visit-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
    padding-top: 1rem;
}

.chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.chart-bar {
    width: 100%;
    max-width: 24px;
    background: var(--color-primary);
    border-radius: 2px 2px 0 0;
    min-height: 4px;
}

.chart-label {
    font-size: 0.65rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.media-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.library-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    display: flex;
    gap: 0.75rem;
}

.library-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.library-doc-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #f3f4f6;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.library-info {
    flex: 1;
    min-width: 0;
}

.library-url {
    display: block;
    font-size: 0.7rem;
    color: #6b7280;
    word-break: break-all;
    margin-top: 0.25rem;
}

.library-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === POST DETAIL PAGES (theo template document/index.html) === */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #9ca3af;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .sep {
    color: #9ca3af;
}

.breadcrumb .current {
    color: #1f2937;
    font-weight: 500;
}

.page-title {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.375rem;
    padding-bottom: 0.625rem;
    border-bottom: 3px solid var(--color-accent);
    display: inline-block;
}

.page-desc {
    color: #4b5563;
    margin-bottom: 1.75rem;
    margin-top: 0.5rem;
}

.layout-sidebar {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.75rem;
}

.article-hero {
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
    height: 22.5rem;
    margin-bottom: 1.5rem;
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-hero .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
}

.article-hero .caption {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    color: #fff;
}

.article-hero .caption h1 {
    font-size: 1.625rem;
    color: #fff;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.article-hero .caption .meta {
    font-size: 0.8125rem;
    opacity: 0.85;
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.article-body {
    background: #fff;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5d9b3;
    margin-bottom: 1.75rem;
}

.article-body-compact {
    margin-bottom: 1rem;
}

.article-title-fallback {
    font-size: 1.625rem;
    color: var(--color-primary);
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.meta-line {
    font-size: 0.8125rem;
    color: #9ca3af;
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.article-body .content-block p,
.announce-detail .content-block p,
.doc-content-block p,
.org-content p {
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    line-height: 1.9;
    overflow-wrap: break-word;
}

.article-body .content-block h2,
.article-body .content-block h3,
.announce-detail .content-block h2,
.announce-detail .content-block h3,
.org-content h2,
.org-content h3 {
    margin: 1.25rem 0 0.625rem;
}

.article-body .content-block ul,
.announce-detail .content-block ul,
.doc-content-block ul,
.org-content ul {
    margin: 0.75rem 0 1rem 1.5rem;
}

.article-body .content-block li,
.announce-detail .content-block li {
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.highlight-box {
    background: linear-gradient(135deg, #fef9e7, #fff);
    border: 1px solid var(--color-accent);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    line-height: 1.75;
    font-size: 0.9375rem;
    overflow-wrap: break-word;
}

.highlight-box strong {
    color: var(--color-announce);
}

.article-body .content-block a,
.announce-detail .content-block a,
.doc-content-block a,
.org-content a,
.highlight-box a {
    color: #1d4ed8;
}

.post-source {
    margin-top: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5d9b3;
    font-size: 0.8125rem;
    color: #6b7280;
}

.post-source a {
    word-break: break-all;
}

.share-row {
    display: flex;
    gap: 0.625rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5d9b3;
    align-items: center;
    flex-wrap: wrap;
}

.share-row span {
    font-size: 0.8125rem;
    color: #9ca3af;
    font-weight: 600;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    border-radius: 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.85;
}

.share-btn.fb {
    background: #1877f2;
    color: #fff;
}

.share-btn.tw {
    background: #1da1f2;
    color: #fff;
}

.share-btn.copy {
    background: #fef9e7;
    color: #1f2937;
    border: 1px solid #e5d9b3;
}

.related-section {
    margin-top: 1.875rem;
}

.related-section h3 {
    font-size: 1.0625rem;
    margin: 0 0 0.875rem;
    color: #1f2937;
}

.detail-sidebar .widget {
    position: sticky;
    top: 3.75rem;
}

.widget {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.125rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.25rem;
    border: 1px solid #e5d9b3;
}

.widget-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent);
}

.widget-title span {
    margin-right: 0.375rem;
}

.announce-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.announce-list .announce-item {
    padding: 0.875rem 1rem;
    border-left: 4px solid var(--color-primary);
    background: #fff;
    margin-bottom: 0.625rem;
    border-radius: 0 0.5rem 0.5rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: border-color 0.2s;
}

.announce-list .announce-item:hover {
    border-left-color: var(--color-accent);
}

.announce-list .announce-item a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.announce-list .announce-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.1875rem;
}

.announce-list .announce-item .date {
    font-size: 0.6875rem;
    color: #9ca3af;
}

.card-grid {
    display: grid;
    gap: 1.25rem;
}

.card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5d9b3;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.card-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.card-img {
    height: 7.5rem;
    overflow: hidden;
    background: #eee;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 1rem;
}

.card-body h3 {
    font-size: 0.8125rem;
    margin: 0 0 0.375rem;
    font-weight: 700;
}

.card-meta {
    font-size: 0.6875rem;
    color: #9ca3af;
}

.announce-detail {
    background: #fff;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5d9b3;
    margin-bottom: 1.5rem;
}

.announce-detail .header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.announce-detail .level {
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.announce-detail .level.urgent {
    background: #fdecea;
    color: var(--color-primary);
}

.announce-detail .level.normal {
    background: #fef9e7;
    color: #d4a017;
}

.announce-detail .level.info {
    background: #ebf5fb;
    color: #2980b9;
}

.announce-detail h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0 0 0.375rem;
    line-height: 1.4;
}

.announce-detail .sign-line {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed #e5d9b3;
    font-size: 0.8125rem;
    color: #4b5563;
    font-style: italic;
}

.related-section .announce-item {
    padding: 0.875rem 1rem;
    border-left: 4px solid var(--color-primary);
    background: #fff;
    border-radius: 0 0.5rem 0.5rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.related-section .announce-item a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.related-section .announce-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.1875rem;
}

.doc-detail-card {
    background: #fff;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5d9b3;
    margin-bottom: 1.5rem;
}

.doc-detail-card .doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-accent);
}

.doc-detail-card .doc-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    flex: 1;
    margin: 0;
}

.doc-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

.doc-meta-item {
    padding: 0.75rem;
    background: #fef9e7;
    border-radius: 0.5rem;
    border: 1px solid #e5d9b3;
}

.doc-meta-item .label {
    font-size: 0.6875rem;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.doc-meta-item .value {
    font-size: 0.875rem;
    font-weight: 600;
}

.doc-preview {
    background: #f8f9fa;
    border: 1px solid #e5d9b3;
    border-radius: 0.5rem;
    padding: 2.5rem;
    text-align: center;
    margin: 1.25rem 0;
    color: #9ca3af;
}

.doc-preview .icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.doc-preview-actions {
    margin-top: 0.75rem;
}

.doc-content-title {
    margin: 1.25rem 0 0.625rem;
    font-size: 1rem;
    font-weight: 700;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.doc-table th {
    background: var(--color-primary);
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
}

.doc-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5d9b3;
    font-size: 0.8125rem;
}

.doc-table tr:hover td {
    background: #fef9e7;
}

.doc-table a {
    color: inherit;
    text-decoration: none;
}

.doc-table a:hover {
    color: var(--color-primary);
}

.album-hero {
    border-radius: 0.5rem;
    overflow: hidden;
    height: 20rem;
    position: relative;
    margin-bottom: 1.25rem;
}

.album-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-hero .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
}

.album-hero .caption {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
    color: #fff;
}

.album-hero .caption h2 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0 0 0.25rem;
}

.album-hero .caption p {
    font-size: 0.8125rem;
    opacity: 0.85;
    margin: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.125rem;
}

.section-header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.section-header .line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--color-accent), transparent);
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
    margin-bottom: 1.875rem;
}

.album-photo {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    background: #fff;
    margin: 0;
}

.album-photo img {
    width: 100%;
    height: 13.75rem;
    object-fit: cover;
    display: block;
}

.album-photo figcaption {
    padding: 0.625rem;
    font-size: 0.8125rem;
    text-align: center;
    color: #4b5563;
}

.album-content .post-figure,
.album-content img {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.album-content .post-figure img,
.album-content img {
    width: 100%;
    height: 13.75rem;
    object-fit: cover;
    display: block;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.gallery-item {
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1;
    display: block;
    text-decoration: none;
}

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

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5rem;
    text-align: center;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.org-detail-card {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5d9b3;
    margin-bottom: 1.5rem;
}

.org-detail-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    padding: 1.75rem 2rem;
    color: #fff;
}

.org-detail-header h2 {
    font-size: 1.375rem;
    color: #fff;
    margin: 0 0 0.25rem;
}

.org-detail-header p {
    font-size: 0.8125rem;
    opacity: 0.85;
    margin: 0;
}

.org-detail-body {
    padding: 1.75rem 2rem;
}

.org-detail-body .info-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5d9b3;
    font-size: 0.875rem;
}

.org-detail-body .info-row .icon {
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.org-detail-body .info-row strong {
    display: block;
    margin-bottom: 0.125rem;
}

.org-detail-body .info-row p {
    color: #4b5563;
    margin: 0;
    font-size: 0.8125rem;
}

.org-content {
    margin-top: 1.25rem;
}

.org-chart {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.org-card {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-top: 3px solid var(--color-primary);
    color: inherit;
    text-decoration: none;
    display: block;
    transition: transform 0.2s;
}

.org-card:hover {
    transform: translateY(-2px);
}

.org-card h4 {
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.org-card p {
    font-size: 0.75rem;
    color: #4b5563;
    margin: 0;
}

.content-block .video-embed,
.article-body .video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.content-block .video-embed iframe,
.article-body .video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.article-body .post-figure,
.content-block .post-figure {
    margin: 1.25rem 0;
    text-align: center;
}

.article-body .post-figure figcaption,
.content-block .post-figure figcaption {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.35rem;
}

.content-block .post-figure img,
.article-body .post-figure img,
.article-body .content-block img,
.announce-detail .content-block img,
.doc-content-block img,
.org-content img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: none;
    border-radius: 0.5rem;
    margin: 1rem auto;
}

@media (max-width: 900px) {
    .layout-sidebar {
        grid-template-columns: 1fr;
    }

    .card-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-hero {
        height: 15rem;
    }

    .article-hero .caption h1 {
        font-size: 1.25rem;
    }

    .article-body,
    .announce-detail,
    .doc-detail-card {
        padding: 1.25rem;
    }

    .org-detail-header,
    .org-detail-body {
        padding: 1.25rem;
    }

    .org-chart {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .article-hero {
        height: 12.5rem;
    }

    .article-hero .caption {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .article-hero .caption h1 {
        font-size: 1.125rem;
    }

    .article-body {
        padding: 1rem;
    }

    .card-grid-3,
    .card-grid-2 {
        grid-template-columns: 1fr;
    }

    .doc-meta-grid {
        grid-template-columns: 1fr;
    }

    .org-chart {
        grid-template-columns: 1fr;
    }

    .album-hero {
        height: 12.5rem;
    }
}

/* === ABOUT PAGE (gioi-thieu) === */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    align-items: start;
}

.about-content-spaced {
    margin-bottom: 1.875rem;
}

.about-section-spaced {
    margin-top: 1.875rem;
}

.about-text p {
    margin-bottom: 0.875rem;
    font-size: 0.875rem;
    line-height: 1.8;
}

.about-heading {
    font-size: 1.25rem;
    margin: 0 0 0.75rem;
    color: var(--color-primary);
}

.about-img {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.about-img img {
    width: 100%;
    height: 18.75rem;
    object-fit: cover;
    display: block;
}

.org-chart-about {
    margin-top: 0;
}

.org-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
    transition: transform 0.2s;
}

.org-card-link:hover {
    transform: translateY(-2px);
}

.org-card-desc {
    font-size: 0.6875rem;
    color: #9ca3af;
    margin: 0.25rem 0 0;
}

/* === CONTACT PAGE (lien-he) === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
}

.contact-section-title {
    font-size: 1.125rem;
    margin: 0 0 1rem;
    color: #1f2937;
}

.contact-form {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5d9b3;
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.contact-form-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.contact-form .form-group input,
.contact-form .form-group select,
.contact-form .form-group textarea {
    border: 1px solid #e5d9b3;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    transition: border-color 0.2s;
}

.contact-form .form-group input:focus,
.contact-form .form-group select:focus,
.contact-form .form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

.contact-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info-list li {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5d9b3;
    font-size: 0.875rem;
}

.contact-info-list .icon {
    width: 2.25rem;
    height: 2.25rem;
    background: #fef9e7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.contact-info-detail {
    font-size: 0.8125rem;
    color: #4b5563;
}

.contact-info-link {
    font-size: 0.8125rem;
    color: var(--color-primary);
    text-decoration: none;
}

.contact-info-link:hover {
    text-decoration: underline;
}

.contact-map {
    margin-top: 1.25rem;
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5d9b3;
}

.contact-map-placeholder {
    height: 13.75rem;
    background: #fef9e7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.8125rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 1rem;
}

.contact-map-icon {
    font-size: 2rem;
}

.contact-map-sub {
    font-size: 0.6875rem;
}

@media (max-width: 900px) {
    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-row {
        grid-template-columns: 1fr;
    }
}

/* === VĂN BẢN (danh sách file ban hành) === */
.doc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.doc-filters {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.doc-chip {
    padding: 0.375rem 0.875rem;
    background: #fff;
    color: #1f2937;
    border-radius: 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e5d9b3;
}

.doc-chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.doc-chip.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.doc-search-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.doc-search-form input[type="search"] {
    padding: 0.45rem 0.75rem;
    border: 1px solid #e5d9b3;
    border-radius: 0.375rem;
    min-width: 14rem;
    font-size: 0.875rem;
}

.doc-table-wrap {
    overflow-x: auto;
}

.doc-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 0.1875rem;
    font-size: 0.6875rem;
    font-weight: 600;
    margin-right: 0.25rem;
}

.doc-badge.pdf {
    background: #fdecea;
    color: var(--color-primary);
}

.doc-badge.doc {
    background: #ebf5fb;
    color: #2980b9;
}

.doc-badge.new {
    background: #fef9e7;
    color: #b45309;
}

.doc-type-label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.doc-code {
    white-space: nowrap;
    font-weight: 700;
}

.doc-issuer {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.doc-no-file {
    font-size: 0.75rem;
    color: #9ca3af;
}

.doc-empty {
    background: #fff;
    border: 1px solid #e5d9b3;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.pagination-center {
    justify-content: center;
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .doc-search-form input[type="search"] {
        min-width: 0;
        width: 100%;
    }

    .doc-search-form {
        width: 100%;
    }

    .doc-search-form .btn {
        flex: 1;
    }
}

/* ========== Trang Tin tức (layout cổng tin) ========== */
.news-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--color-primary);
}

.news-page-kicker {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.news-page-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.15;
    color: #111827;
}

.news-page-desc {
    margin: 0.5rem 0 0;
    max-width: 36rem;
    color: #4b5563;
    font-size: 0.95rem;
}

.news-page-count {
    margin: 0;
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #6b7280;
    white-space: nowrap;
}

.news-empty {
    color: #6b7280;
    padding: 2rem 0;
}

.news-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.news-lead {
    background: #fff;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.news-lead-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.news-lead-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e5e7eb;
}

.news-lead-media img,
.news-card-media img,
.news-side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.news-lead-link:hover .news-lead-media img,
.news-card-link:hover .news-card-media img,
.news-side-item:hover .news-side-thumb img {
    transform: scale(1.04);
}

.news-media-fallback {
    width: 100%;
    height: 100%;
    min-height: 12rem;
    background:
        linear-gradient(135deg, rgba(185, 28, 28, 0.12), rgba(127, 29, 29, 0.28)),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 8px,
            rgba(185, 28, 28, 0.05) 8px,
            rgba(185, 28, 28, 0.05) 16px
        );
}

.news-media-fallback--sm {
    min-height: 0;
}

.news-lead-body {
    padding: 1.25rem 1.35rem 1.5rem;
}

.news-badge {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--color-primary);
}

.news-lead-title {
    margin: 0 0 0.65rem;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.3;
    color: #111827;
}

.news-lead-link:hover .news-lead-title,
.news-card-link:hover .news-card-title,
.news-side-item:hover .news-side-title {
    color: var(--color-primary);
}

.news-lead-summary {
    margin: 0 0 0.75rem;
    color: #4b5563;
    font-size: 0.975rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
}

.news-side {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 3px solid var(--color-primary);
    padding: 1rem 1rem 0.5rem;
}

.news-side-heading {
    margin: 0 0 0.85rem;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.news-side-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-side-list li {
    border-top: 1px solid #f3f4f6;
}

.news-side-list li:first-child {
    border-top: 0;
}

.news-side-item {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 0.75rem;
    padding: 0.75rem 0;
    text-decoration: none;
    color: inherit;
}

.news-side-thumb {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e5e7eb;
}

.news-side-title {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-section-title {
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 800;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
}

.news-section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 4.5rem;
    height: 2px;
    background: var(--color-primary);
}

.news-grid-section {
    margin-bottom: 0.5rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.news-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.news-card:hover {
    border-color: #d1d5db;
    transform: translateY(-2px);
}

.news-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.news-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e5e7eb;
}

.news-card-new {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fff;
    background: var(--color-primary);
}

.news-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0.9rem 1rem 1.1rem;
}

.news-card-title {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-summary {
    margin: 0 0 0.75rem;
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-body .news-meta {
    margin-top: auto;
}

.content-block-footer {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    text-align: right;
}

.content-block-more {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

.content-block-more:hover {
    text-decoration: underline;
}

@media (max-width: 960px) {
    .news-spotlight {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .news-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-page-title {
        font-size: 1.625rem;
    }

    .news-lead-title {
        font-size: 1.25rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-side-item {
        grid-template-columns: 72px 1fr;
    }
}

/* ========== Portal homepage ========== */
.portal {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.portal .slider {
    margin-bottom: 0;
}

.portal-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 1024px) {
    .portal-top {
        grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr);
        align-items: start;
    }
}

.portal-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.portal-block-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--color-news);
    letter-spacing: 0.01em;
}

.portal-block-title--announce {
    color: var(--color-announce);
}

.portal-block-title--docs {
    color: #1e3a8a;
}

.portal-block-head:has(.portal-block-title--announce) {
    border-color: #ca8a04;
}

.portal-block-head:has(.portal-block-title--docs) {
    border-color: #1e3a8a;
}

.portal-block-more {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

.portal-block-more:hover {
    text-decoration: underline;
}

/* Spotlight */
.portal-spotlight {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 3px solid var(--color-primary);
    padding: 1rem 1.1rem 1.15rem;
}

.portal-spotlight-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .portal-spotlight-grid {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        gap: 1.15rem;
    }
}

.portal-spotlight-lead-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.portal-spotlight-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f3f4f6;
}

.portal-spotlight-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.portal-spotlight-lead-link:hover .portal-spotlight-media img {
    transform: scale(1.04);
}

.portal-hot-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
}

.portal-spotlight-body {
    padding-top: 0.75rem;
}

.portal-spotlight-title {
    margin: 0 0 0.4rem;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.35;
    color: #111827;
}

.portal-spotlight-lead-link:hover .portal-spotlight-title {
    color: var(--color-primary);
}

.portal-spotlight-summary {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
}

.portal-spotlight-side {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.portal-spotlight-side li {
    border-top: 1px solid #f3f4f6;
}

.portal-spotlight-side li:first-child {
    border-top: none;
    padding-top: 0;
}

.portal-spotlight-side-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.65rem 0;
    text-decoration: none;
    color: inherit;
    align-items: start;
}

.portal-spotlight-side-thumb {
    width: 88px;
    height: 64px;
    overflow: hidden;
    background: #f3f4f6;
}

.portal-spotlight-side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portal-spotlight-side-item:hover .portal-spotlight-side-thumb img {
    transform: scale(1.05);
}

.portal-spotlight-side-title {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-spotlight-side-item:hover .portal-spotlight-side-title {
    color: var(--color-primary);
}

.portal-cat-date {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Announcements */
.portal-announce {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-top: 3px solid #ca8a04;
    padding: 1rem 1.1rem 1.15rem;
}

.portal-announce-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.portal-announce-list li + li {
    border-top: 1px dashed #fcd34d;
}

.portal-announce-list a {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.7rem 0;
    text-decoration: none;
    color: inherit;
}

.portal-announce-dot {
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 0.4rem;
    border-radius: 50%;
    background: var(--color-marquee);
    flex-shrink: 0;
}

.portal-announce-dot--urgent {
    background: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.18);
}

.portal-announce-urgent {
    display: inline-block;
    margin-right: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: 0.2rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    vertical-align: middle;
    background: #fdecea;
    color: var(--color-primary);
}

.portal-announce-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.portal-announce-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    color: #78350f;
}

.portal-announce-list a:hover .portal-announce-title {
    color: var(--color-primary);
}

.portal-announce-text time {
    font-size: 0.75rem;
    color: #92400e;
    opacity: 0.8;
}

/* Category portal grid */
.portal-section-head {
    margin-bottom: 1rem;
}

.portal-section-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--color-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.portal-section-desc {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.portal-cats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .portal-cats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .portal-cats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.portal-cat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 3px solid var(--color-primary);
    padding: 0.9rem 1rem 1rem;
    min-height: 100%;
    animation: portalFadeUp 0.45s ease both;
}

.portal-cats-grid .portal-cat:nth-child(2) { animation-delay: 0.05s; }
.portal-cats-grid .portal-cat:nth-child(3) { animation-delay: 0.1s; }
.portal-cats-grid .portal-cat:nth-child(4) { animation-delay: 0.15s; }
.portal-cats-grid .portal-cat:nth-child(5) { animation-delay: 0.2s; }
.portal-cats-grid .portal-cat:nth-child(6) { animation-delay: 0.25s; }
.portal-cats-grid .portal-cat:nth-child(7) { animation-delay: 0.3s; }

@keyframes portalFadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portal-cat--party { border-top-color: #b91c1c; }
.portal-cat--front { border-top-color: #b45309; }
.portal-cat--orgs { border-top-color: #15803d; }
.portal-cat--gallery { border-top-color: #0369a1; }
.portal-cat--video { border-top-color: #7c3aed; }
.portal-cat--history { border-top-color: #92400e; }
.portal-cat--docs { border-top-color: #1e3a8a; }

.portal-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #f3f4f6;
}

.portal-cat-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.portal-cat-icon {
    font-size: 1rem;
    line-height: 1;
}

.portal-cat-more {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    white-space: nowrap;
}

.portal-cat-more:hover {
    text-decoration: underline;
}

.portal-cat-empty {
    margin: 0;
    font-size: 0.875rem;
    color: #9ca3af;
}

.portal-cat-lead-link {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.7rem;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.65rem;
}

.portal-cat-lead-link--text {
    grid-template-columns: 1fr;
}

.portal-cat-thumb {
    width: 88px;
    height: 66px;
    overflow: hidden;
    background: #f3f4f6;
}

.portal-cat-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portal-cat-lead-link:hover .portal-cat-thumb img {
    transform: scale(1.05);
}

.portal-cat-lead-title {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-cat-lead-link:hover .portal-cat-lead-title {
    color: var(--color-primary);
}

.portal-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #f3f4f6;
}

.portal-cat-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f9fafb;
}

.portal-cat-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.portal-cat-list a {
    flex: 1;
    min-width: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-cat-list a::before {
    content: "›";
    color: var(--color-primary);
    margin-right: 0.3rem;
    font-weight: 800;
}

.portal-cat-list a:hover {
    color: var(--color-primary);
}

.portal-cat-list time {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: #9ca3af;
    padding-top: 0.1rem;
}

/* Bottom row: calendar + docs */
.portal-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 1024px) {
    .portal-bottom {
        grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
        align-items: start;
    }
}

.portal .schedule-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 3px solid var(--color-schedule);
    padding: 1rem 1.1rem 1.15rem;
}

.portal .schedule-table {
    margin-top: 0;
}

.portal-docs {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 3px solid #1e3a8a;
    padding: 1rem 1.1rem 1.15rem;
}

.portal-docs-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.portal-docs-list li + li {
    border-top: 1px solid #f3f4f6;
}

.portal-docs-list a {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0;
    text-decoration: none;
    color: inherit;
}

.portal-docs-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e3a8a;
    line-height: 1.4;
}

.portal-docs-list a:hover .portal-docs-name {
    color: var(--color-primary);
    text-decoration: underline;
}

.portal-docs-list time {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #6b7280;
}

.portal .stats-grid {
    margin-top: 0.25rem;
}

@media (max-width: 640px) {
    .portal-cat-lead-link {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .portal-cat-thumb {
        width: 72px;
        height: 54px;
    }

    .portal-spotlight-side-item {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .portal-spotlight-side-thumb {
        width: 72px;
        height: 54px;
    }

    .portal-spotlight-title {
        font-size: 1.05rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-cat {
        animation: none;
    }

    .portal-spotlight-media img,
    .portal-spotlight-side-thumb img,
    .portal-cat-thumb img {
        transition: none;
    }
}

/* ========== Announcements page ========== */
.announce-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid #e5d9b3;
}

.announce-page-kicker {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-announce);
}

.announce-page-title {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    color: #1f2937;
    line-height: 1.2;
}

.announce-page-desc {
    margin: 0.5rem 0 0;
    max-width: 40rem;
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.5;
}

.announce-page-count {
    margin: 0;
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-announce);
    white-space: nowrap;
}

.announce-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.announce-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid #e5d9b3;
    background: #fff;
    color: #4b5563;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.announce-filter:hover {
    border-color: var(--color-announce);
    color: var(--color-announce);
}

.announce-filter.active {
    background: var(--color-announce);
    border-color: var(--color-announce);
    color: #fff;
}

.announce-filter--urgent.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.announce-filter span {
    opacity: 0.85;
    font-weight: 500;
}

.announce-page-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #6b7280;
    background: #fff;
    border: 1px dashed #e5d9b3;
    border-radius: 0.5rem;
}

.announce-page-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.announce-page-item {
    background: #fff;
    border: 1px solid #e5d9b3;
    border-left: 4px solid #94a3b8;
    border-radius: 0 0.5rem 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.announce-page-item.urgent {
    border-left-color: var(--color-primary);
    background: linear-gradient(90deg, #fef2f2 0%, #fff 28%);
}

.announce-page-item.normal {
    border-left-color: #d4a017;
    background: linear-gradient(90deg, #fffbeb 0%, #fff 28%);
}

.announce-page-item.info {
    border-left-color: #2980b9;
}

.announce-page-item:hover {
    border-color: #d6c48a;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.announce-page-link {
    display: block;
    padding: 1rem 1.15rem;
    color: inherit;
    text-decoration: none;
}

.announce-page-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.announce-page-level {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.announce-page-level.urgent {
    background: #fdecea;
    color: var(--color-primary);
}

.announce-page-level.normal {
    background: #fef9e7;
    color: #b45309;
}

.announce-page-level.info {
    background: #ebf5fb;
    color: #2980b9;
}

.announce-page-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

.announce-page-item-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1f2937;
}

.announce-page-item:hover .announce-page-item-title {
    color: var(--color-primary);
}

.announce-page-item-summary {
    margin: 0.45rem 0 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #6b7280;
}

.announce-page-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 0.65rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

@media (max-width: 640px) {
    .announce-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .announce-page-title {
        font-size: 1.6rem;
    }

    .announce-page-item-title {
        font-size: 0.975rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .announce-page-item {
        transition: none;
    }

    .announce-page-item:hover {
        transform: none;
    }
}

/* ========== Schedule page ========== */
.schedule-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid #d1fae5;
}

.schedule-page-kicker {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-schedule);
}

.schedule-page-title {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    color: #1f2937;
    line-height: 1.2;
}

.schedule-page-desc {
    margin: 0.5rem 0 0;
    max-width: 40rem;
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.5;
}

.schedule-page-count {
    margin: 0;
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-schedule);
    white-space: nowrap;
}

.schedule-month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.schedule-month-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid #bbf7d0;
    border-radius: 0.375rem;
    background: #fff;
    color: var(--color-schedule);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.schedule-month-nav-btn:hover {
    background: #f0fdf4;
    border-color: var(--color-schedule);
}

.schedule-month-label {
    margin: 0;
    min-width: 10rem;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: #14532d;
}

.schedule-author-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.schedule-author-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid #bbf7d0;
    background: #fff;
    color: #4b5563;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.schedule-author-filter:hover {
    border-color: var(--color-schedule);
    color: var(--color-schedule);
}

.schedule-author-filter.active {
    background: var(--color-schedule);
    border-color: var(--color-schedule);
    color: #fff;
}

.schedule-author-filter span {
    opacity: 0.85;
    font-weight: 500;
}

.schedule-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.schedule-page-calendar {
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(21, 128, 61, 0.06);
}

.schedule-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.35rem;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #6b7280;
}

.schedule-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.schedule-cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    border-radius: 0.35rem;
    background: #f9fafb;
    font-size: 0.8rem;
    color: #374151;
}

.schedule-cal-day.is-empty {
    background: transparent;
}

.schedule-cal-day.has-events {
    background: #ecfdf5;
    color: #14532d;
    font-weight: 700;
}

.schedule-cal-day.is-today {
    outline: 2px solid var(--color-schedule);
    outline-offset: -2px;
}

.schedule-cal-num {
    line-height: 1;
}

.schedule-cal-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    background: var(--color-schedule);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
}

.schedule-page-list-wrap {
    min-width: 0;
}

.schedule-page-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #6b7280;
    background: #fff;
    border: 1px dashed #bbf7d0;
    border-radius: 0.5rem;
}

.schedule-page-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.schedule-page-day-group {
    margin: 0;
}

.schedule-page-day-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #d1fae5;
    font-size: 0.95rem;
    font-weight: 800;
    color: #14532d;
}

.schedule-page-day-heading span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.schedule-page-day-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.schedule-page-item {
    background: #fff;
    border: 1px solid #d1fae5;
    border-left: 4px solid var(--color-schedule);
    border-radius: 0 0.5rem 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.schedule-page-item:hover {
    border-color: #86efac;
    box-shadow: 0 6px 18px rgba(21, 128, 61, 0.1);
    transform: translateY(-1px);
}

.schedule-page-link {
    display: block;
    padding: 0.9rem 1.1rem;
    color: inherit;
    text-decoration: none;
}

.schedule-page-item-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1f2937;
}

.schedule-page-item:hover .schedule-page-item-title {
    color: var(--color-schedule);
}

.schedule-page-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 0.55rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.schedule-page-author {
    font-weight: 600;
    color: #15803d;
}

@media (max-width: 860px) {
    .schedule-page-layout {
        grid-template-columns: 1fr;
    }

    .schedule-page-calendar {
        max-width: 22rem;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .schedule-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .schedule-page-title {
        font-size: 1.6rem;
    }

    .schedule-page-item-title {
        font-size: 0.975rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .schedule-page-item {
        transition: none;
    }

    .schedule-page-item:hover {
        transform: none;
    }
}

/* ========== Org structure tree (Giới thiệu) ========== */
.org-tree-intro {
    margin: -0.5rem 0 1.25rem;
    color: #6b7280;
    font-size: 0.95rem;
}

.org-tree-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #6b7280;
    background: #fff;
    border: 1px dashed #e5d9b3;
    border-radius: 0.5rem;
}

.org-tree-wrap {
    overflow-x: auto;
    padding: 1rem 0.5rem 1.5rem;
}

.org-tree-wrap--admin {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.25rem 0.75rem;
}

.org-tree {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    position: relative;
}

.org-tree-node {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 1.25rem;
}

/* Vertical connector from parent */
.org-tree > .org-tree-node {
    padding-top: 0;
}

.org-tree-node::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 1.25rem;
    background: #d1d5db;
    transform: translateX(-50%);
}

.org-tree > .org-tree-node::before {
    display: none;
}

/* Horizontal bar across siblings */
.org-tree-node::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #d1d5db;
}

.org-tree > .org-tree-node::after,
.org-tree-node:only-child::after {
    display: none;
}

.org-tree-node:first-child::after {
    left: 50%;
    right: 0;
}

.org-tree-node:last-child::after {
    left: 0;
    right: 50%;
}

.org-tree-node:first-child:last-child::after {
    display: none;
}

.org-tree-card {
    position: relative;
    z-index: 1;
    min-width: 10.5rem;
    max-width: 14rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid #e5d9b3;
    border-top: 3px solid var(--color-primary);
    border-radius: 0.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: inherit;
    text-decoration: none;
}

.org-tree-card--link:hover {
    border-color: #d6c48a;
    box-shadow: 0 6px 18px rgba(185, 28, 28, 0.12);
    transform: translateY(-2px);
}

.org-tree-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.35;
}

.org-tree-person {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
}

.org-tree-desc {
    font-size: 0.72rem;
    color: #6b7280;
    line-height: 1.4;
}

.org-tree-node > .org-tree {
    margin-top: 1.25rem;
    padding-top: 0;
}

.org-tree-node.is-inactive > .org-tree-card {
    opacity: 0.55;
    border-top-color: #9ca3af;
}

@media (max-width: 900px) {
    .org-tree {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .org-tree-node {
        align-items: stretch;
        padding-top: 0;
        padding-left: 1.25rem;
    }

    .org-tree > .org-tree-node {
        padding-left: 0;
    }

    .org-tree-node::before,
    .org-tree-node::after {
        display: none;
    }

    .org-tree-node > .org-tree {
        margin-top: 0.75rem;
        border-left: 2px solid #e5e7eb;
        margin-left: 0.75rem;
        padding-left: 0.5rem;
    }

    .org-tree-card {
        max-width: none;
        min-width: 0;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .org-tree-card--link:hover {
        transform: none;
    }
}

/* ===== Admin video guides ===== */
.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-guide {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    border-radius: 999px;
    background: #0b3d2e;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
}

.btn-guide:hover {
    background: #145c44;
}

.admin-guide-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.admin-guide-modal[hidden] {
    display: none !important;
}

.admin-guide-dialog {
    width: min(960px, 100%);
    max-height: min(90vh, 880px);
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.admin-guide-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.admin-guide-kicker {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0b3d2e;
    font-weight: 700;
}

.admin-guide-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #111827;
}

.admin-guide-summary {
    margin: 0.35rem 0 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.admin-guide-close {
    border: 0;
    background: #f3f4f6;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: #374151;
}

.admin-guide-body {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem;
}

.admin-guide-player video,
.admin-guide-fallback {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #102a43;
    border-radius: 12px;
    color: #fff;
}

.admin-guide-fallback {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem;
    box-sizing: border-box;
}

.admin-guide-slide-meta {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #f5c542;
    margin-bottom: 0.5rem;
}

.admin-guide-fallback h3 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.admin-guide-fallback p {
    margin: 0;
    white-space: pre-line;
    line-height: 1.5;
    color: #e5e7eb;
}

.admin-guide-slide-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.admin-guide-slide-controls button {
    border: 0;
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.admin-guide-steps {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-guide-steps li {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.45;
}

.admin-guide-steps strong {
    display: block;
    color: #111827;
    margin-bottom: 0.15rem;
}

body.admin-guide-open {
    overflow: hidden;
}

@media (max-width: 860px) {
    .admin-guide-body {
        grid-template-columns: 1fr;
    }
}

/* ========== Thư viện ảnh ========== */
.gallery-page-header {
    margin-bottom: 1.25rem;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
}

.gallery-filter {
    border: 1px solid #e5d9b3;
    background: #fff;
    color: #1f2937;
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.8125rem;
    cursor: pointer;
    line-height: 1.3;
}

.gallery-filter span {
    margin-left: 0.2rem;
    font-weight: 600;
    opacity: 0.75;
}

.gallery-filter.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.gallery-filter:focus-visible,
.photo-tile:focus-visible,
.photo-lightbox-close:focus-visible,
.photo-lightbox-nav:focus-visible,
.photo-zoom-btn:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

.photo-library {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 0.85rem;
}

.photo-tile {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    border-radius: 0.7rem;
    background: #111827;
    aspect-ratio: 1;
    cursor: zoom-in;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
    color: #fff;
    text-align: left;
}

.photo-tile.is-wide {
    grid-column: span 2;
    aspect-ratio: 16 / 10;
}

.photo-tile[hidden] {
    display: none !important;
}

.photo-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.photo-tile:hover img,
.photo-tile:focus-visible img {
    transform: scale(1.06);
}

.photo-tile-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 2.4rem 0.9rem 0.8rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
    pointer-events: none;
}

.photo-tile-kicker {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #fde68a;
}

.photo-tile-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-empty,
.gallery-filter-empty {
    background: #fff;
    border: 1px dashed #d6c79a;
    border-radius: 0.75rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #4b5563;
}

.gallery-empty p,
.gallery-filter-empty {
    margin: 0.25rem 0;
}

.gallery-back {
    margin-top: 2rem;
}

.photo-lightbox[hidden] {
    display: none !important;
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.photo-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.9);
}

.photo-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(68rem, 100%);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
}

.photo-lightbox-figure {
    margin: 0;
    min-width: 0;
}

.photo-zoom-stage {
    position: relative;
    height: min(76vh, 42rem);
    overflow: hidden;
    border-radius: 0.6rem;
    background: #000;
    touch-action: none;
    cursor: zoom-in;
}

.photo-zoom-stage.is-zoomed {
    cursor: grab;
}

.photo-zoom-stage.is-dragging {
    cursor: grabbing;
}

.photo-zoom-stage img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.photo-zoom-bar {
    position: absolute;
    left: 50%;
    bottom: 0.85rem;
    z-index: 2;
    display: flex;
    gap: 0.35rem;
    transform: translateX(-50%);
    padding: 0.3rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
}

.photo-zoom-btn {
    min-width: 2.4rem;
    height: 2.2rem;
    padding: 0 0.7rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.photo-zoom-reset {
    min-width: 4.2rem;
    font-size: 0.82rem;
}

.photo-lightbox-caption {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-top: 0.75rem;
    color: #fff;
}

.photo-lightbox-caption strong {
    font-size: 1.05rem;
    line-height: 1.35;
}

.photo-lightbox-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    color: #e5e7eb;
    font-size: 0.875rem;
}

.photo-lightbox-link {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.photo-lightbox-link[hidden] {
    display: none !important;
}

.photo-lightbox-close,
.photo-lightbox-nav {
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
}

.photo-lightbox-close {
    position: absolute;
    top: -0.25rem;
    right: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    font-size: 1.6rem;
    line-height: 1;
}

.photo-lightbox-nav {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    font-size: 2rem;
    line-height: 1;
}

body.photo-lightbox-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .photo-library {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-tile.is-wide {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .photo-library {
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
    }

    .photo-tile,
    .photo-tile.is-wide {
        grid-column: auto;
        aspect-ratio: 1;
    }

    .photo-lightbox {
        padding: 0.75rem;
    }

    .photo-lightbox-dialog {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .photo-lightbox-nav {
        position: absolute;
        top: 38%;
        z-index: 2;
    }

    .photo-lightbox-prev {
        left: 0.35rem;
    }

    .photo-lightbox-next {
        right: 0.35rem;
    }

    .photo-lightbox-caption {
        flex-direction: column;
        align-items: flex-start;
    }
}



