/* ===== Polish v4 — 20 refinements ===== */

/* 1. Crisper text rendering site-wide */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* 2. Hero headings: soft shadow for readability over photos */
.page-hero.hero-photo h1, .photo-band h2 { text-shadow: 0 2px 14px rgba(13,34,66,0.45); }


/* 5. Nav links: animated underline */
.main-nav > .nav-item > .nav-link, .main-nav > .nav-link { position: relative; }
.main-nav .nav-link::after { content:''; position:absolute; left:12%; right:88%; bottom:4px; height:2px;
  background: var(--gold,#F2B705); transition: right .25s ease; }
.main-nav .nav-link:hover::after { right:12%; }

/* 6. Dropdown menus: fade + rise animation */
@media (min-width: 1001px) {
  .nav-dropdown { opacity: 0; transform: translateY(8px); transition: opacity .22s, transform .22s;
    pointer-events: none; display: block; }
  .nav-item:hover .nav-dropdown { opacity: 1; transform: none; pointer-events: auto; }
  .nav-dropdown a { transition: padding-left .18s, background .18s; }
  .nav-dropdown a:hover { padding-left: 22px; background: var(--paper-dim,#f6f5f1); }
}

/* 7. Table headers: navy band with white text */
table thead th, .admin-table thead th { background: var(--navy,#14305C); color: #fff; }

/* 8. Content lists: gold chevron bullets */
.section ul:not([class]) { list-style: none; padding-left: 4px; }
.section ul:not([class]) li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.section ul:not([class]) li::before { content: '\276F'; position: absolute; left: 0; color: var(--gold,#F2B705); font-size: .8em; top: 3px; }

/* 9. Horizontal rules: tri-colour mini bar */
.section hr { border: none; height: 3px; width: 90px; margin: 26px 0;
  background: linear-gradient(90deg, var(--gold,#F2B705), var(--leaf,#1C7A34), var(--navy,#14305C)); border-radius: 2px; }

/* 10. Images: shimmer placeholder while lazy-loading */
img[loading="lazy"] { background: linear-gradient(100deg, #eee 40%, #f7f7f7 50%, #eee 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* 11. Status badges (tenders/careers): open=green, closed=grey */
.badge-open, .badge-closed { display:inline-block; font-size:.68rem; font-weight:800; letter-spacing:.06em;
  text-transform:uppercase; padding:3px 10px; border-radius:20px; }
.badge-open { background:#eaf5ec; color:var(--leaf-dark,#14591F); border:1px solid #bfe3c8; }
.badge-closed { background:#f0f0f0; color:#777; border:1px solid #ddd; }

/* 12. Breadcrumbs: slash separators in gold */
.breadcrumb a { opacity:.85; } .breadcrumb a:hover { opacity:1; }

/* 13. Chat bubble: gentle attention pulse */
#chatWidget button, .chat-launcher { animation: chatPulse 4s infinite; }
@keyframes chatPulse { 0%,88%,100% { transform:scale(1);} 92% { transform:scale(1.08);} 96% { transform:scale(1);} }

/* 14. Card headings tighten */
.card h3 { line-height: 1.3; }

/* 15. Sticky header: govbar tucks away on scroll for more screen space */
body.scrolled .govbar { display: none; }

/* 16. FAQ details/summary styling */
details { border:1px solid var(--line,#e5e2da); border-radius:12px; padding:14px 18px; margin-bottom:10px; background:#fff; }
details[open] { border-color: var(--gold,#F2B705); box-shadow:0 6px 18px rgba(20,48,92,.07); }
details summary { cursor:pointer; font-weight:700; color:var(--navy,#14305C); }
details summary::marker { color: var(--gold,#F2B705); }

/* 17. Photo band: subtle vignette for depth */
.photo-band { box-shadow: inset 0 24px 40px -24px rgba(0,0,0,.5), inset 0 -24px 40px -24px rgba(0,0,0,.5); }

/* 18. Footer headings: gold kicker underline */
.site-footer h4, .site-footer .footer-col > span:first-child { position:relative; padding-bottom:8px; }
.site-footer h4::after { content:''; position:absolute; left:0; bottom:0; width:28px; height:3px; background:var(--gold,#F2B705); border-radius:2px; }

/* 19. Skip-to-content link (appears on first Tab press — WCAG) */
.skip-link { position:absolute; left:-9999px; top:0; background:var(--gold,#F2B705); color:var(--navy,#14305C);
  font-weight:800; padding:10px 18px; border-radius:0 0 10px 0; z-index:9999; }
.skip-link:focus { left:0; }

/* 20. Print: clean margins + show page URL after title */
@media print {
  .section { padding: 12px 0 !important; }
  .page-hero { background: none !important; color: #000 !important; padding: 8px 0 !important; }
  .page-hero h1, .page-hero p { color: #000 !important; text-shadow: none !important; }
}
/* fix: button text contrast */
.btn-primary, .btn-primary:hover, .btn-primary:visited { color: #fff !important; }
.btn-gold, .btn-gold:hover, .btn-gold:visited { color: var(--navy, #14305C) !important; }
.hero .btn, .cta-band .btn { color: #fff; }
.hero .btn-gold, .cta-band .btn-gold { color: var(--navy, #14305C) !important; }
/* Cookie bar */
#cookieBar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 980;
  background: var(--navy, #14305C); color: #fff; border-top: 3px solid var(--gold, #F2B705);
  box-shadow: 0 -6px 24px rgba(13,34,66,0.3); animation: cookieUp .45s ease; }
@keyframes cookieUp { from { transform: translateY(100%); } to { transform: none; } }
.cookiebar-inner { display: flex; align-items: center; gap: 18px; padding: 14px 24px; flex-wrap: wrap; }
.cookiebar-inner p { margin: 0; flex: 1; font-size: 0.85rem; color: rgba(255,255,255,0.92); min-width: 240px; }
.cookiebar-inner a { color: var(--gold, #F2B705); text-decoration: underline; }
.cookiebar-inner .btn { white-space: nowrap; }
@media (max-width: 640px) { .cookiebar-inner { justify-content: center; text-align: center; } }
/* Gov anti-phishing warning popup */
#govWarn { position: fixed; top: 14px; right: 14px; z-index: 990; max-width: 300px;
  background: #E5372F; color: #fff; border-radius: 12px; padding: 16px 18px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.30); animation: warnIn .4s ease; }
@keyframes warnIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
#govWarn p { margin: 0 0 12px; font-size: 0.85rem; line-height: 1.5; color: #fff; }
#govWarn strong { color: #fff; }
#govWarn button { background: #fff; color: #E5372F; border: none; border-radius: 8px;
  padding: 7px 16px; font-weight: 700; font-size: 0.8rem; cursor: pointer; }
#govWarn button:hover { background: #ffe9e8; }
@media (max-width: 640px) { #govWarn { left: 14px; right: 14px; max-width: none; } }
/* Policy Planning team section */
.ppteam-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; align-items: center; }
.ppteam-photo { margin: 0; position: relative; }
.ppteam-photo::before { content: ''; position: absolute; inset: 14px -14px -14px 14px;
  border: 3px solid var(--gold, #F2B705); border-radius: 18px; z-index: 0; }
.ppteam-photo img { position: relative; z-index: 1; width: 100%; border-radius: 16px; display: block;
  box-shadow: 0 16px 40px rgba(20,48,92,0.18); }
.ppteam-photo figcaption { position: relative; z-index: 1; margin-top: 22px; padding-left: 14px;
  border-left: 4px solid var(--gold, #F2B705); font-size: 0.85rem; font-style: italic; color: var(--muted, #666); }
.ppteam-lead { font-family: Georgia, 'Times New Roman', serif; font-size: 1.15rem; line-height: 1.5;
  color: var(--navy, #14305C); font-style: italic; border-left: 4px solid var(--leaf, #1C7A34);
  padding-left: 16px; margin-bottom: 18px; }
.ppteam-text p { color: var(--muted, #555); margin-bottom: 14px; }
.ppteam-text .btn { margin-top: 6px; }
@media (max-width: 860px) {
  .ppteam-grid { grid-template-columns: 1fr; gap: 30px; }
  .ppteam-photo::before { display: none; }
}
/* Social icons */
.social-icons { display: inline-flex; gap: 8px; align-items: center; }
.social-icons a { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 50%; background: rgba(255,255,255,0.14); color: #fff; transition: all .2s; }
.social-icons a:hover { background: var(--gold, #F2B705); color: var(--navy, #14305C); transform: translateY(-2px); }
.site-footer .social-icons { margin-top: 12px; }
.site-footer .social-icons a { background: rgba(255,255,255,0.10); }
/* Partner logos row */
.partners-row { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; }
.partner-item img { height: 84px; width: auto; max-width: 170px; object-fit: contain; display: block;
  filter: grayscale(25%); opacity: .92; transition: all .25s; }
.partner-item img:hover { filter: none; opacity: 1; transform: scale(1.05); }
.partner-item .partner-name { font-size: 0.85rem; color: var(--muted, #666); }
/* Motto emphasis */
.motto-accent { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 800;
  color: var(--gold, #F2B705); text-decoration: none; border: none; letter-spacing: 0.01em; }
.motto-uno { text-decoration: underline; text-decoration-color: var(--gold, #F2B705);
  text-decoration-thickness: 4px; text-underline-offset: 7px; }
/* Fix: only "No One" underlined, never the whole motto phrase */
.hero h1 .motto-accent, h1 .motto-accent, .motto-accent {
  text-decoration: none !important; border-bottom: none !important; box-shadow: none !important;
  background-image: none !important; }
.motto-accent .motto-uno {
  text-decoration: underline !important; text-decoration-color: var(--gold, #F2B705) !important;
  text-decoration-thickness: 4px; text-underline-offset: 7px; }

/* Milne Bay flag beside Emergency Contacts */
.mb-flag { width: 58px; height: 34px; object-fit: cover; border-radius: 5px; margin-left: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18); border: 1px solid rgba(20,48,92,0.15);
  flex-shrink: 0; align-self: center; display: none; }
@media (min-width: 1240px) { .mb-flag { display: inline-block; } }
/* Animated Milne Bay flag video — header sizing */
.mbflag-wrap { display: inline-flex; align-items: center; margin-left: 10px; flex-shrink: 0; }
.mbflag-video { height: 40px; width: auto; border-radius: 5px; display: block;
  box-shadow: 0 3px 10px rgba(0,0,0,0.22); border: 1px solid rgba(20,48,92,0.15); }
@media (max-width: 1000px) { .mbflag-video { height: 30px; } .mbflag-wrap { margin-left: 6px; } }
