/* ================================================================
   ODPL – Optimal Development & Performance Limited
   Main Stylesheet
   Brand: Mulish / palette from theme
   ================================================================ */

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Playfair+Display:wght@600;700&display=swap');

/* ── Brand Tokens (from site source) ── */
:root {
  /* Palette */
  --color-1: #315453;   /* dark teal – primary */
  --color-2: #f28c28;   /* orange – accent / CTA */
  --color-3: #333333;   /* body text dark */
  --color-4: #192a3d;   /* headings navy */
  --color-5: #F7F7F7;   /* light bg */
  --color-6: #f2f5f7;   /* subtle bg */
  --color-7: #FAFBFC;   /* near-white bg */
  --color-8: #ffffff;   /* white */

  /* Semantic */
  --text-color:       #315453;
  --heading-color:    #192a3d;
  --link-color:       #f28c28;
  --link-hover:       #315453;
  --selection-text:   #ffffff;
  --selection-bg:     #2A3F43;
  --border-color:     #F7F7F7;

  /* Typography */
  --font-family:        'Mulish', Sans-Serif;
  --font-weight:        400;
  --font-size:          18px;
  --line-height:        1.65;
  --letter-spacing:     0em;
  --text-transform:     none;

  /* Headings */
  --heading-font:       'Playfair Display', serif;

  /* Buttons */
  --btn-font-weight:    700;
  --btn-font-size:      15px;
  --btn-text-transform: none;
  --btn-min-height:     60px;
  --btn-padding:        5px 20px;
  --btn-radius:         0px;
  --btn-bg:             var(--color-1);
  --btn-bg-hover:       var(--color-2);
  --btn-text:           #ffffff;
  --btn-text-hover:     #ffffff;

  /* Layout */
  --container-max:      1120px;
  --container-narrow:   750px;
  --content-spacing:    1.5em;
  --section-pad:        80px;

  /* Misc */
  --radius:             0px;
  --shadow-card:        0 4px 24px rgba(25,42,61,.08);
  --shadow-hover:       0 12px 40px rgba(25,42,61,.14);
  --transition:         .25s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  font-weight: var(--font-weight);
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--color-3);
  background: var(--color-8);
  overflow-x: hidden;
}
::selection { background: var(--selection-bg); color: var(--selection-text); }

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--link-color); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--link-hover); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  color: var(--heading-color);
  line-height: 1.22;
  font-weight: 700;
}
p { margin-bottom: var(--content-spacing); }
p:last-child { margin-bottom: 0; }

/* ── Layout ── */
.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding: var(--section-pad) 0; }
.section--sm  { padding: 56px 0; }
.section--lg  { padding: 112px 0; }
.section--dark  { background: var(--color-4); }
.section--teal  { background: var(--color-1); }
.section--light { background: var(--color-5); }
.section--cream { background: var(--color-6); }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }

/* ── Section Header ── */
.section-header        { margin-bottom: 52px; }
.section-header.center { text-align: center; }
.section-label {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--color-2);
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--heading-font);
  font-size: clamp(1.7rem, 2.8vw, 2.5rem);
  color: var(--heading-color);
  margin-bottom: 0;
}
.section-title--white { color: var(--color-8); }
.section-divider {
  width: 48px; height: 3px;
  background: var(--color-2);
  margin: 16px 0 24px;
}
.section-divider.center { margin: 16px auto 24px; }
.section-desc {
  font-size: .97rem;
  color: #6a7b8d;
  line-height: 1.75;
  max-width: 560px;
}
.section-header.center .section-desc { margin: 0 auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-min-height);
  padding: var(--btn-padding);
  padding-left: 28px;
  padding-right: 28px;
  font-family: var(--font-family);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  letter-spacing: .04em;
  text-transform: var(--btn-text-transform);
  border-radius: var(--btn-radius);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-1);
  color: var(--btn-text);
}
.btn-primary:hover { background: var(--color-2); color: var(--btn-text-hover); }

.btn-accent {
  background: var(--color-2);
  color: var(--btn-text);
}
.btn-accent:hover { background: var(--color-1); color: var(--btn-text-hover); }

