/* ===================================================
   Confidere — Menu com pop-ups
   =================================================== */

:root {
  --color-bg: #FEFEFE;

  --color-btn1: #1C7C7D;
  --color-btn1-accent: #B3D3D3;
  --color-btn1-active: #175F60;

  --color-btn2: #0A2540;
  --color-btn2-accent: #ADB6BF;
  --color-btn2-active: #071A2E;

  --color-btn3: #061826;
  --color-btn3-accent: #ADB6BF;
  --color-btn3-active: #030D14;

  --shadow-btn: 0 10px 22px rgba(6, 24, 38, 0.18);
  --shadow-btn-active: 0 4px 10px rgba(6, 24, 38, 0.22);

  --max-width: 430px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

.page {
  width: 100%;
  max-width: var(--max-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  position: relative;
  overflow-x: hidden;
}

/* ---------- Cabeçalho / fundo 1 e fundo 2 ---------- */

.header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 28px;
}

.fundo1 {
  width: min(84%, 340px);
  height: auto;
  z-index: 2;
}

.fundo2 {
  width: 100%;
  height: auto;
  margin-top: -8px;
  display: block;
}

/* ---------- Menu / botões ---------- */

.menu {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 0 45px 32px;
  margin-top: -70px; /* faz os botões ficarem levemente sobre a onda */
  position: relative;
  z-index: 3;
}

.menu-btn {
  position: relative;
  display: flex;
  align-items: center;
  height: 120px;
  padding: 0;
  border: none;
  border-radius: 18px;
  background: var(--color-bg);
  box-shadow: var(--shadow-btn);
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.menu-btn:active {
  background-color: #F4F6F6;
  box-shadow: var(--shadow-btn-active);
  transform: translateY(1px) scale(0.997);
}

.menu-btn:focus-visible {
  outline: 3px solid #1C7C7D;
  outline-offset: 2px;
}

/* Faixa de cor à esquerda, atrás do círculo */
.menu-btn__accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 65px;
  z-index: 1;
    border-radius: 18px;
}

.menu-btn--1 .menu-btn__accent { background: var(--color-btn1-accent); }
.menu-btn--2 .menu-btn__accent { background: var(--color-btn2-accent); }
.menu-btn--3 .menu-btn__accent { background: var(--color-btn3-accent); }

/* Círculo colorido com o ícone, centralizado na vertical do botão */
.menu-btn__circle {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  margin-left: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-btn--1 .menu-btn__circle { background: var(--color-btn1); }
.menu-btn--2 .menu-btn__circle { background: var(--color-btn2); }
.menu-btn--3 .menu-btn__circle { background: var(--color-btn3); }

.menu-btn__icon {
  width: 40px;
  height: 40px;
  display: block;
}

/* Texto (svg) à direita do círculo */
.menu-btn__text {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-height: 85px;
  height: auto;
  object-fit: contain;
  object-position: left center;
  margin-left: 16px;
  display: block;
}

/* Seta à direita, ponta oposta do botão */
.menu-btn__arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
}

.menu-btn__arrow svg {
  width: 9px;
  height: 15px;
}

.menu-btn--1 .menu-btn__arrow { color: var(--color-btn1); }
.menu-btn--2 .menu-btn__arrow { color: var(--color-btn2); }
.menu-btn--3 .menu-btn__arrow { color: var(--color-btn3); }

/* ---------- Overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease;
  z-index: 10;
}

.overlay.is-visible {
  visibility: visible;
}

.overlay.is-open {
  opacity: 1;
}

/* ---------- Pop-ups ---------- */

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(88vw, 380px);
  max-height: 82vh;
  background: var(--color-bg);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(6, 24, 38, 0.35);
  z-index: 11;

  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.28s ease, transform 0.28s ease;

  display: flex;
  flex-direction: column;
}

.popup.is-visible {
  visibility: visible;
}

.popup.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.popup__close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.popup--1 .popup__close { color: var(--color-btn1); }
.popup--2 .popup__close { color: var(--color-btn2); }
.popup--3 .popup__close { color: var(--color-btn3); }

.popup__content {
  padding: 28px 20px 20px;
  overflow-y: auto;
  display: flex;
  justify-content: center;
}

.popup__content img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Responsivo ---------- */

@media (max-width: 360px) {
  .menu-btn {
    height: 68px;
  }
  .menu-btn__circle {
    width: 48px;
    height: 48px;
    margin-left: 16px;
  }
  .menu-btn__accent {
    width: 80px;
  }
  .menu-btn__text {
    height: 17px;
    margin-left: 12px;
  }
}

@media (min-width: 431px) {
  body {
    background: #EDEDED;
  }
  .page {
    box-shadow: 0 0 40px rgba(0,0,0,0.08);
    margin: 24px 0;
    min-height: calc(100vh - 48px);
    border-radius: 18px;
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-btn,
  .overlay,
  .popup {
    transition: none;
  }
}
