/* ==========================================================================
   M.T.S.I. Ltd — site stylesheet
   Plain HTML/CSS. Modular sections: corners / header / menu / content / footer
   All colors and spacing are defined as CSS variables for easy reuse.
   ========================================================================== */

:root {
  --navy: #1c3a78;
  --navy-deep: #16306b;
  --navy-bright: #1f4796;
  --ink: #2b2f36;
  --muted: #545861;
  --line: #c9ccd4;
  --line-soft: #dfe1e7;
  --paper: #ffffff;
  --backdrop: #eceef2;

  --page-max: 1000px;
  --pad-x: 64px;

  --font: "Heebo", system-ui, "Segoe UI", Arial, sans-serif;

  --success: #1e7e34;
  --error: #b3261e;
  --success-bg: #e6f4ea;
  --error-bg: #fdecea;
}

/* ---------- base ---------- */
* {
  box-sizing: border-box;
}

html {
  background: var(--backdrop);
}

body {
  margin: 0;
  background: var(--backdrop);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- visually hidden (honeypot fields, etc.) ---------- */
.visually-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- page wrapper (the white "sheet") ---------- */
.page {
  position: relative;
  max-width: var(--page-max);
  margin: 32px auto;
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(22, 48, 107, 0.12);
  overflow: hidden;
}

/* ---------- decorative navy corner triangles ---------- */
.corner {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 2;
  pointer-events: none;
}
.corner--tl {
  top: 0;
  left: 0;
  border-top: 26px solid var(--navy);
  border-right: 26px solid transparent;
}
.corner--tr {
  top: 0;
  right: 0;
  border-top: 26px solid var(--navy);
  border-left: 26px solid transparent;
}

/* ==========================================================================
   HEADER  (logo on the left + tagline lines on the right)
   ========================================================================== */
.header {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 32px;
  padding: 40px var(--pad-x) 20px;
}

.header__logo {
  flex: 0 0 auto;
}
.header__logo img {
  display: block;
  width: 230px;
  height: auto;
}

.header__titles {
  flex: 1 1 auto;
  text-align: right;
}

.header__tagline {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}

.header__rule {
  height: 2px;
  background: var(--navy);
  margin: 0 0 14px;
}

.header__subtitle {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}

/* ==========================================================================
   MENU  (navigation under the logo line)
   ========================================================================== */
.menu {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #fbfbfd;
}

.menu__list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

.menu__link {
  display: inline-block;
  padding: 16px 22px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  position: relative;
  transition: color 0.2s ease;
}
.menu__link::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 10px;
  height: 2px;
  background: var(--navy-bright);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}
.menu__link:hover,
.menu__link[aria-current="page"] {
  color: var(--navy-bright);
}
.menu__link:hover::after,
.menu__link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ==========================================================================
   PAGE CONTENT
   ========================================================================== */
.content {
  padding: 44px var(--pad-x) 56px;
}

/* ---------- hero ---------- */
.hero {
  text-align: center;
  margin-bottom: 28px;
}

.hero__title {
  margin: 0 auto;
  display: inline-block;
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--navy);
  padding: 10px 40px;
/*  border-top: 2px solid var(--line);*/
  border-bottom: 2px solid var(--line);
}

.hero__subtitle {
  margin: 18px 0 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
}

/* ---------- intro paragraph ---------- */
.intro {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 18px;
  color: var(--ink);
}

/* ---------- section title with side rules ---------- */
.section-title {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 44px 0 30px;
}
.section-title::before,
.section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--navy);
}
.section-title__text {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap;
}

/* ---------- expertise grid (3 x 3) ---------- */
.expertise {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.expertise__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 26px 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.expertise__cell:hover {
  background: #f6f8fc;
  transform: translateY(-2px);
}

/* internal divider lines only */
.expertise__cell:not(:nth-child(3n)) {
  border-left: 1px solid var(--line-soft);
}
.expertise__cell:nth-child(-n + 6) {
  border-bottom: 1px solid var(--line-soft);
}

.expertise__icon {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: 40px;
}
.expertise__icon img {
  height: 48px;
  width: auto;
}

.expertise__label {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

/* ---------- about ---------- */
.about {
  max-width: 550px;
  margin: 0 auto;
  text-align: center;
}
.about p {
  margin: 0 0 16px;
  font-size: 17px;
  color: var(--ink);
}
.about p:last-child {
  margin-bottom: 0;
}

/* ---------- why us ---------- */
.why-us{
  max-width: 550px;
  margin: 0 auto;
}
.why-us__list {
  list-style: none;
  max-width: 440px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.why-us__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.why-us__icon {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1.6;
  color: var(--navy-bright);
}

/* ---------- gallery strip (Swiper) ---------- */
.gallery-strip {
  margin-inline: calc(var(--pad-x) * -1);
}
.gallery-strip > .section-title,
.gallery-strip__more {
  margin-inline: var(--pad-x);
}
.gallery-strip .swiper {
  padding: 4px var(--pad-x) 44px;
}
.gallery-strip .swiper-slide {
  height: auto;
}
.gallery-strip__img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 4px;
}
.gallery-strip .swiper-button-next,
.gallery-strip .swiper-button-prev {
  color: var(--navy);
}
.gallery-strip .swiper-pagination-bullet-active {
  background: var(--navy-bright);
}
.gallery-strip__more {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-weight: 700;
  color: var(--navy-bright);
}
.gallery-strip__more:hover {
  text-decoration: underline;
}

/* ---------- quality bar ---------- */
.quality {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin: 80px auto 0;
  max-width: 760px;
  padding: 14px 24px;
  border: 2px solid var(--navy);
}
.quality__item {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}
.quality__sep {
  color: var(--line);
  font-weight: 400;
}

/* ---------- vision ---------- */
.vision {
  max-width: 700px;
  margin: 40px auto 0;
  text-align: center;
  font-size: 17px;
  color: var(--ink);
}

/* ---------- signature ---------- */
.signature {
  text-align: center;
  margin-top: 50px;
  margin-bottom: 50px;
}
.signature__greeting {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--ink);
}
.signature__name {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
}
.signature__role {
  margin: 4px 0 0;
  font-size: 16px;
  color: var(--muted);
}
.signature__company {
  margin: 2px 0 0;
  font-size: 16px;
  color: var(--navy);
}

/* ---------- partners teaser ---------- */
.partners-teaser {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px;
  text-align: center;
  border: 2px solid var(--line-soft);
  border-radius: 6px;
}
.partners-teaser p {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--ink);
}
.partners-teaser__link {
  display: inline-block;
  font-weight: 700;
  color: var(--navy-bright);
}
.partners-teaser__link:hover {
  text-decoration: underline;
}

