/* ============================================
   MADRIX HUB - ESTILOS PRINCIPAIS
   ============================================ */

/* Reset e Variáveis */
:root {
  --primary: #2a7a7a;
  --primary-light: #3a9a9a;
  --primary-dark: #1a5a5a;
  --accent: #4ab5b5;
  --background: #f8f9fa;
  --foreground: #1a1a1a;
  --foreground-light: #666666;
  --border: #e0e0e0;
  --card-bg: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
  color: var(--foreground-light);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-light);
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.25rem;
  }
}

/* ============================================
   HEADER E NAVEGAÇÃO
   ============================================ */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.logo img {
  height: 40px;
  width: 40px;
  object-fit: contain;
}

.logo-text {
  display: none;
}

@media (min-width: 768px) {
  .logo-text {
    display: inline;
  }
}

nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
}

nav.active {
  display: block;
}

nav a {
  display: block;
  padding: 0.75rem 0;
  color: var(--foreground-light);
  font-weight: 500;
  transition: var(--transition);
}

nav a:hover {
  color: var(--primary);
}

@media (min-width: 768px) {
  nav {
    display: flex;
    position: static;
    gap: 2rem;
    padding: 0;
    border: none;
    background: none;
  }

  nav a {
    padding: 0;
    display: inline-block;
  }
}

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

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--foreground);
  transition: var(--transition);
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

/* ============================================
   BOTÕES
   ============================================ */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-align: center;
}

.btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-full {
  width: 100%;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-icon {
  width: 48px;
  height: 48px;
  background-color: rgba(42, 122, 122, 0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* ============================================
   SEÇÕES
   ============================================ */

section {
  padding: 4rem 0;
}

@media (max-width: 768px) {
  section {
    padding: 2rem 0;
  }
}

.section-light {
  background-color: rgba(42, 122, 122, 0.05);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  margin-bottom: 1rem;
}

.section-title p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

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

.hero {
  padding: 4rem 0 6rem;
  background: linear-gradient(135deg, var(--background) 0%, rgba(42, 122, 122, 0.05) 100%);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
}

.hero-text h1 {
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }
}

.hero-image {
  height: 400px;
  background: linear-gradient(135deg, rgba(42, 122, 122, 0.2) 0%, rgba(74, 181, 181, 0.2) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-image img {
  max-width: 80%;
  height: auto;
  object-fit: contain;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: rgba(26, 26, 26, 0.05);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

.footer-section h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--foreground-light);
  font-size: 0.9rem;
}

.footer-section a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--foreground-light);
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

.footer-cookies {
  background-color: rgba(42, 122, 122, 0.1);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--foreground-light);
}

/* ============================================
   FORMULÁRIO
   ============================================ */

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(42, 122, 122, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-success {
  background-color: rgba(42, 122, 122, 0.1);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--primary);
}

/* ============================================
   UTILITÁRIOS
   ============================================ */

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.gap-3 {
  gap: 1.5rem;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--foreground-light);
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.hidden {
  display: none;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  section {
    padding: 2rem 0;
  }

  .hero {
    padding: 2rem 0 3rem;
  }
}

/* ============================================
   ANIMAÇÕES
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in {
  animation: slideIn 0.6s ease-out;
}

/* ============================================
   ACESSIBILIDADE
   ============================================ */

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}



/* ============================================
   IMAGENS E SECOES APRIMORADAS
   ============================================ */

.article-section {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.article-section:hover {
  box-shadow: var(--shadow-lg);
}

.article-with-image {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .article-with-image {
    grid-template-columns: 1fr 200px;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .article-with-image {
    grid-template-columns: 1fr;
  }
}

.article-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition);
}

.article-image:hover img {
  transform: scale(1.05);
}

.section-with-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .section-with-images {
    grid-template-columns: 1fr;
  }
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .image-gallery {
    grid-template-columns: 1fr;
  }
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.gallery-item:hover {
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.principle-card {
  background: linear-gradient(135deg, rgba(42, 122, 122, 0.05) 0%, rgba(74, 181, 181, 0.05) 100%);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.principle-card:hover {
  border-left-color: var(--accent);
  background: linear-gradient(135deg, rgba(42, 122, 122, 0.1) 0%, rgba(74, 181, 181, 0.1) 100%);
}

.principle-card h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.guide-step {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  border: 2px solid transparent;
  transition: var(--transition);
  position: relative;
  padding-left: 3rem;
  box-shadow: var(--shadow);
}

.guide-step:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.guide-step h3 {
  margin-top: 0;
  color: var(--primary);
}

.insight-box {
  background: linear-gradient(135deg, rgba(74, 181, 181, 0.1) 0%, rgba(42, 122, 122, 0.1) 100%);
  border-left: 5px solid var(--accent);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.insight-box strong {
  color: var(--primary);
}

.stat-box {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.stat-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--foreground-light);
  font-size: 0.95rem;
}

.side-image {
  width: 100%;
  max-width: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 0 auto;
}

.side-image img {
  width: 100%;
  height: auto;
  display: block;
}




/* ============================================
   SECAO DE ARTIGOS REDESENHADA
   ============================================ */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

.article-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.article-image-small {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(42, 122, 122, 0.1) 0%, rgba(74, 181, 181, 0.1) 100%);
}

.article-image-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.article-card:hover .article-image-small img {
  transform: scale(1.1);
}

.article-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.article-content h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.25rem;
  line-height: 1.4;
}

.article-content p {
  font-size: 0.95rem;
  color: var(--foreground-light);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--foreground-light);
  line-height: 1.5;
}

.article-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.article-list li strong {
  color: var(--primary);
}