.btn-outline-white {
  background: transparent;
  color: var(--color-8);
  border: 2px solid rgba(255,255,255,.55);
}
.btn-outline-white:hover {
  background: var(--color-8);
  color: var(--color-4);
  border-color: var(--color-8);
}

.btn-outline-dark {
  background: transparent;
  color: var(--color-4);
  border: 2px solid var(--color-4);
}
.btn-outline-dark:hover { background: var(--color-4); color: var(--color-8); }

/* ── Chips / Tags ── */
.chip {
  display: inline-block;
  background: var(--color-8);
  border: 1px solid #dde3e8;
  border-left: 3px solid var(--color-1);
  font-size: .78rem;
  font-weight: 600;
  color: var(--color-4);
  padding: 5px 12px;
}

/* ── Cards ── */
.card {
  background: var(--color-8);
  border: 1px solid #e8edf1;
  padding: 32px 28px;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--color-1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 52px; height: 52px;
  background: rgba(49,84,83,.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 24px; height: 24px; stroke: var(--color-1); fill: none; stroke-width: 1.8; }
.card h3 {
  font-family: var(--heading-font);
  font-size: 1.05rem;
  color: var(--heading-color);
  margin-bottom: 10px;
}
.card p { font-size: .88rem; color: #6a7b8d; line-height: 1.65; margin-bottom: 16px; }
.card-link {
  font-size: .82rem;
  font-weight: 700;
  color: var(--color-1);
  display: inline-flex; align-items: center; gap: 5px;
  letter-spacing: .03em;
  transition: gap .2s, color .2s;
}
.card-link:hover { gap: 9px; color: var(--color-2); }
.card-link::after { content: '→'; }

/* Dark card variant */
.card--dark {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
}
.card--dark:hover { background: rgba(49,84,83,.2); border-color: var(--color-1); }
.card--dark h3 { color: var(--color-8); }
.card--dark p  { color: rgba(255,255,255,.55); }
.card--dark .card-link { color: var(--color-2); }
.card--dark .card-link:hover { color: #ffa94d; }
.card--dark::before { background: var(--color-2); }

/* ── Image placeholder ── */
.img-placeholder {
  background: linear-gradient(135deg, #c8cfd6 0%, #adb5bd 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; letter-spacing: .14em;
  color: rgba(30,43,56,.3); font-weight: 700; text-transform: uppercase;
}

/* ── Stat items ── */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--heading-font);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-2);
  line-height: 1;
}
.stat-label { font-size: .8rem; color: rgba(255,255,255,.55); letter-spacing: .04em; }
.stat-label--dark { color: #6a7b8d; }

/* ── Utilities ── */
.text-center  { text-align: center; }
.text-white   { color: var(--color-8); }
.text-teal    { color: var(--color-1); }
.text-orange  { color: var(--color-2); }
.text-muted   { color: #6a7b8d; }
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 16px; }
.mt-3  { margin-top: 24px; }
.mt-4  { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 8px; }
.mb-2  { margin-bottom: 16px; }
.mb-3  { margin-bottom: 24px; }
.mb-4  { margin-bottom: 32px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

/* ================================================================
   TOPBAR
   ================================================================ */
.topbar {
  background: var(--color-4);
  color: rgba(255,255,255,.6);
  font-size: .8rem;
  padding: 8px 0;
}
.topbar__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 18px; }
.topbar a { color: rgba(255,255,255,.6); }
.topbar a:hover { color: var(--color-2); }
.topbar__sep { color: rgba(255,255,255,.2); }

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
  background: var(--color-8);
  border-bottom: 1px solid #e8edf1;
  position: sticky; top: 0; z-index: 200;
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: 0 4px 20px rgba(25,42,61,.10); }
.navbar__inner {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo__img { height: 44px; width: auto; display: block; }

/* WordPress custom logo — same constraints */
.custom-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}
.custom-logo-link .custom-logo,
.custom-logo-link img {
  height: 44px;
  width: auto;
  max-width: none;
  display: block;
}
/* Menu */
.nav__menu { display: flex; align-items: center; gap: 2px; }
.nav__item { position: relative; }
.nav__link {
  display: block; padding: 10px 14px;
  font-size: .88rem; font-weight: 600;
  color: var(--color-4); border-radius: 2px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav__link:hover,
.nav__item.active .nav__link { color: var(--color-1); background: rgba(49,84,83,.07); }

/* Mega Menu */
.nav__chevron {
  display: inline-block; width: 8px; height: 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 4px; transition: transform .2s;
}
.nav__item:hover .nav__chevron { transform: rotate(-135deg) translateY(-2px); }

.mega-menu {
  position: fixed; left: 0; right: 0;
  top: 72px;
  background: var(--color-8);
  border-top: 3px solid var(--color-1);
  box-shadow: 0 24px 60px rgba(25,42,61,.15);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .22s, transform .22s, visibility .22s;
  z-index: 300;
}
.nav__item:hover .mega-menu,
.nav__item:focus-within .mega-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.mega-menu__body {
  display: flex; align-items: stretch; gap: 0;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 32px 32px;
}

.mega-menu__sections {
  flex: 1;
  display: flex; flex-direction: column; gap: 0;
}

.mega-menu__section {
  padding: 16px 0;
}
.mega-menu__section + .mega-menu__section {
  border-top: 1px solid #eef1f4;
}

.mega-menu__section-inner {
  display: flex; align-items: flex-start; gap: 20px;
}

.mega-menu__section-img {
  flex-shrink: 0; width: 100px; height: 100px;
  border-radius: 50%; overflow: hidden;
  border: 3px solid var(--color-6);
  box-shadow: 0 4px 16px rgba(25,42,61,.12);
}
.mega-menu__section-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.mega-menu__section-links { flex: 1; }
.mega-menu__label {
  display: block;
  font-size: .68rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--color-2); margin-bottom: 10px;
}
.mega-menu__section-links ul {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 16px;
}
.mega-menu__section-links ul li a {
  display: block; padding: 5px 8px;
  font-size: .85rem; font-weight: 500; color: var(--color-3);
  border-left: 2px solid transparent;
  transition: all .15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mega-menu__section-links ul li a:hover {
  color: var(--color-1); background: var(--color-6);
  border-left-color: var(--color-1); padding-left: 12px;
}

/* Aside panel */
.mega-menu__aside {
  flex-shrink: 0; width: 200px;
  border-left: 1px solid #eef1f4;
  margin-left: 32px;
}
.mega-menu__aside-img {
  height: 100%;
  background: url('https://images.unsplash.com/photo-1488521787991-ed7bbaae773c?w=500&q=80') center/cover no-repeat;
  border-radius: 4px; overflow: hidden;
  position: relative; display: flex; align-items: flex-end;
}
.mega-menu__aside-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(25,42,61,.92) 40%, rgba(25,42,61,.3) 100%);
}
.mega-menu__aside-content {
  position: relative; z-index: 1;
  padding: 20px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.mega-menu__aside-tag {
  display: inline-block;
  background: rgba(242,140,40,.2); border: 1px solid rgba(242,140,40,.4);
  color: #fba94d; font-size: .62rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 8px; width: fit-content;
}
.mega-menu__aside-content p {
  font-size: .78rem; color: rgba(255,255,255,.8); line-height: 1.5; margin: 0;
}
.mega-menu__aside-content .btn { min-height: 34px; padding: 5px 14px; font-size: .76rem; align-self: flex-start; }

/* Dropdown */
.nav__dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--color-8);
  border: 1px solid #e0e7ed;
  border-top: 3px solid var(--color-1);
  min-width: 270px; padding: 10px 0;
  box-shadow: 0 16px 40px rgba(25,42,61,.13);
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s;
  z-index: 300;
}
.nav__item:hover .nav__dropdown,
.nav__item:focus-within .nav__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__dropdown-label {
  display: block; padding: 10px 20px 4px;
  font-size: .68rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: #8a9bab;
}
.nav__dropdown hr { border: none; border-top: 1px solid #eef1f4; margin: 6px 0; }
.nav__dropdown a {
  display: block; padding: 8px 20px;
  font-size: .85rem; font-weight: 500;
  color: var(--color-3);
  transition: all .15s;
}
.nav__dropdown a:hover { color: var(--color-1); background: var(--color-6); padding-left: 26px; }

/* CTA button in nav */
.nav__cta { margin-left: 12px; }
.nav__cta .btn {
  min-height: 36px;
  padding: 6px 18px;
  font-size: .82rem;
}

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 6px; background: none; border: none;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--color-4); transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ================================================================
   FOOTER
   ================================================================ */
