/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */


 /* @import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap'); */
 @import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Caveat:wght@400..700&family=Comfortaa:wght@300..700&family=Montserrat+Alternates:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000&display=swap');

:root {
  --primary-color: #556B73;
  --secondary-color: #E4E7DF;
  --font-color: var(--primary-color);
  --border-radius: 8px;
  --box-shadow: 0px 4px 14px #000;
  --text-shadow: 0px 1px 3px #000;
}

* {
  box-sizing: border-box;
  padding: 0; margin: 0;
  /* font-family: "Merriweather", serif; */
  /* font-family: "Comfortaa", sans-serif; */
  font-family: "Montserrat Alternates", sans-serif;
  /* font-family: "Sofia Sans", sans-serif; */
  /* font-family: "Mulish", sans-serif; */
  color: var(--font-color);
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) transparent;
  font-size: 16px;
  overscroll-behavior: contain;
  /* user-select: none; */
}

.text-right {
  text-align: right;
}

.flex {
  display: flex;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.text-center {
  text-align: center !important;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.gap-24 {
  gap: 24px
}

.gap-8 {
  gap: 8px
}

img {
  user-select: none;
  -drag: none;
  -moz-user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
}

.text-shadow {
  text-shadow: var(--text-shadow);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #99ABB6;
  height: 100vh;
  position:relative;
}

.no-scroll {
  overflow: hidden;
  /* -webkit-overflow-scrolling: touch;
  touch-action: none;
  -ms-touch-action: none; */
}

.btn {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  scale: 1;
  transition: scale 0.5s;
}

.btn:hover {
  scale: 1.02;
}

.btn:active {
  opacity: 0.5;
}

section {
  display: flex;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  /* scroll-snap-align: center; */
}

.for-mobile {
  display: none;
}

/* Home */

section#home {
  display: flex;
  justify-content: center;
}

#section-1-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("/assets/v2/section-1-background-07a475bc.webp") center center no-repeat;
  background-size: cover;
}

#home-content {
  width: min(100%, 700px);
  z-index: 1;
  color: var(--secondary-color);
  display: flex;
  flex-direction: column;
  margin-top: 8rem;
}

#home-content h1 * {
  color: var(--secondary-color);
}

#home-content h1 {
  display: flex;
}

#home-content h1 div {
  font-size: 3em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

#home-content h1 span {
  font-size: 1.3rem;
  color: var(--secondary-color);
  display: flex;
  font-weight: normal;
}

#home-content h2 {
  margin-top: 30px;
  font-size: 1em;
  font-weight: normal;
}

#home-content h1, #home-content h2, #home-content h3 {
  color: var(--secondary-color);

}

/* Education */

.services-grid-block, .contacts-grid-block {
  display: flex;
  flex-grow: 1;
  justify-content: center;
  align-items: center;
  width: 50%;
  position: relative;
}

section#education {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;

  padding: 70px 4% 24px 4%;
  background-color: rgb(221, 223, 230);
}

.education-block {
  /* background-color: var(--secondary-color); */
  background-color: rgb(251, 250, 251);
  padding: 32px;
  border-radius: var(--border-radius);
  /* box-shadow: var(--box-shadow); */
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.education-block .icon {
  display: flex;
  justify-content: center;
}

.education-block .icon i {
  font-size: 3.5em;
}

.education-block .title {
  text-align: center;
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 16px;
}

.education-block img {
  height: 100px;
  width: auto;
  transition: transform .3s ease;
  cursor: pointer;
}

.education-block img:hover {
  transform: scale(1.2);
}

.education-block .arrows span {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  border-right: 3px solid #5f6f76;
  border-bottom: 3px solid #5f6f76;
  transform: rotate(45deg);
}

.education-block .arrows span + span {
  margin-top: 6px;
}

#show-gallery {
  margin-left: auto;
  margin-right: auto;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 16px 56px;
  border-radius: var(--border-radius);
  cursor: pointer;
}

ul li {
  margin-bottom: 8px;
  text-align: justify;
  hyphens: auto;
}

/* gallery */

#gallery {
  position: relative;
  scroll-snap-type: y mandatory;
  background-color: #D9D9D9;
  justify-content: center;
  min-height: 400px;
}













.cert-slider {
  padding: 80px 40px;
  background: #efefef;
  text-align: center;
}

.cert-title {
  font-size: 32px;
  margin-bottom: 12px;
}

.cert-subtitle {
  max-width: 720px;
  margin: 0 auto 48px;
  color: #6c7a80;
}

.slider-viewport {
  overflow: hidden;
  width: 100%;
  cursor: grab;
}

.slider-viewport:active {
  cursor: grabbing;
}

.slider-track {
  display: flex;
  gap: 32px;
  will-change: transform;
  transition: transform .5s ease-out;
  touch-action: pan-y;
}

.slide {
  width: 360px;
  max-width: 100vw;
  height: 260px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,.12);
  flex-shrink: 0;
  transition: transform .3s ease;
  position: relative;
}

/* :not(.loaded) */
.slide:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -15px;
  margin-left: -15px;
  width: 25px;
  height: 25px;
  border-radius: 50px;
  border: 5px solid #99ABB6;
  border-top-color: var(--secondary-color);
  animation: loading 1s linear infinite;
}

.slide:has(img.loaded):before {
  display: none;
}

@keyframes loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}


.slide:hover {
  transform: scale(1.08);
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;

  flex-wrap: wrap;
  padding: 0 24px;
}

.pagination-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5db;
  cursor: pointer;
  transition: transform .3s ease, background .3s ease;
}

.pagination-dot.active {
  background: #5b7c8a;
  transform: scale(1.4);
}



.cert-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.cert-modal.active {
  display: block;
}

.cert-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
}

.cert-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  animation: modalFade .35s ease;
}

