:root {
  --color-primary:    #12AEA1;
  --color-heading:    #374A99;
  --color-nav-text:   #13887E;
  --color-text:       #151E42;
  --color-text-light: #4C66D0;
  --shadow-card:      4px 4px 10px 0 rgba(76, 102, 208, 0.25);

  /* Animation timing — change these to adjust speed site-wide */
  --hero-duration:    0.65s;   /* hero load animation duration      */
  --hero-delay-step:  0.13s;   /* delay between each hero element   */
  --reveal-duration:  0.55s;   /* scroll-reveal animation duration  */
  --reveal-stagger:   0.12s;   /* delay between staggered siblings  */
}

body, h1, h2, h3, h4, h5, h6, p, span, a, li {
  font-family: "Poppins", sans-serif;
}

.page-background {
  position: fixed;
  inset: 0;
  z-index: -100;
  background-image: url('../img/bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

body {
  background-color: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ─── Typography ─────────────────────────────────────────────────────────── */

section h1,
section h2 {
  color: var(--color-heading);
  font-weight: 300;
  font-size: 2rem;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 30px;
  max-width: 30ch;
  margin-left: auto;
  margin-right: auto;
}

section h3 {
  color: var(--color-heading);
  font-weight: 300;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.section-label {
  color: var(--color-text-light);
  display: block;
  font-weight: 400;
  font-size: 1rem;
}

/* ─── Section Spacing ────────────────────────────────────────────────────── */

main section {
  padding-top: 80px;
  padding-bottom: 80px;
}

@media (max-width: 768px) {
  main section {
    padding-top: 50px;
    padding-bottom: 50px;
  }
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn-primary {
  background-color: var(--color-primary);
  border: none;
  padding: 15px 40px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(30, 178, 166, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 30px;
  font-size: 14px;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #17a095;
  border: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(30, 178, 166, 0.4);
}

.btn-primary:active {
  background-color: var(--color-text-light) !important;
}

/* ─── Navbar ─────────────────────────────────────────────────────────────── */

.navbar-toggler {
  border: none;
  box-shadow: none;
}

.navbar-toggler:focus,
.navbar-toggler:active {
  box-shadow: none;
  outline: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(19,136,126,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ─── Full-Screen Mobile Overlay ─────────────────────────────────────────────
   Position/layout is driven by .overlay-open / .overlay-closing on the
   navbar — never by Bootstrap's own .show / .collapsing — so the overlay
   stays fixed even during the 1-frame gap where Bootstrap swaps classes.    */

.logo-white {
  display: none;
}

@media (max-width: 991.98px) {
  .navbar.overlay-open .navbar-collapse,
  .navbar.overlay-closing .navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh !important;
    background-color: var(--color-primary);
    z-index: 1040;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 80px 24px 40px;
  }

  /* Fade in when opening */
  .navbar.overlay-open .navbar-collapse.collapsing {
    opacity: 0;
    transition: opacity 0.25s ease !important;
  }

  .navbar.overlay-open .navbar-collapse.show {
    opacity: 1;
    transition: opacity 0.25s ease;
  }

  /* Fade out when closing */
  .navbar.overlay-closing .navbar-collapse {
    opacity: 0;
    transition: opacity 0.25s ease !important;
    pointer-events: none;
  }

  /* Brand and toggler float above the overlay */
  .navbar.overlay-open .navbar-brand,
  .navbar.overlay-open .navbar-toggler,
  .navbar.overlay-closing .navbar-brand,
  .navbar.overlay-closing .navbar-toggler {
    position: relative;
    z-index: 1042;
  }

  /* Logo swap */
  .navbar.overlay-open .logo-default,
  .navbar.overlay-closing .logo-default {
    display: none;
  }

  .navbar.overlay-open .logo-white,
  .navbar.overlay-closing .logo-white {
    display: inline-block;
  }

  /* Toggler: X icon when overlay open or closing */
  .navbar.overlay-open .navbar-toggler,
  .navbar.overlay-closing .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
  }

  .navbar.overlay-open .navbar-toggler {
    pointer-events: auto;
  }

  .navbar.overlay-open .navbar-toggler-icon,
  .navbar.overlay-closing .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cline x1='4' y1='4' x2='26' y2='26' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3e%3cline x1='26' y1='4' x2='4' y2='26' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3e%3c/svg%3e");
  }

  /* Nav links in overlay */
  .navbar.overlay-open .navbar-collapse .navbar-nav,
  .navbar.overlay-closing .navbar-collapse .navbar-nav {
    width: 100%;
    align-items: center;
    gap: 0 !important;
  }

  .navbar.overlay-open .navbar-collapse .navbar-nav > .nav-item > .nav-link {
    color: #ffffff !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 14px 0 !important;
    text-align: center;
  }

  .navbar.overlay-open .navbar-collapse .navbar-nav > .nav-item > .nav-link:hover {
    color: #ffffff !important;
    opacity: 0.75;
  }

  /* Desktop lang dropdown hidden on mobile */
  .desktop-lang {
    display: none !important;
  }

  /* Mobile language selector */
  .mobile-lang .lang-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
  }

  .mobile-lang .lang-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg) translateY(-2px);
    transform-origin: center center;
    transition: none;
    vertical-align: middle;
  }

  .mobile-lang .lang-toggle[aria-expanded="true"] .lang-arrow {
    transform: rotate(225deg);
    position: relative;
    left: 2px;
    margin-top: 2px;
  }

  .mobile-lang-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 8px;
    padding-right: 20px;
  }

  .mobile-lang-options .lang-option {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 10px 0 !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .mobile-lang-options .lang-option.active-lang {
    color: #ffffff !important;
  }

  .mobile-lang-options .check-icon {
    width: 18px;
    height: 18px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-lang-options .check-icon::after {
    content: '';
    width: 6px;
    height: 16px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    display: block;
  }

  .mobile-lang-options .lang-option:not(.active-lang) .check-icon {
    visibility: hidden;
  }
}

@media (min-width: 992px) {
  .mobile-lang {
    display: none !important;
  }
}

.navbar .nav-link {
  color: var(--color-nav-text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 14px;
  line-height: 1;
}

.navbar .nav-link:hover {
  color: var(--color-primary);
}

.navbar .nav-link.dropdown-toggle {
  color: var(--color-text);
}

/* ─── Language Dropdown ───────────────────────────────────────────────────── */

.custom-lang-dropdown .dropdown-toggle::after {
  display: inline-block;
  margin-left: 0.5em;
  content: "";
  width: 8px;
  height: 8px;
  transform: rotate(45deg) translateY(-2px);
  transform-origin: center center;
  transition: none;
  border: 0 none;
  border-right: 2px solid var(--color-nav-text);
  border-bottom: 2px solid var(--color-nav-text);
  vertical-align: middle;
}

.custom-lang-dropdown .dropdown-toggle.show::after {
  transform: rotate(225deg);
  position: relative;
  left: 2px;
  margin-top: 2px;
}

.custom-lang-dropdown .dropdown-menu {
  padding: 10px 20px 10px 0;
  border-radius: 25px;
  border: none;
  background: #FFFFFF;
  box-shadow: 0 10px 40px rgba(21, 30, 66, 0.12);
  margin-top: 15px !important;
}

.custom-lang-dropdown .dropdown-item {
  color: var(--color-text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
  background: transparent !important;
  transition: color 0.2s ease;
}

.custom-lang-dropdown .dropdown-item:hover {
  color: var(--color-nav-text);
}

.custom-lang-dropdown .check-icon {
  width: 18px;
  height: 18px;
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-lang-dropdown .check-icon::after {
  content: '';
  width: 6px;
  height: 16px;
  border: solid var(--color-text-light);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  display: block;
}

.custom-lang-dropdown .dropdown-item:not(.active) .check-icon {
  visibility: hidden;
}

.custom-lang-dropdown .dropdown-item.active {
  color: var(--color-text);
}

/* ─── Body Copy ──────────────────────────────────────────────────────────── */

#hero p,
#experience p:not(.section-label),
#profiles p:not(.section-label),
#prices .description,
#privacy .description,
#prices .discount-note,
.testimonial-content p,
#benefits p,
#contacts p:not(.section-label) {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 400;
  line-height: 1.6;
  max-width: 650px;
}

#hero p {
  margin: 0 auto 40px;
}

#hero h1 {
  padding-bottom: 36px;
}

#hero ul li strong {
  color: var(--color-text-light);
  font-weight: 500;
}

#profiles h2,
#services h2,
#experience h2,
#prices .section-subtitle,
#clients h2,
#testimonials h2,
#benefits h2,
#privacy h1 {
  padding-bottom: 52px;
}

/* ─── Cards (shared) ─────────────────────────────────────────────────────── */

.profile-card,
#prices .price-card,
#privacy .card {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 45px 50px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease;
  cursor: default;
}