.footer { background: #fff; color: var(--color-3); border-top: 1px solid #e0e7ed; }
.footer__main { padding: 80px 0 56px; }
.footer__grid { display: grid; grid-template-columns: 2.2fr 1fr 1.4fr 1.2fr; gap: 40px; }

.footer__brand p {
  font-size: .88rem; line-height: 1.72;
  max-width: 300px; margin-top: 16px;
  color: #6a7b8d;
}
.footer__social { display: flex; gap: 10px; margin-top: 22px; }
.social-btn {
  width: 36px; height: 36px;
  border: 1px solid #d4dbe3;
  display: flex; align-items: center; justify-content: center;
  color: #8a9bab; font-size: .78rem; font-weight: 700;
  transition: all .2s; text-decoration: none;
}
.social-btn:hover { background: var(--color-1); border-color: var(--color-1); color: #fff; }

.footer__col h4 {
  font-family: var(--font-family);
  font-size: .75rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--heading-color); margin-bottom: 20px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col ul li a {
  font-size: .87rem; color: #6a7b8d;
  transition: color .15s;
}
.footer__col ul li a:hover { color: var(--color-1); }

.footer__bottom {
  border-top: 1px solid #e0e7ed;
  padding: 22px 0;
  background: #f2f5f7;
}
.footer__bottom-inner {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px;
}
.footer__bottom p { font-size: .82rem; color: #6a7b8d; }
.footer__bottom a { color: var(--color-1); }
.footer__bottom a:hover { color: var(--color-2); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  :root { --section-pad: 56px; --font-size: 16px; }
  .topbar { display: none; }
  .footer { margin: 0; border-radius: 0; }

  .hamburger { display: flex; }
  .nav__menu {
    display: none; position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--color-8); flex-direction: column;
    padding: 12px 16px 20px; align-items: stretch;
    box-shadow: 0 16px 40px rgba(25,42,61,.15);
    gap: 2px; z-index: 199; max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .nav__menu.open { display: flex; }
  .nav__cta { margin-left: 0; margin-top: 8px; }
  .nav__link { border-radius: 4px; }
  .nav__dropdown {
    position: static; opacity: 1; visibility: visible;
    transform: none; box-shadow: none;
    border: none; border-left: 3px solid var(--color-1);
    border-top: none; margin-left: 8px; padding: 4px 0;
    min-width: auto;
  }

  .mega-menu {
    position: static;
    border-top: none; border-left: 3px solid var(--color-1);
    box-shadow: none; opacity: 1; visibility: visible;
    transform: none; margin-left: 8px;
    display: none; max-height: none; overflow: visible;
  }
  .nav__item:hover .mega-menu,
  .nav__item:focus-within .mega-menu { display: block; }
  .mega-menu__body { flex-direction: column; padding: 8px 12px; gap: 0; }
  .mega-menu__sections { gap: 0; }
  .mega-menu__section { padding: 8px 0; }
  .mega-menu__section + .mega-menu__section { border-top: 1px solid #eef1f4; }
  .mega-menu__cards { grid-template-columns: 1fr !important; gap: 4px; }
  .mega-card__img { display: none; }
  .mega-card { border: none; }
  .mega-card__body { padding: 6px 8px; }
  .mega-card__desc { display: none; }
  .mega-menu__aside { display: none; }

  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }

  .flex-between { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .grid-4 { grid-template-columns: 1fr; }
}
