/* ==========================================================================
   GEMS Engineering – site template
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 300; font-display: swap;
  src: url('../fonts/ubuntu-v15-latin-ext_latin-300.woff2') format('woff2'), url('../fonts/ubuntu-v15-latin-ext_latin-300.woff') format('woff'); }
@font-face { font-family: 'Ubuntu'; font-style: italic; font-weight: 300; font-display: swap;
  src: url('../fonts/ubuntu-v15-latin-ext_latin-300italic.woff2') format('woff2'), url('../fonts/ubuntu-v15-latin-ext_latin-300italic.woff') format('woff'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/ubuntu-v15-latin-ext_latin-regular.woff2') format('woff2'), url('../fonts/ubuntu-v15-latin-ext_latin-regular.woff') format('woff'); }
@font-face { font-family: 'Ubuntu'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('../fonts/ubuntu-v15-latin-ext_latin-italic.woff2') format('woff2'), url('../fonts/ubuntu-v15-latin-ext_latin-italic.woff') format('woff'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/ubuntu-v15-latin-ext_latin-500.woff2') format('woff2'), url('../fonts/ubuntu-v15-latin-ext_latin-500.woff') format('woff'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/ubuntu-v15-latin-ext_latin-700.woff2') format('woff2'), url('../fonts/ubuntu-v15-latin-ext_latin-700.woff') format('woff'); }
@font-face { font-family: 'DM Serif Text'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/dm-serif-text-v5-latin-ext_latin-regular.woff2') format('woff2'), url('../fonts/dm-serif-text-v5-latin-ext_latin-regular.woff') format('woff'); }
@font-face { font-family: 'DM Serif Text'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('../fonts/dm-serif-text-v5-latin-ext_latin-italic.woff2') format('woff2'), url('../fonts/dm-serif-text-v5-latin-ext_latin-italic.woff') format('woff'); }

/* ---------- Base ---------- */
:root {
  --gems-yellow: #fed048;
  --gems-amber: #ffc107;
  --gems-dark-yellow: #d6aa2b;
  --gems-dark: #343a40;
  --gems-grey: #6c757d;
  --gems-light: #f8f9fa;
  --gems-panel: #e9ecef;
  --gems-serif: 'DM Serif Text', Georgia, serif;
  --gems-sans: 'Ubuntu', system-ui, sans-serif;
}
html { scroll-behavior: smooth; }
body { font-family: var(--gems-sans); font-weight: 300; color: #212529; overflow-x: hidden; }
strong, b { font-weight: 500; }
a { color: #0d6efd; }
a:hover { color: var(--gems-dark-yellow); }
img { max-width: 100%; height: auto; }

.text-dm, h1, h2, .page-header h1, .page-header h2 { font-family: var(--gems-serif); letter-spacing: .05rem; font-weight: 400; }
.text-yellow { color: var(--gems-yellow) !important; }
.text-amber  { color: var(--gems-amber) !important; }

/* Page titles (article / category headings) */
.com-content-article .page-header h1,
.com-content-article .page-header h2,
.com-content-category-blog > h1,
.com-content-category-blog .category-name,
.com-contact .page-header h1,
.com-contact .page-header h2,
.gems-main > .page-header h1,
.gems-title {
  color: var(--gems-amber);
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 678px) {
  .gems-title, .com-content-article .page-header h1, .com-content-article .page-header h2,
  .com-content-category-blog > h1, .com-contact .page-header h1 { font-size: 2rem; }
}

.gems-shadow::before, .gems-shadow::after { display: block; content: ''; height: 20px; width: 100%; background-size: cover; }
.gems-shadow::before { background-image: url('../images/shadow-top.png'); }
.gems-shadow::after  { background-image: url('../images/shadow-bottom.png'); background-position: bottom; }

/* ---------- Buttons ---------- */
.btn-gems, .btn-warning, .com-contact__form .btn-primary, .readmore .btn {
  background: var(--gems-yellow); border-color: var(--gems-yellow); color: #212529; font-weight: 300;
}
.btn-gems:hover, .btn-warning:hover, .com-contact__form .btn-primary:hover, .readmore .btn:hover {
  background: var(--gems-amber); border-color: var(--gems-amber); color: #212529;
}

/* ---------- Header / navigation ---------- */
.gems-header .navbar { padding-top: .75rem; padding-bottom: .75rem; }
.gems-header .navbar-brand img { max-height: 12vh; width: auto; max-width: 70vw; }
.gems-header .navbar-collapse { align-self: flex-end; }
.gems-header ul.mod-menu { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
@media (min-width: 992px) { .gems-header ul.mod-menu { flex-direction: row; align-items: center; } }
.gems-header ul.mod-menu > li { position: relative; }
.gems-header ul.mod-menu > li > a,
.gems-header ul.mod-menu > li > span { display: block; padding: .5rem .55rem; color: #000; text-decoration: none; font-weight: 300; }
.gems-header ul.mod-menu > li.current > a,
.gems-header ul.mod-menu > li.active > a,
.gems-header ul.mod-menu > li > a:hover { text-decoration: underline; }
.gems-header ul.mod-menu ul { list-style: none; padding: .25rem 0; margin: 0; background: #fff; }
@media (min-width: 992px) {
  .gems-header ul.mod-menu ul { display: none; position: absolute; right: 0; min-width: 14rem; box-shadow: 0 .25rem 1rem rgba(0,0,0,.15); z-index: 1000; }
  .gems-header ul.mod-menu li:hover > ul, .gems-header ul.mod-menu li:focus-within > ul { display: block; }
}
.gems-header ul.mod-menu ul a { display: block; padding: .4rem 1rem; color: #000; text-decoration: none; }
.gems-header ul.mod-menu ul a:hover, .gems-header ul.mod-menu ul .current > a { background: var(--gems-amber); }
.gems-header .mod-menu .gems-icon-linkedin > a, .gems-header .mod-menu .gems-icon-facebook > a { color: #0d6efd; }

/* Language switcher (flags) */
.gems-header .mod-languages { margin-left: .75rem; }
.gems-header .mod-languages ul { display: flex; gap: .5rem; list-style: none; margin: 0; padding: .5rem 0; }
.gems-header .mod-languages li.lang-active { display: none; }
.gems-header .mod-languages img { max-height: 1.3rem; width: auto; filter: drop-shadow(0 0 4px #ccc); }

/* ---------- Banner (hero) ---------- */
.gems-banner { background: url('../images/bg-dark.jpg') center / cover fixed; border: 1px solid #dee2e6; }
@supports (-webkit-touch-callout: none) { .gems-banner, .bg-d, .gems-dark { background-attachment: scroll !important; } }
.gems-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; max-width: 1140px; margin: 0 auto; padding: 6rem 1rem; }
.gems-hero-logo { flex: 0 0 22%; text-align: center; }
.gems-hero-logo img { width: 75%; transition: transform .5s ease; }
.gems-hero-logo img:hover { transform: scale(1.4) rotate(4deg); }
.gems-hero-box { flex: 1 1 60%; background: rgba(0,0,0,.7); padding: 3rem; color: #f8f9fa; }
.gems-hero-box h1, .gems-hero-box .h2 { font-family: var(--gems-sans); font-weight: 300; color: var(--gems-yellow); font-size: 2rem; letter-spacing: 0; }
.gems-hero-box p { margin-bottom: .5rem; }
.gems-hero-box .btn { margin-top: .5rem; }
@media (max-width: 991px) {
  .gems-hero { padding: 3rem 1rem; }
  .gems-hero-logo { flex: 0 0 100%; }
  .gems-hero-logo img { width: 40%; }
  .gems-hero-box { padding: 2rem; }
}
/* compact banner on subpages */
.is-subpage .gems-hero { padding: 1.5rem 1rem; }
.is-subpage .gems-hero-logo img { width: 50%; }
.is-subpage .gems-hero-box { padding: 1rem 1.5rem; font-size: 90%; }
.is-subpage .gems-hero-box .btn { display: none; }

/* ---------- Breadcrumbs ---------- */
.gems-breadcrumbs { font-size: .875rem; color: var(--gems-grey); padding-top: .25rem; }
.gems-breadcrumbs .breadcrumb { margin: 0; background: none; padding: 0; }
.gems-breadcrumbs .breadcrumb a { color: #0d6efd; }

/* ---------- Main ---------- */
.gems-main { padding-top: 3rem; padding-bottom: 3rem; }
.is-home .gems-main { padding-top: 3rem; padding-bottom: 0; }
.is-home .com-content-article .page-header { display: none; }
.com-content-article__body, .blog-item .item-content { text-align: justify; }
@media (max-width: 678px) { .com-content-article__body, .blog-item .item-content { text-align: left; } }
.com-content-article__body::after, .blog-item::after { content: ''; display: block; clear: both; }

/* Full-width dark section that can be used inside an article */
.gems-fullbleed { width: 100vw; position: relative; left: 50%; margin-left: -50vw; }
.gems-dark, .bg-d { background: var(--gems-dark) url('../images/bg-d.jpg') center / cover fixed; }
.gems-dark { padding: 3rem 0 2.5rem; margin-top: 3rem; text-align: left; }
.gems-dark > .gems-inner { max-width: 1140px; margin: 0 auto; padding: 0 1rem; }
.gems-dark h2 { color: var(--gems-yellow); text-align: center; font-size: 2.5rem; margin-bottom: 2rem; }

/* Eyebrow + section heading on the home page */
.gems-eyebrow { text-align: center; color: var(--gems-grey); text-transform: uppercase; font-size: 1rem; margin-bottom: .5rem; }
.gems-section-title { text-align: center; color: var(--gems-amber); font-size: 2.5rem; margin-bottom: 3rem; }

/* Four pillars */
.gems-pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
@media (max-width: 991px) { .gems-pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .gems-pillars { grid-template-columns: 1fr; } }
.gems-pillars figure { margin: 0; }
.gems-pillars img { transition: transform .5s ease; }
.gems-pillars img:hover { transform: scale(1.25) rotate(4deg); }
.gems-pillars figcaption { font-family: var(--gems-serif); color: var(--gems-amber); margin-top: 1.25rem; font-size: 1rem; letter-spacing: .05rem; }

/* Competency cards */
.gems-competencies { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 3rem; }
@media (max-width: 767px) { .gems-competencies { grid-template-columns: 1fr; } }
.gems-comp { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #000; border-radius: 1rem; overflow: hidden; background: var(--gems-light); transition: transform .3s linear, box-shadow .3s; }
.gems-comp:hover { transform: scale(1.03); box-shadow: 0 0 .75rem #111; position: relative; z-index: 1; }
.gems-comp-media { background: var(--gems-dark); display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.gems-comp-media img { max-height: 280px; width: auto; }
.gems-comp-text { padding: 1.5rem; display: flex; flex-direction: column; justify-content: center; }
.gems-comp-text h3 { font-family: var(--gems-sans); font-weight: 500; color: var(--gems-yellow); font-size: 1.5rem; }
.gems-comp.is-reversed .gems-comp-media { order: 2; }
.gems-comp.is-reversed .gems-comp-text { text-align: right; }
@media (max-width: 575px) {
  .gems-comp { grid-template-columns: 1fr; }
  .gems-comp.is-reversed .gems-comp-media { order: 0; }
  .gems-comp.is-reversed .gems-comp-text { text-align: left; }
}
.gems-comp details { margin-top: .5rem; }
.gems-comp summary { color: var(--gems-dark-yellow); cursor: pointer; text-transform: uppercase; font-size: .9rem; list-style: none; }
.gems-comp summary::-webkit-details-marker { display: none; }
.gems-comp details[open] summary { margin-bottom: .5rem; }
.gems-comp details ul { text-align: left; padding-left: 1.2rem; margin-bottom: 0; }
.gems-comp details h4 { font-family: var(--gems-serif); color: var(--gems-dark-yellow); font-size: 1.05rem; margin: .75rem 0 .25rem; text-align: left; }

/* Custom bullet list */
ul.gems-list { padding-left: 0; }
ul.gems-list li { list-style: none; padding-left: 2rem; margin: .25rem 0; background: no-repeat left center / 1.4rem
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23d6aa2b' d='M11 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm.5 2v1.5H13a.5.5 0 0 1 0 1h-1.5V10a.5.5 0 0 1-1 0V8.5H9a.5.5 0 0 1 0-1h1.5V6a.5.5 0 0 1 1 0zM6.5 8a4.5 4.5 0 0 0 .9 2.7H.5a.5.5 0 0 1 0-1h5.6A4.5 4.5 0 0 1 6.5 8zm.9-2.7H.5a.5.5 0 0 0 0 1h6.1c.1-.4.4-.7.8-1z'/%3E%3C/svg%3E"); }

/* ---------- Figures & galleries in articles ---------- */
figure.gems-figure, .item-image, .com-content-article .item-image {
  background: #fff; border: 1px solid #dee2e6; padding: .5rem; margin: 0 0 1rem 1.5rem; max-width: 300px; text-align: center;
}
figure.gems-figure { float: right; width: 30%; }
.item-image.float-end, figure.gems-figure { float: right; }
.item-image img, figure.gems-figure img { cursor: zoom-in; }
.item-image figcaption, figure.gems-figure figcaption { font-size: .8rem; color: var(--gems-grey); margin-top: .35rem; }
@media (max-width: 767px) {
  figure.gems-figure, .item-image, .com-content-article .item-image { float: none !important; width: 100%; max-width: 100%; margin: 0 0 1rem; }
}

.gems-gallery { clear: both; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.gems-gallery figure { margin: 0; background: #fff; border: 1px solid #dee2e6; padding: .5rem; text-align: center; }
.gems-gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; cursor: zoom-in; }
.gems-gallery figcaption { font-size: .8rem; color: var(--gems-grey); margin-top: .35rem; }

/* ---------- News items ---------- */
.com-content-article__body h2, .blog-item h2.gems-news-heading { clear: both; font-family: var(--gems-serif); color: var(--gems-grey); font-size: 1.9rem; margin-top: 2.5rem; }
.gems-news { clear: both; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 1.25rem; align-items: center; background: #fff; border: 1px solid #dee2e6; padding: 1rem 1.25rem; margin-bottom: 1rem; text-align: left; }
.gems-news > img, .gems-news-media img { width: 100%; cursor: zoom-in; }
.gems-news-media figcaption { font-size: .8rem; font-style: italic; text-align: center; }
.gems-news h3, .gems-news h4 { font-family: var(--gems-sans); font-weight: 500; font-size: 1.2rem; margin: 0 0 .25rem; }
.gems-news .gems-date { font-size: .85rem; color: var(--gems-grey); margin-bottom: .5rem; }
.gems-news p:last-child { margin-bottom: 0; }
.gems-news.no-image { grid-template-columns: 1fr; }
@media (max-width: 575px) { .gems-news { grid-template-columns: 1fr; } }

/* Logo / grant image floated to the right */
img.gems-float-right { float: right; width: 45%; margin: 0 0 1.5rem 1.5rem; box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); }
@media (max-width: 767px) { img.gems-float-right { float: none; width: 100%; margin: 0 0 1rem; } }

/* ---------- Project list (category blog) ---------- */
.com-content-category-blog .category-desc { text-align: justify; margin-bottom: 1.5rem; }
.com-content-category-blog .blog-item,
.com-content-category-blog .com-content-category-blog__item {
  background: var(--gems-panel); border-radius: .3rem; padding: 1.5rem 2rem; margin: 1.5rem 0;
}
.blog-item .page-header h2, .com-content-category-blog__item .page-header h2 { font-family: var(--gems-serif); font-size: 1.6rem; text-align: left; margin-bottom: 1rem; }
.blog-item .page-header h2 a { color: #0d6efd; text-decoration: none; }
.blog-item .page-header h2 a:hover { color: var(--gems-dark-yellow); }
.blog-item .readmore { clear: both; margin-top: .5rem; }
.blog-item .readmore a.btn { font-size: .95rem; }
.com-content-category-blog .items-leading > div, .com-content-category-blog .blog-items > div { width: 100%; }

/* ---------- Contact page ---------- */
.com-contact { max-width: 900px; margin: 0 auto; }
.com-contact .contact-miscinfo, .com-contact__miscinfo { background: var(--gems-light); padding: 1rem 1.25rem; border-left: 4px solid var(--gems-yellow); }
.com-contact__form { margin-bottom: 2rem; }
.com-contact h3 { font-family: var(--gems-serif); color: var(--gems-dark-yellow); }

/* ---------- Footer ---------- */
.gems-footer { padding: 3rem 1rem; color: #f8f9fa; }
.gems-footer a { color: var(--gems-yellow); text-decoration: none; }
.gems-footer a:hover { text-decoration: underline; color: var(--gems-yellow); }
.gems-footer ul.mod-menu { list-style: none; padding: 0; margin: 0; }
.gems-footer ul.mod-menu li { margin: .15rem 0; }
.gems-footer-wrap { margin-top: 2rem; }

/* ---------- Lightbox ---------- */
.gems-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.gems-lightbox[hidden] { display: none; }
.gems-lightbox figure { margin: 0; max-width: 95vw; max-height: 90vh; text-align: center; }
.gems-lightbox img { max-width: 100%; max-height: 80vh; background: #fff; }
.gems-lightbox figcaption { color: #fff; margin-top: .75rem; }
.gems-lightbox-close { position: absolute; top: 1rem; right: 1.5rem; background: none; border: 0; color: #fff; font-size: 2.5rem; line-height: 1; cursor: pointer; }

/* ---------- Misc ---------- */
.clear-both { clear: both; }
.system-pagebreak, hr#system-readmore { display: none; }

.gems-hero-title { font-family: var(--gems-sans); font-weight: 300; color: var(--gems-yellow); font-size: 2rem; margin-bottom: .75rem; }

/* --- fixes --- */
.com-content-article__body h2.gems-section-title { color: var(--gems-amber); font-size: 2.5rem; margin-top: 0; text-align: center; }
.com-content-article__body .gems-dark h2 { color: var(--gems-yellow); font-size: 2.5rem; margin-top: 0; text-align: center; }
.gems-footer ul.mod-menu { display: block; }
.gems-footer ul.mod-menu li a { padding: 0; display: inline; }
.gems-news { align-items: start; }
.com-contact.gems-contact { max-width: 1140px; }
.gems-contact legend { font-family: var(--gems-serif); color: var(--gems-dark-yellow); font-size: 1.4rem; }
.gems-contact .com-contact__miscinfo { margin-top: .5rem; }
.com-contact__form .controls .btn, .com-contact__form button[type=submit] { margin-top: 1rem; }
.gems-header .mod-menu img { height: 1.7rem; width: auto; }
@media (max-width: 991px) {
  .is-subpage .gems-hero-logo { display: none; }
  .gems-header ul.mod-menu > li > a { padding: .4rem 0; }
  .gems-header .mod-languages { margin-left: 0; }
}