.profile-card:hover,
#prices .price-card:hover,
#privacy .card:hover {
  transform: translateY(-5px);
  border-color: var(--color-heading);
}

@media (max-width: 768px) {
  .profile-card,
  #prices .price-card,
  #privacy .card {
    padding: 35px 25px;
  }
}

/* ─── Services ───────────────────────────────────────────────────────────── */

#services ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
}

#services ul li {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 23px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease;
  padding: 24px;
  cursor: default;
  font-size: 14px;
  color: var(--color-text);
  font-weight: 400;
  line-height: 1.6;
}

#services ul li:hover {
  transform: translateX(5px);
  border-color: var(--color-heading);
}

/* ─── Experience Stats ───────────────────────────────────────────────────── */

.stat-card {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 40px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-card);
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-heading);
}

.stat-card h3 {
  color: var(--color-text-light);
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 10px;
}

.stat-card p {
  margin: 0 auto;
}

@media (max-width: 768px) {
  .stat-card {
    padding: 30px 15px;
  }
  .stat-card h3 {
    font-size: 2.5rem;
  }
}

/* ─── Pricing ────────────────────────────────────────────────────────────── */

#prices .section-subtitle,
#prices .title {
  color: var(--color-heading);
  font-weight: 300;
  font-size: 1.2rem;
  margin-top: 16px;
  margin-bottom: 0;
}

