/* =========================================================
   COBOLworx Theme Stylesheet
   ---------------------------------------------------------
   Site-wide theme, homepage sections, secondary page modules,
   and responsive behavior.
   ========================================================= */

/* =========================================================
   Design Tokens
   ========================================================= */
:root {
  --cream: #f2e4c8;
  --cream-light: #fff4df;
  --ink: #062331;
  --teal: #0f6670;
  --teal-dark: #052e36;
  --red: #b4211b;
  --gold: #e1a843;
  --shadow: 0 18px 40px rgba(0, 0, 0, .22);
  --max: 1390px;

  --card-bg: rgba(255, 250, 238, .9);
  --card-border: 1px solid rgba(6, 35, 49, .16);
  --card-shadow: 0 14px 28px rgba(68, 43, 16, .12);
  --card-radius: 8px;

  --impact: Impact, 'Arial Narrow', Arial, sans-serif;
}

/* =========================================================
   Base / Reset
   ========================================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #0b2228;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  z-index: 9999;
  padding: .7rem 1rem;
  background: #fff;
  color: #000;
}

.skip-link:focus {
  left: 1rem !important;
  top: 1rem;
}

/* =========================================================
   Shared Components
   ========================================================= */
.header-cta,
.btn,
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 4px;
  font-family: var(--impact);
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.card,
.service-card,
.feature-card,
.contact-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

/* =========================================================
   Header / Navigation
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #fff2da 0%, var(--cream) 100%);
  border-bottom: 1px solid rgba(6, 35, 49, .15);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}

.header-inner {
  max-width: var(--max);
  min-height: 112px;
  margin: 0 auto;
  padding: 8px 28px;
  display: grid;
  grid-template-columns: 350px 1fr auto;
  align-items: center;
  gap: 28px;
}

.brand {
  display: block;
  width: min(350px, 30vw);
  overflow: visible;
}

.brand img {
  width: 100%;
  max-height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .2));
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.main-nav a {
  position: relative;
  margin: 0 14px;
  padding: 1rem 0;
  color: var(--ink);
  font-family: var(--impact);
  font-size: 1rem;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--red);
}

.main-nav a.active::after,
.main-nav a:hover::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: .25rem;
  height: 4px;
  background: var(--red);
}


.nav-item {
  position: relative;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  padding: .35rem 0;
  background: var(--cream-light);
  border: 1px solid rgba(6, 35, 49, .15);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .16);
  z-index: 1001;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  margin: 0;
  padding: .7rem 1rem;
}

.nav-dropdown a.active::after,
.nav-dropdown a:hover::after {
  display: none;
}

.header-cta {
  padding: 1.15rem 1.55rem;
  background: var(--red);
  color: #fff;
  box-shadow: inset 0 -4px rgba(0, 0, 0, .18);
  white-space: nowrap;
}

.header-cta:hover {
  filter: brightness(1.05);
}

.nav-toggle {
  display: none;
  justify-self: end;
  padding: .6rem;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  margin: 5px 0;
  background: var(--ink);
  border-radius: 3px;
}

/* =========================================================
   Homepage Hero
   ---------------------------------------------------------
   Desktop uses the full wide hero. Tablet/mobile use contain
   so the baked-in headline stays visible and the black gap is
   avoided.
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background: #111;
}

.hero picture,
.hero img {
  width: 100%;
}

.hero img {
  min-height: 430px;
  object-fit: cover;
  object-position: center top;
}

.hero-hotspot {
  position: absolute;
  display: block;
  border-radius: 5px;
}

.hotspot-talk {
  left: 15.6%;
  top: 77.5%;
  width: 13.6%;
  height: 7.8%;
}

.hotspot-services {
  left: 30.2%;
  top: 77.5%;
  width: 12.5%;
  height: 7.8%;
}

.hero-hotspot:focus-visible {
  background: rgba(255, 255, 255, .12);
  outline: 4px solid #fff;
  outline-offset: 3px;
}

/* =========================================================
   Homepage Services
   ========================================================= */
