.en:not(:lang(en)),
.tr:not(:lang(tr)) {
  display: none;
}

:root {
  --bulma-primary-h: 213deg;
  --bulma-primary-l: 43%;
}

/* hide scrollbar for Chrome, Edge, and Safari */
::-webkit-scrollbar {
  display: none;
}

/* hide scrollbar for Firefox */
* {
  scrollbar-width: none;
  scrollbar-color: transparent transparent;
}

i {
  padding-right: 4px;
}

a {
  color: inherit;
}

a:hover {
  color: #0063db;
}

section p {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  line-height: 1.75rem;
}

.title {
  color: #0063db;
  font-size: 2.5rem !important;
  font-weight: 500 !important;
  margin-bottom: 30px !important;
}

.subtitle {
  color: #0063db;
  font-size: 1.5rem !important;
  font-weight: 500 !important;
  margin-bottom: 20px !important;
}

@media (max-width: 768px) {
  section p {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    line-height: 1.5rem;
  }

  .title {
    font-size: 1.75rem !important;
    margin-bottom: 2rem !important;
  }

  .subtitle {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
  }

  .head-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
    line-height: 2.5rem !important;
    margin-bottom: 0.5rem !important;
  }
}

.square-img-container {
  aspect-ratio: 1 / 1;
  max-width: 250px;
  margin: 0 auto;
  margin-bottom: 4px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

@media screen and (min-width: 1408px) {
  .container:not(.is-max-tablet):not(.is-max-desktop):not(.is-max-widescreen) {
    max-width: 1444px;
  }
}

/*============ Head section. ============*/
section#head {
  position: relative;
  overflow: hidden;
}

#head-hero-body-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
}

#crystal-container {
  position: relative;
  width: 50%;
  height: 1vh;
  min-height: 40rem;
}

/* Labels around the crystal */
.crystal-label {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  pointer-events: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0b3d91;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 99, 219, 0.18);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  box-shadow: 0 2px 10px rgba(0, 60, 150, 0.12);
  transition: opacity 0.4s ease;
}
.crystal-label.is-behind {
  opacity: 0.45;
}
@media (max-width: 768px) {
  .crystal-label {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
  }
}

#head-left-side {
  width: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

#head-content-container {
  position: relative;
  width: 100%;
  box-sizing: content-box;
  padding-bottom: 0.75rem; /* breathing room above the progress bar */
}

.head-content-item {
  transition: all 1.5s ease;
  text-align: left;
  position: absolute;
  opacity: 0;
}

.head-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 3.25rem;
  margin-bottom: 1.25rem;
  color: #0063db;
  text-wrap: balance; /* even line lengths, no lone last word */
}

.head-text {
  margin-bottom: 0;
}

#head-btn {
  margin-top: 1.2rem;
  width: fit-content;
}

.progress-container {
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 1rem;
  overflow: hidden;
}

.progress-bar {
  height: 0.125rem;
  width: 100%;
  border-radius: 1rem;
  background-color: #ffa126; /* logo orange */
  /* animated with transform (GPU) instead of width, so no layout work per frame */
  transform: scaleX(0);
  transform-origin: left center;
}
.progress-bar.animate {
  animation: progress-animation 8s linear forwards; /* = delayHead in index.html */
}

@keyframes progress-animation {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

/* Increase brand logo size */
.navbar-brand > .navbar-item {
  padding-top: 0;
  padding-bottom: 0;
}
.navbar-brand > .navbar-item img {
  max-height: 2.75rem;
}
/* Remove brand logo effects */
.navbar-brand .navbar-item:focus,
.navbar-brand .navbar-item:hover {
  background-color: transparent;
}

#navbarMenuHeroC {
  background-color: transparent;
  box-shadow: none;
}

.navbar-link:not(.is-arrowless):after {
  border-color: inherit !important;
}

.navbar a:hover {
  color: inherit;
}

