/*
Theme Name: LHAAP
Theme URI: https://example.local/
Author: LHAAP Migration
Description: Modern WordPress theme based on the Longhorn ASP.NET site.
Version: 2.0
Text Domain: lhaap
*/

/* CSS Variables for Design System */
:root {    
    --lhaap-primary-dark: #293124;
    --lhaap-primary: #355B1D;
    --lhaap-primary-light: #52743e;
    --lhaap-secondary: #003366;
    --lhaap-accent: #355B1D;
    --lhaap-accent-dark: #355B1D;
    --lhaap-navbar-bg: #355B1D;
    --lhaap-footer-bg: #212529;
    --lhaap-bg-light: #f5f5f5;
    --lhaap-text-dark: #333333;
    --lhaap-text-gray: #666666;
    --lhaap-alert-red: #cc0000;
    --lhaap-link-blue: #428bca;
    --lhaap-link-green: #52743e;
    --bs-nav-link-font-size: 12px;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--lhaap-text-dark);
  line-height: 1.6;
  background-color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#content,
.site-main {
  flex: 1 0 auto;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--lhaap-primary-dark);
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.875rem; 
     color: var(--lhaap-accent);
}
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Links */
a {
  color: var(--lhaap-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  text-decoration: underline;
}

a.acronym {
  color: var(--lhaap-link-blue);
  text-decoration: underline;
}

/* Header / Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-header .navbar {
  background-color: var(--lhaap-navbar-bg) !important;
}

.site-header .navbar-toggler {
  border-color: var(--lhaap-primary);
}

.site-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23004d80' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand {
  font-size: 1.0rem;
  font-weight: 700;
}

.site-header .navbar .navbar-collapse {
  justify-content: center;
}

.site-header .lhaap-primary-nav {
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
}

.navbar-nav .nav-link,
.site-header .lhaap-primary-nav > li > a {
  padding: 0.5rem 0.85rem;
  color: var(--lhaap-primary) !important;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.site-header .lhaap-primary-nav > li > a:hover {
  color: var(--lhaap-primary-light) !important;
}

.site-header .lhaap-primary-nav .menu-item-has-children {
  position: relative;
}

.site-header .lhaap-primary-nav .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  margin-left: 0.4rem;
  vertical-align: middle;
  border-left: 0.28rem solid transparent;
  border-right: 0.28rem solid transparent;
  border-top: 0.34rem solid currentColor;
}

.site-header .lhaap-primary-nav .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.35rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  z-index: 1001;
}

.site-header .lhaap-primary-nav .sub-menu a {
  display: block;
  padding: 0.45rem 0.8rem;
  background: #fff;
  color: var(--lhaap-primary-dark) !important;
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
}

.site-header .lhaap-primary-nav .sub-menu a:hover {
  /*background: rgba(0, 0, 0, 0.04);*/
  background: var(--lhaap-link-blue);
  color: #fff !important;
  text-decoration: none;
}

@media (min-width: 992px) {
  .site-header .lhaap-primary-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
  }

  .site-header .lhaap-primary-nav .menu-item-has-children:hover > .sub-menu,
  .site-header .lhaap-primary-nav .menu-item-has-children:focus-within > .sub-menu {
    display: block;
  }
}

@media (max-width: 991.98px) {
  .site-header .lhaap-primary-nav .sub-menu {
    display: block;
    position: static;
    transform: none;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0.15rem 0 0.4rem;
    margin-left: 0.5rem;
  }

  .site-header .lhaap-primary-nav .sub-menu a {
    color: var(--lhaap-primary) !important;
    padding: 0.35rem 0.8rem;
  }
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  background-color: var(--lhaap-footer-bg) !important;
}

