/* ==========================================================================
   INSTITUTO GUADAGNIN - CSS OFICIAL
   Manual da Marca:
   - Granito: #303030 (RGB: 48, 48, 48 | CMYK: 82, 79, 70, 48)
   - Inox:    #CFCFCF (RGB: 207, 207, 207 | CMYK: 22, 17, 18, 0)
   - Cinza:   #747070 (RGB: 116, 112, 112 | CMYK: 63, 57, 54, 2)
   - Branco:  #FFFFFF
   - Fonte Secundária Oficial: Poppins
   ========================================================================== */

:root {
  --granito: #303030;
  --granito-deep: #1E1E1E;
  --granito-dark: #282828;
  --granito-card: #323232;
  --granito-border: rgba(207, 207, 207, 0.12);
  --granito-border-hover: rgba(207, 207, 207, 0.35);

  --inox: #CFCFCF;
  --inox-light: #F0F0F0;
  --inox-soft: #A0A0A0;
  --cinza-suporte: #747070;

  --white: #FFFFFF;
  --wa-green: #25D366;
  --wa-hover: #1EBE5D;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--inox);
  background-color: var(--granito-deep);
  scrollbar-color: var(--granito-card) var(--granito-deep);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: var(--granito-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--cinza-suporte);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--inox);
}

::selection {
  background: var(--inox);
  color: #1E1E1E;
}

:focus-visible {
  outline: 2px solid var(--inox);
  outline-offset: 3px;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.02em;
}

.glass-header {
  background: rgba(30, 30, 30, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--granito-border);
}

.card-craft {
  background: var(--granito-card);
  border: 1px solid var(--granito-border);
  border-radius: 16px;
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.card-craft:hover {
  border-color: var(--granito-border-hover);
  transform: translateY(-2px);
}

/* BOTÃO PRIMÁRIO: INOX OFICIAL DA MARCA */
.btn-inox {
  background: var(--inox);
  color: #1E1E1E;
  font-weight: 600;
  transition: background-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.btn-inox:hover {
  background: var(--inox-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px -4px rgba(207, 207, 207, 0.25);
}

/* BOTÃO WHATSAPP OFICIAL */
.btn-wa-header {
  background: var(--wa-green);
  color: #FFFFFF;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.btn-wa-header:hover {
  background: var(--wa-hover);
  transform: translateY(-1px);
}

header nav a {
  white-space: nowrap;
}

/* FAQ ITEMS */
.faq-item {
  border: 1px solid var(--granito-border);
  border-radius: 14px;
  background: var(--granito-card);
  color: #E0E0E0;
  transition: border-color 0.25s ease, background-color 0.25s ease;
  overflow: hidden;
}

.faq-item:hover {
  border-color: rgba(207, 207, 207, 0.35);
}

.faq-item[open] {
  border-color: var(--inox);
  background: #3A3A3A;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.35rem 1.6rem;
  font-weight: 600;
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  font-size: 0.975rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-icon-svg {
  transition: transform 0.3s var(--ease-out);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--inox);
}

.faq-item[open] .faq-icon-svg {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 1.6rem 1.4rem 1.6rem;
  color: #C0C0C0;
  line-height: 1.75;
  font-size: 0.915rem;
}

/* WIDGET WHATSAPP */
.wa-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.wa-widget__toggle {
  pointer-events: auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--wa-green);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s var(--ease-out);
  position: relative;
}

.wa-widget__toggle:hover {
  transform: scale(1.06);
}

.wa-widget__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #E53935;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid #FFFFFF;
}

.wa-widget__bubble {
  pointer-events: auto;
  width: min(340px, calc(100vw - 36px));
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 20px 48px -16px rgba(0, 0, 0, 0.35);
  padding: 18px 20px;
  margin-bottom: 14px;
  position: relative;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out), visibility 0.35s;
}

.wa-widget__bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.wa-widget__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: #666666;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.wa-widget__close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #111111;
}

.wa-widget__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.wa-widget__avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.wa-widget__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--wa-green);
  display: block;
}

.wa-widget__status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--wa-green);
  border: 2px solid #FFFFFF;
}

.wa-widget__meta {
  display: flex;
  flex-direction: column;
}

.wa-widget__name {
  font-size: 0.95rem;
  color: #1E1E1E;
  font-weight: 700;
  line-height: 1.25;
}

.wa-widget__role {
  font-size: 0.75rem;
  color: #666666;
  line-height: 1.25;
  margin-top: 2px;
}

.wa-widget__body {
  background: #F4F6F5;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  position: relative;
}

.wa-widget__body p {
  margin: 0;
  font-size: 0.865rem;
  color: #2E2E2E;
  line-height: 1.5;
}

.wa-widget__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--wa-green);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s var(--ease-out);
}

.wa-widget__cta:hover {
  background: var(--wa-hover);
}

@media (max-width: 640px) {
  .wa-widget {
    right: 16px;
    bottom: 16px;
  }
  .wa-widget__toggle {
    width: 52px;
    height: 52px;
  }
  .wa-widget__bubble {
    width: calc(100vw - 32px);
  }
}

/* FILTROS DE CASOS REAIS: CORES DA MARCA */
.case-filter-btn {
  user-select: none;
  cursor: pointer;
  border: 1px solid var(--granito-border);
}
.case-filter-btn.active {
  background-color: var(--inox) !important;
  color: #1E1E1E !important;
  border-color: transparent !important;
}
.case-filter-btn:not(.active):hover {
  border-color: var(--inox);
  color: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .wa-widget__toggle,
  .wa-widget__bubble,
  .card-craft,
  .btn-inox,
  .faq-icon-svg {
    transition: none !important;
  }
}
