/**
 * 8th Engineer Battalion — Portal Layout Stylesheet
 * Inspired by RTA news portal, themed with Olive/Khaki/Gold
 */

/* ========== Variables ========== */
:root {
    --olive-dark:    #1e2f1a;
    --olive:         #3d4f2a;
    --olive-mid:     #556B2F;
    --olive-light:   #6B7F3A;
    --khaki:         #C3B091;
    --khaki-light:   #D4C4A8;
    --charcoal:      #2F2F2F;
    --charcoal-muted:#666;
    --gold:          #C5A572;
    --gold-bright:   #D4AF37;
    --gold-dark:     #A8894E;
    --white:         #fff;
    --gray-bg:       #f0f0f0;
    --gray-border:   #e0e0e0;
    --nav-bg:        #1a2744;
    --nav-bg-alt:    #243056;
    --accent:        #556B2F;
    --accent-light:  #6B7F3A;
    --font-heading:  'Prompt', sans-serif;
    --font-body:     'Sarabun', sans-serif;
    --container:     1200px;
    --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
    --shadow-md:  0 4px 16px rgba(0,0,0,.12);
    --shadow-lg:  0 8px 32px rgba(0,0,0,.16);
    --transition: .25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    color: var(--charcoal);
    background: var(--gray-bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1rem;
}

.text-gold { color: var(--gold-bright); }

/* ========== Buttons ========== */
.btn {
    display: inline-flex; align-items: center; gap: .4rem;
    font-family: var(--font-heading); font-weight: 600; font-size: .9rem;
    padding: .6rem 1.4rem; border-radius: 4px; border: none; cursor: pointer;
    transition: all var(--transition);
}
.btn-gold {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold-dark));
    color: var(--charcoal);
    box-shadow: 0 3px 12px rgba(197,165,114,.4);
}
.btn-gold:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-sm { padding: .45rem 1rem; font-size: .82rem; }

/* ============================================================
   HEADER
   ============================================================ */

/* 2. Unit Banner (Header Image) */
.unit-banner {
    position: relative;
    min-height: var(--banner-height, 180px);
    background:
        var(--banner-bg, none) center/cover no-repeat,
        linear-gradient(135deg, #1a1a1a 0%, #2d3a2a 50%, #1a1a1a 100%);
    background-blend-mode: overlay;
    overflow: hidden;
}
.unit-banner--full {
    background: #111;
    background-blend-mode: normal;
}
.unit-banner-full-link { display: block; }
.unit-banner-full-image {
    width: 100%;
    height: var(--banner-height, 180px);
    object-fit: cover;
    object-position: center;
}
.unit-banner-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.45) 60%, rgba(0,0,0,.65) 100%);
}

/* 1. Utility Bar */
.utility-bar {
    background: var(--nav-bg);
    color: rgba(255,255,255,.85);
    font-size: .82rem;
    padding: .4rem 0;
}
.utility-bar-inner {
    display: flex; justify-content: space-between; align-items: center;
}
.utility-datetime {
    display: flex; align-items: center; gap: .5rem;
}
.utility-datetime i { color: var(--gold-bright); }
.utility-social { display: flex; gap: .75rem; }
.utility-social a {
    color: rgba(255,255,255,.75); font-size: .95rem;
    transition: color var(--transition);
}
.utility-social a:hover { color: var(--gold-bright); }

.unit-banner-inner {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 2rem;
    padding: 1.75rem 1rem;
    min-height: var(--banner-height, 180px);
}
.unit-emblem {
    display: flex; align-items: center; gap: 1rem; flex-shrink: 0;
}
.emblem-circle {
    width: 80px; height: 80px;
    background: linear-gradient(145deg, var(--olive-light), var(--olive-dark));
    border: 3px solid var(--gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--gold-bright);
    box-shadow: 0 4px 16px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.15);
}
.emblem-circle.has-logo {
    width: auto; height: auto;
    min-width: 0; min-height: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    overflow: visible;
}
.emblem-circle img {
    width: auto; height: 96px; max-width: 120px;
    object-fit: contain; display: block;
    background: transparent;
}
.nav-home-btn .unit-crest,
.nav-home-btn img.nav-crest {
    width: 32px; height: 32px; object-fit: contain; display: block;
}
.nav-home-btn i.nav-crest { font-size: 1.1rem; }
.footer-brand img.footer-crest,
.footer-brand .unit-crest {
    width: 42px; height: 42px; object-fit: contain; display: block;
}
.footer-brand i.footer-crest { color: var(--gold-bright); font-size: 1.5rem; }
.emblem-text { display: flex; flex-direction: column; }
.emblem-unit {
    font-family: var(--font-heading); font-weight: 700;
    font-size: 1.15rem; color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,.5);
}
.emblem-division {
    font-size: .85rem; color: var(--khaki-light);
}
.unit-banner-message { flex: 1; text-align: center; }
.banner-motto {
    font-family: var(--font-heading); font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 600; color: var(--white);
    text-shadow: 0 2px 6px rgba(0,0,0,.5);
    margin-bottom: .35rem;
}
.banner-sub {
    font-size: .9rem; color: var(--khaki-light);
}
.unit-banner-portrait { flex-shrink: 0; }
.portrait-frame {
    width: 100px; height: 130px;
    background: var(--olive-dark) center/cover no-repeat;
    border: 3px solid var(--gold);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
}