@media (max-width: 1024px) {
  section#head {
    min-height: unset;
  }
  #navbarMenuHeroC {
    position: absolute;
    width: 100%;
  }
  .navbar-brand > .navbar-item img {
    max-height: 2.25rem;
  }
  #head-hero-body-container {
    flex-direction: column;
    gap: 2rem;
  }
  #head-left-side {
    width: 100%;
    max-width: 640px;
    align-items: center;
    gap: 1rem;
  }
  #crystal-container {
    width: 100%;
    height: 90vw;
    max-height: 40rem;
    min-height: 0;
  }
  .head-content-item {
    text-align: center;
  }
}

/* ============ Analytics section ============ */
section#analytics {
  height: 749px;
}

#analytics-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#analytics-circle-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  margin-top: 16px;
  /* because of circle margin-right */
  padding-right: 25px;
}

.analytics-circle {
  width: 20vw;
  height: 20vw;
  max-width: 160px;
  max-height: 160px;
  border: 14px solid #ccc;
  border-radius: 100%;
  transition: opacity 0.5s ease-out;
  margin-right: -25px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 75%;
}

@media (max-width: 768px) {
  section#analytics {
    height: 465px;
  }

  #analytics-circle-container {
    margin-top: 8px;
    margin-bottom: 16px;
    /*because of circle margin-right */
    padding-right: 12px;
  }

  .analytics-circle {
    border: 8px solid #ccc;
    margin-right: -12px;
  }
}

#analytics-text {
  max-width: 600px;
}

/*============ Solutions section. ============*/
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.solution-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid #e3eaf5;
  border-radius: 1rem;
  background: #fff;
  color: inherit;
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}
.solution-card:hover {
  color: inherit;
  border-color: #c9daf6;
  box-shadow: 0 10px 30px rgba(13, 92, 255, 0.1);
  transform: translateY(-3px);
}

.solution-card .square-img-container {
  width: 100%;
  max-width: 220px;
  margin: 0 auto 1.25rem;
  transition: transform 1s ease;
}
.solution-card:hover .square-img-container {
  transform: scale(1.05);
}

/* product photos: slightly brighter, livelier */
.solution-img-pqm,
.solution-img-sf6,
.solution-img-tcm {
  filter: brightness(1.07) contrast(1.1) saturate(1.4);
}
.solution-img-pqm {
  background-image: url("../img/pqm.png");
}
.solution-img-sf6 {
  background-image: url("../img/sf6.png");
}
.solution-img-tcm {
  background-image: url("../img/trafo.png");
}

/* "Tailor-made" card: crystal on a soft blue tile */
.solution-card-custom {
  background: linear-gradient(180deg, #ffffff 0%, #f1f6ff 100%);
}
.solution-img-custom {
  background-image: url("../img/custom-solution.png");
  background-color: #eaf2ff;
  background-size: auto 62% !important;
  border-radius: 1rem;
}

.solution-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #10264f;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

#solutions .solution-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #4a5872;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.solution-link {
  font-weight: 600;
  color: #0063db;
}

.solution-btn {
  display: inline-block;
  background: #0063db;
  color: #fff;
  font-weight: 500;
  border-radius: 0.25rem;
  padding: 0.6rem 1.25rem;
}
.solution-card-custom:hover .solution-btn {
  background: #3381e6;
}

@media (max-width: 1100px) {
  .solutions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .solutions-grid {
    grid-template-columns: 1fr;
  }
}

/* For the button that is in head section */
.cta-btn {
  align-items: center;
  background-clip: padding-box;
  background-color: #0063db;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 500;
  justify-content: center;
  line-height: 1.25;
  margin: 0;
  min-height: 3rem;
  padding: calc(0.875rem - 1px) calc(1.5rem - 1px);
  position: relative;
  text-decoration: none;
  transition: all 250ms;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: baseline;
  width: auto;
}
.cta-btn:hover,
.cta-btn:focus {
  color: #fff; /* keep white text now that the button is a link */
  background-color: #3381e6;
  box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
}
.cta-btn:hover {
  transform: translateY(-1px);
}
.cta-btn:active {
  background-color: #0063db;
  box-shadow: rgba(0, 0, 0, 0.06) 0 2px 4px;
  transform: translateY(0);
}

/* 3D views are loaded after the page; fade them in gently */
#crystal-container canvas,
#pqm-container canvas,
#sf6-container canvas,
#tcm-container canvas {
  animation: model-fade-in 0.6s ease both;
}
@keyframes model-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
