/* ---- Base --------------------------------------------------------------- */
:root {
  --maxW: 1200px;
  --gutter: 80px;
  --muted: #9aa3a6;
  --accent: #222;
  --bg: #f2f2f2;
  --hover-color: #d97706; /* orange hover color */
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--accent);
  font-family: "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden; /* 🔥 prevents side scroll */
  width: 100%;
}

/* ---- Page Transition ---------------------------------------------------- */
body.is-loading .site-main {
  opacity: 0;
  transform: translateY(1rem);
}
.site-main {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ---- Shared Container --------------------------------------------------- */
.container,
.values-container {
  max-width: var(--maxW);
  margin: 60px auto;
  background: #fff;
  display: grid;
  grid-template-rows: auto auto;
  overflow-x: hidden; /* extra safety */
}

.main,
.values-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

.col,
.values-col {
  padding: 80px var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* ---- Right Image -------------------------------------------------------- */
.side-image,
.values-image,
.case-image {
  padding: 0;
  background-color: #000;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  width: 100%;
  height: 100%;
  min-height: 600px;
}
.side-image { background-image: url("img/MoeDheis.png"); }
.values-image { background-image: url("img/values.jpg"); }
.case-image { background-image: url("img/case-studies.png"); }

/* ---- Typography --------------------------------------------------------- */
.hero-title {
  margin: 0 0 10px;
  font-size: 32px;
  letter-spacing: 6px;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}
.subtitle {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 3px;
  margin-bottom: 24px;
  text-align: center;
}
.lead {
  color: #666;
  line-height: 1.8;
  max-width: 420px;
  margin: 0 auto 32px auto;
  text-align: center;
}

/* ---- Buttons ------------------------------------------------------------ */
.btn-row { 
  display: flex; 
  gap: 14px; 
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  text-decoration: none;
  color: var(--accent);
  padding: 14px 26px;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 600;
  background: #fff;
  transition: all .2s ease;
  min-width: 180px;
  max-width: 100%; /* 🔥 prevents button overflow */
  line-height: 1.4;
  text-align: center;
}
.btn:hover {
  color: var(--hover-color);
  border-color: var(--hover-color);
  background: #fff;
}

/* ---- Footer ------------------------------------------------------------- */
.footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
  border-top: 1px solid #e5e5e5;
  padding: 20px 0;
  align-items: center;
}
.footer-left { grid-column: 1 / 2; padding-left: var(--gutter); display: flex; align-items: center; }
.footer-right { grid-column: 2 / 3; padding-right: var(--gutter); justify-self: end; white-space: nowrap; }

.social-icons { display: flex; gap: 22px; line-height: 1; }
.social-icons a {
  font-size: 20px;
  color: #999;
  text-decoration: none;
  transition: color 0.2s ease;
}
.social-icons a:hover { color: var(--hover-color); }
.footer-right p { margin: 0; font-size: 14px; color: #666; }

/* ---- Values Page -------------------------------------------------------- */
.values-title {
  margin-bottom: 30px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 5px;
  text-align: center;
  text-transform: uppercase;
}
.values-points {
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.7;
  font-size: 15.5px;
  color: #444;
  text-align: center;
}
.values-points strong {
  display: block;
  margin-top: 16px;
  margin-bottom: 4px;
  font-weight: 700;
  color: #000;
}

/* ---- Contact Page ------------------------------------------------------- */
.contact-single {
  max-width: 700px;
  margin: 40px auto;
  background: #fff;
  padding: 40px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border-radius: 8px;
  text-align: center;
  width: calc(100% - 32px); /* 🔥 fits inside viewport */
  overflow-x: hidden;
}
.contact-text {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  color: #444;
  line-height: 1.8;
  word-break: break-word;
}
.contact-email { margin: 30px 0; }
.contact-email a {
  display: inline-block;
  background: var(--hover-color);
  color: #fff;
  padding: 16px 28px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.6;
  transition: background 0.2s ease, transform 0.2s ease;
  min-width: 200px;
  max-width: 100%; /* 🔥 no overflow */
}
.contact-email a:hover { background: #b45309; transform: translateY(-2px); }
.contact-note { font-size: 13px; color: #666; margin-top: 20px; }
.contact-dm { margin-top: 20px; font-size: 14px; }
.contact-dm a { color: var(--hover-color); font-weight: 600; text-decoration: none; }
.contact-dm a:hover { text-decoration: underline; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .main, .values-container { grid-template-columns: 1fr; }
  .side-image, .values-image, .case-image {
    order: -1;
    min-height: 400px;
    background-position: top center;
  }
  .col, .values-col { padding: 40px 24px; align-items: center; }
  .footer { grid-template-columns: 1fr; gap: 14px; text-align: center; }
  .footer-left, .footer-right { grid-column: 1 / -1; justify-self: center; padding: 0; }
}

@media (max-width: 600px) {
  .side-image, .values-image, .case-image {
    min-height: 320px;
    background-position: top center;
  }
  .col, .values-col { padding: 20px 16px; }
  .hero-title, .values-title { font-size: 20px; letter-spacing: 4px; }
  .btn, .back-btn { min-width: 100%; }
  .contact-single {
    margin: 20px 12px;
    padding: 24px 18px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.08);
    border-radius: 8px;
    width: calc(100% - 24px); /* 🔥 keep inside viewport */
  }
  .contact-email a {
    width: 100%;
    font-size: 15px;
    padding: 16px 20px;
    border-radius: 6px;
  }
}
