/* =========================================================
   COMPONENTES GLOBAIS - HEADER, FOOTER, COOKIES E BOTÕES
   Caminho recomendado: public_html/includes/estilo/includes.css
   ========================================================= */

/* Botões globais usados no header e em CTAs */
.header-btn,
.btn-primary,
.btn-secondary {
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  border: 0;
  transition: var(--transition);
}

.header-btn,
.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--pink), var(--blue-main) 58%, var(--blue-light));
  box-shadow: 0 18px 38px rgba(255, 0, 79, 0.22);
}

.header-btn:hover,
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(8, 0, 168, 0.35);
}

.btn-primary i,
.btn-secondary i {
  font-size: 18px;
  line-height: 1;
}

.btn-secondary {
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(8, 0, 168, 0.13);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  background: var(--white);
  box-shadow: 0 18px 36px rgba(5, 0, 63, 0.12);
}

/* Header */

.header {
  width: 100%;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(5, 0, 63, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 48px rgba(3, 0, 30, 0.28);
}

.header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(54, 214, 255, 0.7),
    rgba(255, 0, 79, 0.7),
    transparent
  );
  opacity: 0.8;
}

.header-content {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.logo-area {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.logo {
  width: 178px;
  height: auto;
}

.nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-width: 0;
}

.nav a,
.nav-dropdown-trigger {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav a::after,
.nav-dropdown-trigger::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -9px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  transition: var(--transition);
}

.nav a:hover,
.nav-dropdown-trigger:hover {
  color: var(--white);
}

.nav a:hover::after,
.nav-dropdown-trigger:hover::after {
  width: 100%;
}

.menu-toggle {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: none;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 26px;
}

.menu-toggle.is-active {
  background: rgba(255, 255, 255, 0.14);
}

/* Submenu Método */

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.nav-dropdown-trigger {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-dropdown-trigger i {
  font-size: 13px;
  line-height: 1;
  transition: var(--transition);
}

.nav-dropdown:hover .nav-dropdown-trigger i,
.nav-dropdown:focus-within .nav-dropdown-trigger i {
  transform: rotate(180deg);
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 22px);
  left: 50%;
  width: 258px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(5, 0, 63, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 70px rgba(3, 0, 30, 0.36);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: var(--transition);
  pointer-events: none;
  z-index: 160;
}

.nav-submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -24px;
  height: 24px;
}

.nav-dropdown:hover .nav-submenu,
.nav-dropdown:focus-within .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.nav-submenu a {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.76) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  white-space: normal;
}

.nav-submenu a::after {
  display: none !important;
}

.nav-submenu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white) !important;
  transform: none;
}

.nav-submenu span {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--pink), var(--blue-main) 58%, var(--blue-light));
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.nav-submenu strong {
  display: block;
  min-width: 0;
  color: inherit;
  font-size: 13px;
  line-height: 1.2;
}

/* Footer */

.footer {
  background: #03001e;
  color: var(--white);
  padding-top: 72px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 0.9fr;
  gap: 52px;
  padding-bottom: 58px;
}

.footer-brand img {
  width: 190px;
  height: auto;
  margin-bottom: 24px;
}

.footer-brand p {
  max-width: 360px;
}

.footer h4,
.footer-column h4 {
  color: var(--white);
  font-size: 16px;
  line-height: 1.2;
  margin-bottom: 18px;
}

.footer p,
.footer a,
.footer-column p,
.footer-column a {
  color: rgba(255, 255, 255, 0.67);
  font-size: 14px;
  line-height: 1.78;
}

.footer a,
.footer-column a {
  display: block;
  margin-bottom: 9px;
  transition: var(--transition);
}

.footer a:hover,
.footer-column a:hover {
  color: var(--white);
  transform: translateX(3px);
}

.footer-column a[target="_blank"] {
  word-break: break-word;
}

.footer-bottom {
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-bottom-content p,
.footer-bottom-content a {
  font-size: 13px;
}

.footer-bottom-content div {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Botão flutuante de suporte */

.floating-support-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--pink), var(--blue-main), var(--blue-light));
  box-shadow: 0 24px 54px rgba(8, 0, 168, 0.32);
  font-size: 14px;
  font-weight: 950;
  transition: var(--transition);
}

.floating-support-btn i {
  font-size: 22px;
}

.floating-support-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 64px rgba(255, 0, 79, 0.34);
}

/* Banner de Cookies */

.cookie-banner[hidden],
.cookie-preferences[hidden] {
  display: none !important;
}

.cookie-banner {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 9999;
  width: min(760px, calc(100% - 48px));
  background: linear-gradient(135deg, rgba(12, 8, 76, 0.98), rgba(18, 14, 96, 0.98));
  color: #ffffff;
  border: 1px solid rgba(54, 214, 255, 0.20);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(5, 0, 63, 0.42);
  padding: 20px 22px;
  backdrop-filter: blur(14px);
}

.cookie-content {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.cookie-text {
  flex: 1;
  max-width: 430px;
}

.cookie-text strong {
  display: block;
  font-size: 17px;
  margin-bottom: 8px;
}

.cookie-text p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 10px;
}

.cookie-text a {
  color: #36d6ff;
  font-size: 13px;
  font-weight: 850;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-actions button,
.cookie-preferences button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink), var(--blue-main));
  font-weight: 850;
}

.cookie-actions button:nth-child(2) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-preferences {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.cookie-preferences label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

.cookie-preferences input[type="checkbox"] {
  accent-color: #36d6ff;
}

/* Responsivo dos componentes globais */

@media (max-width: 1180px) {
  .nav {
    gap: 18px;
  }

  .nav a,
  .nav-dropdown-trigger {
    font-size: 13px;
  }

  .header-btn {
    padding: 0 20px;
  }
}

@media (max-width: 1120px) {
  .header-btn {
    display: none;
  }

  .nav {
    gap: 18px;
  }
}

@media (max-width: 980px) {
  .header-content {
    min-height: 78px;
  }

  .logo {
    width: 158px;
  }

  .menu-toggle {
    display: grid;
  }

  .nav {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 12px;
    border-radius: 24px;
    background: rgba(5, 0, 63, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a,
  .nav-dropdown-trigger {
    width: 100%;
    padding: 15px 16px;
    border-radius: 16px;
    font-size: 15px;
  }

  .nav a::after,
  .nav-dropdown-trigger::after {
    display: none;
  }

  .nav a:hover,
  .nav-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-dropdown {
    display: block;
    width: 100%;
  }

  .nav-dropdown-trigger {
    justify-content: space-between;
  }

  .nav-submenu {
    position: static;
    width: 100%;
    margin: 0 0 8px;
    padding: 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: none;
    border-radius: 16px;
  }

  .nav-submenu::before {
    display: none;
  }

  .nav-submenu a {
    padding: 12px !important;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .cookie-banner {
    width: min(680px, calc(100% - 32px));
    left: 16px;
    bottom: 16px;
    padding: 18px;
  }

  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-text {
    max-width: 100%;
  }

  .cookie-actions {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .btn-primary,
  .btn-secondary {
    width: 100%;
    min-height: 52px;
  }

  .floating-support-btn {
    right: 16px;
    bottom: 16px;
    min-height: 52px;
    padding: 0 16px;
  }

  .floating-support-btn span {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .footer-bottom-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom-content div {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .cookie-banner {
    width: calc(100% - 24px);
    left: 12px;
    bottom: 12px;
    padding: 16px;
    border-radius: 18px;
  }

  .cookie-actions,
  .cookie-preferences {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-actions button,
  .cookie-preferences button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .logo {
    width: 142px;
  }
}