.services {
  padding: 34px 6vw 48px;
  background: linear-gradient(180deg, #fff4df 0%, #f4e6cf 100%);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 0 auto 28px;
}

.section-title span {
  width: 90px;
  height: 3px;
  background: var(--red);
}

.section-title h1 {
  margin: 0;
  color: var(--red);
  font-family: var(--impact);
  font-size: clamp(1.45rem, 2.3vw, 2.2rem);
  letter-spacing: .045em;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.service-grid {
  max-width: 1262px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

/*
   SeaMonkey/older enterprise browsers can ignore CSS Grid/Flex gap.
   Card spacing is handled with margins instead of gap so the layout
   stays readable in older browsers as well as Chrome/Firefox/Safari/Edge.
*/
.service-card {
  min-height: auto;
  padding: 22px;
  margin: 0 11px 22px;
  flex: 1 1 calc(25% - 22px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/*
   Older enterprise browsers can render fonts a little wider.
   This keeps the service cards from getting pinched before the
   tablet breakpoint kicks in, without switching to two giant cards too early.
*/
@media (max-width: 980px) {
  .service-card {
    flex-basis: calc(50% - 22px);
  }
}

/* Fixed icon stage: keeps all service-card artwork visually consistent. */
.service-icon,
.service-card > img {
  width: 150px;
  height: 150px;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-bottom: 1.15rem;
  object-fit: contain;
  object-position: center;
}

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

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.service-card > div:not(.service-icon) {
  width: 100%;
}

.service-card h2 {
  margin: .3rem 0 .7rem;
  font-family: var(--impact);
  font-size: 1.25rem;
  letter-spacing: .04em;
  line-height: 1.05;
  text-transform: uppercase;
}

.service-card p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.55;
}

.service-card a {
  color: var(--red);
  font-family: var(--impact);
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.service-card a:hover {
  text-decoration: underline;
}

/* Service Card Links */
.service-card-icon-link {
  display: inline-block;
}

.service-card-icon-link img {
  transition: transform .2s ease;
}

.service-card-icon-link:hover img {
  transform: scale(1.05);
}

.service-card-title-link {
  color: inherit;
  text-decoration: none;
}

.service-card-title-link:hover {
  color: var(--red);
}

.service-card-title-link:visited {
  color: inherit;
}

.service-card-title-link:focus {
  color: var(--red);
}

/* =========================================================
   Training Band
   ---------------------------------------------------------
   Kept here in case older/secondary templates still reference it.
   ========================================================= */
.training-band {
  padding: 42px 6vw;
  background: var(--cream);
}

.training-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  align-items: center;
  gap: 52px;
}

.training-inner h2 {
  margin: 0;
  font-family: var(--impact);
  font-size: clamp(2rem, 3.6vw, 4rem);
  letter-spacing: .035em;
  line-height: .95;
  text-transform: uppercase;
}

.training-inner p {
  max-width: 780px;
  margin: 0;
  padding-left: 50px;
  border-left: 2px solid var(--red);
  font-size: 1.25rem;
}

/* =========================================================
   Trust Band
   ========================================================= */
.trust-band {
  padding: 26px 6vw;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: linear-gradient(90deg, #07313a, #034352);
  color: #f8edda;
}

.trust-item {
  padding: 0 28px;
  border-right: 1px solid rgba(255, 255, 255, .22);
}

.trust-item:last-child {
  border-right: 0;
}

.trust-item strong {
  display: block;
  font-family: var(--impact);
  font-size: 1.12rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.trust-item span {
  display: block;
  color: #d9d4c1;
  font-size: .95rem;
}

/* =========================================================
   Secondary / Modular PHP Page Styles
   ========================================================= */
.page-hero {
  padding: clamp(56px, 9vw, 110px) 6vw;
  background:
    linear-gradient(90deg, rgba(6, 35, 49, .94), rgba(6, 35, 49, .72)),
    url('../img/backgrounds/footer-road.jpg') center / cover no-repeat;
  color: #fff4df;
}

.page-hero-inner {
  max-width: 980px;
  margin: 0 auto;
}

.kicker {
  margin: 0 0 .75rem;
  color: var(--gold);
  font-family: var(--impact);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 0;
  font-family: var(--impact);
  font-size: clamp(2.2rem, 6vw, 5.2rem);
  letter-spacing: .035em;
  line-height: .94;
  text-transform: uppercase;
}

.page-hero p:not(.kicker) {
  max-width: 760px;
  color: #f6ead4;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.content-section {
  padding: clamp(42px, 7vw, 82px) 6vw;
  background: linear-gradient(180deg, #fff4df 0%, #f4e6cf 100%);
}

.content-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.content-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card,
.contact-card {
  padding: clamp(22px, 3vw, 34px);
}

.feature-card img {
  width: 92px;
  margin-bottom: 14px;
}

.feature-card h2,
.narrow-copy h2,
.contact-card h2,
.cta-band h2 {
  margin-top: 0;
  font-family: var(--impact);
  letter-spacing: .04em;
  line-height: 1.05;
  text-transform: uppercase;
}

.feature-card p,
.narrow-copy p,
.contact-card p,
.contact-card li {
  font-size: 1.05rem;
}

.narrow-copy {
  max-width: 900px;
  margin: 0 auto;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.contact-card {
  padding: clamp(24px, 4vw, 40px);
}

.contact-card a {
  color: var(--red);
  font-weight: 700;
}

.cta-band {
  padding: clamp(34px, 5vw, 58px) 6vw;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 42px;
  background: linear-gradient(90deg, #07313a, #034352);
  color: #fff4df;
}

.cta-band > div {
  max-width: 760px;
}

.cta-band h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 3rem);
}

.cta-button {
  padding: 1rem 1.4rem;
  background: var(--red);
  color: #fff;
  box-shadow: inset 0 -4px rgba(0, 0, 0, .18);
  white-space: nowrap;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  padding: 36px 6vw 20px;
  background: linear-gradient(180deg, #07313a 0%, #062930 100%);
  color: #f9ecd8;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.45fr 1fr 1.2fr 1.2fr;
  gap: 42px;
}

.footer-brand img {
  max-width: 290px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tagline {
  font-family: var(--impact);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tagline em {
  color: #e4a93d;
  font-family: Georgia, serif;
  font-size: 1.15rem;
  text-transform: none;
}

.site-footer h2 {
  color: #e4a93d;
  font-family: var(--impact);
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.site-footer a {
  display: block;
  margin: .25rem 0;
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-bottom {
  max-width: 1240px;
  margin: 32px auto 0;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  color: #f4ead9;
  font-size: .9rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  display: inline;
  color: #fff;
}

.footer-bottom span {
  margin: 0 .8rem;
  color: #c9bda8;
}

/* =========================================================
   Responsive: Tablet / Small Desktop
   ========================================================= */
@media (max-width: 1100px) {
  .header-inner {
    min-height: 86px;
    padding: 6px 18px;
    grid-template-columns: minmax(180px, 260px) 1fr auto;
    gap: 16px;
  }

  .brand {
    width: clamp(180px, 38vw, 260px);
    max-width: 100%;
  }

  .brand img {
    max-height: 68px;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 18px 28px;
    background: var(--cream-light);
    box-shadow: 0 18px 30px rgba(0, 0, 0, .18);
    white-space: normal;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    margin: 0;
    padding: .6rem 0;
    font-size: 1.05rem;
  }

  .main-nav .nav-item {
    width: 100%;
  }

  .main-nav .nav-dropdown {
    position: static;
    display: block;
    min-width: 0;
    padding: 0 0 0 1rem;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .main-nav .nav-dropdown a {
    padding: .45rem 0;
    font-size: .95rem;
  }

  .header-cta {
    display: none;
  }

  .hero {
    background: #0b2228;
    line-height: 0;
  }

  .hero picture,
  .hero img {
    display: block;
    width: 100%;
  }

  .hero img {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center top !important;
  }

  .hero-hotspot {
    display: none;
  }

  .trust-band {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }

  .trust-item {
    border-right: 0;
    border-left: 3px solid rgba(255, 255, 255, .18);
  }
}

/* =========================================================
   Responsive: Mobile
   ========================================================= */
@media (max-width: 820px) {
  .content-grid.two-col,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .service-card {
    flex-basis: calc(100% - 22px);
  }

  .training-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .training-inner p {
    padding-left: 0;
    border-left: 0;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

/* =========================================================
   Responsive: Small Mobile
   ========================================================= */
@media (max-width: 520px) {
  .header-inner {
    min-height: 76px;
    padding: 5px 14px;
    grid-template-columns: 1fr auto;
  }

  .brand {
    width: clamp(170px, 58vw, 220px);
  }

  .brand img {
    max-height: 58px;
  }

  .nav-toggle span {
    width: 30px;
    height: 3px;
  }

  .services {
    padding-top: 30px;
  }

  .section-title span {
    display: none;
  }

  .service-card {
    align-items: center;
    text-align: center;
  }

  .service-icon,
  .service-card > img {
    align-self: center;
    margin: 0 auto .25rem;
  }

  .trust-band {
    grid-template-columns: 1fr;
  }

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

  .footer-brand img {
    max-width: 240px;
  }

  .footer-bottom {
    font-size: .82rem;
  }
}

/* =========================================================
   Header overflow fix
   Prevent CTA from sliding off-screen at in-between widths.
   ========================================================= */
@media (max-width: 1250px) {
  .header-inner {
    grid-template-columns: minmax(220px, 300px) 1fr auto;
    gap: 14px;
  }

  .brand {
    width: clamp(220px, 26vw, 300px);
  }

  .main-nav a {
    margin: 0 10px;
    font-size: 0.95rem;
  }

  .header-cta {
    padding: 1rem 1.15rem;
    font-size: 0.95rem;
  }
}

/* Force mobile nav before the header gets cramped */
@media (max-width: 1120px) {
  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
    justify-self: end;
  }

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background: var(--cream-light);
    padding: 18px 28px;
    box-shadow: 0 18px 30px rgba(0,0,0,.18);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    margin: 0;
    padding: .6rem 0;
    font-size: 1.05rem;
  }

  .main-nav .nav-item {
    width: 100%;
  }

  .main-nav .nav-dropdown {
    position: static;
    display: block;
    min-width: 0;
    padding: 0 0 0 1rem;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .main-nav .nav-dropdown a {
    padding: .45rem 0;
    font-size: .95rem;
  }

}