/* =========================================
   GLOBAL RESET + CROSS BROWSER SUPPORT
========================================= */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;

  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Roboto", Arial, sans-serif;

  background: #f5f5f5;

  overflow-x: hidden;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

/* =========================================
   CONTAINER
========================================= */

.container {
  width: 90%;
  max-width: 1200px;

  margin: 0 auto;
}

/* =========================================
   HEADER
========================================= */

.header {
  position: sticky;
  top: 0;

  z-index: 999;

  background: #ffffff;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Safari sticky fix */

@supports (-webkit-touch-callout: none) {
  .header {
    position: -webkit-sticky;
  }
}

/* =========================================
   TOP BAR
========================================= */

.top-bar {
  padding: 10px 0;

  background: #111827;

  color: #ffffff;

  font-size: 13px;
}

.top-bar-content {
  display: flex;
  justify-content: center;
  align-items: center;

  text-align: center;

  letter-spacing: 1px;
}

/* =========================================
   MAIN HEADER
========================================= */

.main-header {
  background: #ffffff;

  border-bottom: 1px solid #e5e5e5;
}

.header-flex {
  position: relative;

  display: flex;
  justify-content: space-between;
  align-items: center;

  min-height: 80px;
}

/* =========================================
   LOGO
========================================= */

.logo {
  position: relative;
  z-index: 1002;

  display: flex;
  align-items: center;

  text-decoration: none;
}

.logo img {
  width: auto;
  height: 45px;

  object-fit: contain;

  filter: brightness(1.2);
}

/* =========================================
   HEADER CONTACTS
========================================= */

.header-contacts {
  position: absolute;

  right: 20px;
  bottom: 20px;

  display: flex;
  align-items: center;
  gap: 10px;

  font-size: 30px;

  text-decoration: none;
}

.fa-square-whatsapp {
  color: green;
}

.fa-envelope {
  color: #333333;
}

/* =========================================
   NAVBAR
========================================= */

.navbar {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;

  gap: 35px;

  list-style: none;
}

.nav-links li {
  position: relative;
}

/* =========================================
   NAV LINKS
========================================= */

.nav-links a {
  position: relative;

  display: block;

  padding: 30px 0;

  color: #222222;

  text-decoration: none;

  font-size: 15px;
  font-weight: 600;

  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

/* UNDERLINE */

.nav-links a::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: 0;

  width: 0;
  height: 24px;

  border-bottom: 3px solid #25aae1;

  transition: width 0.3s ease-in-out;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 97%;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #000000;
}

/* =========================================
   DROPDOWN MENU
========================================= */

.dropdown {
  position: absolute;

  top: 100%;
  left: 0;

  min-width: 240px;

  padding: 12px 0;

  list-style: none;

  background: #ffffff;

  border-radius: 10px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

  opacity: 0;
  visibility: hidden;

  transform: translateY(10px);

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;

  z-index: 999;
}

.dropdown li {
  width: 100%;
}

.dropdown a {
  padding: 12px 20px;

  font-size: 14px;
  font-weight: 500;
}

.dropdown a::after {
  display: none;
}

.dropdown a:hover,
.dropdown a:focus-visible {
  background: #f5f5f5;
}

/* DESKTOP HOVER */

.dropdown-parent:hover .dropdown,
.dropdown-parent:focus-within .dropdown {
  opacity: 1;
  visibility: visible;

  transform: translateY(0);
}

/* =========================================
   MEGA MENU
========================================= */

.mega-parent {
  position: relative;
}

.mega-menu {
  position: absolute;

  top: 100%;
  left: 50%;

  width: 750px;

  display: flex;
  justify-content: space-between;

  padding: 25px;

  background: #ffffff;

  border-radius: 12px;

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);

  opacity: 0;
  visibility: hidden;

  transform: translateX(-50%) translateY(10px);

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;

  z-index: 999;
}

/* SHOW */

.mega-parent:hover .mega-menu,
.mega-parent:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;

  transform: translateX(-50%) translateY(0);
}

/* =========================================
   MEGA COLUMNS
========================================= */

.mega-column {
  width: 33%;
}

.mega-column h4 {
  margin-bottom: 12px;
  padding-bottom: 8px;

  border-bottom: 1px solid #eeeeee;

  color: #111827;

  font-size: 14px;
  font-weight: 700;
}

.mega-column ul {
  list-style: none;
}

.mega-column ul li a {
  display: block;

  padding: 8px 0;

  color: #333333;

  text-decoration: none;

  font-size: 14px;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.mega-column ul li a:hover,
.mega-column ul li a:focus-visible {
  color: #25aae1;

  transform: translateX(4px);
}

/* =========================================
   MOBILE MENU BUTTON
========================================= */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  width: 45px;
  height: 45px;

  gap: 6px;

  background: transparent;

  border: none;

  cursor: pointer;

  z-index: 1002;

  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  width: 28px;
  height: 3px;

  border-radius: 10px;

  background: #111827;

  transition:
    transform 0.4s ease,
    opacity 0.4s ease,
    background-color 0.2s ease;
}

/* ACTIVE */

.menu-toggle.active span {
  background: #111827;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* =========================================
   ACCESSIBILITY
========================================= */

a:focus-visible,
button:focus-visible {
  outline: 2px solid #25aae1;
  outline-offset: 3px;
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {
  .header-flex {
    min-height: 70px;
  }

  .navbar {
    display: flex;
    align-items: center;
  }

  /* HAMBURGER */

  .menu-toggle {
    display: flex;

    margin-left: auto;
  }

  /* MOBILE MENU */

  .nav-links {
    position: fixed;

    top: 0;
    left: -100%;

    width: 100%;
    height: 100vh;

    overflow-y: auto;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 0;

    padding: 130px 25px;

    background: #ffffff;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);

    transition: left 0.35s ease;

    z-index: 99;

    /* Smooth iOS scrolling */
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    width: 100%;

    padding: 18px 0;

    border-bottom: 1px solid #f1f1f1;
  }

  .nav-links a::after {
    display: none;
  }

  .mega-column ul li a {
    padding-left: 12px;
  }

  /* MOBILE DROPDOWN */

  .dropdown,
  .mega-menu {
    position: static !important;

    width: 100%;

    display: none;

    padding: 0;

    opacity: 1;
    visibility: visible;

    transform: none !important;

    border-radius: 0;

    box-shadow: none;
  }

  .dropdown-parent.active .dropdown,
  .mega-parent.active .mega-menu {
    display: block;
  }

  /* MEGA MENU STACK */

  .mega-menu {
    flex-direction: column;

    padding: 10px 0 10px 15px;
  }

  .mega-column {
    width: 100%;

    margin-bottom: 15px;
  }

  .mega-column h4 {
    margin-top: 10px;
  }

  /* CONTACTS */

  .header-contacts {
    right: 70px;
    bottom: 18px;

    font-size: 24px;
  }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {
  .container {
    width: calc(100% - 30px);
  }

  .logo img {
    height: 40px;
  }

  .nav-links {
    padding: 110px 20px;
  }
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}