/* 3. Main Navigation */
.main-nav {
    background: var(--nav-bg);
    border-top: 2px solid var(--gold-dark);
    position: sticky; top: 0; z-index: 900;
    box-shadow: var(--shadow-md);
}
.main-nav-inner {
    display: flex; align-items: center; gap: 0;
}
.nav-home-btn {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px;
    background: var(--accent);
    color: var(--white); font-size: 1.1rem;
    flex-shrink: 0;
    transition: background var(--transition);
}
.nav-home-btn:hover, .nav-home-btn.active { background: var(--accent-light); }

.nav-menu {
    display: flex; flex: 1;
    overflow: visible;
}
.nav-menu li { flex-shrink: 0; }
.nav-item-has-children { position: relative; }
.nav-link {
    display: block;
    font-family: var(--font-heading); font-size: .82rem; font-weight: 500;
    color: rgba(255,255,255,.85);
    padding: 1rem 1.1rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--white);
    background: rgba(255,255,255,.06);
    border-bottom-color: var(--gold-bright);
}
.nav-caret {
    margin-left: .45rem;
    font-size: .7rem;
}
.nav-submenu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 220px;
    background: #23304d;
    border: 1px solid rgba(197,165,114,.25);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 24px rgba(0,0,0,.28);
    display: none;
    overflow: hidden;
    z-index: 950;
}
.nav-item-has-children:hover .nav-submenu,
.nav-item-has-children:focus-within .nav-submenu {
    display: block;
}
.nav-submenu li { width: 100%; }
.nav-submenu-link {
    display: block;
    padding: .8rem 1rem;
    color: rgba(255,255,255,.88);
    font-size: .84rem;
    border-top: 1px solid rgba(255,255,255,.06);
}
.nav-submenu-link:hover,
.nav-submenu-link.active {
    background: rgba(255,255,255,.07);
    color: #fff;
}

.nav-actions {
    display: flex; margin-left: auto; flex-shrink: 0;
}
.nav-action-btn {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 52px;
    background: none; border: none;
    color: rgba(255,255,255,.8); font-size: 1rem;
    cursor: pointer; transition: color var(--transition);
}
.nav-action-btn:hover { color: var(--gold-bright); }

.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: .5rem;
    margin-left: auto;
}
.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--white); border-radius: 2px;
}

