/* =================================
   Globalscan — styles.css
   ================================= */

/* -------- Base / Reset -------- */
html { scroll-behavior: smooth; box-sizing: border-box; }
:focus:not(:focus-visible) { outline: none; }
*, *::before, *::after { box-sizing: inherit; }

:root {
  /* Colors */
  --brand: #2B6BAF;
  --ink: #2B6BAF;
  --paper: #ffffff;
  --paper-2: #f5f7fb;

  /* Spacing */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;

  /* Layout */
  --container-max: 1120px;
  --container-pad: 16px;
  --gutter: 24px;
}

@media (min-width: 768px) {
  :root { --container-pad: 24px; --gutter: 24px; }
}

body {
  margin: 0;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* -------- Typography -------- */
:root {
  --heading-xl: clamp(32px, 4vw, 49px);
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-16);
  line-height: 1.2;
}

h1 {
  font-size: var(--heading-xl);
  color: #fff;
}

h2 {
  font-size: var(--heading-xl);
  color: var(--ink);
}

.h4, h4, .eyebrow {
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--ink);
  margin-bottom: 0;
  font-weight: bold;
}

.lead {
  font-size: 18px;
}

.section__lead {
  max-width: 65ch;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: none;
}

.text-light {
  color: #fff;
}


/* -------- Section Titles (with right-aligned rule) -------- */
.section__title {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  white-space: nowrap;
  color: var(--ink);
}

.section__title::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--brand);
  width: 40%;
  margin-left: auto;
  flex: 0 0 auto;
}

.section__title--light { color: #fff; }
.section__title--light::after { background: #fff; }

.section__title--rule { min-height: 1px; }

@media (max-width: 767.98px) {
  .section__title { white-space: normal; gap: var(--space-8); }
  .section__title::after { content: none; }
}

/* -------- Grid / Layout -------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  width: 100%;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin-left: calc(var(--gutter) * -0.5);
  margin-right: calc(var(--gutter) * -0.5);
}

#technologies .row, #about .row, #locations .row { --gutter: 44px; }

[class*="col-"] {
  padding-left: calc(var(--gutter) * 0.5);
  padding-right: calc(var(--gutter) * 0.5);
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
}

/* Gutter helpers */
.row.g-16 > [class*="col-"] { padding-top: 8px; padding-bottom: 8px; }
.row.g-24 > [class*="col-"] { flex: 0 0 50%; max-width: 50%; }
@media (max-width: 767.98px) {
  .row.g-24 > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
}

/* Width helpers */
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6  { flex: 0 0 50%;  max-width: 50%; }
.col-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }

/* Small breakpoint used in HTML (.col-sm-6) */
@media (min-width: 576px) {
  .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
}

/* Medium / Large widths used in HTML */
@media (min-width: 768px) {
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-8 { flex: 0 0 66.6667%; max-width: 66.6667%; } /* used in HERO */
  .col-md-9 { flex: 0 0 75%; max-width: 75%; }
}

@media (min-width: 992px) {
  .col-lg-5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-7 { flex: 0 0 58.3333%; max-width: 58.3333%; }
}

.ai-center { align-items: center; }
.ai-start  { align-items: flex-start; }

/* One-column helper (Privacy/Terms) */
.row.onecol > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }

