/*
Theme Name: Gradon Custom Theme
Theme URI: https://www.gradonarchitecture.com
Author: nBIT
Author URI: https://www.gradonarchitecture.com
Description: Custom theme developed for Gradon Architecture
Version: 1.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gradon
*/

/* === Admin Bar Overlay Fix === */
#wpadminbar {
  background: #161b1e5e;
}
html {
  margin-top: 0 !important;
}
body.admin-bar #wpadminbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
}


/* ------------------------------
   Fonts
------------------------------ */
@font-face {
  font-family: "Larsseit";
  src: url("assets/fonts/ef431dac-7ccf-48f9-ab0d-76b9c4bdb21a.eot?#iefix") format("embedded-opentype"),
    url("assets/fonts/63e41261-c59d-42db-86b7-99a32ec9a605.woff2") format("woff2"),
    url("assets/fonts/c0cd4f71-5a0a-4aa1-83a6-1ba625a9bc8f.woff") format("woff"),
    url("assets/fonts/e4efd1fb-0533-4b0c-adad-7727c9ce68e0.ttf") format("truetype"),
    url("assets/fonts/15304154-ab84-45eb-b5d5-239a94fa882f.svg#15304154-ab84-45eb-b5d5-239a94fa882f") format("svg");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Larsseit";
  src: url("assets/fonts/7c18e6f0-ae7b-4e5d-87e6-b5b3b0ec2d73.eot?#iefix") format("embedded-opentype"),
    url("assets/fonts/35585918-70df-42bb-af94-a863449eb643.woff2") format("woff2"),
    url("assets/fonts/7e733478-69ef-4b99-801d-73bf3528ce30.woff") format("woff"),
    url("assets/fonts/da7f18e4-cdc2-44bf-acb6-a89a2f1b51c9.ttf") format("truetype"),
    url("assets/fonts/1a3e172f-7624-43a0-a942-fd569d66d767.svg#1a3e172f-7624-43a0-a942-fd569d66d767") format("svg");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Larsseit";
  src: url("assets/fonts/a19695b2-589f-4b08-94f5-2505a4c8631d.eot?#iefix") format("embedded-opentype"),
    url("assets/fonts/32270e9c-145a-492e-9d13-f0971893dd96.woff2") format("woff2"),
    url("assets/fonts/7d211f36-d7b9-4625-a3e9-4bec9e5f4737.woff") format("woff"),
    url("assets/fonts/de717994-6d9f-487a-b686-1322aa474cd0.ttf") format("truetype"),
    url("assets/fonts/5d9c16c5-fe21-4990-a597-a79b932422e5.svg#5d9c16c5-fe21-4990-a597-a79b932422e5") format("svg");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------
   Global Styles
------------------------------ */
body {
  font-family: "Larsseit", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  word-spacing: 1px;
  color: #585a5b;
  margin: 0;
  overflow-x: hidden;
}
input,
select,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

body.no-scroll {
  overflow: hidden;
  padding-right: var(--scrollbar-comp, 0px);
}

body.no-scroll .site-header {
  padding-right: var(--scrollbar-comp, 0px);
}


h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Larsseit", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
  color: #1e1e1e;
}

h2 {
  font-size: 28px;
  margin: 0 0 20px 0;
  font-weight: 300;
}

p {
  font-size: 20px;
  line-height: 28px;
  margin-block-start: 0px;
}

/* Standard text shadow */
.primary-menu a,
.slide-caption,
.slide-link,
.featured-overlay-content-inner {
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.4),
    0 0 2px rgba(0, 0, 0, 0.8);
}

.site-header .logo.logo-white,
.white-logo-active .search-toggle img,
.white-logo-active .hamburger-toggle .bar {
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.4));
}

