/* ==============================
   INDEX.CSS - Página Inicial
   Projeto: AncestrON
   Descrição: Estilos específicos para a página de início
   ============================== */

@import url("cores.css");

/* ==============================
   HERO SECTION - MELHORADO
   ============================== */
.hero {
  text-align: center;
  margin-bottom: 4rem;
  /* margin-top: 2rem; */
  animation: fadeInDown 0.8s ease;
}

.hero h2 {
  font-size: 2.8rem;
  font-family: 'Tan', serif;
  color: var(--cor-primaria);
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.hero p {
  max-width: 750px;
  margin: 0 auto;
  font-size: 1.15rem;
  color: var(--texto-corpo);
  line-height: 1.8;
  font-family: 'Alice', serif;
  font-weight: 400;
  letter-spacing: 0.3px;
}

/* ==============================
   CARDS SECTION - MELHORADO
   ============================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-bottom: 5rem;
}

.card {
  background: var(--bg-card);
  border: 2px solid var(--card-borda);
  border-radius: 16px;
  padding: 2.2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
  min-height: 340px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Efeito de hover elegante */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(163, 58, 38, 0.15);
  border-color: var(--cor-secundaria);
  background: var(--card-hover);
}

.card-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.card-title img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.card:hover .card-title img {
  transform: scale(1.12) rotate(5deg);
}

.card h3 {
  color: var(--cor-secundaria);
  font-size: 1.6rem;
  font-family: 'Tan', serif;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.card h4 {
  font-size: 1.05rem;
  color: var(--texto-corpo);
  font-family: 'Alice', serif;
  font-weight: 400;
  line-height: 1.7;
  margin: 0.5rem 0 0 0;
  flex-grow: 1;
  text-align: center;
}



/* ==============================
   FOOTER - MODERNO E ELEGANTE
   ============================== */
.footer {
  background: var(--bg-footer);
  color: var(--texto-claro);
  padding: 4rem 2rem 2rem;
  margin-top: 6rem;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--cor-terciaria);
  font-family: 'Tan', serif;
  letter-spacing: 0.5px;
}

/* Footer About Section */
.footer-about {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.footer-logo-img {
  height: 45px;
  width: auto;
  filter: brightness(1.1);
}

.footer-logo h3 {
  font-size: 1.5rem;
  font-family: 'Tan', serif;
  color: var(--cor-terciaria);
  margin: 0;
}

.footer-about p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  text-align: justify;
}

/* Footer Links Sections */
.footer-links ul,
.footer-categories ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a,
.footer-categories a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}

.footer-links a::before,
.footer-categories a::before {
  content: '';
  display: none;
}

.footer-links a::after,
.footer-categories a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--cor-terciaria);
  transition: width 0.3s ease;
}

.footer-links a:hover,
.footer-categories a:hover {
  color: var(--cor-terciaria);
  border-bottom-color: transparent;
}

.footer-links a:hover::before,
.footer-categories a:hover::before {
  display: none;
}

.footer-links a:hover::after,
.footer-categories a:hover::after {
  width: 100%;
}

/* Footer Contact Section */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.contact-info p {
  font-size: 0.9rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

.contact-info i {
  color: var(--cor-terciaria);
  width: 18px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--cor-terciaria);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  border: 2px solid var(--cor-terciaria);
}

.social-links a:hover {
  background: var(--cor-terciaria);
  color: var(--bg-footer);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(217, 164, 65, 0.3);
}

/* Footer Bottom */
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Responsividade Footer */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer {
    padding: 3rem 1.5rem 1.5rem;
  }

  .footer-logo {
    justify-content: center;
  }

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

  .footer-about p {
    text-align: center;
  }

  .footer-section h4 {
    text-align: center;
  }

  .footer-links ul,
  .footer-categories ul {
    align-items: center;
  }

  .contact-info {
    align-items: center;
  }

  .social-links {
    justify-content: center;
  }
}

/* ==============================
   FOOTER OVERRIDE - CORES VERDES
   ============================== */
.footer {
  background: linear-gradient(135deg, #4b5f36 0%, #3d4a2a 100%) !important;
  border-top-color: var(--cor-secundaria) !important;
}

.footer-section h4 {
  color: var(--cor-terciaria) !important;
}

/* ==============================
   ANIMAÇÕES
   ============================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.card {
  animation: slideUp 0.6s ease backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }
.card:nth-child(7) { animation-delay: 0.7s; }
.card:nth-child(8) { animation-delay: 0.8s; }
.card:nth-child(9) { animation-delay: 0.9s; }

/* ==============================
   ACESSIBILIDADE
   ============================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Focus visible para navegação por teclado */
.card:focus-visible {
  outline: 3px solid var(--cor-terciaria);
  outline-offset: 2px;
}

.footer-links a:focus-visible,
.footer-categories a:focus-visible,
.social-links a:focus-visible {
  outline: 2px solid var(--cor-terciaria);
  outline-offset: 2px;
}
