/* -------------------------------------------------------------------------
   FJRG home / services sections
   Background images are set in the views via asset_path (inline style).
   ------------------------------------------------------------------------- */

/* In-page anchors clear the sticky/fixed navbar */
html {
  scroll-behavior: smooth;
}

#home,
#service-pm,
#service-dev,
#service-dba,
#service-hw-net,
#service-ai,
#contact {
  scroll-margin-top: 5rem; /* tune to your navbar height */
}

/* Full-bleed main column (matches old site) */
#main.container-fluid {
  padding-left: 0;
  padding-right: 0;
  overflow-x: hidden;
}

/* ---- Sections ---------------------------------------------------------- */

.tm-section {
  position: relative;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  font-size: 1.125rem;
  box-sizing: border-box;
}

.tm-page-content-width {
  max-width: 1200px;
  width: 100%;
  margin-inline: auto;
  padding-inline: 15px;
  box-sizing: border-box;
}

/* ---- Hero: fill viewport BELOW navbar, then center ---- */
.tm-section-home {
  min-height: calc(100vh - var(--navbar-height));
  justify-content: flex-start;   /* was center */
  align-items: stretch;
  padding-top: clamp(1.5rem, 5vh, 3rem);  /* small gap under navbar only */
  padding-bottom: 2rem;
  box-sizing: border-box;
}

.tm-section-home .tm-page-content-width {
  min-height: 0;
  display: block;        /* stop inner vertical centering */
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
}

/* Services + contact: start near the top, under the navbar */
.tm-section-services {
  justify-content: flex-start;
  /* space below fixed navbar — tune 1.5rem–3rem */
  padding-top: 3rem;
  padding-bottom: 3rem;
  box-sizing: border-box;
}

.tm-section-services .tm-page-content-width {
  min-height: 0;              /* was forcing a huge tall box + centering */
  display: block;             /* drop flex centering */
  padding-top: 0;
  justify-content: flex-start;
}

/* Optional desktop parallax-ish feel without JS */
@supports (background-attachment: fixed) {
  .tm-section {
    background-attachment: fixed;
  }
}

@media (max-width: 991.98px) {
  .tm-section {
    background-attachment: scroll;
    min-height: auto;
    padding-block: 3rem;
  }
}

.tm-section-home {
  /* was min-height: 1100 (invalid). Prefer same as other sections. */
}

/* ---- Content width ----------------------------------------------------- */

.tm-page-content-width {
  max-width: 1200px;
  width: 100%;
  margin-inline: auto;
  padding-inline: 15px;
  box-sizing: border-box;
}

.tm-padding-b {
  padding-bottom: 5rem;
}

/* ---- Text panels ------------------------------------------------------- */

.tm-textbox {
  max-width: 800px;
  width: 100%;
  padding: 2.5rem; /* 40px — slightly tighter than 50px on small screens via clamp below */
  padding: clamp(1.5rem, 4vw, 3.125rem);
  overflow: auto;
  font-weight: 500;
  box-sizing: border-box;
}

.tm-content-box-right {
  margin-left: auto;
  margin-right: 0;
}

.tm-services-box {
  margin-bottom: 1.25rem;
}

.tm-section-title {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  margin-bottom: 2rem;
}

.tm-blue-text {
  color: rgb(20, 103, 159);
}

/* Keep only if you still use them in markup */
.tm-green-text { color: #96c700; }
.tm-red-text   { color: #983333; }

.tm-white-bg {
  background-color: #fff;
  color: #676362;
}

.tm-translucent-white-bg {
  background-color: rgba(255, 255, 255, 0.58);
}

/* ---- Buttons (works for <a class="tm-btn"> and <button>) --------------- */

.tm-btn,
.tm-btn:visited {
  display: inline-block;
  float: none;              /* was float:right — use margin instead */
  margin-left: auto;
  color: #fff;
  background-color: rgb(20, 103, 159);
  padding: 0.625rem 1.25rem;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  text-align: center;
  line-height: 1.25;
  transition: background-color 0.15s ease-in-out;
}

/* Sit the button on the right inside the text box */
.tm-services-box .tm-btn,
.tm-textbox > .tm-btn {
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-top: 1rem;
}

.tm-btn:hover,
.tm-btn:focus {
  color: #fff;
  background-color: rgb(64, 172, 223);
  text-decoration: none;
}

.tm-btn:focus-visible {
  outline: 2px solid rgb(20, 103, 159);
  outline-offset: 3px;
}

/* ---- Contact form (scope so global Bootstrap forms stay normal) -------- */

/* Contact form fields — readable over busy backgrounds */
.tm-contact-form .form-control {
  background-color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 103, 159, 0.35);
  border-radius: 4px;
  color: #222;
  font-size: 1.15rem;
  font-weight: 400; /* don't inherit bold from .tm-textbox */
  padding: 0.9rem 1.25rem;
}

.tm-contact-form .form-control::placeholder {
  color: #6c757d;
  opacity: 1;
}

.tm-contact-form .form-control:focus {
  background-color: #fff;
  border-color: rgb(20, 103, 159);
  color: #222;
  box-shadow: 0 0 0 0.2rem rgba(20, 103, 159, 0.2);
  outline: 0;
}

/* Textarea grows cleanly */
.tm-contact-form textarea.form-control {
  resize: vertical;
  min-height: 8rem;
}

.tm-contact-form .form-group {
  margin-bottom: 1.2rem;
}

/* ---- Copyright strip on contact section -------------------------------- */

.tm-copyright-div {
  color: #fff;
  padding: 1.875rem 2.1875rem;
  text-align: right;
}

.tm-copyright-text {
  font-size: 1rem;
  margin-bottom: 0;
  font-weight: 300;
}