/* Search Overlay */
.search-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.7); z-index: 1100;
    align-items: flex-start; padding-top: 120px;
}
.search-overlay.open { display: flex; }
.search-box {
    display: flex; align-items: center; gap: 1rem; width: 100%;
}
.search-form {
    flex: 1; display: flex;
    background: var(--white); border-radius: 4px; overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.search-form input {
    flex: 1; border: none; padding: .85rem 1.25rem;
    font-family: var(--font-body); font-size: 1rem; outline: none;
}
.search-form button {
    background: var(--accent); color: var(--white); border: none;
    padding: 0 1.25rem; cursor: pointer; font-size: 1rem;
}
.search-close {
    background: none; border: none; color: var(--white);
    font-size: 1.5rem; cursor: pointer;
}

/* ============================================================
   TOP TAGS
   ============================================================ */
.top-tags {
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
    padding: .75rem 0;
}
.top-tags-inner {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.top-tags-label {
    font-family: var(--font-heading); font-weight: 700;
    font-size: .88rem; color: var(--charcoal); flex-shrink: 0;
}
.top-tags-label i { color: var(--accent); margin-right: .25rem; }
.top-tags-list { display: flex; gap: .5rem; flex-wrap: wrap; }
.tag-pill {
    font-size: .78rem; font-weight: 500;
    color: var(--accent);
    background: rgba(85,107,47,.1);
    border: 1px solid rgba(85,107,47,.25);
    padding: .25rem .75rem; border-radius: 2rem;
    transition: all var(--transition);
}
.tag-pill:hover {
    background: var(--accent); color: var(--white);
}

/* ============================================================
   FEATURED SECTION
   ============================================================ */
.featured-section { padding: 1.5rem 0; }
.featured-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.25rem;
    align-items: start;
}

/* Featured Main */
.featured-main { border-radius: 4px; overflow: hidden; box-shadow: var(--shadow-md); }
.featured-main-link { display: block; }
.featured-main-image {
    position: relative; height: 420px;
    background: linear-gradient(135deg, var(--olive), var(--charcoal)) center/cover no-repeat;
}
.featured-main-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.1) 60%);
}
.featured-main-content {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 1.75rem;
}
.media-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    background: var(--accent); color: var(--white);
    font-size: .75rem; border-radius: 3px;
    margin-bottom: .5rem;
}
.cat-badge {
    display: inline-block;
    font-size: .72rem; font-weight: 600;
    color: var(--white); background: var(--accent);
    padding: .2rem .65rem; border-radius: 2px;
    margin-bottom: .5rem;
}
.cat-badge-sm {
    display: inline-block;
    font-size: .68rem; font-weight: 600;
    color: var(--accent); margin-bottom: .2rem;
}
.featured-main-title {
    font-family: var(--font-heading); font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700; color: var(--white); line-height: 1.35;
    margin-bottom: .65rem;
}
.featured-meta {
    display: flex; gap: 1.25rem; flex-wrap: wrap;
    font-size: .78rem; color: rgba(255,255,255,.8);
}
.featured-meta i { margin-right: .3rem; color: var(--gold-bright); }

