* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  padding-top: 10px;
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--main-color);
  color: black;
}

ul,
ol {
  list-style-type: none;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

section {
  width: 100%;
  margin: 0 auto;
}

h1 {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
}

h2 {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-semibold);
}

h3 {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-medium);
}

p {
  font-weight: var(--font-weight-regular);
}

:root {
  --main-color: #f8f8f8;
  --second-color: #00326f;
  --text-color: #1f2937;

  --font-size-main: 16px;
  --font-size-h1: 30px;
  --font-size-h2: 25px;
  --font-size-h3: 20px;

  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --border-radius: 5px;
  --box-shadow: 0 3px 3px rgba(146, 168, 22, 0.8);
}

.container {
  width: 375px;
  padding: 10px;
  margin: 0 auto;
}

/* Header */
.desktop-contact-link,
.desktop-nav {
  display: none;
}

/* Зникаючий ефект */
.header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--main-color);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
  height: 80px;
  color: var(--text-color);
}

.header-hidden {
  transform: translateY(-100%);
}

.logo-image {
  height: 60px;
  border-radius: 5px;
}

/* Footer */
.footer-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: space-between;
  align-items: center;
  color: var(--second-color);
  background-color: var(--main-color);
}

.footer-logo-image {
  width: 90px;
}

.footer-nav > li > a {
  color: var(--second-color);
  transition: color 0.5s ease-in-out;
}

.footer-nav > li > a:hover,
.contact-address-info > p > a:hover {
  color: var(--text-color);
}

.policy-container {
  padding-top: 90px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-color);
}

.page-contact-adr {
  display: none;
}

.terms-policy-contact-link {
  color: var(--second-color);
  border-bottom: 1px solid transparent;
  transition: border-bottom 0.5s ease;
}

.terms-policy-contact-link:hover {
  border-bottom: 1px solid var(--second-color);
}

/* Animation */

/* Hero */
@keyframes fadeDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-down {
  animation: fadeDown 0.6s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animate-gradient {
  background: linear-gradient(45deg, #00c6ff, #0072ff, #00c6ff);
  background-size: 400% 400%;
  animation: gradient 10s ease infinite;
}

/* Card */
.card {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 300px;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5); /* Затінений фон */
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Текст буде відображатися в нижній частині картки */
}

.overlay h3,
.overlay p {
  z-index: 1; /* Забезпечує, щоб текст був поверх затемнення */
}

.card {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.card .overlay {
  transition: background-color 0.3s ease-in-out;
}

.card:hover .overlay {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Form */
.spinner-border {
  border-top-color: transparent;
  border-radius: 50%;
  border-width: 4px;
  border-style: solid;
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media screen and (min-width: 768px) {
  body {
    font-size: 18px;
  }

  :root {
    --font-size-h1: 34px;
    --font-size-h2: 28px;
    --font-size-h3: 24px;
  }

  .container {
    width: 768px;
    padding: 15px;
  }

  /* Header */
  .desktop-contact-link,
  .desktop-nav {
    display: block;
  }

  .desktop-nav > ul {
    display: flex;
    gap: 25px;
  }

  .desktop-nav > ul > li {
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.5s ease;
    font-size: 16px;
  }

  .desktop-nav > ul > li:hover {
    border-bottom: 1px solid var(--second-color);
  }

  .desktop-contact-link {
    padding: 8px;
    border: 1px solid var(--text-color);
    border-radius: 8px;
    transition: background-color 0.5s ease, border 0.5s ease, color 0.5s ease;
    font-size: 14px;
  }

  .desktop-contact-link:hover {
    border: 1px solid var(--second-color);
    background-color: var(--second-color);
    color: var(--main-color);
  }

  .header-wrapper {
    height: 60px;
  }

  .logo-image {
    height: 50px;
  }

  /* Footer */
  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
  }
}

@media screen and (min-width: 1024px) {
  body {
    font-size: 20px;
  }

  :root {
    --font-size-h1: 36px;
    --font-size-h2: 30px;
    --font-size-h3: 26px;
  }

  .container {
    width: 1024px;
    padding: 20px;
  }

  /* Header */
  .header-wrapper {
    height: 70px;
  }

  .logo-image {
    height: 50px;
  }

  .desktop-nav > ul > li {
    font-size: 20px;
  }

  .desktop-contact-link {
    font-size: 18px;
  }

  /* Footer */
  .footer-container {
    gap: 30px;
    justify-content: start;
  }
}

@media screen and (min-width: 1440px) {
  body {
    font-size: 22px;
  }

  :root {
    --font-size-h1: 40px;
    --font-size-h2: 34px;
    --font-size-h3: 30px;
  }

  .container {
    width: 1440px;
    padding: 25px;
  }

  .logo-image {
    height: 60px;
  }
}

.policy-container {
  padding-top: 90px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-contact-wrapper {
  padding-top: 90px;
}
