/*
 * Theme Name:		GWT-Wordpress 26.7.0 - Barangay San Agustin
 * Theme URI:		https://i.gov.ph
 * Description:		Custom WordPress theme based on the draft Unified Web Content Policy
 *					prepared by the PCDSPO, DOST-ASTI, and DOST-ICTO. Theme is built on
 *					HTML5 responsive WordPress framework based on ZURB's Foundation.
 *					Branded for Barangay San Agustin, Iba, Zambales.
 * Version:			26.7.1
 * Author:			iGovPhil
 * Author URI:		https://i.gov.ph
 * License:			MIT License
 * License URI:		https://www.opensource.org/licenses/mit-license.php
 * Tags: 			theme-options, rtl-language-support, featured-images, editor-style, custom-menu,
 *					responsive-layout, right-sidebar, left-sidebar, one-column, two-columns, three-columns
 */

/* =====================================================================
   Barangay San Agustin, Iba, Zambales — brand overrides
   Loaded after theme.css, so these rules win.
   ===================================================================== */

:root {
  --gov-blue: #0038a8;       /* Philippine flag blue */
  --gov-blue-dark: #002a7a;
  --gov-red: #ce1126;        /* Philippine flag red */
  --gov-gold: #fcd116;       /* Philippine flag gold */
  --ink: #1f2933;
  --muted: #52606d;
  --line: #e4e7eb;
  --bg-soft: #f5f7fa;
}

/* ---- Headings & links ---- */
h1, h2, h3, h4, h5, h6 { color: var(--gov-blue-dark); }
.container-main a,
.container-main a:visited { color: var(--gov-blue); }
.container-main a:hover,
.container-main a:focus { color: var(--gov-red); }

/* ---- Top navigation bar ---- */
#main-nav { background-color: var(--gov-blue); }
#main-nav li:not(.has-form) a:not(.button),
#main-nav li.active:not(.has-form) a:not(.button),
#aux-main li:not(.has-form) a:not(.button) {
  color: #fff;
  font-weight: 500;
}
#main-nav .name a,
#main-nav .top-bar-left > ul > li > a { color: #fff !important; }
#main-nav ul li:hover:not(.has-form) > a,
#main-nav .dropdown li:not(.has-form) a:not(.button):hover,
#main-nav .dropdown li:not(.has-form):hover > a:not(.button) {
  background: var(--gov-blue-dark);
  color: var(--gov-gold);
}
#main-nav li.current-menu-item:not(.has-form) a:not(.button) {
  background-color: var(--gov-blue-dark);
  color: var(--gov-gold);
  box-shadow: inset 0 -3px 0 var(--gov-gold);
}
#accessibility-button, #magnifier-button { color: #fff; }
.top-bar-left > ul > li,
.top-bar-right > ul > li,
#aux-main > ul > li { border-right-color: rgba(255,255,255,0.12); }

/* auxiliary strip */
#auxiliary { background-color: var(--gov-blue-dark); border-bottom: none; }
#aux-main li:not(.has-form) a:not(.button) { color: #fff; }