/* Sidebar */
.news-sidebar {
    background: var(--white);
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.sidebar-tabs {
    display: flex; border-bottom: 2px solid var(--gray-border);
}
.sidebar-tab {
    flex: 1; padding: .85rem;
    background: none; border: none; cursor: pointer;
    font-size: 1rem; color: var(--charcoal-muted);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
}
.sidebar-tab:hover { color: var(--accent); background: rgba(85,107,47,.04); }
.sidebar-tab.active {
    color: var(--accent); border-bottom-color: var(--accent);
    background: rgba(85,107,47,.06);
}
.sidebar-panel { display: none; }
.sidebar-panel.active { display: block; }
.sidebar-news-list { padding: .5rem 0; }
.sidebar-news-item {
    display: flex; gap: .75rem; padding: .75rem 1rem;
    border-bottom: 1px solid var(--gray-border);
    transition: background var(--transition);
}
.sidebar-news-item:hover { background: rgba(85,107,47,.04); }
.sidebar-thumb {
    width: 72px; height: 56px; flex-shrink: 0;
    background: var(--olive) center/cover no-repeat;
    border-radius: 3px;
}
.sidebar-news-text h4 {
    font-family: var(--font-heading); font-size: .82rem; font-weight: 600;
    color: var(--charcoal); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================================================
   COMMANDER STRIP
   ============================================================ */
.commander-strip {
    padding: 1.25rem 0;
}
.commander-strip-inner {
    display: flex; align-items: center; gap: 1.5rem;
    background: var(--white);
    border-left: 4px solid var(--gold);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}
.commander-strip-photo {
    width: 64px; height: 64px; flex-shrink: 0;
    border-radius: 50%; border: 2px solid var(--gold);
    background: var(--olive) center/cover no-repeat;
}
.commander-strip-content { flex: 1; }
.commander-strip-label {
    font-family: var(--font-heading); font-size: .78rem; font-weight: 600;
    color: var(--gold-dark); display: block; margin-bottom: .3rem;
}
.commander-strip-msg {
    font-size: .92rem; color: var(--charcoal); font-style: italic;
    margin-bottom: .25rem;
}
.commander-strip-content cite {
    font-size: .8rem; color: var(--charcoal-muted); font-style: normal;
}

.quick-links-section { padding: 1.25rem 0; background: #f7f5ef; }
.quick-links-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .75rem;
}
.quick-link-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .45rem; min-height: 96px;
    background: #fff; border: 1px solid var(--gray-border);
    border-radius: 8px; color: var(--olive-dark); text-decoration: none;
    font-family: var(--font-heading); font-weight: 600; font-size: .92rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.quick-link-card i {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-style: normal;
    font-size: 1.5rem;
    color: var(--olive-mid);
    line-height: 1;
}
.quick-link-card:hover { border-color: var(--olive-mid); transform: translateY(-2px); }
.news-list-more { text-align: center; margin-top: 1.5rem; }

/* ============================================================
   NEWS LIST
   ============================================================ */
.news-list-section { padding: 1.5rem 0 3rem; }
.news-list-header { margin-bottom: 1.25rem; }
.news-cat-filters {
    display: flex; flex-wrap: wrap; gap: .45rem;
    margin-top: .85rem;
}
.news-cat-filter {
    display: inline-block;
    font-size: .82rem; font-weight: 600;
    color: var(--olive-dark); background: #fff;
    border: 1px solid var(--gray-border, #ddd);
    padding: .28rem .75rem; border-radius: 999px;
    text-decoration: none;
}
.news-cat-filter:hover { border-color: var(--olive-mid); color: var(--olive); }
.news-cat-filter.is-active {
    background: var(--olive-mid); border-color: var(--olive-mid); color: #fff;
}
.news-list-title {
    font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700;
    color: var(--charcoal);
    display: flex; align-items: center; gap: .5rem;
}
.news-list-title i { color: var(--accent); }

.news-list { display: flex; flex-direction: column; gap: 1rem; }
.news-list-item {
    background: var(--white);
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
    min-width: 0;
}
.news-list-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.news-list-link {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 160px;
    min-width: 0;
}
.news-list.news-list--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    align-items: stretch;
}
.news-list--grid .news-list-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.news-list--grid .news-list-link {
    grid-template-columns: 1fr;
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.news-list--grid .news-list-image {
    min-height: 180px;
    aspect-ratio: 16/9;
    flex-shrink: 0;
}
.news-list--no-image .news-list-link { grid-template-columns: 1fr; }
.news-back-link-plain { color: var(--olive-dark); margin: 0 0 1rem; display: inline-flex; }
.news-article-title-plain { color: var(--olive-dark); margin: .5rem 0 0.75rem; }
.news-article-meta-plain { color: var(--charcoal-muted); margin-bottom: 1.25rem; }
.news-list-image {
    position: relative;
    background: linear-gradient(135deg, var(--olive-muted, #8B9A6B), var(--olive-dark)) center/cover no-repeat;
    min-height: 160px;
}
.news-list-image .media-badge {
    position: absolute; bottom: .75rem; left: .75rem;
}
.news-list-body {
    padding: 1.25rem 1.5rem;
    display: flex; flex-direction: column; justify-content: center;
    min-width: 0;
    overflow: hidden;
}
.news-list--grid .news-list-body {
    flex: 1;
    justify-content: flex-start;
}
.news-list-body h2,
.news-list-body h3 {
    font-family: var(--font-heading); font-size: 1rem; font-weight: 600;
    color: var(--charcoal); line-height: 1.4;
    margin: .4rem 0 .5rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.news-list--grid .news-list-body h2,
.news-list--grid .news-list-body h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-list--grid .cat-badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.news-list-meta {
    display: flex; gap: 1rem; flex-wrap: wrap;
    font-size: .75rem; color: var(--charcoal-muted); margin-bottom: .5rem;
    min-width: 0;
}
.news-list--grid .news-list-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
}
.news-list--grid .news-list-meta span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.news-list-meta i { color: var(--accent); margin-right: .25rem; }
.news-list-excerpt {
    font-size: .85rem; color: var(--charcoal-muted); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.news-search-result { color: var(--charcoal-muted); margin-top: .35rem; font-size: .92rem; }
.news-empty {
    text-align: center; padding: 3rem 1rem; color: var(--charcoal-muted);
}
.news-empty i { font-size: 2.5rem; color: var(--olive); margin-bottom: 1rem; display: block; }

/* News article detail */
.news-article-hero {
    position: relative;
    min-height: 320px;
    background: var(--olive-dark) center/cover no-repeat;
}
.news-article-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(20,24,16,.92) 0%, rgba(20,24,16,.35) 100%);
}
.news-article-hero-inner {
    position: relative; z-index: 1;
    padding: 2.5rem 1rem 2rem;
    color: #fff;
}
.news-back-link {
    display: inline-flex; align-items: center; gap: .4rem;
    color: rgba(255,255,255,.85); font-size: .88rem; margin-bottom: 1rem;
    text-decoration: none;
}
.news-back-link:hover { color: var(--gold); }
.news-article-title {
    font-family: var(--font-heading); font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700; line-height: 1.35; max-width: 900px;
}
.news-article-meta {
    display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem;
    font-size: .88rem; color: rgba(255,255,255,.8);
}
.news-article-meta i { color: var(--gold); margin-right: .3rem; }
.news-article-body { padding: 2rem 0 3.5rem; max-width: 860px; }
.news-article-lead {
    font-size: 1.1rem; line-height: 1.7; color: var(--charcoal);
    border-left: 4px solid var(--gold); padding-left: 1rem; margin-bottom: 1.75rem;
}
.news-article-content {
    font-size: 1rem; line-height: 1.85; color: var(--charcoal);
}
.news-article-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 1rem 0; }
.news-article-content p { margin-bottom: 1rem; }
.news-article-content h2, .news-article-content h3 {
    font-family: var(--font-heading); margin: 1.5rem 0 .75rem; color: var(--olive-dark);
}

.news-gallery { margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-border); }
.news-gallery-title {
    font-family: var(--font-heading); font-size: 1.25rem; color: var(--olive-dark);
    margin-bottom: 1rem;
}
.news-gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .75rem;
}
.news-gallery-item {
    position: relative; display: block; aspect-ratio: 4/3; overflow: hidden;
    border-radius: 6px; background: #e8e8e8; cursor: zoom-in;
}
.news-gallery-item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .25s ease;
}
.news-gallery-item:hover img { transform: scale(1.06); }
.news-gallery-zoom {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(26,39,68,.0); color: #fff; font-size: 1.2rem;
    opacity: 0; transition: opacity .2s, background .2s;
}
.news-gallery-item:hover .news-gallery-zoom {
    opacity: 1; background: rgba(26,39,68,.38);
}

