/* Skip-navigation link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #2c5f4a;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
  font-size: 0.9rem;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* Site-level visual coherence overrides */

/* Page background: white (undo theme's cream) */
body { background: #ffffff; }

/* Ensure theme main area is also white, not cream */
#main { background: #ffffff !important; }

/* Keep header clean */
#header { box-shadow: none !important; }

/* Remove theme backgrounds so pages sit on white */
#header,
#banner,
.wrapper.style1,
.wrapper.style2,
.wrapper.style3,
.container {
  background: none !important;
  background-color: transparent !important;
}

/* ========================================
   NAVIGATION — refined tab styling
   ======================================== */
#nav {
  background-color: #f8faf9 !important;
  border-bottom: 2px solid #d4e8dc !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

#nav li a, #nav li span {
  color: #3d5a4c !important;
  font-size: 0.85em;
  letter-spacing: 0.05em;
}

#nav li:hover a, #nav li:hover span {
  background: #2c5f4a !important;
  color: #fff !important;
}

#nav li.active a, #nav li.active span {
  background: #2c5f4a !important;
  color: #fff !important;
}

#nav li.current a {
  background: #2c5f4a !important;
  color: #fff !important;
}

/* Dropdown menus */
.dropotron {
  background: #2c5f4a !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  min-width: 180px !important;
}
.dropotron li a {
  color: rgba(255,255,255,0.85) !important;
  font-size: 0.85em !important;
  letter-spacing: 0.03em;
  border-top-color: rgba(255,255,255,0.1) !important;
}
.dropotron li a:hover {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
}

/* Mobile nav: match desktop's light look */
@media screen and (max-width: 980px) {
  #titleBar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    background-image: url("/assets/css/images/overlay.png") !important;
  }
  #titleBar .title { color: #6b7770 !important; }
  #titleBar .toggle:before { color: #6b7770 !important; }
  #titleBar .title img {
    height: 28px;
    width: auto;
    vertical-align: middle;
    margin-top: 8px;
  }

  #navPanel {
    background-color: rgba(255, 255, 255, 0.98) !important;
    background-image: url("/assets/css/images/overlay.png") !important;
    box-shadow: inset -3px 0px 10px 0px rgba(0,0,0,0.06) !important;
  }
  #navPanel .link {
    color: #6b7770 !important;
    border-top: solid 2px rgba(0,0,0,0.06) !important;
  }
  #navPanel .depth-0 { color: #6b7770 !important; }
}

/* ========================================
   TYPOGRAPHY — readable, warm, modern
   ======================================== */
.content-main {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #2d3436;
}

.content-main p {
  margin-bottom: 1.1rem;
}