/* Background colour for image loading */
.homepage-slideshow,
.hero-section,
.page-featured-image {
  background-color: #585a5b;
}
iframe {
  background-color: #f1f1f1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ------------------------------
   Shared Layout Wrappers
------------------------------ */
.page-content {
  padding-top: 100px;
  width: 100%;
  display: inline-block;
}

.page-content.no-padding-top {
  padding-top: 0;
}

.grey-wrapper {
  background-color: #f1f1f1;
  padding-bottom: 40px;
}

.container {
  max-width: 1500px;
  padding-left: 20px;
  padding-right: 20px;
  margin: 0 auto;
}

/* ------------------------------
   Header
------------------------------ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  z-index: 10000;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-color: transparent;
  color: #fff;
  display: flex;
  justify-content: center;
}

.site-header-inner {
  max-width: 1500px;
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.site-header-logo {
  position: relative;
  width: 260px;
  height: 24px;
  flex-shrink: 0;
}

.site-header-tools,
.mobile-header-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
}

.search-toggle {
  order: -1;
}

.site-search {
  display: none;
  position: absolute;
  top: 100%;
  right: 40px;
  background: #fff;
  border: 1px solid #ccc;
  z-index: 9999;
}

.site-search.active {
  display: block;
}

.header-scrolled {
  background: #fff;
  color: #585a5b;
}

.header-scrolled .primary-menu a {
  color: #585a5b;
  text-shadow: none;
}

.grey-wrapper .page-content {
  padding-top: 40px;
}

.logo {
  max-height: 60px;
  width: 260px;
  opacity: 0;
  transition: opacity 0.3s ease;
  position: absolute;
}

.logo-white {
  opacity: 1;
}

.search-icon {
  width: 22px;
  height: 22px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.search-icon-white {
  opacity: 1;
}

.search-icon-dark {
  opacity: 0;
}

.site-header.header-scrolled .site-header-inner {
}

.header-scrolled .logo-white,
.header-scrolled .search-icon-white {
  opacity: 0;
}

.header-scrolled .logo-default,
.header-scrolled .search-icon-dark {
  opacity: 1;
}

html.menu-open .site-header {
  background: transparent;
  color: #fff;
}

html.menu-open .logo-white,
html.menu-open .search-icon-white {
  opacity: 1;
}

html.menu-open .logo-default,
html.menu-open .search-icon-dark {
  opacity: 0;
}

html.menu-open .hamburger-toggle .bar {
  background-color: #fff;
}

.primary-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 24px;
}

.site-nav .primary-menu {
  display: none;
}

.search-toggle {
  position: relative;
  width: 30px;
  height: 100%;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10002;
}

/* Hide search at request of client */
.search-toggle {
  display: none !important;
}

/* Mobile Menu */
button#hamburger {
  padding: 12px 6px;
  background-color: transparent;
}
button#hamburger:hover {
  background-color: transparent;
}

.hamburger-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 34px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10001;
}

.hamburger-toggle .bar {
  display: block;
  height: 2px;
  width: 100%;
  background: white;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
  transform-origin: center;
}

.header-scrolled .hamburger-toggle .bar {
  background: #585a5b;
}

.hamburger-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

body.no-scroll {
  overflow: hidden;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #e12625;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
  transition: transform 0.6s ease-in, opacity 0.2s ease-in 0.3s, visibility 0s linear 0.6s;
  z-index: 9999;
  padding: 40px 20px;
  pointer-events: none;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: transform 0.6s ease-out, opacity 0.3s ease-out, visibility 0s linear 0s;
}

.mobile-menu-inner::-webkit-scrollbar {
  width: 8px;
}

.mobile-menu-inner::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.mobile-menu-overlay.active {
  overflow: hidden;
  /* ensures no outer scrolling issues */
}

html.menu-open {
  overflow: hidden;
}

html.menu-open #wpadminbar {
  display: none;
}

.mobile-menu-inner {
  flex: 1 1 auto;
  margin: 60px 0;
  flex-direction: column;
  justify-content: space-between;
  max-height: calc(100vh - 220px);
  /* avoids social overlap */
  overflow-y: auto;
  box-sizing: border-box;
}

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
}

.mobile-nav .mobile-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 38px;
}


.mobile-menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 300;
}

.mobile-menu a:hover {
  text-decoration: none;
}

/* Style for submenu toggle button */
.submenu-toggle {
  display: none;
  /* Hides the + / - buttons completely */
}

/* Remove default bullets */
.mobile-menu li {
  list-style: none;
  border-left: none !important;
  padding-left: 0;
}