/* -------- Header / Nav -------- */
.site-header { background: #fff; border-bottom: 2px solid #2b6baf; }
.site-header--no-border { border-bottom: none; }

.logo { display: inline-block; padding: var(--space-16) 0; }
.logo-img { display: block; height: 28px; width: auto; }

.nav { display: flex; justify-content: flex-end; align-items: flex-end; }
.nav__toggle { display: none !important; }
.nav__menu { list-style: none; margin: 0; padding: 0; display: none !important; width: auto; }
.nav__menu a { display: block; padding: 12px; color: var(--brand); font-weight: 700; }
.nav__menu a:hover, .nav__menu a:focus { color: #7DA8D0; }

@media (min-width: 768px) {
  .nav__menu { display: flex !important; gap: 8px; }
}

/* -------- Hero -------- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  color: #fff;
  padding: 0;
  background:
    linear-gradient(to right,
      rgba(0,16,38,0.85) 0%,
      rgba(0,32,76,0.70) 35%,
      rgba(0,48,114,0.55) 60%,
      rgba(0,64,152,0.40) 100%),
    var(--hero-image, url('images/hero.webp')) center/cover no-repeat;
}

.hero__copy { max-width: none; }
.hero__title { margin-bottom: var(--space-16); color: #fff; }

.hero__title {
  word-wrap: break-word;
}

.hero__lead { color: #ffffff; }

.btn-group { margin-top: var(--space-24); display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 767.98px) {
  .hero {
    background:
      linear-gradient(to bottom,
        rgba(0,16,38,0.90) 0%,
        rgba(0,32,76,0.80) 45%,
        rgba(0,64,152,0.50) 100%),
      var(--hero-image, url('images/hero.webp')) center/cover no-repeat;
  }
}

/* -------- Buttons -------- */
.btn { display: inline-block; padding: 12px 16px; font-weight: 700; border: 1px solid transparent; font-size: 16px; }
.btn--light { background: #ffffff; color: var(--brand); border-color: #ffffff; }
.btn--light:hover, .btn--light:focus { background: transparent; color: #ffffff; border-color: #ffffff; }

.btn--outline { background: transparent; color: #ffffff; border-color: #ffffff; }
.btn--outline:hover, .btn--outline:focus { background: #ffffff; color: var(--brand); border-color: #ffffff; }

/* -------- Sections / Cards / Media -------- */
.section { padding: var(--space-56) 0; background: #fff; }
.section--blue { background: var(--brand); }
.section--blue .section__title { color: #fff; }

.card {
  position: relative;
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Images inside cards */
.card--image {
  flex: 1 1 auto;
  display: flex;
}
.card--image img.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Cards in blue sections */
.card--blue { background: transparent; }
.card--blue h3, .card--blue p { color: #fff; }

/* Media (Locations) */
.media-photo {
  height: 300px;
  background: url('images/locations.webp') center/cover no-repeat;
}

/* -------- Forms -------- */
.form { max-width: 100%; }
.label { display: block; color: #fff; margin-bottom: 6px; font-size: 16px; }

.input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #fff;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea.input { min-height: 140px; resize: vertical; }

input.input, textarea.input, select.input { font-family: inherit; font-size: 14px; line-height: 1.55; }
.form .col-12:last-child { margin-top: 12px; }

#contactForm .input:required::placeholder { color: #d93025; opacity: 1; }
#contactForm .input:required:placeholder-shown { border-color: #d93025; }
#contactForm .input:focus, #contactForm .input:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 1px 1px rgba(0,0,0,.075) inset, 0 0 8px rgba(43,107,175,.6);
  outline: 0;
}
#contactForm .input.is-invalid { border-color: #d93025; }
#contactForm .input.is-invalid::placeholder { color: #d93025; opacity: 1; }

.checkbox { display: inline-flex; gap: 10px; align-items: flex-start; color: #fff; }
.checkbox a { color: #fff; text-decoration: underline; }
.checkbox a:hover, .checkbox a:focus { color: rgba(255,255,255,0.85); }
.checkbox input[type="checkbox"] { width: 20px; height: 20px; margin: 0; }
#consentError.field-error { color: #d93025; display: none; font-size: 14px; margin-top: 8px; }

/* LinkedIn card (default for blue sections) */
.linkedin-card {
  padding: var(--space-24);
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
}
.linkedin-title {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: bold;
  margin: 0;
  color: inherit;
}
.linkedin-text { font-size: 16px; color: #fff; }
.linkedin-btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.linkedin-btn .linkedin-icon { flex-shrink: 0; }

/* -------- Footer -------- */
.site-footer { background: var(--brand); color: #fff; ; padding: var(--space-24) 0; }
.footer-row { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-text { color: #fff; font-size: 14px; line-height: 1.4; }
.site-footer address { font-style: normal; white-space: pre-line; }
.footer-right { display: flex; align-items: center; gap: 12px; }
.footer-right a:hover { color: rgba(255,255,255,0.7); }
.footer-sep { color: #fff; }

/* -------- Utilities -------- */
.mt-24 { margin-top: var(--space-24); }

/* =================================
   Section-specific overrides
   ================================= */

/* LOCATIONS: blue background + white text + white rule */
#locations.section { background: var(--brand); color: #fff; }
#locations .section__title { color: #fff; }
#locations .section__title::after { background: #fff; }
#locations h3, #locations p { color: #fff; }

#contact.section { background: #fff; color: var(--brand); border-top: 2px solid var(--brand); }
#contact .section__title { color: var(--brand); }
#contact .section__title::after { background: var(--brand); }
#contact p, #contact .label, #contact h3, #contact a { color: var(--brand); }

/* Inputs on contact */
#contact .input { border: 1px solid var(--brand); background: #fff; color: var(--brand); }
#contact .input:focus { border-color: var(--brand); box-shadow: 0 0 6px rgba(43,107,175,.4); }

/* Checkbox + links on contact */
#contact .checkbox, #contact .checkbox a { color: var(--brand); }

/* Buttons on contact */
#contact .btn { border-color: var(--brand); color: var(--brand); background: #fff; }
#contact .btn:hover, #contact .btn:focus { background: var(--brand); color: #fff; }

/* LinkedIn card on contact (light theme) */
#contact .linkedin-card { background: #fff; color: var(--brand); }
#contact .linkedin-title, #contact .linkedin-text { color: var(--brand); }
#contact .linkedin-btn { border: 1px solid var(--brand); color: var(--brand); }
#contact .linkedin-btn:hover { background: var(--brand); color: #fff; }

/* ABOUT (Team): white background + blue text; */
#about.section { background: #fff; color: var(--brand); }
#about .section__title { color: var(--brand); }

#about .section__title--rule::after {
  background: var(--brand);
  width: 40%;
  margin-left: auto;
  flex: 0 0 auto;
}

#about .section__title:not(.section__title--rule)::after { content: none; }

#about .section__lead, #about p, #about h3, #about .eyebrow { color: var(--brand); }

/* Remove gutters only for the Team cards grid */
#about .row.team-cards {
  margin-left: 0;
  margin-right: 0;
}

#about .row.team-cards > [class*="col-"] {
  padding: 0;
}

/* TEAM (About) — text-only cards on brand blue, images stretch */
#about .card--blue:not(.card--image) {
  background: var(--brand);
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

#about .card--blue:not(.card--image) h3,
#about .card--blue:not(.card--image) p {
  color: #fff;
  margin: 0 0 var(--space-16);
}

/* TEAM section text-only cards */
#about .card--blue:not(.card--image) h3 {
  font-size: 16px;
}

#about .card--blue:not(.card--image) p {
  font-size: 12px;
}


#about .card--blue:not(.card--image) p:last-child {
  margin-bottom: 0;
}

#about .row.team-cards {
  margin-left: 0;
  margin-right: 0;
}
#about .row.team-cards > [class*="col-"] {
  padding: 0;
}

#about .card--image {
  flex: 1 1 auto;
}
#about .card--image .card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card--blue h3, .card--blue p { color: #fff; }

#about .row.g-24 {
  align-items: stretch;
}
#about .col-lg-7,
#about .col-lg-5 {
  display: flex;
  flex-direction: column;
}

#about .section__title--rule::after {
  background: var(--brand);
  width: 40%;
  margin-left: 0;
  margin-right: auto;
  flex: 0 0 auto;
}

/* ================================
   Mobile adjustments
   ================================ */
@media (max-width: 767.98px) {

  h2.section__title.section__title--rule {
    display: none;
  }

  #about .col-12.col-lg-5 {
    background: var(--brand);
    padding-bottom: 48px;
  }

  #about .card--blue:not(.card--image) {
    padding-left: 0;
    padding-right: 0;
  }

  #about.section {
    padding-bottom: 0;
  }


  #locations.section {
    border-top: 2px solid white;
  }


  #about .card--blue:not(.card--image) p {
    font-size: 16px;
    text-align: left;
   }

