/* =============================================================
   HiRise Windows — Custom Revisions
   Divi-Child / assets/css/hirise.css
   ============================================================= */


/* -------------------------------------------------------------
   Rev 1: Flip search icon to face inward (toward Contact Us)
   The icon is rendered via ::after using ETmodules icon font.
   ------------------------------------------------------------- */
.et_pb_menu__search-button::after {
    display: inline-block;
    transform: scaleX(-1);
}

/* Remove underline on search button hover */
.et_pb_menu__search-button:hover {
    text-decoration: none;
}


/* -------------------------------------------------------------
   Rev 2: Nav hover — white dropdown text, blue on hover
   ------------------------------------------------------------- */

/* Dropdown links: white by default, blue on hover, no underline
   Using [class*="_tb_header"] to match Divi's high-specificity inline selector */
[class*="_tb_header"].et_pb_menu .nav li ul.sub-menu a {
    color: #ffffff !important;
    background-color: transparent !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

[class*="_tb_header"].et_pb_menu .nav li ul.sub-menu a:hover {
    color: #2685c6 !important;
    background-color: transparent !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Kill Divi's current-item underline inside dropdown */
[class*="_tb_header"].et_pb_menu .nav li ul.sub-menu li.current-menu-item a,
[class*="_tb_header"].et_pb_menu .nav li ul.sub-menu li.current_page_item a {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Top-level parent links: brand blue on hover, no underline, no opacity */
[class*="_tb_header"].et_pb_menu .nav > li > a:hover {
    color: #233c88 !important;
    text-decoration: none !important;
    border-bottom: none !important;
    opacity: 1 !important;
}

/* Suppress Divi's ::before underline indicator on top-level hover */
[class*="_tb_header"].et_pb_menu .nav > li > a:hover::before {
    background-color: transparent !important;
    height: 0 !important;
    display: none !important;
}


/* -------------------------------------------------------------
   Rev 3: Scroll-to-top arrow — HiRise blue, slightly transparent,
   slightly away from edge, fully rounded
   ------------------------------------------------------------- */
.et_pb_scroll_top {
    background-color: rgba(38, 133, 198, 0.85) !important;
    right: 20px !important;
    bottom: 40px !important;
    border-radius: 5px !important;
}

.et_pb_scroll_top:hover {
    background-color: rgba(35, 60, 136, 0.9) !important;
}


/* -------------------------------------------------------------
   Rev 4: Mobile hamburger — remove underline on last item,
   equalize top/bottom padding of the dropdown
   ------------------------------------------------------------- */
#mobile_menu3 > li:last-child > a {
    border-bottom: none !important;
}

#mobile_menu3 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}


/* -------------------------------------------------------------
   Rev 7: Recent News carousel — arrow hover, scrollbar drag, Read More font
   ------------------------------------------------------------- */

/* Arrows: blue bg + white arrow by default; white bg + blue arrow on hover */
.project-slider .swiper-button-prev,
.project-slider .swiper-button-next {
    background: #233c88 !important;
}

.project-slider .swiper-button-prev:hover,
.project-slider .swiper-button-next:hover {
    background: #ffffff !important;
    color: #233c88 !important;
    opacity: 1 !important;
}

.project-slider .swiper-button-prev:hover::after,
.project-slider .swiper-button-next:hover::after {
    color: #233c88 !important;
}

/* Scrollbar: style the draggable thumb */
.project-slider .swiper-scrollbar {
    background: #e0e0e0 !important;
    border-radius: 2px !important;
}

.project-slider .swiper-scrollbar-drag {
    background: #2685c6 !important;
    border-radius: 2px !important;
    cursor: grab !important;
    transition: transform 0.3s ease !important;
}

.project-slider .swiper-scrollbar-drag:active {
    cursor: grabbing !important;
    transition: none !important;
}

/* Read More: Roboto Condensed, reduced size */
.project-card .project-link {
    font-family: "Roboto Condensed", sans-serif !important;
    font-size: 13px !important;
    letter-spacing: 0.1em !important;
}

/* Rev 8: Hide carousel arrows on mobile — swipe gesture replaces them */
@media (max-width: 767px) {
    .project-slider .swiper-button-prev,
    .project-slider .swiper-button-next {
        display: none !important;
    }
}

/* Spacing between filter controls and results grid on mobile */
@media (max-width: 767px) {
    .project-filter__row--results {
        margin-top: 24px !important;
    }
}


/* -------------------------------------------------------------
   Rev 9: Project filter cards — fade-in animation on load
   Cards start invisible; JS adds .is-visible with staggered
   animation-delay after each AJAX response.
   ------------------------------------------------------------- */
.project-filter__card {
    opacity: 0;
}

.project-filter__card.is-visible {
    animation: project-card-fadein 0.45s ease forwards;
}

@keyframes project-card-fadein {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* -------------------------------------------------------------
   Rev 6: Footer — mobile contact row alignment
   (mobile-contact-details module shown only on mobile via Divi visibility)
   ------------------------------------------------------------- */
@media (max-width: 767px) {
    .mobile-contact-details.dipl_list_0_tb_footer .dipl_list_layout.dipl_list_inline {
        justify-content: center !important;
        gap: 6px 20px !important;
        flex-wrap: wrap !important;
    }

    .mobile-contact-details .dipl-list-item-wrap {
        align-items: center !important;
        gap: 8px !important;
    }

    .mobile-contact-details .dipl_list-item_text p {
        margin: 0 !important;
        text-align: left !important;
    }
}


/* -------------------------------------------------------------
   Rev 5: Mobile dropdown toggle — remove white circle,
   make +/− white on the black menu background
   ------------------------------------------------------------- */
#mobile_menu3 li.menu-item-has-children .mobile-toggle::after {
    color: #ffffff !important;
    background: transparent !important;
    border-radius: 0 !important;
}


/* =============================================================
   Migrated from style.css — project slider & filter base styles
   ============================================================= */

/* custom slider for cpt */
.project-slider {
  position: relative;
}

.project-slider .swiper-slide {
  height: unset;
}

.project-slider .swiper-button-prev,
.project-slider .swiper-button-next {
  color: #fff !important;
  background: #233c88;
  border-radius: 0px;
  border-width: 6px;
  border-color: #233c88;
  width: 4%;
  height: auto;
  aspect-ratio: 1 / 1;
}

.project-slider .swiper-button-prev {
  left: 0;
}

.project-slider .swiper-button-next {
  right: 0;
}

.project-slider .swiper-button-prev:hover,
.project-slider .swiper-button-next:hover {
  opacity: 0.8;
}

.project-slider .swiper-button-prev::after,
.project-slider .swiper-button-next::after {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.project-card {
  height: 100%;
}

.project-card .stretched-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

@media only screen and (max-width: 767px) {
  .project-card:last-child {
    border-bottom: 0;
  }
}

.project-card_wrap {
  background: rgba(244, 244, 244, 0.7);
  overflow: hidden;
  height: 100%;
}

.project-card_thumb {
  padding-bottom: 64.52%;
  position: relative;
}

.project-card_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
}

.project-card_title {
  font-size: 24px;
  font-family: Open Sans, Arial, sans-serif;
  line-height: 1.4;
  font-weight: 500;
  margin: 0 0 0;
  color: #111;
}

.project-card_title a {
  color: inherit;
  text-decoration: none;
}

.project-card_details {
  padding: 30px;
}

.project-card_details p {
  font-size: 16px;
  line-height: 1.27;
  color: #111;
  margin: 0;
}

.project-card .project-link {
  color: #155eae;
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  font-family: Open Sans, Arial, sans-serif;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .project-slider {
    padding-inline: 5%;
  }

  .project-slider .swiper-button-prev {
    left: 10px;
  }

  .project-slider .swiper-button-next {
    right: 10px;
  }
}

@media (max-width: 767px) {
  .project-slider {
    width: 90%;
    margin: 0 auto;
  }

  .project-slider .swiper-button-prev,
  .project-slider .swiper-button-next {
    width: 40px;
  }
}

/* =============================================================
   Styles for the custom project filter
   ============================================================= */

.project-filter {
  padding: 2rem 0;
}

.project-filter__row {
  margin-bottom: 2rem;
}

/* Search row */
.project-filter__search {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-filter__row--search {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-filter__search-input {
  flex: 1 1 auto;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 250px;
  padding-left: 15px !important;
  font-size: 16px;
  height: 51px;
}

.project-filter__button--load-more,
.project-filter__button,
.project-filter__search-button {
  background-color: #233c88;
  border: 1px solid #233c88;
  border-radius: 3px;
  color: #fff;
  cursor: pointer;
  float: right;
  font-size: 15px;
  font-weight: 400;
  margin-right: 0;
  padding: 10px 25px;
  transition: color 0.4s, border-color 0.4s, background-color 0.4s;
}
.project-filter__button--load-more:hover,
.project-filter__button:hover,
.project-filter__search-button:hover {
  background-color: #2685c6;
  border: 1px solid #2685c6;
}

.project-filter__search-icon {
  width: 20px;
  height: 20px;
}

/* Dropdowns & filter actions */
.project-filter__dropdowns {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.project-filter__dropdown {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  min-width: 180px;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  flex: 1 1 180px;
  height: 51px;
  font-size: 16px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23666" viewBox="0 0 320 512"><path d="M143 352.3c12.5 12.5 32.8 12.5 45.3 0l136-136c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 274.7 41.9 171c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l136 136z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 12px;
}

.project-filter__actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.project-filter__actions ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0;
}
.project-filter__actions ul li {
  list-style-type: none;
}
.project-filter__actions ul li a {
  min-height: 51px;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 16px;
  display: inline-block;
  color: #4e4e4e;
  background-color: #2685c6;
  border: 1px solid #2685c6;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.project-filter__actions ul li a:hover {
  background-color: #233c88;
  border: 1px solid #233c88;
}

/* Project Grid */
.project-filter__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 2.5rem;
}

.project-filter__card {
  border: none;
  border-radius: 0;
  background: #fff;
  transition: box-shadow 0.3s ease;
  position: relative;
}

.project-filter__card:hover {
  box-shadow: none;
}

.project-filter__card-image {
  aspect-ratio: 1.406;
  overflow: hidden;
  width: 100%;
}

.project-filter__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.project-filter__card:hover .project-filter__card-image img {
  transform: scale(1.05);
}

.project-filter__card-content {
  padding: 1rem 0 1.5rem;
}

.project-filter__card-title {
  margin: 0;
  padding: 0;
  font-family: "Mona Lisa", sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
  transition: color 0.25s ease;
}

.project-filter__card:hover .project-filter__card-title {
  color: #233c88;
}

.project-filter__card-location {
  margin: -5px 0 0 0;
  font-family: "Mona Lisa", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2685c6;
}

/* Load More */
.project-filter__load-more {
  text-align: center;
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .project-filter__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .project-filter__row {
    margin-bottom: 1rem;
  }
  .project-filter__dropdowns,
  .project-filter__actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  .project-filter__search,
  .project-filter__dropdown {
    width: 100%;
  }
  .project-filter__dropdown {
    flex: 1 1 auto;
  }
  .project-filter__search-input {
    min-width: calc(100% - 88px);
  }
  .project-filter__row--search {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 15px;
  }
  .project-filter__actions ul {
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  .project-filter__grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (min-width: 768px) and (max-width: 980px) {
  .project-filter {
    padding-inline: 15px;
  }
}

@media (max-width: 480px) {
  .project-filter {
    padding: 1rem 0;
  }

  .project-filter__button {
    width: 100%;
    text-align: center;
  }

  .project-filter__grid {
    gap: 1.2rem;
  }
}

@media screen and (orientation: landscape) and (max-width: 932px) {
  .project-filter__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.stretched-link::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  pointer-events: auto;
  content: "";
  background-color: rgba(0, 0, 0, 0);
}

.project-filter__grid.overlay-add::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.7);
  z-index: 10;
}

.project-filter__grid.overlay-add::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid #ccc;
  border-top: 4px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 11;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.project-filter__grid {
  position: relative;
}