.mobile-menu .sub-menu li {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.mobile-menu .sub-menu {
  font-size: 30px;
  padding-left: 30px;
}

.mobile-menu .sub-menu .sub-menu {
  font-size: 24px;
  padding-left: 30px;
}

/* Hide submenus by default */
.mobile-menu .sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

/* Reveal submenus when active */
.mobile-menu .sub-menu.open {
  max-height: 1000px;
  /* More than enough for long submenus */
}

.mobile-socials {
  position: absolute;
  bottom: 40px;
  right: 17px;
  font-size: 22px;
}

/* Social icons default hidden */
.mobile-socials {
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 0.3s ease, transform 0.6s ease;
  transition-delay: 0s;
  /* overridden when menu is active */
}

/* When menu is active, animate them in */
.mobile-menu-overlay.active .mobile-socials {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.6s;
  /* wait until menu slide animation finishes */
}

.social-icons {
  display: inline-block;
  height: 50px;
}

.social-icons h5 {
  display: inline-block;
  font-size: 18px;
  font-weight: 300;
  font-style: italic;
  margin: 12px 6px 12px 0;
  color: #fff;
}

.social-icons a {
  display: inline-block;
  height: 50px;
  width: 50px;
  background: #ffffffc7;
  border-radius: 50%;
  margin-right: 6px;
}

.social-icons img {
  padding: 10px;
}

/* ------------------------------
   HOMEPAGE SLIDESHOW
------------------------------ */
.homepage-slideshow,
.slide {
  height: calc(var(--vh, 1vh) * 100);
}

.homepage-slideshow {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.slide {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  transition: opacity 1s ease;
  pointer-events: none;
}

.slide.ready.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

.slide-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  transition: transform 7s ease-in-out;
}

.slide-overlay {
  position: absolute;
  bottom: 40px;
  height: 70px;
  left: 0;
  width: 100%;
  z-index: 4;
}

.slide-overlay .overlay-container {
  max-width: 1500px;
  margin: 0 auto;
  height: 70px;
  padding: 0 20px;
  display: flex;
  justify-content: flex-start;
}

.slide-overlay .overlay-inner {
  display: inline-block;
  color: #fff;
  height: 70px;
  text-align: left;
  max-width: 500px;
  flex: 0 0 auto;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0.4s;
}

.slide.active .overlay-inner {
  opacity: 1;
  transform: translateY(0);
}

.slide-caption {
  max-width: 300px;
  font-size: 20px;
}

.slide-link {
  font-size: 16px;
  display: inline-block;
}

.slide-link a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.scroll-down {
  position: absolute;
  bottom: 10px;
  left: 50%;
  height: 22px;
  width: 40px;
  transform: translateX(-50%);
  cursor: pointer;
  z-index: 4;
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

.slide::before,
.page-featured-image::before,
.slide::after,
.page-featured-image::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  z-index: 3;
  pointer-events: none;
}

.slide::before,
.page-featured-image::before {
  top: 0;
  height: 200px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent);
}

.slide::after,
.page-featured-image::after {
  bottom: 0;
  height: 150px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.slide.first.ready {
  opacity: 1;
  z-index: 2;
}

.slide.first.ready .slide-image img {
  animation: zoomInEffect 8s ease-in-out forwards;
}

@keyframes firstSlideIn {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.1);
  }
}

/* Animations */
.slide.zoom-in .slide-image img {
  transform: scale(1);
}

.slide.zoom-in.active .slide-image img {
  transform: scale(1.1);
}

.slide.zoom-out .slide-image img {
  transform: scale(1.1);
}

.slide.zoom-out.active .slide-image img {
  transform: scale(1);
}

.slide.pan-left .slide-image img {
  transform: scale(1.2);
}

.slide.pan-left.active .slide-image img {
  transform: scale(1.2) translateX(-5%);
}

.slide.pan-right .slide-image img {
  transform: scale(1.2);
}

.slide.pan-right.active .slide-image img {
  transform: scale(1.2) translateX(5%);
}

.slide.pan-up .slide-image img {
  transform: scale(1.2);
}

.slide.pan-up.active .slide-image img {
  transform: scale(1.2) translateY(-5%);
}

.slide.pan-down .slide-image img {
  transform: scale(1.2);
}

.slide.pan-down.active .slide-image img {
  transform: scale(1.2) translateY(5%);
}