#about .card--blue:not(.card--image) h3 {
      text-align: left;
      font-size: 18px;
   }
}


.br-md { display: none; }

@media (min-width: 768px) {
  .br-md { display: inline; }
}

/* Technologies page specifics */
#technologies .section__title { color: var(--ink); }

#technologies .tech-photo {
  display: block;
  width: 100%;
  height: auto;
  margin-top: var(--space-16);
}

.section--no-top {
  padding-top: 0 !important;
}

.tech-photo {
  display: block;
  width: 100%;
  height: auto;
  margin-top: var(--space-40);
}



@media (min-width: 768px) {
  .hero .col-md-8 {
    flex: 0 0 75%;
    max-width: 75%;
  }
}

@media (min-width: 992px) {
  .hero .col-md-8 {
    flex: 0 0 85%;
    max-width: 85%;
  }
}

#about .row.team-cards {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-24);
}

@media (min-width: 576px) {
  #about .row.team-cards > .col-sm-6 {
    flex: 0 0 calc(50% - var(--space-24) / 2);
    max-width: calc(50% - var(--space-24) / 2);
  }
}

@media (max-width: 575.98px) {
  #about .row.team-cards > [class*="col-"] + [class*="col-"] {
    margin-top: var(--space-24);
  }
}

#about .card--image .card-img.card-img--h200 {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.u-underline,
.u-underline:hover,
.u-underline:focus {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
}

@media (max-width: 767.98px) {
  #about .card--image .card-img.card-img--h200 {
    height: 100% !important;
  }
}

@media (max-width: 767.98px) {
  #about .row.team-cards > [class*="col-"] {
    display: flex;
  }
  #about .card {
    flex: 1;
  }
}


@media (max-width: 767.98px) {

  #about .row.team-cards {
    display: flex;
    flex-wrap: wrap;
    row-gap: var(--space-24);
  }
  #about .row.team-cards > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    display: flex;
  }

  #about .row.team-cards > [class*="col-"]:nth-child(1) { order: 1; }
  #about .row.team-cards > [class*="col-"]:nth-child(3) { order: 2; }
  #about .row.team-cards > [class*="col-"]:nth-child(4) { order: 3; }
  #about .row.team-cards > [class*="col-"]:nth-child(2) { order: 4; }


  #about .row.team-cards > [class*="col-"] + [class*="col-"] { margin-top: 0; }
}