.lightbox {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(10,14,22,.9);
    display: flex; align-items: center; justify-content: center;
    padding: 3rem 4.5rem;
}
.lightbox[hidden] { display: none; }
.lightbox-figure { margin: 0; max-width: min(1100px, 100%); text-align: center; }
.lightbox-figure img {
    max-width: 100%; max-height: calc(100vh - 8rem);
    border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.45);
    background: #111; user-select: none;
}
.lightbox-figure figcaption {
    color: #fff; margin-top: .75rem; font-size: .95rem;
}
.lightbox-close, .lightbox-nav {
    position: absolute; background: rgba(255,255,255,.12); color: #fff;
    border: 0; cursor: pointer; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: var(--olive-mid); }
.lightbox-close { top: 1rem; right: 1rem; width: 44px; height: 44px; font-size: 1.25rem; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 1.1rem; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-nav[hidden] { display: none; }

.news-list-footer .pagination { margin-top: .85rem; }
.pagination {
    display: flex; justify-content: center; align-items: center;
    gap: .4rem; margin-top: 2rem;
}
.page-btn {
    display: flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px;
    font-family: var(--font-heading); font-size: .88rem; font-weight: 600;
    color: var(--charcoal); background: var(--white);
    border: 1px solid var(--gray-border); border-radius: 3px;
    transition: all var(--transition);
}
.page-btn:hover, .page-btn.active {
    background: var(--accent); color: var(--white); border-color: var(--accent);
}
.page-dots { color: var(--charcoal-muted); padding: 0 .25rem; }

.page-content-section { padding: 2rem 0 3.5rem; }
.page-content-header { margin-bottom: 1.5rem; border-bottom: 3px solid var(--gold); padding-bottom: .75rem; }
.page-content-title {
    font-family: var(--font-heading); font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700; color: var(--olive-dark);
}
.page-content-body { max-width: 900px; }

/* ============================================================
   ANNOUNCEMENT MODAL
   ============================================================ */
.announcement-modal {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.announcement-modal.hidden { display: none; }
.announcement-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.75);
}
.announcement-content {
    position: relative; z-index: 1;
    max-width: 780px; width: 100%;
    background: radial-gradient(ellipse at center, #4a4a4a 0%, #2a2a2a 70%);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    border: 1px solid rgba(197,165,114,.3);
}
.announcement-close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none;
    color: rgba(255,255,255,.7); font-size: 1.4rem;
    cursor: pointer; transition: color var(--transition);
}
.announcement-close:hover { color: var(--white); }
.announcement-grid {
    display: grid; grid-template-columns: 220px 1fr;
    gap: 2rem; align-items: center;
}
.announcement-frame {
    width: 100%; aspect-ratio: 3/4;
    background: #333 center/cover no-repeat;
    border: 4px solid #555;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,.5), inset 0 0 0 2px rgba(197,165,114,.3);
}
.announcement-text { text-align: center; color: var(--white); }
.announcement-text h2 {
    font-family: var(--font-heading); font-size: clamp(1.2rem, 3vw, 1.75rem);
    font-weight: 600; line-height: 1.5; margin-bottom: 1rem;
}
.announcement-subtitle {
    font-size: .95rem; color: rgba(255,255,255,.85);
    line-height: 1.8; white-space: pre-line; margin-bottom: 1.25rem;
}
.announcement-divider {
    width: 60%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto 1rem;
}
.announcement-footer { font-size: .85rem; color: rgba(255,255,255,.65); }