/* ------------------------------
   Featured Image Styles (Projects & News)
------------------------------ */
.page-featured-image,
.sector-featured-image {
  height: calc(var(--vh, 1vh) * 100);
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.featured-overlay-content {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
  display: flex;
  justify-content: flex-start;
  z-index: 4;
}

.featured-overlay-content-inner {
  padding: 20px 0;
  color: #fff;
  text-align: left;
  max-width: 500px;
}

.featured-overlay-content-inner h1 {
  color: #fff;
  margin: 0;
  font-size: 32px;
}

.featured-meta-item a {
  color: #fff;
}


/* ------------------------------
   Featured Image Overlay Text (Sectors & Services)
------------------------------ */
.featured-title-wrap {
  position: absolute;
  bottom: 50%;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
  display: flex;
  justify-content: flex-start;
}

.featured-title-inner {
  padding: 20px 0;
  margin: 0 auto;
  max-width: 900px;
  text-shadow: 0 0 15px rgba(0, 0, 0, 0.4), 0 0 2px rgba(0, 0, 0, 0.9);
}

.featured-title-inner h1 {
  color: #fff;
  margin: 0;
  font-size: 48px;
}


/* ------------------------------
   Page Content top padding adjustments
------------------------------ */
#homepage .page-content,
#sector-page .page-content,
#service-page .page-content,
#single-project .page-content {
    padding-top: 60px;
}


/* ------------------------------
   Homepage Grid Sections
------------------------------ */
.homepage-section .grid,
.projects-page-section .grid,
.news-page-section .grid {
  display: grid;
  gap: 50px 30px;
  grid-template-columns: 1fr;
  margin: 40px 0;
  width: 100%;
}

.homepage-section.latest-news {
  margin-bottom: 40px;
}

.grid-item {
  text-align: left;
  overflow: hidden;
}

.grid-item a {
  text-decoration: none;
  color: inherit;
}

.grid-item a:hover {
  text-decoration: none;
}

.grid-item-image {
  width: 100%;
  height: 56vw;
  display: block;
  overflow: hidden;
}

.grid-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.grid-item-image:hover img {
  transform: scale(1.1);
}

.grid-item-info {
  margin-top: 0px;
  position: relative;
  z-index: 1;
}

.grid-item-title {
  padding-top: 5px;
  font-size: 20px;
  font-weight: 500;
  color: #1e1e1e;
}

.grid-item-subtitle {
  padding-top: 5px;
  font-size: 14px;
}

.view-all-wrapper {
  text-align: center;
  margin-top: 20px;
}

.view-all-button {
  display: inline-block;
  padding: 12px 30px;
  background-color: #1e1e1e;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  height: 44px;
  transition: background-color 0.3s ease;
}

.view-all-button:hover {
  background-color: #e12625;
}

.load-more-wrap {
  text-align: center;
  margin: 40px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ------------------------------
   Offset for page jump links to account for header height
------------------------------ */
.practice-flow section {
  scroll-margin-top: 100px;
}

/* adjust to your header height */


/* ------------------------------
   Project Sectors
------------------------------ */
.project-sectors a {
  color: #585a5b;
  text-decoration: none;
  font-size: 20px;
}

.project-sectors ul {
  list-style: none;
  text-align: center;
  padding: 0;
}

.project-sectors li {
  margin-right: 34px;
  margin-bottom: 10px;
  display: inline-block;
}


/* ------------------------------
   Sector and service dropdowns on All Projects page
------------------------------ */
.filter {
    display: inline-block;
    margin-right: 60px;
}
.project-filters {
  display: inline-block;
  width: 100%;
}

.project-filters label {
  font-weight: 500;
  color: #585a5b;
}

.project-filters select {
  padding: 0;
  font-size: 16px;
  border: none;
  color: #585a5b;
  font-weight: 300;
}
.project-filters select:hover {
    cursor: pointer;
	color: #1e1e1e;
}
.filter:focus-visible,
.project-filters select:focus-visible {
    outline: none;
}
button#clear-filters {
  padding: 1px 0 0 0;
  height: auto;
  float: right;
  font-weight: 300;
  background: none;
  color: #585a5b;
}
button#clear-filters:hover {
  cursor: pointer;
  color: #1e1e1e;
}


