:root {
  --ms-blue: #0078D4;
  --ms-blue-dark: #005A9E;
  --ms-blue-darker: #004578;
  --white: #ffffff;
  --black: #0b0b0b;
  --gray: #4b4f54;
  --light-gray: #f3f4f6;
  --border: #d8dde3;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: Calibri, "Cambria", "Segoe UI", Arial, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- TOP BAR ---------- */
.topbar {
  background: var(--black);
  padding: 14px 0;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img { height: 42px; width: auto; }

.login-btn {
  background: var(--ms-blue);
  color: var(--white);
  border: none;
  padding: 9px 22px;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 600;
  transition: background .15s ease;
}
.login-btn:hover { background: var(--ms-blue-dark); }

/* ---------- NAV ---------- */
.navbar {
  background: var(--ms-blue);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-links {
  display: flex;
  list-style: none;
}
.nav-links a {
  display: block;
  color: var(--white);
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2px;
  transition: background .15s ease;
}
.nav-links a:hover,
.nav-links a.active { background: var(--ms-blue-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 26px;
  padding: 10px 14px;
}

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(135deg, var(--ms-blue-darker), var(--ms-blue));
  color: var(--white);
  padding: 90px 0 80px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  margin-bottom: 16px;
}
.hero p {
  font-size: clamp(15px, 2vw, 19px);
  max-width: 680px;
  margin: 0 auto;
  opacity: .92;
}

/* ---------- SECTIONS ---------- */
section.page { padding: 64px 0; }
section.page:nth-of-type(even) { background: var(--light-gray); }

h2.section-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: var(--ms-blue-darker);
  margin-bottom: 14px;
}
.section-sub {
  color: var(--gray);
  max-width: 760px;
  margin-bottom: 32px;
  font-size: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ms-blue);
  border-radius: 4px;
  padding: 22px;
}
.stat-card h3 { color: var(--ms-blue-darker); font-size: 18px; margin-bottom: 8px; }
.stat-card p { color: var(--gray); font-size: 14.5px; }

/* ---------- GALLERY ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 36px;
}
.gallery figure {
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
  background: var(--light-gray);
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.gallery figure:hover img { transform: scale(1.06); }

/* ---------- JOBS ---------- */
.job-list { display: flex; flex-direction: column; gap: 16px; }
.job-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.job-card .job-title { font-size: 18px; font-weight: 700; color: var(--ms-blue-darker); }
.job-card .job-meta { color: var(--gray); font-size: 14px; margin-top: 4px; }
.job-card .job-desc { color: var(--gray); font-size: 14.5px; margin-top: 8px; max-width: 620px; }
.job-apply {
  background: var(--ms-blue);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.job-apply:hover { background: var(--ms-blue-dark); }

/* ---------- CONTACT FORM ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-info h3 { color: var(--ms-blue-darker); margin-bottom: 10px; }
.contact-info p { color: var(--gray); margin-bottom: 18px; font-size: 15px; }

form.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form input,
.contact-form textarea {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--ms-blue);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form button {
  background: var(--ms-blue);
  color: var(--white);
  border: none;
  padding: 13px;
  border-radius: 3px;
  font-size: 16px;
  font-weight: 700;
}
.contact-form button:hover { background: var(--ms-blue-dark); }
.form-msg { font-size: 14px; margin-top: 4px; }
.form-msg.ok { color: #137333; }
.form-msg.err { color: #c5221f; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--black);
  color: #cfd3d8;
  padding: 36px 0;
  text-align: center;
  font-size: 13.5px;
}

/* ---------- MODAL (login) ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: 6px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
}
.modal-box h3 { color: var(--ms-blue-darker); margin-bottom: 18px; font-size: 20px; }
.modal-box input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 11px 13px;
  margin-bottom: 12px;
  font-size: 15px;
  font-family: inherit;
}
.modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.modal-actions button {
  flex: 1;
  border: none;
  border-radius: 3px;
  padding: 11px;
  font-size: 15px;
  font-weight: 600;
}
.btn-primary { background: var(--ms-blue); color: var(--white); }
.btn-primary:hover { background: var(--ms-blue-dark); }
.btn-cancel { background: var(--light-gray); color: var(--black); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ms-blue-dark);
    flex-direction: column;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.12); }
  .navbar .container { position: relative; flex-wrap: wrap; }

  .card-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .job-card { flex-direction: column; align-items: flex-start; }
  .job-apply { width: 100%; }
  .logo img { height: 34px; }
}

@media (max-width: 400px) {
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
}
