/*
Theme Name: Barraza
Theme URI: https://example.com/
Author: Site Owner
Author URI: https://example.com/
Description: Custom Gutenberg block theme for the Barraza Consulting Group site clone.
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: barraza
*/

/* Add minimal CSS overrides here if needed. Most styling should live in theme.json. */

/* Hero video cover text enhancements */
.wp-block-cover.is-dark .wp-block-heading,
.wp-block-cover.is-dark h1,
.wp-block-cover.is-dark h2,
.wp-block-cover.is-dark p {
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

/* Contact Form 7 basic styling */
.wpcf7 form .wpcf7-form-control,
.wpcf7 form input[type="text"],
.wpcf7 form input[type="email"],
.wpcf7 form input[type="tel"],
.wpcf7 form textarea,
.wpcf7 form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 16px;
  background: #fff;
}

.wpcf7 form .wpcf7-submit,
.wpcf7-submit {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 6px;
  border: none;
  background-color: var(--wp--preset--color--primary, #0b3d91);
  color: #fff;
  cursor: pointer;
}

.wpcf7 form .wpcf7-submit:hover {
  background-color: var(--wp--preset--color--secondary, #0f6aa3);
}

.wpcf7-response-output {
  margin-top: 12px;
  border-radius: 6px;
}

.wpcf7-not-valid-tip { color: #b71c1c; }
.wpcf7 form .wpcf7-spinner { margin-left: 8px; }

/* Ensure cover video scales nicely */
.wp-block-cover__video-background {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Full-bleed support for alignfull blocks */
.alignfull,
.wp-block-cover.alignfull,
.wp-block-group.alignfull,
.wp-block-columns.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Ensure cover image backgrounds scale and fill */
.wp-block-cover__image-background {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Prevent navigation link text from wrapping */
.wp-block-navigation,
.wp-block-navigation .wp-block-navigation__container {
  white-space: nowrap;
  flex-wrap: nowrap !important;
}

.wp-block-navigation .wp-block-navigation-item,
.wp-block-navigation .wp-block-navigation-item__content,
.wp-block-navigation a {
  white-space: nowrap !important;
}

/* Header layout: avoid overlap between logo and nav */
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 160px;
  background-color: #eef0f1;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Ensure centering wins over Gutenberg layout utility classes */
.site-header.is-layout-flex,
.site-header.is-content-justification-space-between,
.site-header.is-content-justification-left,
.site-header.is-content-justification-right {
  justify-content: center !important;
}

.site-header .header-left { flex: 0 0 auto; }
.site-header .header-right { flex: 0 0 auto; min-width: 0; }

.site-header .wp-block-image img {
  max-height: 10vh;
  height: 10vh;
  width: auto;
  display: block;
}

.site-header .wp-block-navigation,
.site-header .wp-block-navigation .wp-block-navigation__container {
  justify-content: flex-end;
}

.site-header .wp-block-navigation .wp-block-navigation-item__content,
.site-header .wp-block-navigation a {
  font-size: 21px !important;
}

/* Inactive links are slightly lighter */
.site-header .wp-block-navigation a {
  color: #9a9da0 !important;
}

/* Current page link is darker to indicate the active page */
.site-header .wp-block-navigation .current-menu-item a,
.site-header .wp-block-navigation .current_page_item a,
.site-header .wp-block-navigation a[aria-current="page"],
.site-header .wp-block-navigation a.is-current {
  color: #393738 !important;
}

/* Remove default margin-block-start to eliminate gaps between sections */
:root :where(.is-layout-constrained) > * {
  margin-block-start: 0;
}
:root :where(.is-layout-flow) > * { margin-block-start: 0 !important; }
.wp-site-blocks { gap: 0 !important; }
.wp-site-blocks > * { margin-block-start: 0 !important; }

/* ==========================================================================
   Tablet header: tighten gap & reduce nav font size to prevent overflow
   (targets iPad Pro portrait ~834–1024px and similar tablets)
   ========================================================================== */
@media (min-width: 782px) and (max-width: 1100px) {
  .site-header,
  .site-header.is-layout-flex,
  .site-header.is-content-justification-center,
  .site-header.is-content-justification-space-between {
    gap: 40px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .site-header .wp-block-navigation .wp-block-navigation-item__content,
  .site-header .wp-block-navigation a {
    font-size: 18px !important;
  }
}

/* ==========================================================================
   Intro section ("Full-service civil engineering & planning")
   ========================================================================== */
.intro-section {
  background-color: #eef0f1;
  background-image: linear-gradient(to right,
    #eef0f1 max(960px, 70vw),
    rgba(238,240,241,0.8) max(1040px, 76vw),
    rgba(238,240,241,0.2) max(1080px, 82vw),
    rgba(238,240,241,0) max(1110px, 86vw)
  ), url('/wp-content/themes/barraza/intro-drawing.jpg');
  background-size: auto 100%;
  background-position: right top;
  background-repeat: no-repeat;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 800px;
}

.intro-container-text {
  width: 100% !important;
  max-width: 1200px !important;
  padding: 5em clamp(1.5rem, 4vw, 4rem);
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: left;
}

.intro-container-text > * {
  max-width: 800px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

.intro-section > .wp-block-group,
.intro-section > .is-layout-constrained {
  width: 100%;
}

.intro-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fab912 !important;
  text-align: left !important;
  padding: 0.5em 0 1.6em;
  margin: 0;
  line-height: 1.2;
}

.intro-body {
  font-size: 19px;
  color: #2f3b41;
  line-height: 1.7;
  margin-bottom: 1.2em;
  padding-right: 1em;
}

.intro-container-text .wp-block-buttons {
  justify-content: center !important;
}

.intro-body a {
  color: #145ba2;
  text-decoration: none;
}

.intro-body a:hover {
  text-decoration: underline;
}

.intro-learn-more .wp-block-button__link {
  background-color: #6c757d !important;
  color: #ffffff !important;
  border: none;
  padding: 14px 34px;
  margin: 20px 0;
  border-radius: 4px;
  font-size: 22px;
}

.intro-learn-more .wp-block-button__link:hover {
  background-color: #5a6268 !important;
}

@media (max-width: 1100px) {
  .intro-section {
    background-image: none;
    min-height: unset;
  }
  .intro-container-text {
    max-width: 100% !important;
    padding: 3em 2em;
    margin-left: auto !important;
  }
  .intro-container-text > * {
    max-width: 100% !important;
  }
}

@media (max-width: 767px) {
  .intro-container-text {
    width: 100% !important;
    max-width: 100% !important;
    padding: 2em 1.5em;
    margin-left: 0 !important;
  }
  .intro-title {
    font-size: 1.4rem;
    padding: 0.4em 0;
  }
}

/* ==========================================================================
   Services section
   ========================================================================== */
.services-section {
  background-image: url('/wp-content/themes/barraza/services-bg.png') !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-attachment: fixed !important;
  padding-top: 120px !important;
  padding-bottom: 120px !important;
}

.services-section.has-white-background-color { background-color: transparent !important; }

.services-section h2 {
  margin-top: -0.8em;
  margin-bottom: 1.2em;
  color: #fab912;
  font-weight: 700;
  font-size: 2rem;
}

.services-grid { gap: clamp(16px, 1.8vw, 28px) !important; flex-wrap: wrap !important; max-width: min(1480px, 92vw) !important; }

@media (min-width: 1025px) and (max-width: 1400px) {
  .services-grid {
    gap: 20px !important;
    justify-content: center !important;
  }
  .services-grid .wp-block-column {
    flex: 0 0 calc(33.33% - 14px) !important;
    max-width: calc(33.33% - 14px) !important;
  }
}

.service-card {
  height: 100%;
  text-align: center;
  padding: 32px 22px;
  border-radius: 10px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #e7eaec;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(20, 91, 162, 0.14);
  border-color: #cfe0ef;
  background-color: #e9e9e9eb;
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.service-card .service-icon {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 auto;
}

.service-card h3 {
  margin: 6px 0 4px;
  font-size: 19px;
  color: #145ba2;
  font-weight: 700;
  text-wrap: balance;
}

.service-card h3 a { color: #145ba2; text-decoration: none; }
.service-card:hover h3 a { color: #145ba2; }
.service-card p { font-size: 15px; color: #145ba2; margin: 0; font-weight: 600; }

/* ==========================================================================
   Projects hero
   ========================================================================== */
.projects-hero {
  width: 100vw;
  max-width: 100vw;
  height: 45vh;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-image: url('/wp-content/themes/barraza/header-projects.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: bottom;
}

@media (max-width: 768px) {
  .projects-hero { height: 20vh; }
}

/* ==========================================================================
   Projects section
   ========================================================================== */
.projects-section .wp-block-cover__background {
  background: rgba(238, 240, 241, 0.55) !important;
}

.wp-block-cover.projects-section .wp-block-cover__background.has-background-dim.has-background-dim-100,
.wp-block-cover-image.projects-section .wp-block-cover__background.has-background-dim.has-background-dim-100 {
  background: rgba(238, 240, 241, 0.55) !important;
  opacity: 1 !important;
}
.projects-section {
  padding-top: 140px !important;
  padding-bottom: 140px !important;
}

.projects-section h1,
.projects-section h2 {
  margin-bottom: 1em;
  color: #fab912 !important;
  font-size: 2.2rem;
}

.projects-intro {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto 2.4em;
  color: #2f3b41;
  text-align: center !important;
}

.projects-grid {
  gap: clamp(24px, 3vw, 36px) !important;
  max-width: 1620px !important;
  margin: 0 auto !important;
  flex-wrap: nowrap !important;
}

/* Larger project cards on the Projects archive page (single row, wider cards) */
.projects-grid-large {
  flex-wrap: nowrap !important;
  max-width: 1520px !important;
}

.projects-section:not(.projects-list-section) {
  padding-top: 56px !important;
}

.projects-section:not(.projects-list-section) .wp-block-cover__inner-container {
  max-width: 1520px !important;
  width: 100% !important;
}

.projects-grid-large .wp-block-column {
  flex-basis: calc(25% - 18px) !important;
  flex-grow: 1 !important;
  min-width: 0 !important;
}

.projects-grid-large .project-card__body h3 {
  font-size: 22px;
}

.project-card {
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(33, 37, 41, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(33, 37, 41, 0.2);
}

.project-card__media {
  display: block;
  overflow: hidden;
}

.project-card__media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-card__media img { transform: scale(1.06); }

.project-card__body { padding: 24px !important; }

.project-card__body h3 { margin: 0; color: #145ba2; font-size: 22px; font-weight: 700; text-align: center; }

.project-card__link {
  margin: 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 91, 162, 0);
  transition: background 0.3s ease;
  pointer-events: none;
}

.project-card:hover .project-card__link,
.project-card.is-tapped .project-card__link {
  background: rgba(20, 91, 162, 0.55);
  pointer-events: auto;
}

.project-card__link a {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  background-color: #e87722;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 28px;
  border-radius: 4px;
  text-decoration: none;
  pointer-events: auto;
}

.project-card:hover .project-card__link a,
.project-card.is-tapped .project-card__link a {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive: tablet
   ========================================================================== */
@media (max-width: 1024px) {
  .services-grid { flex-wrap: wrap !important; }
  .services-grid .wp-block-column { flex-basis: calc(50% - 18px) !important; }
  .projects-grid { flex-wrap: wrap !important; }
  .projects-grid .wp-block-column { flex-basis: calc(50% - 12px) !important; }

  /* background-attachment:fixed is broken on iOS/iPadOS — disable it for tablet/mobile */
  .services-section {
    background-attachment: scroll !important;
    background-size: cover !important;
  }
}

/* Remove gaps between full-bleed sections */
main.wp-block-group > * { margin-top: 0 !important; margin-bottom: 0 !important; }

/* Footer logo size & position — single source of truth for all pages */
.footer-logo img {
  max-width: 400px !important;
  width: 100%;
  margin-left: -36px;
}

/* Footer nav links: vertical spacing between links */
.footer-nav p {
  margin-top: 0 !important;
  margin-bottom: 16px !important;
}
.footer-nav p:last-of-type {
  margin-bottom: 0 !important;
}

/* Footer contact info grouping */
.footer-contact-info p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
/* Address (2 lines) tight, then a gap */
.footer-contact-info .footer-address {
  line-height: 1.5;
  margin-bottom: 1.4em !important;
}
/* Phone + email grouped together, then a gap before the button */
.footer-contact-info .footer-phone {
  margin-bottom: 4px !important;
}
.footer-contact-info .footer-email {
  margin-bottom: 1.6em !important;
}

/* Footer copyright bar */
.site-footer-bar {
  background-color: #000000 !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  line-height: 20px;
}

.site-footer-bar p,
.site-footer-bar a {
  color: #ffffff !important;
  font-size: 16px;
  margin: 0;
}

/* Join Our Team section */
.join-team-section {
  min-height: 47vh !important;
}

.join-team-section .wp-block-cover__image-background {
  object-position: center bottom;
  transform: scale(1.05);
  transform-origin: center bottom;
}

.wp-block-cover.join-team-section .wp-block-cover__background.has-background-dim.has-background-dim-80,
.wp-block-cover-image.join-team-section .wp-block-cover__background.has-background-dim.has-background-dim-80 {
  background: linear-gradient(to right, rgba(47, 59, 65, 0.97) 70%, rgba(88, 114, 124, 0.92)) !important;
  opacity: 0.9 !important;
}

.join-team-section h2 {
  color: #fab912 !important;
  font-size: 2.2rem;
}

.join-team-section .wp-block-cover__inner-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.join-team-section .wp-block-columns {
  align-items: center;
  padding-left: 5% !important;
  padding-right: 8% !important;
}

.join-team-section .wp-block-columns .wp-block-column:first-child {
  flex-basis: 68% !important;
}

.join-team-section .wp-block-columns .wp-block-column:last-child {
  flex-basis: 55% !important;
  display: flex;
  justify-content: flex-end;
  padding-right: 0%;
}

.join-team-section .wp-block-column p {
  font-size: 20px;
  margin-top: 1em;
  margin-bottom: 0.6em;
  max-width: 100% !important;
  position: relative;
  top: 50px;
}

.join-team-section .wp-block-buttons {
  justify-content: center !important;
  margin-top: 1em !important;
  position: relative;
  top: 70px;
}

@media (max-width: 900px) {
  .join-team-section {
    min-height: auto !important;
  }

  .join-team-section .wp-block-cover__inner-container {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .join-team-section .wp-block-columns .wp-block-column:last-child {
    display: none !important;
  }

  .join-team-section .wp-block-columns .wp-block-column:first-child {
    width: 100% !important;
    flex-basis: 100% !important;
  }

  .join-team-section .wp-block-column p {
    top: 0;
  }

  .join-team-section .wp-block-buttons {
    top: 0;
    margin-top: 1.25rem !important;
  }
}

.join-team-section .is-style-rounded img {
  max-width: 350px !important;
}

.careers-learn-more .wp-block-button__link {
  border-radius: 4px !important;
  background-color: #6c757d !important;
  color: #ffffff !important;
  padding: 12px 32px;
  font-size: 19px !important;
}

/* LinkedIn circle button */
.linkedin-circle .wp-block-button__link {
  width: 46px !important;
  height: 46px !important;
  min-width: unset !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
}

/* Responsive: mobile */
@media (max-width: 781px) {
  .services-section { padding-top: 56px !important; padding-bottom: 56px !important; }
  .services-grid .wp-block-column { flex-basis: 100% !important; }
  .projects-section { padding-top: 56px !important; padding-bottom: 56px !important; }
  .projects-grid .wp-block-column { flex-basis: 100% !important; }

  /* Mobile header: logo left, hamburger right */
  .site-header,
  .site-header.is-layout-flex,
  .site-header.is-content-justification-center {
    justify-content: space-between !important;
    gap: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Hide the responsive container when the menu is not open */
  .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
    visibility: hidden !important;
  }

  /* Hamburger toggle — always visible, acts as open AND close */
  .wp-block-navigation__responsive-container-open {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 42px !important;
    height: 38px !important;
    padding: 4px 8px !important;
    background: transparent !important;
    border: 1px solid rgba(57, 55, 56, 0.35) !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    z-index: 10000 !important;
    position: relative !important;
  }

  .wp-block-navigation__responsive-container-open svg {
    fill: #393738 !important;
    width: 22px !important;
    height: 22px !important;
  }

  /* Hide the X close button — hamburger handles both open and close */
  .wp-block-navigation__responsive-container-close {
    display: none !important;
  }

  /* Dropdown overlay — appears below header, not full-screen */
  .wp-block-navigation__responsive-container.is-menu-open {
    position: fixed !important;
    top: var(--header-h, calc(10vh + 12px)) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-height: calc(100vh - var(--header-h, calc(10vh + 12px))) !important;
    bottom: auto !important;
    background-color: #eef0f1 !important;
    border-top: 1px solid rgba(57, 55, 56, 0.15) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
    z-index: 9999 !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  /* Content wrapper inside dropdown */
  .wp-block-navigation__responsive-container-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    position: relative !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }


  /* Nav links container */
  .wp-block-navigation__responsive-container .wp-block-navigation__container,
  .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    --navigation-layout-justify: flex-start !important;
  }

  /* Individual nav items */
  .wp-block-navigation__responsive-container .wp-block-navigation-item,
  .wp-block-navigation__responsive-container-content .wp-block-navigation-item {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: flex-start !important;
    text-align: left !important;
    border-bottom: 1px solid rgba(57, 55, 56, 0.1) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Nav link text */
  .wp-block-navigation__responsive-container .wp-block-navigation-item__content,
  .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
    display: block !important;
    padding: 14px 24px !important;
    font-size: 18px !important;
    color: #9a9da0 !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Hover */
  .wp-block-navigation__responsive-container .wp-block-navigation-item:hover .wp-block-navigation-item__content,
  .wp-block-navigation__responsive-container-content .wp-block-navigation-item:hover .wp-block-navigation-item__content {
    color: #393738 !important;
    background-color: rgba(57, 55, 56, 0.04) !important;
  }

  /* Current/active page */
  .wp-block-navigation__responsive-container .current-menu-item .wp-block-navigation-item__content,
  .wp-block-navigation__responsive-container .wp-block-navigation-item a[aria-current="page"] {
    color: #393738 !important;
  }
}

/* ==========================================================================
   About page
   ========================================================================== */
.about-hero {
  width: 100vw;
  max-width: 100vw;
  height: 45vh;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-image: url('/wp-content/themes/barraza/header-about.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.about-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
}

.about-title {
  color: #145ba2;
  font-weight: 800;
  font-size: calc(1.3rem + 0.6vw);
  line-height: 1.3;
  margin: 0;
}
.about-title--center { text-align: center; }

.about-page-title {
  font-weight: 800;
  font-size: 2rem;
  color: #145ba2;
  text-align: center;
  margin: 0;
}

/* Intro section */
.about-intro {
  background-color: #eef0f1;
  padding: 3rem 0;
}
.about-intro__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 2em;
}
.about-intro__inner { max-width: 1260px; }
.about-intro__text { width: 65%; }
.about-intro__text p {
  margin: 1.5rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #212529;
}
.about-intro__card {
  margin-left: auto;
  margin-right: 2em;
}

/* Profile card (Bootstrap-style) */
.profile-card {
  width: 18rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.175);
  border-radius: 0.375rem;
  overflow: hidden;
}
.profile-card__img {
  display: block;
  width: 100%;
  height: auto;
}
.profile-card__body { padding: 1rem; }
.profile-card__name {
  font-weight: 700;
  color: #145ba2;
  margin-bottom: 0.5rem;
}
.profile-card__role {
  color: #212529;
  padding-bottom: 0.5rem;
}
.profile-card__bio-btn {
  display: inline-block;
  color: #fff;
  background-color: #0d6efd;
  border: 1px solid #0d6efd;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
}
.profile-card__bio-btn:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

/* History section */
.about-history { padding: 4.5rem 0; }
.about-history .about-inner { max-width: 1260px; }
.about-history__lead {
  margin: 1.5rem 0 0;
  padding-bottom: 3rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #212529;
}
.about-history__values {
  display: flex;
  gap: 1.5rem;
}
.about-value { flex: 1; }
.about-value__title {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #212529;
}
.about-value p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #212529;
}

/* Team section */
.about-team {
  padding: 3.5rem 0 5rem;
  background-color: #eef0f1;
}
.about-team__lead {
  margin: 1.5rem 0 2rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #212529;
  text-align: left;
}
.about-team__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 280px));
  justify-content: center;
  gap: 2rem;
  justify-items: stretch;
  width: min(1320px, 94vw);
  margin-left: 50%;
  transform: translateX(-50%);
}
.about-team__grid .profile-card { width: 100%; max-width: 280px; }

/* Certifications & memberships */
.about-certs { padding: 1.5rem 0 3rem; }
.about-certs__intro {
  padding: 1.5rem;
  margin: 0 auto;
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  color: #212529;
}
.about-certs__list {
  list-style: none;
  padding: 0 0.5rem;
  margin: 0 0 1.5rem;
  text-align: center;
  font-weight: 800;
  color: #212529;
}
.about-certs__list li { margin-bottom: 0.25rem; }
.about-certs__images {
  display: flex;
  justify-content: center;
  gap: 2em;
  padding-bottom: 3em;
  flex-wrap: wrap;
}
.about-certs__image img { height: 150px; width: auto; }

.about-memberships {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75em;
  width: min(1320px, 94vw);
  margin-left: 50%;
  transform: translateX(-50%);
  padding: 1em 1em 0;
  margin-bottom: 2em;
}
.about-memberships__item {
  width: 160px;
  padding: 0.75em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-memberships__item img {
  max-width: 100%;
  height: auto;
}

/* Bio modal */
.bio-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.bio-modal.is-open { display: flex; }
.bio-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.bio-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 0.5rem;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
}
.bio-modal__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #dee2e6;
}
.bio-modal__title {
  margin: 0;
  color: #145ba2;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
}
.bio-modal__body {
  padding: 1.25rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #212529;
}
.bio-modal__body p { margin: 0; }
.bio-modal__footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #dee2e6;
  display: flex;
  justify-content: flex-end;
}
.bio-modal__close {
  color: #fff;
  background-color: #6c757d;
  border: 1px solid #6c757d;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  cursor: pointer;
}
.bio-modal__close:hover { background-color: #5c636a; border-color: #565e64; }
body.bio-modal-open { overflow: hidden; }

/* About responsive */
@media (max-width: 1399px) {
  .about-team__grid { grid-template-columns: repeat(2, minmax(0, 280px)); }
}
@media (max-width: 991px) {
  .about-intro__inner { display: block; text-align: center; }
  .about-intro__text { width: 100%; }
  .about-intro__card {
    display: flex;
    justify-content: center;
    margin: 2rem 0 0;
  }
  .about-team__lead { text-align: center; }
  .about-certs__images { flex-direction: column; align-items: center; }
  .about-certs__image { margin-bottom: 1.5rem; }
}
@media (max-width: 767px) {
  .about-team__grid { grid-template-columns: 1fr; justify-items: center; }
  .about-history__values { display: block; }
  .about-value { margin-bottom: 1.5rem; }
  .about-hero { height: 20vh; }
}

/* ==========================================================================
   Single Project page — image carousel
   ========================================================================== */
.project-carousel,
.alignfull.project-carousel {
  display: block !important;
  position: relative !important;
  width: min(calc(100vw - 48px), 1320px) !important;
  max-width: 1320px !important;
  margin-top: 24px !important;
  margin-bottom: 0 !important;
  margin-left: calc(50% - (min(calc(100vw - 48px), 1320px) / 2)) !important;
  margin-right: calc(50% - (min(calc(100vw - 48px), 1320px) / 2)) !important;
  left: auto !important;
  transform: none !important;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  touch-action: pan-y;
}
.project-carousel__viewport {
  position: relative;
  width: 100%;
  height: clamp(280px, 56vh, 620px);
}
.project-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 0;
}
.project-carousel__slide.is-active {
  opacity: 1;
  z-index: 1;
}
.project-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #145ba2;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.project-carousel__arrow:hover { background: #ffffff; }
.project-carousel__arrow:active { transform: translateY(-50%) scale(0.94); }
.project-carousel__arrow--prev { left: 18px; }
.project-carousel__arrow--next { right: 18px; }
.project-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 3;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.project-carousel__dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.project-carousel__dot.is-active {
  background: #145ba2;
  transform: scale(1.15);
}

@media (max-width: 768px) {
  .project-carousel__arrow { width: 38px; height: 38px; font-size: 1.4rem; }
  .project-carousel__arrow--prev { left: 10px; }
  .project-carousel__arrow--next { right: 10px; }
}

/* ==========================================================================
   Single Project page — body content
   ========================================================================== */
.project-body {
  max-width: 880px;
  margin: 0 auto;
  padding-top: 56px !important;
  padding-bottom: 40px !important;
}
.project-body .project-title {
  color: #145ba2 !important;
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  margin: 0 0 1.25rem;
}
.project-summary {
  list-style: none;
  margin: 0 auto 2rem;
  padding: 0;
  text-align: center;
}
.project-summary li {
  padding: 0.3rem 0;
  font-size: 1.1rem;
  color: #212529;
}
.project-summary li .fw-bold {
  font-weight: 700;
  color: #393738;
  margin-right: 0.4rem;
}
.project-body .project-lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #145ba2;
  font-weight: 600;
}
.project-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #212529;
  margin-bottom: 1.25rem;
}

/* Projects section heading on the single-project page (orange, matches home page) */
.projects-list-section h2 {
  color: #fab912 !important;
}

@media (max-width: 781px) {
  .project-body { padding-top: 40px !important; }
}

/* ==========================================================================
   Services page
   ========================================================================== */
.services-hero {
  width: 100vw;
  max-width: 100vw;
  height: 45vh;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-image: url('/wp-content/themes/barraza/services/header-services.jpeg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  overflow: hidden;
}

.svc-section {
  padding: 3rem 0;
}
.svc-section--grey {
  background-color: #eef0f1;
}

.services-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
}

.services-page-title {
  font-weight: bolder;
  font-size: xx-large;
  color: #145ba2;
  text-align: center;
  margin: 0 0 1.5rem;
}

.services-intro {
  font-size: 1rem;
  line-height: 1.6;
  color: #212529;
  margin: 0;
}

.service-row {
  display: flex;
  align-items: flex-start;
  padding-top: 3rem;
}

.service-detail-image {
  max-height: 30vh;
  max-width: 45vh;
  min-height: 10vh;
  border-radius: 0.375rem;
  object-fit: cover;
  padding-bottom: 1.5em;
  margin-right: 1em;
  flex-shrink: 0;
}

.service-info {
  flex: 1;
  padding: 0 1em 1em;
}

.service-header {
  display: flex;
  align-items: center;
}

.service-title {
  font-size: calc(1.275rem + 0.3vw);
  font-weight: 500;
  line-height: 1.2;
  color: #212529;
  margin: 0;
}

.service-icon {
  height: 3.5em;
  margin-left: 2.5em;
}

.service-info p {
  font-size: 1rem;
  line-height: 1.6;
  color: #212529;
  margin: 1rem 0;
}

.service-subtitle {
  display: block;
  font-weight: bolder;
  color: #212529;
  margin-top: 1rem;
}

.service-list {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 1rem;
}
.service-list li {
  padding: 0.15rem 0;
  color: #212529;
}

#water-resources .service-detail-image {
  padding-left: 7.5vh;
  padding-right: 7.5vh;
}

@media (max-width: 767.98px) {
  .services-hero { height: 20vh; }
  .svc-section { padding: 2rem 0; }
  .service-row { display: block; padding-top: 2rem; }
  .service-detail-image {
    width: 100%;
    max-height: none;
    object-fit: cover;
    margin: 0 0 1em;
  }
  #water-resources .service-detail-image {
    padding-left: 0;
    padding-right: 0;
  }
  .service-icon { height: 4em; margin-left: 1.5em; }
}

/* ==========================================================================
   Careers page
   ========================================================================== */
.careers-hero {
  width: 100vw;
  max-width: 100vw;
  height: 45vh;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-image: url('/wp-content/themes/barraza/careers-header.jpeg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  overflow: hidden;
}

.careers-join {
  background-image: linear-gradient(to right, rgba(47, 59, 65, 0.9) 75%, rgba(88, 114, 124, 0.8)), url('/wp-content/themes/barraza/careers-join-bg.jpeg');
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 68vh;
  color: #ffffff;
  padding-left: 2em;
  padding-right: 2em;
  box-sizing: border-box;
  overflow: hidden;
}

.careers-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
}

.careers-flex {
  display: flex;
}

.careers-text {
  width: 50%;
}

.careers-text p,
.careers-expect,
.careers-cta {
  font-size: 1rem;
  line-height: 1.6;
}

.careers-title {
  padding-top: 2em;
  margin: 0;
  color: #fab912;
  font-size: xx-large;
  font-weight: bolder;
}

.careers-subtitle {
  font-size: x-large;
  font-weight: 700;
  color: #fab912;
  padding-bottom: 0.5em;
}

.careers-expect {
  margin-top: 1rem;
}

.careers-list {
  margin: 0.5rem 0 1rem;
}

.careers-list li {
  padding: 0.1rem 0;
}

.careers-cta {
  padding-bottom: 1.5rem;
}

.careers-join a {
  color: #fab912;
}

.careers-side-image {
  margin-top: 1em;
  margin-left: 1em;
  width: 45%;
  background-image: url('/wp-content/themes/barraza/barraza-circle.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: top;
}

.careers-disclaimer {
  font-weight: lighter;
  padding-bottom: 2.5em;
}

@media (max-width: 767.98px) {
  .careers-hero { height: 20vh; }
  .careers-side-image { display: none; }
  .careers-text { width: 100%; }
  .careers-flex { flex-wrap: wrap; }
  .careers-join {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-right: 2em;
    box-sizing: border-box;
  }
}

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-hero {
  width: 100vw;
  max-width: 100vw;
  height: 45vh;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-image: url('/wp-content/themes/barraza/contact-header.jpeg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top center;
  overflow: hidden;
}

.contact-page-title {
  color: #145ba2;
  font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  text-align: center;
  margin: 0 0 1.25rem;
}

.contact-intro {
  font-size: 1rem;
  line-height: 1.7;
  color: #212529;
  max-width: 820px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

/* Contact form — centered, two-column field layout matching reference */
.contact-form-wrap {
  max-width: 960px;
  margin: 0 auto;
}

.contact-form-wrap .wpcf7-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3em;
  row-gap: 0;
}

.contact-form-wrap .wpcf7-form > p:has(textarea),
.contact-form-wrap .wpcf7-form > p:has(.wpcf7-submit),
.contact-form-wrap .wpcf7-form > .wpcf7-response-output {
  grid-column: 1 / -1;
}

/* Map + office info section */
.contact-location {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 3em;
  flex-wrap: nowrap;
}

.contact-map {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  line-height: 0;
  flex: 1 1 400px;
  min-width: 0;
  max-width: 100%;
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
}

.contact-office {
  flex: 0 0 260px;
  min-width: 220px;
}

.contact-col-title {
  color: #145ba2;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.contact-info-details p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #212529;
}

.contact-info-details strong {
  display: block;
  color: #393738;
  font-weight: 700;
}

.contact-info-details a {
  color: #145ba2;
}

/* ==========================================================================
   Contact Form 7 overrides — brand-styled
   ========================================================================== */
.wpcf7-form p {
  margin: 0 0 1rem;
}

.wpcf7-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #393738;
  margin-bottom: 0.3rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: auto;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
  border-color: #145ba2;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(20, 91, 162, 0.2);
}

.wpcf7-form textarea {
  min-height: 130px;
  resize: vertical;
}

.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit {
  display: inline-block;
  padding: 0.6rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background-color: #145ba2;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-top: 0.5rem;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form .wpcf7-submit:hover {
  background-color: #0e3d6b;
}

.wpcf7-form .wpcf7-not-valid-tip {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.wpcf7 .wpcf7-response-output {
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.wpcf7 .wpcf7-response-output.wpcf7-mail-sent-ok {
  border-color: #198754;
  background-color: #d1e7dd;
  color: #0a3622;
}

.wpcf7 .wpcf7-response-output.wpcf7-validation-errors,
.wpcf7 .wpcf7-response-output.wpcf7-mail-sent-ng {
  border-color: #dc3545;
  background-color: #f8d7da;
  color: #58151c;
}

/* Contact page responsive */
@media (max-width: 767.98px) {
  .contact-hero { height: 20vh; }
  .contact-form-wrap .wpcf7-form { grid-template-columns: 1fr; }
  .contact-location { flex-wrap: wrap; gap: 2em; }
  .contact-map { flex: 1 1 100%; }
  .contact-map iframe { height: 300px; }
  .contact-office { flex: 1 1 100%; min-width: 0; text-align: center; }
}
