/* ================================
   RESET
   ================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================================
   HEADER
   ================================ */
header {
    border-bottom: 2px solid var(--dem-blue);
    padding: 18px 16px;
    margin-top: 32px;
    flex: 0 0 auto;
}

/* Title block */
.header-titles {
    text-align: center;
    margin-bottom: 12px;
}
.header-titles h1 {
    font-size: 66px; /* 3x */
    font-weight: bold;
    color: var(--dem-blue);
}
.header-titles h2 {
    font-size: 42px; /* 3x */
    color: var(--dem-blue);
}

/* Nav row */
.header-nav {
    display: none;
    align-items: center;
    gap: 18px;
}
.header-brand {
    position: relative !important;
}

.header-county-selector {
    position: fixed !important;
    left: 120px !important;
    top: 92px !important;

    width: 230px !important;
    height: 64px !important;

    margin: 0 !important;
    padding: 0 !important;

    z-index: 10000 !important;

    display: none;

    float: none !important;
    clear: none !important;
    transform: none !important;
}

#countySelectLabel {
    position: absolute !important;

    left: 0 !important;
    top: 0 !important;

    width: 230px !important;
    height: 18px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: block !important;
    box-sizing: border-box !important;

    color: #000066 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 18px !important;
    text-align: left !important;

    white-space: nowrap !important;

    float: none !important;
    clear: none !important;
    transform: none !important;
}

#countySelect {
    position: absolute !important;

    left: 0 !important;
    top: 21px !important;

    width: 230px !important;
    height: 42px !important;
    min-height: 42px !important;

    margin: 0 !important;
    padding: 6px 10px !important;

    display: block !important;
    box-sizing: border-box !important;

    border: 1px solid rgba(0, 0, 102, 0.55) !important;
    border-radius: 8px !important;

    background: #ffffff !important;
    color: #000066 !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 28px !important;

    float: none !important;
    clear: none !important;
    transform: none !important;
}

/* ================================
   HAMBURGER
   ================================ */
#hamburger {
    display: none;
    cursor: pointer;
}
#hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--dem-blue);
    margin: 4px 0;
}

/* ================================
   TOP NAV
   ================================ */
.top-nav {
    display: flex;
    gap: 18px;
}
.top-nav a {
    text-decoration: none;
    font-size: 15px;
    color: var(--dem-blue);
    font-weight: bold;
    cursor: pointer;
}

/* ================================
   LAYOUT
   ================================ */
.wrapper {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* ================================
   SIDE MENU
   ================================ */
.side-menu {
    width: var(--side-w);
    border-right: 2px solid var(--dem-blue);
    padding: 16px;
    overflow: auto;
    min-height: 0;
    flex: 0 0 var(--side-w);
}
.side-menu h1 {
    font-size: 26px;
    color: var(--dem-blue);
}
.side-menu h2 {
    font-size: 14px;
    color: var(--dem-blue);
    margin-bottom: 10px;
}

/* Filter moved here */
.side-menu select {
    width: 100%;
    margin: 10px 0 18px;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid var(--dem-blue);
}

/* Side menu list */
.side-menu ul {
    list-style: none;
}
.side-menu li {
    margin-bottom: 12px;
}
.side-menu a {
    color: var(--dem-blue);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

/* ================================
   MAIN
   ================================ */
main {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ================================
   PORTLETS GRID
   ================================ */
.portlets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    align-content: start;
}

/* ================================
   PORTLET CARD
   ================================ */
.company-card {
    border: 1px solid var(--border-light);
    padding: 18px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.company-card:hover {
    transform: translateY(-6px);
    border-color: var(--dem-blue-hover);
    box-shadow: 0 10px 30px rgba(11,61,145,0.18);
}

.company-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--dem-blue);
}

.icon-box {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-box img {
    max-width: 100%;
    max-height: 100%;
}

.company-card p {
    font-size: 14px;
    color: var(--muted);
    margin-top: 10px;
}

/* ================================
   NO MATCHES
   ================================ */
#no-matches {
    display: none;
    padding: 48px;
    text-align: center;
    font-size: 20px;
    color: var(--dem-blue);
}

/* ================================
   OVERLAY
   ================================ */
#overlay {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    display: none;
    flex-direction: column;
}
.overlay-header {
    height: 50px;
    border-bottom: 2px solid var(--dem-blue);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 14px;
}
.overlay-header button {
    border: 1px solid var(--dem-blue);
    background: #fff;
    color: var(--dem-blue);
    font-weight: bold;
    padding: 6px 14px;
    cursor: pointer;
}

