/* Variáveis de tema */
:root {
  --color-primary: #0b3b5a;
  --color-secondary: #00c2ff;
  --color-bg: #ffffff;
  --color-surface: #f4f6f8;
  --color-muted: #2a2f36;
  --color-text: #111318;
  --color-text-inverse: #ffffff;
  --shadow-elevated: 0 18px 40px rgba(11, 59, 90, 0.14);
  --radius-lg: 12px;
  --transition-fast: 0.2s ease;
  color-scheme: light;
}

html.dark-theme {
  --color-bg: #111318;
  --color-surface: #1a1f27;
  --color-muted: #2a2f36;
  --color-text: #f1f5f9;
  --color-text-inverse: #0b3b5a;
  --shadow-elevated: 0 20px 45px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

html.light-theme {
  --color-bg: #ffffff;
  --color-surface: #f4f6f8;
  --color-muted: #0b3b5a;
  --color-text: #111318;
  --color-text-inverse: #ffffff;
  --shadow-elevated: 0 18px 40px rgba(11, 59, 90, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  padding-top: 150px;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

main:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(17, 19, 24, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html.light-theme .site-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(11, 59, 90, 0.12);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem 1.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0b3b5a, #00c2ff);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 1px;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.3;
}

.brand-text p {
  margin: 0.3rem 0 0;
  color: rgba(241, 245, 249, 0.8);
  font-size: 0.95rem;
}

html.light-theme .brand-text p {
  color: rgba(17, 19, 24, 0.75);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-list {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 1.2rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

html.dark-theme .nav-list a {
  color: #f1f5f9;
}

html.light-theme .nav-list a {
  background: rgba(11, 59, 90, 0.08);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  transform: translateY(-2px);
  background: var(--color-secondary);
  color: #111318;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.section {
  margin-bottom: 3rem;
  scroll-margin-top: 140px;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  padding: 2rem;
  transition: transform var(--transition-fast);
}

.card:hover {
  transform: translateY(-4px);
}

.info-card {
  border: 1px solid rgba(0, 194, 255, 0.35);
  background: linear-gradient(135deg, rgba(0, 194, 255, 0.15), rgba(11, 59, 90, 0.15));
}

.info-card h2 {
  margin-top: 0;
}

.best-practices ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.platform-controls {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.platform-controls input {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  transition: border var(--transition-fast), background var(--transition-fast);
}

html.light-theme .platform-controls input {
  border: 1px solid rgba(11, 59, 90, 0.2);
  background: rgba(11, 59, 90, 0.05);
}

.platform-controls input:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.input-help {
  font-size: 0.85rem;
  color: rgba(241, 245, 249, 0.7);
}

html.light-theme .input-help {
  color: rgba(17, 19, 24, 0.7);
}

.accordion-item {
  margin-bottom: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 19, 24, 0.35);
  overflow: hidden;
}

html.light-theme .accordion-item {
  background: rgba(11, 59, 90, 0.06);
  border: 1px solid rgba(11, 59, 90, 0.12);
}

.accordion-trigger {
  width: 100%;
  padding: 1.2rem 1.5rem;
  text-align: left;
  background: transparent;
  color: inherit;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.accordion-trigger:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: -4px;
}

.accordion-trigger[aria-expanded="true"] {
  background: rgba(0, 194, 255, 0.12);
}

.accordion-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.accordion-description {
  font-size: 0.92rem;
  color: rgba(241, 245, 249, 0.75);
}

html.light-theme .accordion-description {
  color: rgba(17, 19, 24, 0.65);
}

.accordion-panel {
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

html.light-theme .accordion-panel {
  border-top: 1px solid rgba(11, 59, 90, 0.12);
}

.accordion-panel[aria-hidden="true"] {
  display: none;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.5rem 0;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.steps ol {
  padding-left: 1.25rem;
  margin: 0 0 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.btn.primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 194, 255, 0.25);
}

.btn.secondary {
  background: rgba(0, 194, 255, 0.12);
  color: var(--color-text);
  border: 1px solid rgba(0, 194, 255, 0.4);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px) scale(1.01);
}

.btn:focus-visible {
  outline: 2px solid rgba(0, 194, 255, 0.6);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(0) scale(0.99);
}

.protocols-table {
  display: grid;
  gap: 1rem;
}

.protocol-card {
  display: grid;
  gap: 0.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: rgba(0, 194, 255, 0.08);
  border: 1px solid rgba(0, 194, 255, 0.3);
}

.protocol-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.protocol-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.protocol-label {
  font-weight: 600;
  color: rgba(241, 245, 249, 0.8);
}

html.light-theme .protocol-label {
  color: rgba(17, 19, 24, 0.8);
}

.protocol-value {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  background: rgba(17, 19, 24, 0.55);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

html.light-theme .protocol-value {
  background: rgba(11, 59, 90, 0.1);
}

.alerts {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.alerts p {
  margin: 0;
}

.alerts .highlight {
  color: var(--color-secondary);
  font-weight: 600;
}

.test-form,
.final-checklist {
  margin-top: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group input,
.form-group select {
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  transition: border var(--transition-fast), background var(--transition-fast);
}

html.light-theme .form-group input,
html.light-theme .form-group select {
  border: 1px solid rgba(11, 59, 90, 0.2);
  background: rgba(11, 59, 90, 0.06);
}

.form-group input:focus-visible,
.form-group select:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.form-checkbox input {
  width: 1.1rem;
  height: 1.1rem;
}

.validation-feedback {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  font-weight: 500;
  display: none;
}

.validation-feedback.success {
  display: block;
  background: rgba(0, 194, 255, 0.15);
  color: var(--color-text);
  border: 1px solid rgba(0, 194, 255, 0.4);
}

.validation-feedback.error {
  display: block;
  background: rgba(255, 64, 64, 0.15);
  color: #ffb3b3;
  border: 1px solid rgba(255, 64, 64, 0.4);
}

html.light-theme .validation-feedback.error {
  color: #a30000;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.checklist-item input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--color-secondary);
}

.toast {
  position: fixed;
  top: 90px;
  right: 24px;
  background: rgba(0, 194, 255, 0.95);
  color: #111318;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 194, 255, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  min-width: 120px;
  text-align: center;
  font-weight: 600;
  z-index: 1200;
}

.copy-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  background: rgba(0, 194, 255, 0.18);
  color: var(--color-text);
  border: 1px solid rgba(0, 194, 255, 0.4);
}

.is-hidden {
  display: none !important;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem 1.5rem 3rem;
  text-align: center;
  color: rgba(241, 245, 249, 0.75);
  background: rgba(17, 19, 24, 0.6);
}

html.light-theme .site-footer {
  background: rgba(11, 59, 90, 0.08);
  border-top: 1px solid rgba(11, 59, 90, 0.12);
  color: rgba(17, 19, 24, 0.7);
}

.footer-link {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover,
.footer-link:focus-visible {
  text-decoration: underline;
}

/* Responsividade */
@media (min-width: 1200px) {
  body {
    padding-top: 140px;
  }

  .brand-text h1 {
    font-size: 1.6rem;
  }

  .brand-text p {
    font-size: 1rem;
  }

  .card {
    padding: 2.4rem;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .header-inner {
    padding: 1rem 2rem 0.75rem;
  }

  .nav-list {
    justify-content: center;
  }

  .platform-controls {
    flex-direction: row;
    align-items: center;
  }

  .platform-controls input {
    flex: 1;
  }
}

@media (max-width: 767px) {
  body {
    padding-top: 190px;
  }

  .header-inner {
    padding: 1rem 1.25rem;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

  .brand-text h1 {
    font-size: 1.2rem;
  }

  .nav-list {
    padding: 0 1.25rem 1rem;
    justify-content: center;
  }

  .accordion-trigger {
    padding: 1rem 1.2rem;
  }

  .accordion-panel {
    padding: 0 1.2rem 1.2rem;
  }
}

/* Estilos de impressão */
@media print {
  body {
    background: #ffffff;
    color: #000000;
    padding-top: 0;
  }

  .site-header,
  .nav-list,
  .video-wrapper,
  .toast,
  .site-footer {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #0b3b5a;
  }
}
