/* this is \scripts\css\styles-home.css */
/***** Home Page Only Styles *****/


/* Mobile hero title: show only on small screens */
.mobile-hero-title {
  background: #fff;
}
.mobile-hero-heading {
  color: #006a4d;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 768px) {
  .mobile-hero-title {
    display: none !important;
  }
}
@media (max-width: 767.98px) {
  .hero-text-container {
    display: none !important;
  }
}


/* HERO SECTION */
.hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #e6f2ee;
}

/* Dark overlay behind hero text to improve contrast */
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.65),
    rgba(0, 0, 0, 0.45),
    rgba(0, 0, 0, 0.25)
  );
  pointer-events: none;
  z-index: 1;
}

.hero-section .img-fluid {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 0;  /* image below overlay/text */
}

.hero-text-container {
  position: absolute;
  top: 10%;
  right: 0;
  width: 100%;
  height: 80%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
  padding: 20px;
  z-index: 2;  /* above overlay */
}

.hero-text-container h1 {
  color: #ffffff !important;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  text-shadow:
    0 0 4px rgba(0,0,0,0.9),
    0 0 8px rgba(0,0,0,0.9);
  margin: 0;
  font-weight: 700;
  text-align: right;
  padding: 0;
  pointer-events: auto;
  font-family: 'Roboto', Arial, sans-serif;
}

@media (max-width: 575.98px) {
  .hero-text-container {
    padding: 10px;
  }
  .hero-text-container h1 {
    font-size: 1.25rem;
  }
}


/* Catalog Search Floating Box */
.catalog-search-float {
  position: absolute;
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 1em;
  padding: 2em 2em 1em 2em;
  z-index: 10;
  min-width: 320px;
  max-width: 700px;
  width: auto;
  box-sizing: border-box;
  display: inline-block;
}
.catalog-search-heading {
  font-size: 1.2em;
  font-weight: 700;
  color: #006a4d;
  margin-bottom: 1em;
}
.search-box-wrapper {
  margin-bottom: 0.5em;
  flex-wrap: wrap;
  gap: 1em;
}
.searchbox-testing label {
  font-weight: 500;
  color: #174d35;
}
.searchbox-testing input[type="text"] {
  min-width: 220px;
  max-width: 400px;
  width: 100%;
}
.catalog-search-float .form-select,
.catalog-search-float .eb-searchselect {
  min-width: 180px;
  max-width: 260px;
  width: 100%;
}
.catalog-search-float .eb-searchinput-bquery,
.catalog-search-float input[type="text"] {
  min-width: 220px;
  max-width: 400px;
  width: 100%;
}
.search-submit {
  font-weight: 700;
  background: #ffd872;
  color: #174d35;
  border: none;
  border-radius: 0.25em;
  padding: 0.3em 1em;
  cursor: pointer;
  transition: background 0.2s;
}
.search-submit:hover,
.search-submit:focus {
  background: #ffe9a7;
  color: #005a9c;
}
.related-discovery-links a {
  color: #005a9c;
  font-size: 0.95em;
  margin-right: 1em;
}
.related-discovery-links a:hover {
  text-decoration: underline;
}
@media (max-width: 767px) {
  .catalog-search-float {
    position: static !important;
    transform: none !important;
    margin: 1.5em auto !important;
    width: 98vw !important;
    max-width: 98vw !important;
    min-width: 0 !important;
    border-radius: 1em;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    z-index: 10;
    display: block;
  }
  .hero-section {
    padding-bottom: 0 !important;
  }
  .catalog-search-float .form-select,
  .catalog-search-float .eb-searchselect,
  .catalog-search-float .eb-searchinput-bquery,
  .catalog-search-float input[type="text"] {
    min-width: 100px;
    max-width: 100%;
    width: 100%;
  }
  .search-box-wrapper {
    flex-direction: column !important;
    gap: 0.5em !important;
  }
}


/* Tablet: Position box near top left, not centered, with margin */
@media (min-width: 768px) and (max-width: 991.98px) {
  .catalog-search-float {
    position: absolute;
    top: 32px;
    left: 24px;
    right: auto;
    bottom: auto;
    transform: none;
    margin: 0;
    width: 340px;
    max-width: 90vw;
    min-width: 220px;
    height: auto;
  }
  .hero-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}


/* Desktop: Shift box left, anchor near top */
@media (min-width: 992px) {
  .catalog-search-float {
    position: absolute;
    top: 48px;
    left: 48px;
    right: auto;
    bottom: auto;
    transform: none;
    margin: 0;
    width: 600px;
    max-width: 90vw;
    min-width: 320px;
    height: auto;
  }
}


/* Icon Row Styles */
.icon-link {
  text-decoration: none;
  color: #174d35;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
  display: block;
}
.icon-link img {
  display: block;
  margin: 0 auto 0.5em auto;
  height: 48px;
  transition: transform 0.2s ease-in-out;
}
.icon-link div {
  font-weight: 500;
  color: #174d35;
  font-size: 1rem;
  line-height: 1.2;
}
.icon-link:hover,
.icon-link:focus {
  color: #005a9c;
  outline: none;
}
.icon-link:hover img,
.icon-link:focus img {
  transform: scale(1.1);
}
@media (max-width: 991px) {
  .icon-link img {
    height: 40px;
  }
  .icon-link div {
    font-size: 0.95rem;
  }
}
@media (max-width: 575px) {
  .icon-link img {
    height: 36px;
  }
  .icon-link div {
    font-size: 0.9rem;
  }
}


/* Cards Row */
.card-title {
  font-family: 'Roboto', Arial, sans-serif;
  font-weight: 700;
}

.card-link-wrapper {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}
.card-link-wrapper .card {
  height: 100%;
  transition: box-shadow 0.2s;
}
.card-link-wrapper:focus .card,
.card-link-wrapper:hover .card {
  box-shadow: 0 0 0 4px #ffd872;
  outline: none;
}
.card-link-wrapper .btn {
  pointer-events: none;
}


/* OVERRIDES FOR HERO HEADING CONTRAST (desktop hero) */
.hero-section .hero-text-container h1,
.hero-section h1[style] {
  background-color: transparent !important;
  color: #ffffff !important;
  text-shadow:
    0 0 4px rgba(0,0,0,0.9),
    0 0 8px rgba(0,0,0,0.9) !important;
}