#overlay iframe,
#stub {
    flex: 1;
    width: 100%;
    border: none;
}

/* ================================
   FOOTER
   ================================ */
footer {
	cursor: pointer;
    height: 28px;
    border-top: 0px solid var(--dem-blue);
    text-align: center;
    font-size: 13px;
    color: var(--dem-blue);
    line-height: 44px;
    flex: 0 0 auto;
}

/* ================================
   HEADER BRAND WITH LOGOS
   ================================ */
.header-brand {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
}

.header-logo {
    width: 90px;
    height: auto;
}

.header-logo.left {
    justify-self: start;
}

.header-logo.right {
    justify-self: end;
}

/* Center titles explicitly */
.header-titles {
    text-align: center;
}




/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 900px) {
    .side-menu {
        position: fixed;
        left: -240px;
        top: 240px;
        bottom: 44px;
        background: #fff;
        z-index: 5000;
        transition: left 0.3s ease;
    }
    .side-menu.open {
        left: 0;
    }
    #hamburger {
        display: block;
    }
}

@media (max-width: 600px) {
    .portlets-grid {
        grid-template-columns: 1fr;
    }
    .header-titles h1 {
        font-size: 32px;
    }
    .header-titles h2 {
        font-size: 20px;
    }
}
@media (max-width: 600px) {
    .header-logo {
        width: 48px;
    }

    .header-brand {
        gap: 10px;
    }
    .marquee-item {
        padding: 0 30px;
        font-size: 12px;
    }
}
/* ================================
   MARQUEE SYSTEM
   ================================ */
.marquee {
    position: fixed;
    left: 0;
    width: 100%;
    height: 32px;
    overflow: hidden;
    z-index: 9999;
    border-bottom: 0px solid var(--dem-blue);
}

.marquee-bottom {
    border-bottom: none;
    border-top: 0px solid var(--dem-blue);
}

/* placement */
.marquee-top {
    top: 0;
}

.marquee-bottom {
    bottom: 12px; /* just above footer */
}

/* track */
.marquee-track {
    display: inline-flex;
    white-space: nowrap;
    animation: marquee-scroll 45s linear infinite;
}

/* items */
.marquee-item {
    display: inline-block;
    padding: 0 60px;
    font-size: 13px;
    font-weight: bold;
    color: var(--dem-blue);
    line-height: 32px;
}

/* animation */
@keyframes marquee-scroll {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .55);
}

.notice-dialog {
  width: 80vw;
  height: 80vh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .35);
  overflow: hidden;
}

.notice-frame-wrap {
  min-height: 0;
  padding: 10px;
}

.notice-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.notice-dialog-actions {
  display: flex;
  justify-content: center;
  padding: 10px;
  border-top: 1px solid #d7dce3;
  background: #f4f6f8;
}

.notice-dialog-button {
  min-width: 120px;
  padding: 9px 18px;
  border: 1px solid #aeb7c3;
  border-radius: 7px;
  background: #1859a9;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
#socialmedia {
  width: 180px;
  display: grid;
  gap: 6px;
  padding: 10px;
  box-sizing: border-box;
}

#socialmedia .social-link {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid rgba(0, 164, 255, 0.35);
  border-radius: 10px;
  background: rgba(11, 61, 145, 0.12);
  color: #000066;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

#socialmedia .social-link:hover {
  transform: translateX(3px);
  background: rgba(0, 164, 255, 0.22);
  border-color: rgba(0, 245, 255, 0.75);
}

#socialmedia .social-link:active {
  transform: translateX(1px) scale(0.98);
}

#socialmedia svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}

#socialmedia span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#countySelect {
  width: 100%;
  max-width: 200px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: Arial, Helvetica, sans-serif;
  color: #0B3D91;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  position: absolute;
  top: 100px; left: 120px;
}

#countySelect:hover {
  border-color: #0B3D91;
}

#countySelect:focus {
  border-color: #00A4FF;
  box-shadow: 0 0 0 2px rgba(0,164,255,0.2);
}
@media (max-width: 900px) {
	#countySelect {
		visibility: hidden;
	}
	#countySelectLabel {
		visibility: hidden;
	}
}












