@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  
  --card-bg: #ffffff;
  --card-text: #0f172a;
  --card-text-muted: #64748b;
  
  /* Brand Accents */
  --accent-apolo-1: #fca5a5; /* Light Red */
  --accent-apolo-2: #fecdd3; /* Light Rose */
  --accent-grupo: #93C6A7;
  --accent-nextil: #1E36A4;
  --accent-apolo: #F59E0B;
  --accent-corretora: #10B981;
  --accent-talk: #E11D48;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  padding: 2rem 1rem;
}

/* Background animated blobs */
.bg-blobs {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-color);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-apolo-1);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-apolo-2);
  bottom: -200px;
  right: -100px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(100px, 50px) scale(1.2); }
  100% { transform: translate(-50px, 100px) scale(0.8); }
}

.container {
  max-width: 600px;
  width: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header Section */
header {
  text-align: center;
  margin-bottom: 1rem;
  animation: slideDown 0.8s ease-out;
}

.header-banner {
  width: 100%;
  height: 160px;
  background-image: url('public/fachada_gruponextil.webp');
  background-size: cover;
  background-position: center;
  border-radius: 32px;
  margin-bottom: -60px;
  position: relative;
  z-index: 0;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.logo-container {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: #ffffff;
  border: 6px solid var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
}

.logo-container img {
  width: 75%;
  height: auto;
  object-fit: contain;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

header p {
  color: var(--text-secondary); /* Corrigido para tema claro */
  font-size: 1rem; /* Tamanho mais elegante */
  font-weight: 400; /* Fonte um pouco mais forte para leitura */
  line-height: 1.5;
  max-width: 460px;
  margin: 0 auto 1rem auto; /* Mais espaço antes dos cards */
  text-align: center;
}

/* Bio Expander */
.bio-collapsed-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bio-collapsed-content.expanded {
  max-height: 500px;
  opacity: 1;
}

.bio-toggle-btn {
  background: transparent;
  border: none;
  color: var(--primary-color);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin: 5px auto 15px auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  opacity: 0.9;
}

.bio-toggle-btn:hover {
  text-decoration: underline;
  color: var(--accent-apolo-1);
}

.bio-toggle-btn i {
  transition: transform 0.3s ease;
}

.bio-toggle-btn.expanded i {
  transform: rotate(180deg);
}

/* Cards Section */
.companies-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.company-card {
  background: var(--card-bg);
  color: var(--card-text);
  border-radius: 24px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Sombra mais leve */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  animation: fadeUp 0.8s ease-out backwards;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  border: 1px solid rgba(0,0,0,0.03);
}

.company-card:hover,
.company-card.expanded {
  background: #d62843;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(220, 38, 38, 0.2);
}

.company-card:hover .quick-icons,
.company-card.expanded .quick-icons {
  color: rgba(255, 255, 255, 0.9);
}

.company-card:hover .quick-icons .icon-circle,
.company-card.expanded .quick-icons .icon-circle {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.company-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: contain;
  background: #f8fafc;
  padding: 2px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Dá um "zoom" na logo da Nextil para remover as bordas transparentes excessivas */
.company-card[data-brand="nextil"] .company-logo {
  transform: scale(1.3);
  padding: 0;
}

.card-header-left h2 {
  font-size: 1.3rem;
  font-weight: 600;
}

/* Quick Icons on collapsed state */
.quick-icons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--card-text-muted);
}

.quick-icons .icon-circle {
  width: 38px;
  height: 38px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.quick-icons .chevron {
  font-size: 1rem;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.company-card.expanded .chevron {
  transform: rotate(180deg);
}

/* Expanded Content */
.card-expanded-content {
  max-height: 0;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0;
}

.company-card.expanded .card-expanded-content {
  max-height: 300px;
  opacity: 1;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* Full Buttons in Expanded State */
.full-link-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: #f8fafc;
  border-radius: 16px;
  color: var(--card-text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid rgba(0,0,0,0.02);
}

.full-link-btn i {
  font-size: 1.2rem;
  color: var(--card-text-muted);
}

.full-link-btn:hover {
  background: #f1f5f9;
  transform: translateX(4px);
}

.full-link-btn:hover i {
  color: var(--card-text);
}

/* Animations */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.company-card:nth-child(1) { animation-delay: 0.1s; }
.company-card:nth-child(2) { animation-delay: 0.2s; }
.company-card:nth-child(3) { animation-delay: 0.3s; }
.company-card:nth-child(4) { animation-delay: 0.4s; }
.company-card:nth-child(5) { animation-delay: 0.5s; }

/* Footer */
footer {
  margin-top: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  animation: fadeUp 0.8s ease-out backwards;
  animation-delay: 0.6s;
}

@media (max-width: 480px) {
  .quick-icons .icon-circle {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}