#prices ul,
#privacy ul {
  list-style: none;
  padding-left: 8px;
}

#prices ul li,
#privacy ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--color-text);
  font-weight: 400;
  line-height: 1.6;
  max-width: 650px;
}

#prices ul li::before,
#privacy ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #333;
}

.price-footer {
  margin-top: auto;
  padding-top: 25px;
}

.price-tag {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 20px;
}

.discount {
  color: var(--color-heading);
  font-weight: 500;
  font-size: 1.5rem;
}

#prices .promo-box .title {
  margin-top: 0;
}

#prices .promo-box .discount-note {
  font-weight: 200;
}

/* ─── Testimonials ───────────────────────────────────────────────────────── */

.testimonial-card {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 36px;
  height: 100%;
  display: flex;
  gap: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease;
  cursor: default;
  align-items: center;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-heading);
}

.testimonial-content h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 20px;
}

.client-logos-grid {
  padding-top: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.client-logos-grid img {
  max-width: 130px;
  height: auto;
  transition: transform 0.3s ease;
}

.client-logos-grid img:hover {
  transform: translateY(-5px);
}

@media (min-width: 992px) {
  .testimonial-row-1 {
    padding-left: 5%;
  }

  .testimonial-row-2 {
    justify-content: flex-end;
    padding-left: 10%;
  }

  .testimonial-row-3 {
    padding-left: 15%;
  }
}

@media (max-width: 768px) {
  .client-logos-grid {
    gap: 30px;
  }

  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 30px 20px;
  }

  .testimonial-logo {
    margin-bottom: 20px;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  .testimonial-logo img {
    max-width: 100px;
  }
}

/* ─── Contact Form ───────────────────────────────────────────────────────── */

#contacts .container p:not(.section-label) {
  margin: 0 auto 40px;
}