/* ------------------------------
   Projects grid animation for applying filter
------------------------------ */
/* Base state */
.projects-page-section .grid {
  display: grid;
  gap: 2rem;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* When AJAX loading */
.projects-page-section .grid.loading {
  opacity: 0;
  transform: scale(0.97);
}

/* Animate new items appearing */
.grid-item {
  opacity: 0;
  transform: translateY(15px);
  animation: gridItemFadeIn 0.5s ease forwards;
}

/* Stagger animation via nth-child */
.grid-item:nth-child(1) {
  animation-delay: 0.05s;
}

.grid-item:nth-child(2) {
  animation-delay: 0.1s;
}

.grid-item:nth-child(3) {
  animation-delay: 0.15s;
}

.grid-item:nth-child(4) {
  animation-delay: 0.2s;
}

.grid-item:nth-child(5) {
  animation-delay: 0.25s;
}

/* Add more if your grid shows many at once */

/* Keyframes */
@keyframes gridItemFadeIn {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ------------------------------
   Related Projects Responsive Scroll
------------------------------ */
.related-projects-grid {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
  margin-top: 30px;
  scrollbar-width: thin;
  /* Firefox */
  scrollbar-color: #e12625 transparent;
  /* thumb + track */
}

.related-projects-grid::-webkit-scrollbar {
  height: 6px;
  /* thin horizontal bar */
}

.related-projects-grid::-webkit-scrollbar-track {
  background: transparent;
}

.related-projects-grid::-webkit-scrollbar-thumb {
  background-color: #e12625;
  /* brand red */
  border-radius: 3px;
  /* rounded pill */
  min-width: 40px;
  /* always looks like a dash */
}

.related-projects-grid>.grid-item {
  flex: 0 0 80%;
  /* default: almost full width on phones */
  scroll-snap-align: start;
}

/* ------------------------------
   Project details area
------------------------------ */
.project-details {
  display: inline-block;
  width: 100%;
  margin-bottom: 20px;
}

.detail-entry {
  float: left;
  width: 45%;
  margin-right: 5%;
  height: 90px;
}

.detail-title {
  color: #e12625;
  font-weight: 500;
}

.detail-content {
  margin-bottom: 24px;
}

.detail-content a {
  color: #585a5b;
  text-decoration: none;
  border-bottom: 1px solid #585a5b63;
}

.detail-content a:hover {
  color: #000000;
  border-color: #000000a8;
  text-decoration: none;
}


/* ------------------------------
   Page sections spacing
------------------------------ */
section#about-us {
  margin: 0 0 40px 0;
}

section#our-team {
  margin: 40px 0;
}

section.projects-page-section {
  margin: 40px 0;
}


/* ------------------------------
   People grid and modal
------------------------------ */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 30px;
}

.person-photo {
  width: 100%;
  height: 0;
  padding-top: 100%;
  /* square */
  position: relative;
  overflow: hidden;
}

.person-photo img,
.person-photo .no-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-photo .no-photo {
  background: #f1f1f1;
}

/* Match hover style to Projects grid (zoom image on hover) */
.person-tile {
  cursor: pointer;
}

.person-photo {
  overflow: hidden;
  position: relative;
}

.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.person-tile:hover .person-photo img {
  transform: scale(1.1);
}

.person-tile:hover .person-name {
  color: #e12625;
  /* Gradon red */
}

.person-info {
  padding: 10px 0;
}


/* Modal */
.person-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 40px 30px;

  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
}

.person-modal.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition-delay: 0s;
}

.person-modal-inner {
  background: #fff;
  color: #333;
  max-width: 1200px;
  width: 100%;
  border-radius: 8px;
  position: relative;
  overflow-y: auto;
  max-height: 100%;
}

.person-modal-close {
  display: inline-block;
  position: sticky;
  height: 26px;
  top: 0;
  width: 100%;
  background: #fff;
}

