/* Embrapa-inspired Design Implementation */

/* Header Transition for Scroll Effect */
.header {
  transition: transform 0.3s ease-in-out;
}

.header.header-hidden {
  transform: translateY(-100%);
}

/* Banner Hero Moderno com Imagem de Fundo */
.hero-banner {
  /* Imagem do banner (local) + overlay para legibilidade */
  background:
    linear-gradient(rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.68)),
    url('../img/waqar-mujahid-NU_s4KI_zME-unsplash.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  color: white;
  padding: 7.5rem 1rem 11rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Caixa discreta para o conteúdo do banner (título + botões) */
.hero-banner .hero-text {
  max-width: 920px;
  margin: 0 auto;
  padding: 2.25rem 2.25rem;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.12);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}

.hero-banner .hero-text::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(15, 23, 42, 0.60), rgba(15, 23, 42, 0.60));
  z-index: -1;
}

.hero-banner .hero-text .btn-hero {
  margin: 0.45rem 0.4rem;
}

@media (min-width: 1024px) {
  .hero-banner {
    background-attachment: fixed;
  }
}

.hero-text h2 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.hero-text .lead {
  font-size: 1.35rem;
  color: #e2e8f0;
  max-width: 800px;
  margin: 0 auto 2.5rem auto;
  font-weight: 300;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.btn-hero {
  display: inline-block;
  background-color: var(--accent);
  color: white;
  padding: 1.2rem 3rem;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5);
  border: 2px solid transparent;
}

.btn-hero:hover {
  background-color: transparent;
  border-color: var(--accent);
  color: #ffffff;
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.7);
}

/* Funcionalidades - Cards Verticais Modernos */
.func-section {
  margin-top: -6rem; /* Sobreposição maior no banner */
  margin-bottom: 5rem;
  position: relative;
  z-index: 10;
}

.func-header {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
  text-align: center;
  margin-bottom: 3rem;
}

.func-header h3 {
  color: white; /* Título branco pois está sobre o banner */
  font-size: 2.2rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.func-header p {
  color: #e2e8f0;
  font-size: 1.1rem;
}

.func-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.func-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  height: 100%;
}

.func-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Removemos a lógica de reverse para padronizar verticalmente */
.func-card.reverse {
  grid-template-columns: 1fr;
}

.func-media {
  height: 240px;
  overflow: hidden;
  position: relative;
}

.func-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  border: none;
  transition: transform 0.5s ease;
}

.func-card:hover .func-media img {
  transform: scale(1.05); /* Zoom suave na imagem ao passar o mouse */
}

.func-text {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.func-text h4 {
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.func-text p {
  color: #64748b;
  font-size: 1rem;
  line-height: 1.6;
}

.func-cta {
  margin-top: 4rem;
  text-align: center;
}

/* Features Cards - Overlapping */
.features-section {
  margin-top: -5rem; /* Negative margin for overlap */
  position: relative;
  z-index: 10;
  margin-bottom: 4rem;
}

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

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: transform 0.3s ease;
  border-top: 4px solid transparent;
}

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

.feature-card.active-card {
  border-top-color: var(--accent);
}

.icon-circle {
  width: 60px;
  height: 60px;
  background-color: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1.5rem auto;
  color: var(--accent);
}

.active-card .icon-circle {
  background-color: #eff6ff; /* Light blue */
  color: var(--accent);
}

.feature-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Content Section */
.content-section {
  padding: 4rem 1rem;
}

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

.content-text h3 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  position: relative;
}

.content-text h3::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

.img-placeholder {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-weight: 600;
}

/* Mobile Responsiveness for New Design */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .content-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-text .lead {
    max-width: 100%;
    padding: 0 1rem;
  }

  .func-card,
  .func-card.reverse {
    grid-template-columns: 1fr;
  }

  .func-card.reverse .func-media {
    order: 0;
  }
}

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr; /* Stack cards */
    gap: 1.5rem;
  }
  
  .content-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-text h2 {
    font-size: 2rem;
  }
  
  .features-section {
    margin-top: -3rem;
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .func-section {
    margin-top: -3rem;
  }

  .func-header {
    padding: 2rem;
  }
}

/* Enhanced Mobile Optimization (< 600px) */
@media (max-width: 600px) {
  .hero-banner {
    padding: 4rem 1rem 6rem 1rem;
  }

  .hero-text h2 {
    font-size: 1.75rem;
  }

  .features-section {
    margin-top: -4rem;
    margin-left: 0;
    margin-right: 0;
    padding: 0 1rem;
  }

  .func-section {
    margin-top: -3.5rem;
  }

  .func-header {
    padding: 1.5rem;
  }

  .func-text h4 {
    font-size: 1.25rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .content-section {
    padding: 2rem 1rem;
  }

  .content-text h3 {
    font-size: 1.5rem;
  }

  .team-section {
    padding-top: 2rem;
  }

  .section-title-center {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }

  /* Force single column for team on mobile to prevent overflow */
  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Team Section */
.team-section {
  padding: 6rem 1rem 8rem 1rem;
  background-color: #f8fafc;
  text-align: center;
}

.section-title-center {
  font-size: 2.25rem;
  color: var(--primary);
  margin-bottom: 4rem;
  position: relative;
  display: inline-block;
  font-weight: 800;
}

.section-title-center::after {
  content: '';
  display: block;
  width: 60%;
  height: 5px;
  background: var(--accent);
  margin: 1rem auto 0 auto;
  border-radius: 4px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.team-card {
  background: transparent; /* Card transparente como na Embrapa/Institucional muitas vezes */
  padding: 1rem;
  border-radius: 16px; 
  /* Sem borda ou shadow no card em si para focar no avatar, ou um shadow bem leve */
  box-shadow: none; 
  transition: transform 0.3s ease;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.member-avatar {
  width: 180px; /* Aumento significativo (era 80px) */
  height: 180px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  /* Sombra elegante na esfera */
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 5px solid white; /* Borda branca para destacar do fundo */
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.team-card:hover .member-avatar {
  box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.2), 0 8px 10px -6px rgba(37, 99, 235, 0.2);
  border-color: var(--accent);
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.team-card:hover .member-avatar img {
  transform: scale(1.1);
}

.team-card h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.team-card .role {
  color: #334155;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.team-card .role-detail {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.lattes-link {
  display: inline-block;
  margin-top: auto;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 50px;
  transition: all 0.2s;
  text-decoration: none;
  font-weight: 600;
}

.lattes-link:hover {
  background-color: var(--accent);
  color: white;
}

/* Social Media Section */
.social-section {
  background-color: var(--primary);
  color: white;
  padding: 3rem 1rem;
  text-align: center;
}

.social-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  font-weight: 700;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-btn:hover {
  background-color: white;
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
}