.contact-form {
  max-width: 400px;
}

.custom-input {
  border: 1px solid #31479C;
  border-radius: 12px;
  padding: 12px 20px;
  color: var(--color-text);
}

.custom-input::placeholder {
  color: #707070;
}

.custom-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.25rem rgba(26, 179, 157, 0.2);
  background-color: #fff;
}

.custom-radio {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.custom-radio input[type="radio"] {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  background: none;
}

.custom-radio input[type="radio"]:checked::after {
  content: "✓";
  position: absolute;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: bold;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.custom-radio input[type="radio"]:focus {
  box-shadow: none;
}

.custom-radio input[type="radio"]:checked {
  background-color: transparent;
  border-color: var(--color-primary);
}

.custom-radio input[type="radio"]:active {
  filter: brightness(90%);
}

.custom-radio label {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#contacts .btn-primary {
  margin-top: 0;
}

#contacts .container #form-success {
  padding: 80px 0 40px;
  animation: fadeUp var(--reveal-duration) ease both;
}

#contacts .container .form-error {
  padding-top: 16px;
  color: #c0392b;
  font-size: 14px;
  margin-top: 12px;
  text-align: right;
}

@keyframes btnPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.btn-primary.btn--sending,
.btn-primary.btn--sending:hover,
.btn-primary.btn--sending:focus {
  background-color: #0e9088;
  box-shadow: 0 6px 14px rgba(30, 178, 166, 0.2);
  transform: none;
  cursor: not-allowed;
  animation: btnPulse 1.2s ease-in-out infinite;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.footer-section {
  background-color: var(--color-primary);
  color: #FFFFFF;
  margin-top: 5rem;
}

.footer-section a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform 0.3s ease;
  text-transform: uppercase;
  display: inline-block;
}

.footer-section a:hover {
  opacity: 0.8;
  transform: translateY(-5px);
}

.footer-nav li {
  margin-bottom: 15px;
}

.footer-section .footer-socials .social-circle {
  width: 35px;
  height: 35px;
  background-color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.social-circle:hover {
  transform: translateY(-3px);
}

.social-circle img {
  width: 28px;
  height: auto;
}

@media (max-width: 768px) {
  .footer-logo {
    margin-top: 20px;
  }
}

/* ─── Privacy Page ───────────────────────────────────────────────────────── */

#privacy .card {
  border: none;
}

/* ─── Page Animations ────────────────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero: animate on load */
#hero h1 {
  animation: fadeUp var(--hero-duration) ease both;
}

#hero > .container > p {
  animation: fadeUp var(--hero-duration) ease var(--hero-delay-step) both;
}

#hero .list-unstyled {
  animation: fadeUp var(--hero-duration) ease calc(var(--hero-delay-step) * 2) both;
}

#hero .btn-primary {
  animation: fadeUp var(--hero-duration) ease calc(var(--hero-delay-step) * 3) both;
}

/* Scroll reveal — uses animation (not transition) so that after the reveal
   completes and JS strips [data-reveal], each element returns to its own CSS
   rules and hover transitions work normally again with no interference.      */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
}

[data-reveal].is-visible {
  animation: fadeUp var(--reveal-duration) ease forwards;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  #hero h1,
  #hero > .container > p,
  #hero .list-unstyled,
  #hero .btn-primary {
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  [data-reveal].is-visible {
    animation: none;
  }
}

.fi {
  background-size: contain;
  background-position: 50%;
  background-repeat: no-repeat;
  position: relative;
  display: inline-block;
  width: 1.33333333em;
  line-height: 1em;
}

.fi:before {
  content: "\00a0";
}

.fi-lv {
  background-image: url(../img/lv.svg);
}

.fi-gb {
  background-image: url(../img/gb.svg);
}