.site-footer a {
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer .copyright {
    line-height: 1.1;
    font-size: 0.9em;
}

.site-footer .credit {
  font-size: 0.6em;
}

.site-footer .footer-logo-column {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.site-footer .footer-logos-widget {
  width: 100%;
}

.site-footer .footer-logos-widget .widget-title {
  display: none;
}

.site-footer .lhaap-footer-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
}

.site-footer .lhaap-footer-logo-img {
  max-height: 56px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

/* Footer Navigation */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.footer-nav .menu-item {
  list-style: none;
}

.footer-nav .menu-item a {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.25rem 0;
}

.footer-nav .menu-item a:hover {
  color: #fff;
}

@media (max-width: 576px) {
  .footer-nav {
    justify-content: center;
    text-align: center;
  }

  .site-footer .footer-logo-column,
  .site-footer .lhaap-footer-logos {
    justify-content: center;
    text-align: center;
  }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(var(--lhaap-hero-overlay, rgba(53, 91, 29, 0.75)), var(--lhaap-hero-overlay, rgba(53, 91, 29, 0.75))), var(--lhaap-hero-bg, url("../assets/caddo2.jpg") center/cover no-repeat);
  padding: 150px 0;
  margin-top: 0;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 100px 0;
  }
}

.hero-section h1 {
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hero-section h2 {
  color: rgba(255,255,255,0.95);
}

/* Mini Hero for Content Pages */
.mini-hero-section {
  background: linear-gradient(var(--lhaap-hero-overlay, rgba(53, 91, 29, 0.75)), var(--lhaap-hero-overlay, rgba(53, 91, 29, 0.75))), var(--lhaap-hero-bg, url("../assets/caddo2.jpg") center/cover no-repeat);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.mini-hero-section h1,
.mini-hero-section h2 {
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Sections */
.overview-section {
  background-color: #fff;
}

.announcements-section {
  background-color: var(--lhaap-bg-light);
}

.project-sites-section {
  background-color: var(--lhaap-bg-light);
}

/* Interactive Map Hotspots */
.image-map-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.image-map-wrapper img {
  display: block;
  width: 100%;
  height: auto;
}

.hotspots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hotspot {
  position: absolute;
}

.hotspot-link {
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--lhaap-primary);
  opacity: 0.12;
  border: 2px solid var(--lhaap-primary);
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
  border-radius: 4px;
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.hotspot-link::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background-color: rgba(255,255,255,0.8);
  border: 2px solid var(--lhaap-primary);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-map-wrapper:hover .hotspot-link {
  opacity: 0.28;
}

.image-map-wrapper:hover .hotspot-link::after {
  opacity: 1;
}

.hotspot-link:hover,
.hotspot-link:focus {
  opacity: 0.55;
  outline: 2px solid var(--lhaap-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(53, 91, 29, 0.3), 0 0 12px rgba(53, 91, 29, 0.55);
}

.hotspot-link:hover::after,
.hotspot-link:focus::after {
  opacity: 1;
}

.image-map-wrapper .hotspot-link {
  outline: none; /* Remove default outline for custom focus styling */
}

/* Loading state */
.image-map-wrapper:not(.interactive-map-ready) .hotspots {
  opacity: 0.5;
}

/* Keyboard focus indicator for accessibility */
.hotspot-link:focus-visible {
  outline: 3px solid var(--lhaap-primary-light);
  outline-offset: 2px;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .hotspot-link {
    opacity: 0.4;
  }

  .image-map-wrapper:hover .hotspot-link {
    opacity: 0.4;
  }

  .hotspot-link:hover,
  .hotspot-link:focus {
    opacity: 0.6;
  }

  .hotspot-link::after,
  .image-map-wrapper:hover .hotspot-link::after,
  .hotspot-link:hover::after,
  .hotspot-link:focus::after {
    opacity: 1;
  }
}

/* Carousel */
.carousel {
  --lhaap-carousel-height: auto;
  --lhaap-carousel-max-height: 99999px;
  --lhaap-carousel-bg: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background-color: var(--lhaap-carousel-bg);
}

.carousel .carousel-inner,
.carousel .carousel-item {
  height: min(var(--lhaap-carousel-height), var(--lhaap-carousel-max-height));
}

.carousel .carousel-item {
  align-items: center;
  justify-content: center;
}

.carousel .carousel-item > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background-color: var(--lhaap-carousel-bg);
}

.carousel-control-prev,
.carousel-control-next {
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  width: 3rem;
  height: 3rem;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-control-prev {
  left: 1rem;
}

.carousel-control-next {
  right: 1rem;
}

/* Buttons */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--lhaap-primary);
    --bs-btn-border-color:var(--lhaap-accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--lhaap-primary-dark);
    --bs-btn-hover-border-color: var(--lhaap-primary-light);
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--lhaap-primary-light);
    --bs-btn-active-border-color: var(--lhaap-primary-dark);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--lhaap-text-gray);
    --bs-btn-disabled-border-color: var(--lhaap-text-gray);
}

/* ============================================================
   Responsive padding — prevent content from pressing flush
   against screen edges on small viewports
   ============================================================ */

/* Prevent horizontal overflow/scroll on narrow screens */
html,
body {
  overflow-x: hidden;
}

@media (max-width: 991.98px) {
  /* Front-page block content uses no Bootstrap container, so add
     horizontal breathing room manually. On page.php this is inside
     a .col which already has gutter padding, so a small addition
     is harmless and still helpful on very narrow viewports. */
  .entry-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* WordPress block groups that render inline in the content area
     may produce padding that adds to .entry-content's padding,
     so keep them at zero for left/right so nothing doubles up. */
  .entry-content .wp-block-group {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 575.98px) {
  /* Scale down display headings so they don't overflow on phones */
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.4rem; }

  /* Give Bootstrap containers a touch more breathing room below sm */
  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}


/* Alerts */
.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    background: linear-gradient(var(--lhaap-hero-overlay, rgba(53, 91, 29, 0.75)), var(--lhaap-hero-overlay, rgba(53, 91, 29, 0.75))), var(--lhaap-hero-bg, url("../assets/caddo2.jpg") center/cover no-repeat);
    padding: 8rem 0;
    min-height: 300px;
    margin-top: 0;
    background-attachment: fixed;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }

  .navbar {
    padding: 0.5rem 0;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* CERCLA Process Flowchart */
.cercla-process {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.cercla-step-box {
  display: inline-block;
  min-width: 220px;
  border-color: var(--lhaap-primary) !important;
}

.cercla-step-box .cercla-abbrev {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--lhaap-primary-dark);
  line-height: 1.3;
}

.cercla-step-box .cercla-name {
  font-size: 0.85rem;
}

.cercla-connector {
  color: var(--lhaap-primary);
}

.cercla-bridge {
  color: var(--lhaap-primary);
}

@media (min-width: 768px) {
  .cercla-desc {
    border-right: 2px dashed rgba(0, 0, 0, 0.12);
  }
}

@media (max-width: 767.98px) {
  .cercla-desc {
    text-align: center !important;
    padding-right: 0 !important;
    margin-bottom: 0.5rem;
  }

  .cercla-step-box {
    min-width: 180px;
  }
}