/* Links inside cards/content only — not sidebar */
.card a:not([class]),
.card .mainContentIndent a,
.card .pReg a {
  color: #006376;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,99,118,0.25);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.card a:not([class]):hover,
.card .mainContentIndent a:hover,
.card .pReg a:hover {
  color: #004d5a;
  border-bottom-color: #004d5a;
}

/* ========================================
   CARD — the primary content container
   ======================================== */
.card {
  background: #ffffff;
  border: 1px solid #e0e6e3;
  border-left: 4px solid #6aad8e;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 4px 16px -4px rgba(0,0,0,0.06);
  margin-bottom: 1.5em;
  overflow: hidden;
}

/* Headings inside cards */
.card > h1,
.card td h1,
.card .mainContentIndent h1 {
  font-size: 1.6rem;
  color: #1a3c34;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid #d4e8dc;
  letter-spacing: -0.01em;
}
.card > h2,
.card td h2,
.card .mainContentIndent h2 {
  font-size: 1.3rem;
  color: #2c5f4a;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e8eeeb;
}
.card h3, .card h4 {
  font-size: 1.1rem;
  color: #2c5f4a;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}

/* Lists inside cards */
.card ul, .card ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
}
.card li {
  margin-bottom: 0.5rem;
  padding-left: 0.2rem;
}
.card ul > li::marker {
  color: #6aad8e;
}

/* Content images only — not spacer/layout images */
.card > img:not([src*="spacer"]),
.card .mainContentIndent img,
.card td > div > img:not([src*="spacer"]) {
  border-radius: 6px;
  max-width: 100%;
  height: auto;
}

/* ========================================
   LEGACY TABLE COMPATIBILITY
   ======================================== */

/* Force legacy layout tables to behave inside cards */
.card table {
  width: 100% !important;
  border-collapse: collapse;
  float: none !important;
  table-layout: auto;
}
.card table[align] {
  float: none !important;
}
.card table td {
  vertical-align: top;
  padding: 0.25rem;
}

/* Compact breadcrumb + HR header rows at top of card.
   Pattern: outer table row 1 = breadcrumb nested table, row 2 = HR.
   Strip all padding from these two rows so only content rows get spacing. */
.card > table > tbody > tr:nth-child(-n+2) > td,
.card > table > tr:nth-child(-n+2) > td {
  padding: 0 !important;
}
/* The inner breadcrumb table — override cellpadding="4" and height="27" */
.card > table > tbody > tr:first-child table,
.card > table > tr:first-child table {
  margin: 0;
  line-height: 1.3;
}
.card > table > tbody > tr:first-child table td,
.card > table > tr:first-child table td {
  padding: 0.3rem 0 !important;
  height: auto !important;
  line-height: 1.3;
}

/* Hide spacer GIFs */
img[src*="spacer.gif"] {
  display: none !important;
}

/* Legacy HR separators — compact inside card header */
.card hr {
  border: none;
  border-top: 1px solid #d4e8dc;
  margin: 0.15rem 0 0.6rem;
}

/* ========================================
   HEADINGS — outside cards
   ======================================== */
.box h2.major { text-align: center; }

/* The Dreamweaver template placed a redundant outer <h1> above every card
   (e.g. "CISN - Mission Statement") that duplicates the breadcrumb and
   the card's own heading. Hide it to reduce overhead on inner pages. */
.content-main > h1 {
  display: none;
}

.content-main > h2,
.content-main > h3 {
  text-align: center;
  color: #1a3c34;
}
.content-main > h1 {
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

/* Space between heading and following card */
.content-main h1 + .card,
.content-main h2 + .card,
.content-main h3 + .card { margin-top: 0.75rem; }

/* ========================================
   CISN TIP CALLOUT
   ======================================== */
.cisnTip {
  display: block;
  background: linear-gradient(135deg, #e8f4f0 0%, #dff0eb 100%);
  border-left: 4px solid #006376;
  padding: 0.6rem 1rem;
  font-weight: 600;
  color: #006376;
  border-radius: 0 6px 6px 0;
  margin: 1.5rem 0 0.5rem;
  font-size: 1rem;
}

/* ========================================
   STRONG / BOLD — subtle color lift
   ======================================== */
.pRegBold {
  color: #1a3c34;
  font-weight: bold;
}

/* Main content layout with sidebar */
.content-layout {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
}
.content-main {
  flex: 1;
  min-width: 0;
  max-width: 800px;
}
.box h2.major + .card { margin-top: 0.75rem; }

/* Desktop: sidebar sticks to viewport top as user scrolls */
.sidebar {
  width: 160px;
  flex-shrink: 0;
  position: sticky;
  top: 1rem;
  align-self: flex-start;
}

/* Responsive: stack sidebar BELOW content on mobile.
   Breakpoint aligned with hamburger nav activation in main.css (980px).
   Sidebar goes after content (no order:-1) so users read content first. */
@media screen and (max-width: 980px) {
  .content-layout {
    flex-direction: column;
    padding: 1rem;
  }
  .sidebar {
    width: 100%;
    position: static;
  }
  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .sidebar-nav li {
    flex: 1 1 auto;
    min-width: 120px;
  }
}

/* Sidebar buttons styled like nav bar */
.sidebar .sidebar-nav,
.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar .sidebar-nav li,
.sidebar-nav li { margin-bottom: 0.5rem; }
.sidebar .sidebar-nav a,
.sidebar-nav a {
  display: block;
  border: 1px solid #ddecdb;
  border-radius: 6px;
}

/* Hide sidebar images immediately so they never flash before JS
   converts them to text buttons. !important overrides inline styles. */
.sidebar-nav img {
  display: none !important;
}

/* Sidebar text buttons (created by main.js from image alt text) */
.sidebar-nav a.nav-like {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2c5f4a;
  background: #f8faf9;
  border: 1px solid #d4e8dc;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: 'Open Sans Condensed', sans-serif;
}
.sidebar-nav a.nav-like:hover {
  background: #2c5f4a;
  border-color: #2c5f4a;
  color: #fff;
  transform: translateX(2px);
}

/* Sidebar links must not inherit content link styles */
.sidebar a,
.sidebar-nav a {
  border-bottom: none !important;
}


/* Footer styling — works for id="footer" and class="site-footer" */
#footer,
.site-footer {
  background: #f2f5f3;
  border-top: 2px solid #d4e8dc;
  color: #6b7770;
  font-size: 0.9rem;
  padding: 2.5rem 2rem;
  text-align: center;
}
#footer a,
.site-footer a {
  color: #006376;
  text-decoration: none;
}
#footer a:hover,
.site-footer a:hover { text-decoration: underline; }
#footer .footer-nav,
.site-footer .footer-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
#footer .social-links,
.site-footer .social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
#footer p,
.site-footer p {
  margin: 1rem 0 0;
  font-size: 0.8rem;
}

/* ========================================
   LEGACY LAYOUT CLEANUP
   ======================================== */
.mainContentIndent { padding-left: 1rem; }

/* Hide "You Are Here:" label but keep breadcrumbs visible */
.breadCrumbTitle { display: none; }
.breadCrumbs, .breadCrumbActive { font-size: 0.9rem; }

/* ========================================
   PAGINATION — prev/next page navigation
   ======================================== */
.pageNumbers, .pageNumbersActive, .pageNumbersGrey {
  font-size: 0.9rem;
}
.pageNumbers a, .pageNumbersActive a {
  color: #006376;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}
.pageNumbers a:hover, .pageNumbersActive a:hover {
  background: #e3f2ea;
}
.pageNumbersActive {
  font-weight: bold;
  color: #1a3c34;
  background: #d4e8dc;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.pageNumbersGrey {
  color: #767676;
}

/* Modern pagination bar (for new/converted pages) */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 2px solid #d4e8dc;
}
.page-nav a {
  color: #006376;
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border: 1px solid #d4e8dc;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.page-nav a:hover {
  background: #e3f2ea;
  border-color: #6aad8e;
}
.page-nav .disabled {
  color: #767676;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
}
.page-nav .page-nums {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}
.page-nav .page-nums a {
  padding: 0.25rem 0.55rem;
  min-width: 1.8rem;
  text-align: center;
}
.page-nav .page-nums .current {
  background: #d4e8dc;
  color: #1a3c34;
  font-weight: bold;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  min-width: 1.8rem;
  text-align: center;
  font-size: 0.9rem;
}

/* ========================================
   CTA BLOCK — call-to-action on homepage
   ======================================== */
.cta-block {
  text-align: center;
  padding: 2.5rem 2rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, #e8f4f0 0%, #dff0eb 100%);
  border-radius: 10px;
  border: 1px solid #d4e8dc;
}
.cta-block p {
  font-size: 1.15rem;
  color: #1a3c34;
  margin-bottom: 1.25rem;
}
.cta-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #2c5f4a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  margin: 0.4rem;
  border-bottom: none;
}
.cta-button:hover {
  background: #1a3c34;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.cta-button.cta-secondary {
  background: transparent;
  color: #2c5f4a;
  border: 2px solid #2c5f4a;
}
.cta-button.cta-secondary:hover {
  background: #2c5f4a;
  color: #fff;
}

/* ========================================
   SECTION LINKS — tables with navigation links
   ======================================== */
.sectionLinks {
  color: #006376;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.sectionLinks:hover {
  color: #004d5a;
  text-decoration: underline;
}
.sectionTitle {
  font-weight: bold;
  color: #1a3c34;
}
.bullet {
  font-size: 0.9rem;
  color: #6aad8e;
}

/* Section link tables: clean up spacing */
.card table td .sectionLinks,
.card table td a.sectionLinks {
  border-bottom: none;
}

/* ========================================
   HRs — outside cards
   ======================================== */
.content-main > hr,
.content > hr {
  border: none;
  border-top: 2px solid #d4e8dc;
  margin: 2rem 0;
}

/* Legacy text utility classes */
.tableHeading4, .cellHeading4 { font-weight: bold; color: #1a3c34; }
.tableBox { border: 1px solid #d4e8dc; padding: 0.75rem; border-radius: 6px; }
.news { font-style: italic; color: #4a6a5e; }
.pReg { line-height: 1.7; }
.pRegBold { font-weight: bold; color: #1a3c34; }
.pRegBoldSm { font-weight: bold; font-size: 0.9rem; color: #1a3c34; }
.pRegBoldSmItalic { font-weight: bold; font-size: 0.9rem; font-style: italic; color: #2c5f4a; }

/* Image credit captions */
.imageCredit {
  font-size: 0.8rem;
  color: #6b7770;
  font-style: italic;
  text-align: center;
  padding-top: 0.25rem;
}

/* Breadcrumb styling */
.breadCrumbs {
  color: #006376;
  text-decoration: none;
  font-size: 0.85rem;
}
.breadCrumbs:hover {
  text-decoration: underline;
}
.breadCrumbActive {
  font-weight: 600;
  color: #2c5f4a;
  font-size: 0.85rem;
}

.logo-img {
  display: block;
  height: 130px;
  margin: auto;
}

.hero-section {
  position: relative;
  overflow: hidden;
  height: 70vh;
}
@media screen and (max-width: 736px) {
  .hero-section {
    height: 50vh;
    min-height: 250px;
  }
  .hero-content {
    padding: 2rem 1rem;
  }
}

.hero-video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 2rem;
  text-align: center;
  background: none;
}

.hero-content h2 {
  color: #fdf5e6;
}

.hero-content p {
  font-size: 1.2rem;
  color: white;
}

.hero-content .actions.special {
  margin-top: 2rem;
}

/* ========================================
   CONTACT / FEEDBACK FORMS
   ======================================== */
.contact-form {
  max-width: 540px;
}
.contact-form p {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
.contact-form label {
  font-weight: 600;
  color: #1a3c34;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.contact-form label span[aria-label="required"] {
  color: #c0392b;
  margin-left: 0.2rem;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  border: 1px solid #b0c8be;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  color: #1a3c34;
  background: #fff;
  transition: border-color 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #006376;
  box-shadow: 0 0 0 3px rgba(0,99,118,0.15);
}
.contact-form textarea {
  resize: vertical;
  min-height: 160px;
}
.contact-form input[type="submit"] {
  align-self: flex-start;
  padding: 0.65rem 2rem;
  background: #2c5f4a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  min-height: 44px;
}
.contact-form input[type="submit"]:hover {
  background: #1a3c34;
}
@media screen and (max-width: 736px) {
  .contact-form input[type="submit"] {
    width: 100%;
  }
}

/* ========================================
   GLOBAL IMAGE PROTECTION — prevent overflow
   ======================================== */
img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   CTA BUTTON — mobile stacking
   ======================================== */
@media screen and (max-width: 736px) {
  .cta-button {
    display: block;
    width: 100%;
    margin: 0.4rem 0;
    box-sizing: border-box;
    text-align: center;
  }
  .cta-block {
    padding: 1.5rem 1rem;
  }
}