.person-modal-button {
  position: sticky;
  top: 0;
  right: 0;
  height: auto;
  line-height: 1;
  padding: 0 14px 6px 14px;
  float: right;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.person-modal-button:hover {
  color: #fff;
}

.person-modal-content {
  display: inline-block;
  padding: 0 30px 20px 30px;
}

.person-modal-content h2 {
  margin-top: 0;
}

.person-photo-modal {
  margin-bottom: 10px;
}

.person-photo-modal img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

h3.person-name-modal,
h3.person-name {
  color: #e12625;
  font-size: 24px;
  margin: 0;
}

.person-quals-modal {
  font-size: 16px;
}

.person-job-modal {
  font-size: 20px;
}

.person-bio-modal {
  margin-top: 20px;
}

.person-bio-modal p {
  font-size: 18px;
}

.person-socials-modal a {
  display: inline-block;
  height: 50px;
  width: 50px;
  background: #e126251a;
  border-radius: 50%;
  margin-right: 6px;
}

.person-socials-modal img {
  padding: 10px;
}


/* ------------------------------
   Wordpress image overrides
------------------------------ */
.alignleft.size-full {
  margin: 10px 0 20px;
}

.alignleft {
  margin: 10px 0 20px 0 !important;
}

.wp-block-image.size-full img {
    min-width: 100%;
}

/* ------------------------------
   Wordpress text overrides
------------------------------ */
.wp-block-list {
    font-size: 20px;
}

/* ------------------------------
   Footer
------------------------------ */
.site-footer {
  background: #e12625;
  color: #fff;
}

address {
  font-style: normal;
}

.footer-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 30px 20px 5px 20px;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col {
  font-size: 16px
}

.footer-col h3 {
  margin: 0 0 6px 0;
  color: #fff;
}

.footer-logo {
  width: 260px;
}

.footer-contact a,
.footer-menu a {
  color: #fff;
  text-decoration: none;
}

.footer-menu,
.footer-nav {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
}

.footer-menu {
  padding-bottom: 18px;
}

.footer-menu li,
.footer-nav li {
  margin-bottom: 6px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 30px;
  font-size: 16px;
  padding-top: 14px;
}

.footer-social {
  margin-bottom: 24px;
}

.footer-copyright {
  margin: 20px 0 30px;
}

.footer-policy {
  display: flex;
  height: 100%;
  align-items: center;
}

.footer-policy a {
  color: #fff;
}

/* ------------------------------
   Search Page Styles
------------------------------ */
.result-type-badge {
  margin-bottom: 5px;
}

.search-badge {
  background-color: #e12625;
  color: #fff;
  font-size: 12px;
  padding: 3px 6px;
  margin-left: 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.badge-project {
  background-color: #e12625;
}

.badge-news {
  background-color: #585a5b;
}

.badge-other {
  background-color: #777;
}

.search-highlight {
  background-color: yellow;
  padding: 0 2px;
  font-weight: bold;
}

.search-results-page .grid {
  margin-top: 20px;
}

/* ------------------------------
   Responsive
------------------------------ */
@media (min-width: 768px) {
  .logo {
    width: 320px;
    height: 30px;
  }

  .footer-logo {
    width: 320px;
  }
  
  .site-header-inner,
  .container,
  .footer-inner,
  .slide-overlay .overlay-container  {
    padding-left: 30px;
    padding-right: 30px;
  }

  .scroll-down {
    bottom: 20px;
    height: 30px;
    width: 50px;
  }

  .homepage-section .grid,
  .projects-page-section .grid,
  .news-page-section .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-item-image {
    height: 24vw;
  }

  .footer-columns {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    flex-direction: row;
    justify-content: space-between;
  }

  .footer-policies {
    display: flex;
    order: 2;
  }

  .footer-policy {
    margin-left: 40px;
  }

  .footer-copyright {
    order: 1;
  }

  .related-projects-grid>.grid-item {
    flex: 0 0 45%;
    /* default: almost full width on phones */
    scroll-snap-align: start;
  }

  .detail-entry {
    width: 28%;
  }

  /* ------------------------------
   People grid and modal
------------------------------ */
  .person-modal {
    padding: 40px 12vw;
  }

  .person-bio-modal p {
    font-size: 20px;
  }
}


/* ------------------------------
   Contact page and CF7 styling
------------------------------ */
.contact h2 {
  margin-bottom: 40px;
}
.contact figure.wp-block-table {
    height: 100%;
}
.contact table {
  width: 100%;
  height: 100%;
}
.contact .wp-block-table thead {
    border-bottom: none;
}
.contact td,
.contact th {
    border: none;
    padding: 0;
	text-align: left;
	font-size: 20px;
	font-weight: 300;
}
.contact td {
  vertical-align: bottom;
}

form.wpcf7-form p {
    margin: 0;
}

input.wpcf7-form-control {
  height: 34px;
  font-size: 18px;
  color: #2f3131;
}

/* === CF7 Contact Form Layout === */
.form-row {
  width: 100%;
}

.form-row.two-col {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-row.two-col .form-field {
  flex: 1;
  min-width: 250px;
}

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 18px;
  color: #333;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
  width: 100%;
  padding: 1.5rem 1rem;
  border: 1px solid #ccc;
  font-size: 20px;
  font-weight: 300;
  font-family: inherit;
  margin: 0 0 15px 0;
  transition: border-color 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #e12625;
  outline: none;
}

textarea {
  min-height: 150px;
  height: 150px;
  resize: vertical;
}

/* Submit button */
.submit-row {
  text-align: right;
}

button,
.wpcf7 input[type="submit"] {
  float: right;
  height: 40px;
  padding: 12px 30px;
  background-color: #1e1e1e;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  transition: background-color 0.3s ease;
}

button:hover,
.wpcf7 input[type="submit"]:hover {
  background-color: #e12625;
}
#map {
    margin-bottom: 40px;
}

/* Responsive */
@media (max-width: 600px) {
  .form-row.two-col {
    flex-direction: column;
  }
}

.contact-info-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin: 50px 0 30px 0;
  text-align: center;
}