/* Cookie Consent */
.cookie-consent {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    max-width: 340px;
    background: var(--white);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-border);
    display: flex; flex-direction: column; gap: .75rem;
    z-index: 1500;
    transform: translateY(120%); opacity: 0;
    transition: all .4s ease;
}
.cookie-consent.show { transform: translateY(0); opacity: 1; }
.cookie-consent p { font-size: .82rem; color: var(--charcoal-muted); }
.cookie-consent a { color: var(--accent); text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--nav-bg); color: rgba(255,255,255,.8); }
.footer-main { padding: 2.5rem 0 1.5rem; }
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 2rem;
}
.footer-brand {
    display: flex; align-items: center; gap: .6rem;
    font-family: var(--font-heading); font-weight: 700;
    color: var(--white); margin-bottom: .75rem;
}
.footer-brand i { color: var(--gold-bright); }
.footer-desc { font-size: .88rem; opacity: .75; }
.footer-heading {
    font-family: var(--font-heading); font-size: .9rem; font-weight: 600;
    color: var(--gold-bright); margin-bottom: .85rem;
    padding-bottom: .4rem; border-bottom: 1px solid rgba(197,165,114,.25);
}
.footer-links li { margin-bottom: .4rem; }
.footer-links a { font-size: .85rem; opacity: .75; transition: opacity var(--transition); }
.footer-links a:hover { opacity: 1; color: var(--gold-bright); }
.footer-contact li {
    display: flex; gap: .6rem; font-size: .83rem;
    margin-bottom: .5rem; opacity: .8;
}
.footer-contact i { color: var(--gold); margin-top: .2rem; flex-shrink: 0; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 1rem 0; text-align: center;
    font-size: .8rem; opacity: .55;
}

/* Back to top */
.back-to-top {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    width: 42px; height: 42px;
    background: var(--accent); color: var(--white);
    border: none; border-radius: 4px; cursor: pointer;
    font-size: .95rem; box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden;
    transform: translateY(16px);
    transition: all var(--transition);
    z-index: 800;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-light); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .featured-grid { grid-template-columns: 1fr; }
    .featured-main-image { height: 320px; }
    .news-list-link { grid-template-columns: 220px 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .unit-banner-inner { flex-wrap: wrap; gap: 1rem; }
    .unit-banner-message { text-align: left; order: 3; width: 100%; }
    .unit-banner-portrait { display: none; }

    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed; top: 0; right: -100%;
        width: 280px; height: 100vh;
        background: var(--nav-bg-alt);
        flex-direction: column;
        padding: 4.5rem 0 2rem;
        box-shadow: var(--shadow-lg);
        transition: right var(--transition);
        z-index: 1001;
        overflow-x: hidden;
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .nav-menu::-webkit-scrollbar { display: none; }
    .nav-menu.open { right: 0; }
    .nav-link { padding: .85rem 1.5rem; border-bottom: none; }
    .nav-submenu {
        position: static;
        display: none;
        min-width: 0;
        background: rgba(0,0,0,.18);
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    .nav-item-has-children.submenu-open .nav-submenu { display: block; }
    .nav-submenu-link { padding-left: 2.25rem; }
    .nav-actions { display: none; }

    .news-list-link { grid-template-columns: 1fr; }
    .news-list-image { min-height: 200px; }
    .lightbox { padding: 4.5rem 1rem 1.5rem; }
    .lightbox-prev { left: .4rem; }
    .lightbox-next { right: .4rem; }

    .commander-strip-inner { flex-direction: column; text-align: center; }
    .announcement-grid { grid-template-columns: 1fr; }
    .announcement-portrait { max-width: 180px; margin: 0 auto; }

    .footer-grid { grid-template-columns: 1fr; }
    .cookie-consent { left: 1rem; right: 1rem; max-width: none; }
}

@media (max-width: 480px) {
    .featured-main-image { height: 260px; }
    .top-tags-inner { flex-direction: column; align-items: flex-start; }
}
