/*
 * Loaded after Bootstrap. Keeps the original look after headings were
 * re-tagged for a correct outline (one <h1> per page, no repeated slider
 * headings).
 */

/* Page titles that used to be <h3> are now <h1 class="h3">. */
:where(h1.h3) {
  color: #a44141;
}

/* Hero slogan: formerly .goal h3 / .goal h4 */
.goal .goal-title,
.goal .goal-subtitle {
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.goal .goal-subtitle {
  border-style: solid;
  border-width: 5px 0 0 0;
  color: white;
  margin-right: 30px;
  border-image: linear-gradient(to right, #252f70 75%, #f39337 75%);
  border-image-slice: 1;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
}

@media only screen and (max-width: 1200px) {
  .goal .goal-title {
    font-size: 1.8rem;
  }
}

@media only screen and (max-width: 991px) {
  .goal .goal-subtitle {
    font-size: 1.3rem;
  }
  .goal .goal-title {
    font-size: 1.5rem;
  }
}

@media only screen and (max-width: 480px) {
  .goal .goal-title {
    font-size: 1.2rem;
  }
}

/* Company summary block on the home page */
.home-intro p {
  line-height: 1.75;
}

.home-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
}

.home-facts li {
  border-left: 4px solid #f39337;
  padding: 8px 0 8px 16px;
  color: #1e2255;
}

.home-facts strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.2;
}

/* Brand logos (replaces the static owl-carousel markup) */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 24px;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 40px 0 30px;
}

.brand-grid li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: rgba(99, 99, 99, 0.15) 0 2px 8px 0;
}

.brand-grid img {
  max-width: 100%;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Section intro text above post grids */
.section-intro {
  line-height: 1.75;
  margin-bottom: 40px;
}

.section-intro p {
  margin-bottom: 1rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 8px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  background: #1e2255;
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
}

.cta-button.secondary {
  background: transparent;
  color: #1e2255 !important;
  border: 1px solid #1e2255;
}

.cta-button:hover {
  background: #f39337;
  border-color: #f39337;
  color: #fff !important;
}

.contact-map {
  width: 100%;
  height: 360px;
  border: 0;
  border-radius: 8px;
  margin-top: 30px;
}

/* Card arrow icon: was a <button> nested inside a link */
.card .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50px;
  background: white;
}

.card .btn-icon img {
  width: 24px;
}

/* "Read more" in product cards: was a <button> nested inside a link */
.product-card .product-desc a.product-read-more {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: auto;
  height: auto;
  border: 1px solid #525ba6;
  color: #525ba6;
  border-radius: 5px;
  font-weight: 600;
  padding: 5px 20px;
  background-color: white;
  text-decoration: none;
}

.product-card .product-desc a.product-read-more:hover {
  color: white;
  border-color: white;
  background-color: #525ba6;
}

/* Hero branch links: label was an <h6> */
.slider-branch .h6 {
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

@media only screen and (max-width: 1200px) {
  .slider-branch .h6 {
    font-size: 0.9rem;
  }
}

/* News list: card labels/titles were <h6> */
.news-card p.h6.news-cat {
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.news-card .news-info h2.h6 {
  line-height: 1.2;
  margin-top: 0;
}

.news-card .news-info h2.h6 {
  font-size: 1.1rem;
}

@media only screen and (max-width: 1400px) {
  .news-card .news-info h2.h6 {
    font-size: 1rem;
  }
}

@media only screen and (max-width: 1200px) {
  .news-card .h6 {
    font-size: 0.9rem !important;
  }
}

/* Re-tagged section headings keep the colour of the tag they replaced */
h2.h3 {
  color: #a44141;
}

h2.h4,
h2.h5 {
  color: inherit;
}

.project-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.project-highlights li {
  border-left: 4px solid #f39337;
  padding: 6px 0 6px 14px;
}

.project-highlights strong {
  display: block;
  color: #1e2255;
}

/* Phone / email links added to the footer and contact page */
footer a,
a[href^="tel:"],
a[href^="mailto:"] {
  text-decoration: none;
  color: inherit;
}

footer a:hover,
a[href^="tel:"]:hover,
a[href^="mailto:"]:hover {
  text-decoration: underline;
}