.contact-info-icons .info-item {
  flex: 1 1 120px;
}

.contact-info-icons .info-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s ease;
}

.contact-info-icons .info-icon {
  width: 60px;
  height: 60px;
  background-color: #e12625; /* Gradon red */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.contact-info-icons .info-icon img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

.contact-info-icons .info-icon:hover {
  background-color: #c11f1f;
  transform: scale(1.08);
}

.contact-info-icons p {
  font-size: 15px;
  line-height: 1.4;
}

.contact-info-icons a {
  color: #333;
  text-decoration: none;
}

.contact-info-icons a:hover {
  color: #e12625;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .contact-info-icons {
    gap: 25px;
  }

  .contact-info-icons .info-item {
    flex: 1 1 45%;
  }
}


@media (min-width: 1024px) {
  .site-nav {
    position: relative;
  }

  .primary-menu {
    position: relative;
  }

  .primary-menu>li.menu-item-has-children {
    position: static;
  }

  .primary-menu>li.menu-item-has-children>.sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: 320px;
    z-index: 9999;
    background: rgb(0 0 0 / 60%);
    padding: 20px 0;
    text-align: left;
  }

  /* ensure second-level li acts as anchor */
  .primary-menu li ul.sub-menu li {
    position: relative;
  }

  /* fly-out submenu for Our Services*/
  .primary-menu li ul.sub-menu li ul.sub-menu {
    position: absolute;
    top: -64px;
    left: -280px;
    min-width: 280px;
  }

  .primary-menu>li.menu-item-has-children>.sub-menu>li {
    white-space: nowrap;
  }

  .site-header-tools {
    gap: 20px;
  }

  .mobile-header-buttons {
    display: none;
  }

  .site-nav .primary-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
  }

  .primary-menu li {
    position: relative;
  }

  .primary-menu li ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgb(0 0 0 / 60%);
    color: #fff;
    list-style: none;
    padding: 20px 0;
    margin: 0;
    min-width: 200px;
    z-index: 999;
  }

  .primary-menu li:hover>ul.sub-menu {
    display: block;
  }

  .primary-menu li ul.sub-menu li {
    padding: 0;
  }

  .primary-menu li ul.sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    line-height: 24px;
    white-space: nowrap;
  }

  .primary-menu li ul.sub-menu li a:hover,
  .primary-menu li ul.sub-menu li:hover>a {
    background: #ffffff;
    color: #1e1e1e;
    text-shadow: none;
  }
  
  .site-header-inner,
  .container,
  .footer-inner,
  .slide-overlay .overlay-container  {
    padding-left: 40px;
    padding-right: 40px;
  }

  .project-details {
    float: right;
    margin: 0 0 50px 100px;
    width: 350px;
  }

  .detail-entry {
    width: 100%;
    height: auto;
  }

  /* ------------------------------
   Related Projects Responsive Scroll
  ------------------------------ */
  .related-projects-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    /* reset scroll */
    padding-bottom: 0;
  }

  .related-projects-grid>.grid-item {
    flex: initial;
    scroll-snap-align: unset;
  }

  /* ------------------------------
   People grid and modal
    ------------------------------ */
  .person-modal {
    padding: 100px 60px;
  }

  .person-photo-modal {
    float: left;
    width: 40%;
    margin: 0 40px 34px 0;
  }

  .person-info-modal {}

  .person-bio-modal {}

  .person-socials-modal {
    float: left;
  }
}


@media (min-width: 1200px) {
  .scroll-down {
    bottom: 20px;
    height: 34px;
    width: 60px;
  }

  .homepage-section .grid,
  .projects-page-section .grid,
  .news-page-section .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-item-image {
    height: 18vw;
    max-height: 300px;
  }
}