.cert-modal-content img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 40px 80px rgba(0,0,0,.4);
}

.cert-modal .close-modal-icon {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  z-index: 100;
  transition: transform 0.5s;
}

.cert-modal .close-modal-icon:hover {
  transform: rotate(180deg);
}


@keyframes modalFade {
  from {
    opacity: 0;
    transform: scale(.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Prevent background scroll when modal open */
body.modal-open {
  overflow: hidden;
}













/* services */

.services-separator {
  position: absolute;
  background-color: var(--primary-color);
}

.services-separator.line {
  left: calc(50% - 2px);
  width: 4px;
  top: 10%;
  bottom: 10%;
}

.services-separator.circle {
  left: calc(50% - 18px);
  top: 50%;
}

.services-grid-block {
  margin-top: 7rem;
  flex-direction: column;
  justify-content: start;
}

.services-card-title {
  width: min(400px, 100%);
  background-color: var(--secondary-color);
  padding: 16px;
  font-size: 1.2em;
  border-radius: var(--border-radius);
  display: flex;
  justify-content: center;
  margin: 20px;
  margin-bottom: 50px;
}


.services-content-content {
  width: min(450px, 100%)
}

.services-content-list-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.services-content-list-line span { flex: 1 }

/* Contacts */

section#contacts {
  background-color: var(--secondary-color);
}
section#contacts * {
  user-select: text;
}

.photo-image {
  aspect-ratio: 1 / 1;
  width: 70%;
  background-color: var(--primary-color);
  background-image: url("/assets/v2/profile-686edb78.webp");
  background-size: 130%;
  background-repeat: no-repeat;
  background-position-x: center;
  background-position-y: 25%;
  border-radius: 50%;
  position: relative;
}

.contacts-grid-block {
  padding: 24px;
}

.contacts-grid-block:nth-child(2n) {
  align-items: normal;
  padding-top: 180px;
}

#contacts-info-container {
  width: min(500px, 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#contacts-info-container .contact-item {
  display: flex;
  align-items: center;
  gap: 4px
}

#google-map {
  margin-top: 3rem;
  height: min(500px, 60%);
  width: 100%;
}

#phone-number i {
  animation: ring 3s ease-in-out infinite;
}

@keyframes ring {
  0% {
      transform: rotate(0deg);
  }
  5% {
      transform: rotate(15deg);
  }
  10% {
      transform: rotate(-15deg);
  }
  15% {
      transform: rotate(10deg);
  }
  20% {
      transform: rotate(-10deg);
  }
  25% {
      transform: rotate(5deg);
  }
  30% {
      transform: rotate(-5deg);
  }
  35% {
      transform: rotate(3deg);
  }
  40% {
      transform: rotate(-3deg);
  }
  45% {
      transform: rotate(1deg);
  }
  50% {
      transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
}


/* Navbar */

header {
  position: fixed;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  z-index: 10;
  padding: 8px 20px;
}

header.dark-navbar {
  height: 77px;
  background-color: var(--primary-color);
}

header * {
  color: var(--secondary-color);
}

.header-bg{
  position: absolute;
}

#logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

#logo img {
  max-height: 100%;
  /* filter: invert(1); */
  filter: invert(1) sepia(1) saturate(0) brightness(1.1) hue-rotate(20deg);
}

nav {
  margin-left: auto;
  display: flex;
  gap: 16px;
  z-index: 1;
}

nav a {
  text-decoration: none;
  padding: 8px 16px;
  /* border-radius: var(--border-radius); */
  cursor: pointer;
}

nav a div {
  transform: scale(1);
  text-shadow: 1px 1px 1px var(--primary-color);
  transition: all 0.3s;
}

nav a:hover div {
  /* outline: 1px solid var(--secondary-color); */
  transform: scale(1.05);
}

nav a.active {
  /* background-color: var(--secondary-color);
  color: var(--primary-color); */
  border-bottom: 2px solid var(--secondary-color);
}

.toggle i {
  text-shadow: 1px 1px 2px var(--primary-color);
}


/* Articles */

section.article-style {
  background-color: var(--secondary-color);
  padding: 100px 10% 24px 10%;
  gap: 32px;
  flex-direction: column;
  min-height: unset;
  counter-reset: footnotes footnote-elements;
  padding-bottom: 5rem;
}

section#articles {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
}

.card {
  width: calc(25% - 24px);
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  /* box-shadow: 0 0 0 5px #21283a; */
}

.card .img {
  border-radius: var(--border-radius);
  background-image: var(--background);
  background-position: center;
  background-size: cover;
  aspect-ratio: 4 / 3;
  transform: scale(1);
  transition: transform 0.3s;
}

.card:hover .img {
  transform: scale(1.03);
}

.card .date {
  text-align: right;
}

.card .title {
  font-weight: bold;
}

section.article-style p {
  text-indent: 24px;
  text-align: justify;
}

.text-align-justify {
  text-align: justify;
}


/* TMP */
section.article-style h1 {
  font-size: 3rem;
}

section.article-style h2 {
  font-size: 2.5rem;
}

section.article-style h3 {
  font-size: 2rem;
}

section.article-style h4 {
  font-size: 1.5rem;
}

/* Footnote links in text */
.footnote-item {
  counter-increment: footnotes;
  text-decoration: none;
}

.footnote-item:after {
  content: "[" counter(footnotes) "]";
  vertical-align: super;
  font-size: 60%;
  margin-left: .1em;
}

.footnote-element {
  counter-increment: footnote-elements;
}

.footnote-element:before {
  content: "[" counter(footnote-elements) "] ";
  vertical-align: super;
  font-size: 60%;
}
/* Footnote links in text */

section.article-style .articles-mobile-pre img {
  max-width: 600px;
  max-height: 350px;
}