/* ---------- contact ---------- */
.contact {
  margin-top: 10px;
}
.contact__intro {
  max-width: 640px;
  margin: 0 auto 24px;
  text-align: center;
}
.contact__subtext {
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--muted);
}
.contact__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact__details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact__detail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.contact__detail-icon {
  flex: 0 0 auto;
  font-size: 18px;
  color: var(--navy);
}
.contact__cta {
  display: inline-block;
  margin-top: 8px;
  padding: 14px 32px;
  background: var(--navy);
  color: var(--paper);
  font-weight: 800;
  font-size: 17px;
  border-radius: 4px;
  text-align: center;
  transition: background 0.2s ease;
}
.contact__cta:hover {
  background: var(--navy-bright);
}

/* ---------- form ---------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}
.form__input,
.form__textarea,
.form__select {
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}
.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: 2px solid var(--navy-bright);
  outline-offset: 1px;
}
.form__textarea {
  resize: vertical;
  min-height: 120px;
}
.form__submit {
  align-self: flex-start;
  padding: 14px 36px;
  background: var(--navy);
  color: var(--paper);
  border: none;
  border-radius: 4px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease;
}
.form__submit:hover {
  background: var(--navy-bright);
}

/* ---------- form messages ---------- */
.form-message {
  padding: 14px 18px;
  border-radius: 4px;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: center;
}
.form-message--success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}
.form-message--error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error);
}

/* ==========================================================================
   FOOTER
   The decorative navy triangle sits at the BOTTOM-LEFT only, just ABOVE
   the footer's navy separator line (drawn via .footer::before).
   ========================================================================== */
.footer {
  position: relative;
  border-top: 3px solid var(--navy);
  padding: 26px var(--pad-x) 40px;
}
.footer::before {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;                 /* line up bottom edge with the separator line */
  width: 0;
  height: 0;
  border-bottom: 64px solid var(--navy);
  border-right: 64px solid transparent;
  transform: translateY(-100%); /* lift the triangle to sit above the line */
}
.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.footer__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s ease;
}
a.footer__item:hover {
  color: var(--navy-bright);
}
.footer__icon {
  color: var(--navy);
  font-size: 18px;
  flex: 0 0 auto;
}
.footer__divider {
  width: 1px;
  align-self: stretch;
  background: var(--line-soft);
}

/* ==========================================================================
   GALLERY PAGE (masonry)
   ========================================================================== */
.masonry-grid {
  margin: 0 -8px;
}
.grid-sizer,
.masonry-item {
  width: 33.333%;
}
.masonry-item {
  padding: 8px;
}
.masonry-item img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.masonry-item img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22, 48, 107, 0.18);
}

/* ==========================================================================
   SIMPLE CONTENT PAGES
   ========================================================================== */
.page-intro {
  max-width: 720px;
  margin: 0 auto 8px;
  text-align: center;
}
.page-intro h2 {
  margin: 12px 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
}
.page-intro p {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.page-section {
  max-width: 760px;
  margin: 32px auto 0;
}
.page-section p {
  font-size: 16px;
  color: var(--ink);
}
.page-section ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-inline-start: 22px;
  font-size: 16px;
  color: var(--ink);
  list-style: disc;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 760px) {
  :root {
    --pad-x: 22px;
  }
  .page {
    margin: 0 auto;
  }
  .header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .header__titles {
    text-align: center;
  }
  .hero__title {
    font-size: 44px;
    padding: 8px 18px;
  }
  .hero__subtitle {
    font-size: 20px;
  }
  .expertise {
    grid-template-columns: repeat(2, 1fr);
  }
  .expertise__cell:not(:nth-child(3n)) {
    border-left: none;
  }
  .expertise__cell:nth-child(odd) {
    border-left: 1px solid var(--line-soft);
  }
  .expertise__cell:nth-child(7),
  .expertise__cell:nth-child(8) {
    border-bottom: 1px solid var(--line-soft);
  }
  .gallery-strip__img {
    height: 200px;
  }
  .contact__layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .grid-sizer,
  .masonry-item {
    width: 50%;
  }
  .footer__divider {
    display: none;
  }
  .footer__list {
    justify-content: center;
  }
}
