/* =========================================================
   CORREÇÕES GERAIS
========================================================= */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
  position: fixed;
  z-index: 1000;
}

.navbar-content {
  min-height: 76px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
}


/* =========================================================
   HERO
========================================================= */

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 48px;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.35rem);
}

.hero-subtitle {
  color: var(--text-muted);
}

.highlight {
  color: var(--primary);
}

.hero-image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 420px);
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 30px;
  background: linear-gradient(
    145deg,
    rgba(14, 165, 233, 0.16),
    rgba(8, 17, 31, 0.86)
  );
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.32),
    0 0 0 8px rgba(56, 189, 248, 0.04);
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  object-fit: contain;
}


/* =========================================================
   CARDS DE PROJETOS
========================================================= */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  margin-top: 42px;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

.project-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
}

.project-image-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #080f19;
}

.project-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.project-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.project-category {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-light);
  font-size: 0.78rem;
  font-weight: 600;
}

.project-title {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.25;
}

.project-highlight {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.08);
  color: #bae6fd;
  font-size: 0.9rem;
  line-height: 1.45;
}

.project-highlight span {
  flex-shrink: 0;
  color: var(--primary-light);
}

.project-highlight p {
  margin: 0;
}

.project-description {
  display: -webkit-box;
  overflow: hidden;
  min-height: 74px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 20px;
}

.project-tag {
  padding: 6px 10px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 999px;
  background: rgba(8, 17, 31, 0.72);
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}


/* =========================================================
   CARDS DE FERRAMENTAS
========================================================= */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 58px;
}

.tool-card {
  min-height: 320px;
  padding: 32px 24px;
  text-align: center;
}

.tool-title {
  color: var(--text);
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tool-tag {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.06);
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 8px 12px;
}


/* =========================================================
   PROCESSO
========================================================= */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 56px;
}

.process-grid::before,
.process-card:not(:last-child)::after {
  background: rgba(14, 165, 233, 0.35);
}

.process-card {
  min-width: 0;
}


/* =========================================================
   MENU MOBILE
========================================================= */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-actions {
    margin-left: auto;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-menu {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    z-index: 999;
    display: block;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      visibility 0.2s ease;
  }

  .mobile-menu.menu-open,
  .mobile-menu.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 24px 24px;
    list-style: none;
  }

  .mobile-nav-link {
    display: block;
    padding: 12px 0;
    color: var(--text-muted);
    font-weight: 700;
  }

  .mobile-nav-link:hover,
  .mobile-nav-link:focus-visible {
    color: var(--primary-light);
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    gap: 36px;
    text-align: center;
  }

  .hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-buttons,
  .hero-social-links {
    justify-content: center;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-image-wrapper {
    width: min(88vw, 360px);
  }

  .projects-grid,
  .tools-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .project-image-wrapper {
    height: 210px;
  }
}


/* =========================================================
   TABLET
========================================================= */

@media (min-width: 769px) and (max-width: 1100px) {
  .container {
    width: min(100% - 48px, 920px);
    margin-inline: auto;
  }

  .hero-section {
    min-height: auto;
    padding: 110px 0 80px;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    gap: 44px;
    text-align: center;
  }

  .hero-text {
    width: min(100%, 760px);
  }

  .hero-description {
    max-width: 700px;
    margin-inline: auto;
  }

  .hero-buttons,
  .hero-social-links {
    justify-content: center;
  }

  .hero-image-wrapper {
    width: min(70vw, 520px);
  }

  .projects-grid,
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 769px) and (max-width: 900px) {
  .projects-grid,
  .tools-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   SELETOR DE IDIOMA
========================================================= */

.language-switcher {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(8, 17, 31, 0.82);
}

.language-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 100%;
  padding: 0 11px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.language-option.active {
  background: var(--primary);
  color: #ffffff;
}

.language-option:hover,
.language-option:focus-visible {
  background: rgba(14, 165, 233, 0.18);
  color: var(--primary-light);
}

.language-option.active:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

.language-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
}