/* ---- Masthead ---- */
div .container-masthead { background: #fff; border-bottom: 4px solid var(--gov-gold); }
#agency-heading { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.02em; }
#agency-name { color: var(--gov-blue-dark); border-top-color: var(--gov-gold); }
#agency-tagline { color: var(--gov-red); font-weight: 600; }

/* ---- Footer ---- */
#footer { background: #16213a; border-top: 4px solid var(--gov-gold); color: #c9d2e3; }
#footer .widget, #footer a { color: #c9d2e3; }
#footer a:hover { color: var(--gov-gold); }
#footer h1, #footer h2, #footer h3, #footer h4 { color: #fff; }

#back-to-top { background-color: var(--gov-blue); }

/* =====================================================================
   front-page.php — Barangay homepage sections
   ===================================================================== */
.bsa { font-family: "Roboto", Helvetica, Arial, sans-serif; }
.bsa .wrap { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Hero */
.bsa-hero {
  position: relative;
  background: linear-gradient(135deg, var(--gov-blue) 0%, var(--gov-blue-dark) 70%);
  color: #fff; padding: 3.5rem 0; text-align: center; overflow: hidden;
}
.bsa-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--gov-red) 0 33%, var(--gov-blue-dark) 33% 66%, var(--gov-gold) 66% 100%);
}
.bsa-hero h1 { color: #fff; font-size: 2.2rem; margin: 0 0 0.6rem; text-transform: uppercase; }
.bsa-hero p { font-size: 1.08rem; max-width: 720px; margin: 0 auto 1.4rem; color: #e9eefb; }
.bsa-hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem 2.5rem; margin: 1.8rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.22); max-width: 720px; }
.bsa-hstat { display: flex; flex-direction: column; align-items: center; }
.bsa-hstat-v { font-family: 'Lora', Georgia, serif; font-size: 2.1rem; font-weight: 800; color: var(--gov-gold, #E8A317); line-height: 1; }
.bsa-hstat-l { font-size: 0.82rem; color: rgba(255,255,255,0.85); margin-top: 0.35rem; text-transform: uppercase; letter-spacing: 0.04em; }
.bsa-ctarow { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.bsa-hero-account { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; align-items: center; max-width: 720px; margin: 1.1rem auto 0; }
.bsa-hero-account .bsa-acct-greet { color: #fff; font-weight: 600; margin-right: 0.2rem; }
.bsa-hero-account .bsa-acct-greet .fa { color: var(--gov-gold); margin-right: 0.3rem; }
.bsa-hero-account .bsa-cta { margin: 0; padding: 0.5rem 1.05rem; font-size: 0.95rem; }

.bsa-cta {
  display: inline-block; background: var(--gov-gold); color: var(--gov-blue-dark);
  padding: 0.7rem 1.4rem; border-radius: 4px; text-decoration: none; font-weight: 700;
  text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.03em; border: 2px solid transparent;
  transition: all 0.2s ease;
}
.bsa-cta:hover { background: #ffdf3d; color: var(--gov-blue-dark); }
.bsa-cta.outline { background: transparent; color: #fff; border-color: #fff; }
.bsa-cta.outline:hover { background: #fff; color: var(--gov-blue-dark); }
.bsa-cta.blue { background: var(--gov-blue); color: #fff; }
.bsa-cta.blue:hover { background: var(--gov-blue-dark); color: #fff; }

/* Sections */
.bsa-section { padding: 3rem 0; }
.bsa-section.alt { background: var(--bg-soft); }
.bsa-head { text-align: center; margin-bottom: 2rem; }
.bsa-head h2 { font-size: 1.7rem; text-transform: uppercase; margin: 0 0 0.4rem; color: var(--gov-blue-dark); }
.bsa-head p { color: var(--muted); max-width: 700px; margin: 0 auto; }
.bsa-head::after { content: ""; display: block; width: 70px; height: 4px; background: var(--gov-gold); margin: 0.8rem auto 0; border-radius: 2px; }

/* Grids */
.bsa-grid { display: grid; gap: 1.5rem; }
.bsa-grid.g2 { grid-template-columns: repeat(2, 1fr); }
.bsa-grid.g3 { grid-template-columns: repeat(3, 1fr); }
.bsa-grid.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .bsa-grid.g3, .bsa-grid.g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .bsa-grid.g2, .bsa-grid.g3, .bsa-grid.g4 { grid-template-columns: 1fr; } }

/* Cards */
.bsa-card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bsa-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.10); }
.bsa-card .ic {
  width: 54px; height: 54px; border-radius: 50%; background: rgba(0,56,168,0.08); color: var(--gov-blue);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 0.9rem;
}
.bsa-card h3 { font-size: 1.05rem; margin: 0 0 0.5rem; text-transform: none; color: var(--gov-blue-dark); }
.bsa-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Stats */
.bsa-stats { background: var(--gov-blue-dark); color: #fff; }
.bsa-stats .bsa-grid { text-align: center; }
.bsa-stat .num { font-size: 2.3rem; font-weight: 800; color: var(--gov-gold); display: block; line-height: 1; }
.bsa-stat .lbl { text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; color: #cdd7f0; margin-top: 0.4rem; }

/* Officials */
.bsa-official { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1.4rem 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.bsa-official .av {
  width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 0.8rem;
  background: linear-gradient(135deg, var(--gov-blue), var(--gov-blue-dark)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; border: 4px solid var(--gov-gold);
}
.bsa-official .nm { font-weight: 700; color: var(--gov-blue-dark); font-size: 1rem; }
.bsa-official .rl { color: var(--gov-red); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; margin-top: 0.2rem; }
.bsa-official.captain { border: 2px solid var(--gov-gold); }

/* News */
.bsa-news { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.bsa-news .bar { height: 8px; background: linear-gradient(90deg, var(--gov-blue), var(--gov-gold)); }
.bsa-news .body { padding: 1.3rem; }
.bsa-news .date { font-size: 0.78rem; color: var(--gov-red); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.bsa-news h3 { font-size: 1.05rem; margin: 0.4rem 0 0.5rem; text-transform: none; color: var(--gov-blue-dark); }
.bsa-news p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* Two-column intro */
.bsa-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 820px) { .bsa-two { grid-template-columns: 1fr; } }
.bsa-panel { background: var(--bg-soft); border: 1px solid var(--line); border-left: 5px solid var(--gov-blue); border-radius: 6px; padding: 1.4rem; }
.bsa-panel h3 { margin-top: 0; color: var(--gov-blue-dark); }
.bsa-prose p { color: var(--ink); }
.bsa-prose h2 { color: var(--gov-blue-dark); }

/* =====================================================================
   Plugin integration — online services, card links
   ===================================================================== */
.bsa-services-cta { display:flex; gap:0.8rem; justify-content:center; flex-wrap:wrap; margin:0 0 2.2rem; }
.bsa-card-link { display:block; text-decoration:none; color:inherit; transition:transform .15s ease, box-shadow .15s ease; }
.bsa-card-link:hover { transform:translateY(-3px); }
.bsa-card-link .bsa-card { height:100%; }
.bsa-card .go { display:inline-block; margin-top:0.6rem; font-weight:700; color:var(--gov-blue); font-size:0.9rem; }
.bsa-card-link:hover .go { color:var(--gov-red); }

/* =====================================================================
   Mobile & iOS refinements (Barangay San Agustin)
   ===================================================================== */
html, body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.bsa img { max-width: 100%; height: auto; }

/* CTA buttons: 44px+ tap target with centred icon + label */
.bsa-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 44px; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0,56,168,.15);
}

/* Phone-size tuning */
@media (max-width: 560px) {
  .bsa-hero { padding: 2.5rem 0; }
  .bsa-hero h1 { font-size: 1.6rem; }
  .bsa-hero p { font-size: 1rem; }
  .bsa-hero-stats { gap: 1rem 1.8rem; }
  .bsa-hstat-v { font-size: 1.6rem; }
  .bsa-section { padding: 2.2rem 0; }
}
/* Stack the online-service buttons full width on very small screens */
@media (max-width: 460px) {
  .bsa-services-cta { flex-direction: column; }
  .bsa-services-cta .bsa-cta { width: 100%; }
  .bsa-ctarow .bsa-cta { width: 100%; }
  .bsa-hero-account { width: 100%; }
  .bsa-hero-account .bsa-cta { width: 100%; }
  .bsa-hero-account .bsa-acct-greet { width: 100%; text-align: center; }
}

/* =====================================================================
   Grouped navigation — dropdown sub-menus for the default menu (v26.2)
   Works WITH Foundation's dropdown-menu (it handles show/hide and adds
   .is-dropdown-submenu-parent). We force readable colors and render a single
   caret so the navbar's white text and Foundation's own caret don't clash.
   ===================================================================== */
#main-nav .top-bar-left li.bsa-has-sub { position: relative; }

/* ONE caret: replace Foundation's border-triangle ::after with our own glyph */
#main-nav .top-bar-left li.bsa-has-sub > a::after {
	content: "\25BE";
	border: 0 !important;
	width: auto !important;
	height: auto !important;
	margin: 0 0 0 .3em !important;
	padding: 0 !important;
	position: static !important;
	right: auto !important;
	display: inline-block;
	font-size: .68em;
	vertical-align: middle;
	opacity: .9;
}

/* The dropdown panel */
#main-nav .top-bar-left li.bsa-has-sub > .bsa-sub {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 248px;
	margin: 0;
	padding: .35rem 0;
	list-style: none;
	background: #ffffff !important;
	border: 1px solid #e2e8f0;
	border-top: 3px solid var(--gov-blue-dark, #002a7a);
	box-shadow: 0 12px 30px rgba(10, 47, 78, .20);
	border-radius: 0 0 8px 8px;
	z-index: 1300;
}
#main-nav .top-bar-left li.bsa-has-sub:hover > .bsa-sub,
#main-nav .top-bar-left li.bsa-has-sub:focus-within > .bsa-sub { display: block !important; }
#main-nav .top-bar-left li.bsa-has-sub > .bsa-sub > li { display: block; width: 100%; margin: 0; background: transparent; }

/* Readable dark links on white — override the navbar's white menu text */
#main-nav .top-bar-left li.bsa-has-sub > .bsa-sub > li > a,
#main-nav .top-bar-left li.bsa-has-sub > .bsa-sub > li > a:visited {
	display: block;
	padding: .55rem 1.15rem;
	color: #16222E !important;
	background: transparent !important;
	text-decoration: none !important;
	white-space: nowrap;
	font-size: .95rem;
	line-height: 1.3;
	border: 0;
}
#main-nav .top-bar-left li.bsa-has-sub > .bsa-sub > li > a:hover,
#main-nav .top-bar-left li.bsa-has-sub > .bsa-sub > li > a:focus {
	background: #eef3f9 !important;
	color: #0038a8 !important;
}

/* Mobile off-canvas: show the sub-items as an indented list (no caret/hover) */
#mySidenav .bsa-sub { list-style: none; margin: 0; padding: 0 0 .3rem .95rem; }
#mySidenav .bsa-sub > li > a { font-size: .92rem; opacity: .95; }

/* ---------------------------------------------------------------------
   Real WP menu (assigned via Appearance → Menus, e.g. "Barangay Main Menu")
   The theme walker renders sub-menus as ul.dropdown.vertical.menu under a
   .has-dropdown item; Foundation handles show/hide and one caret. We only
   force the same readable colours as the fallback dropdowns.
   --------------------------------------------------------------------- */
#main-nav .top-bar-left .has-dropdown > ul.menu,
#main-nav .top-bar-left ul.is-dropdown-submenu {
	background: #ffffff !important;
	border: 1px solid #e2e8f0;
	border-top: 3px solid var(--gov-blue-dark, #002a7a);
	box-shadow: 0 12px 30px rgba(10, 47, 78, .20);
	border-radius: 0 0 8px 8px;
	min-width: 240px;
	padding: .35rem 0 !important;
}
#main-nav .top-bar-left .has-dropdown > ul.menu > li > a,
#main-nav .top-bar-left ul.is-dropdown-submenu > li > a {
	color: #16222E !important;
	background: transparent !important;
	text-decoration: none !important;
	padding: .55rem 1.15rem !important;
	white-space: nowrap;
}
#main-nav .top-bar-left .has-dropdown > ul.menu > li > a:hover,
#main-nav .top-bar-left .has-dropdown > ul.menu > li > a:focus,
#main-nav .top-bar-left ul.is-dropdown-submenu > li > a:hover,
#main-nav .top-bar-left ul.is-dropdown-submenu > li > a:focus {
	background: #eef3f9 !important;
	color: #0038a8 !important;
}

/* =====================================================================
   Header RIGHT cluster dropdowns — accessibility menu + font-size ("A") menu.
   These are Foundation submenus too, but the readability fix above only covered
   the LEFT nav, so their white icons landed on a white panel and were invisible
   ("all white"). Give them the same readable white-panel + dark-icon treatment,
   and anchor them as an overlay below the button. (theme v26.6.2)
   ===================================================================== */
#main-nav .top-bar-right > ul.menu > li { position: relative; }
#main-nav .top-bar-right .has-dropdown > ul.menu,
#main-nav .top-bar-right ul.is-dropdown-submenu,
#main-nav .top-bar-right > ul.menu > li > ul.menu {
	position: absolute !important;
	top: 100% !important;
	right: 0 !important;
	left: auto !important;
	z-index: 30 !important;
	background: #ffffff !important;
	border: 1px solid #e2e8f0 !important;
	border-top: 3px solid var(--gov-blue-dark, #002a7a) !important;
	box-shadow: 0 12px 30px rgba(10, 47, 78, .20) !important;
	border-radius: 0 0 8px 8px;
	padding: .3rem 0 !important;
	min-width: 56px;
}
#main-nav .top-bar-right .has-dropdown > ul.menu > li > a,
#main-nav .top-bar-right ul.is-dropdown-submenu > li > a,
#main-nav .top-bar-right > ul.menu > li > ul.menu > li > a {
	color: #16222E !important;
	background: transparent !important;
	text-align: center;
	padding: .5rem .85rem !important;
}
/* the items are FontAwesome glyphs — colour the icons explicitly, not just the link */
#main-nav .top-bar-right .has-dropdown > ul.menu > li > a i,
#main-nav .top-bar-right .has-dropdown > ul.menu > li > a .fa,
#main-nav .top-bar-right ul.is-dropdown-submenu > li > a i,
#main-nav .top-bar-right ul.is-dropdown-submenu > li > a .fa,
#main-nav .top-bar-right > ul.menu > li > ul.menu > li > a i {
	color: #16222E !important;
}
#main-nav .top-bar-right .has-dropdown > ul.menu > li > a:hover,
#main-nav .top-bar-right .has-dropdown > ul.menu > li > a:focus,
#main-nav .top-bar-right ul.is-dropdown-submenu > li > a:hover,
#main-nav .top-bar-right ul.is-dropdown-submenu > li > a:focus,
#main-nav .top-bar-right > ul.menu > li > ul.menu > li > a:hover {
	background: #eef3f9 !important;
	color: #0038a8 !important;
}
#main-nav .top-bar-right .has-dropdown > ul.menu > li > a:hover i,
#main-nav .top-bar-right ul.is-dropdown-submenu > li > a:hover i,
#main-nav .top-bar-right > ul.menu > li > ul.menu > li > a:hover i { color: #0038a8 !important; }

/* =====================================================================
   Homepage: More Services quick-links grid + Local Info & Safety band
   (v26.5) Scoped under .bsa to avoid clashing with the plugin's classes.
   ===================================================================== */
.bsa .bsa-ql{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;}
.bsa .bsa-ql-tile{display:flex;align-items:flex-start;gap:.8rem;padding:1.05rem 1.1rem;background:#fff;border:1px solid var(--line,#DCE3EC);border-radius:12px;text-decoration:none;color:inherit;transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease;}
.bsa .bsa-ql-tile:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(10,47,78,.12);border-color:#bcd0e6;}
.bsa .bsa-ql-ic{flex:0 0 auto;width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;background:#eef3f9;color:var(--gov-blue,#0038a8);font-size:1.2rem;}
.bsa .bsa-ql-tx{display:flex;flex-direction:column;gap:.15rem;}
.bsa .bsa-ql-t{font-weight:700;color:#16222E;font-size:1.02rem;line-height:1.25;}
.bsa .bsa-ql-d{font-size:.85rem;color:#5b6b79;line-height:1.3;}
@media(max-width:860px){.bsa .bsa-ql{grid-template-columns:repeat(2,1fr);}}
@media(max-width:520px){.bsa .bsa-ql{grid-template-columns:1fr;}}

/* weather + tide widgets side by side (widgets themselves are styled by the plugin) */
.bsa .bsa-wx-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1.15rem;align-items:stretch;}
.bsa .bsa-wx-row > .bsa-weather,
.bsa .bsa-wx-row > .bsa-tide{height:100%;}
@media(max-width:760px){.bsa .bsa-wx-row{grid-template-columns:1fr;}}

/* Disaster Readiness strip */
.bsa .bsa-dr{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem 1.4rem;padding:1.25rem 1.45rem;border-radius:12px;background:linear-gradient(135deg,#7A1E12,#B5311F);color:#fff;}
.bsa .bsa-dr-main{flex:1 1 360px;min-width:270px;}
.bsa .bsa-dr-main h3{margin:0 0 .35rem;color:#fff;font-size:1.2rem;}
.bsa .bsa-dr-main h3 .fa{margin-right:.4rem;}
.bsa .bsa-dr-main p{margin:0;font-size:.92rem;opacity:.96;line-height:1.5;}
.bsa .bsa-dr-links{display:flex;flex-wrap:wrap;gap:.55rem;}
.bsa .bsa-dr-links .bsa-cta{margin:0;}
.bsa .bsa-dr-links .bsa-cta.blue{background:#fff;color:#16222E;border-color:#fff;}
.bsa .bsa-dr-links .bsa-cta.blue:hover{background:#eef3f9;color:#16222E;}
.bsa .bsa-dr-links .bsa-cta.outline.blue{background:transparent;color:#fff;border-color:rgba(255,255,255,.72);}
.bsa .bsa-dr-links .bsa-cta.outline.blue:hover{background:rgba(255,255,255,.16);color:#fff;}

/* =====================================================================
   Header right cluster — search box + accessibility + font-size (A) icons.
   Foundation floats the menu (left) and this cluster (right) on one line and
   gives the search a fixed width, so on narrower screens the rigid search box
   pushes the icons onto a second row / overlaps them. Force the cluster onto a
   single, non-wrapping, vertically-centred flex row and let ONLY the search box
   shrink — the icons always keep their place and stay visible. !important is
   used so this wins over Foundation's runtime (JS) layout. (theme v26.6.1)
   ===================================================================== */
.top-bar-right > ul.menu,
.top-bar-right > ul.dropdown.menu {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: flex-end !important;
	width: auto;
	max-width: 100%;
}
.top-bar-right > ul.menu > li {
	flex: 0 0 auto !important;        /* icons + any menu items keep their width */
	float: none !important;
	display: block;
}
.top-bar-right > ul.menu > li.search {
	display: flex !important;         /* search has no dropdown — safe to flex; centres the field */
	align-items: center !important;
	flex: 0 1 200px !important;        /* the search is the one that gives way */
	min-width: 0 !important;
	width: auto !important;
	padding: 0 10px !important;
}
.top-bar-right > ul.menu > li.search .search-form {
	width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	display: block;
}
.top-bar-right > ul.menu > li.search input[type="search"],
.top-bar-right .search-field {
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;       /* override Foundation's max-width:200px on top-bar inputs */
	box-sizing: border-box;
}
/* Keep the search progressively compact as the bar tightens, so the icons
   always have room and never get pushed onto a new line. */
@media only screen and (max-width: 80em) { .top-bar-right > ul.menu > li.search { flex-basis: 170px !important; } }
@media only screen and (max-width: 75em) { .top-bar-right > ul.menu > li.search { flex-basis: 130px !important; } }
@media only screen and (max-width: 68em) { .top-bar-right > ul.menu > li.search { flex-basis: 100px !important; } }
