:root {
  /* Colors */
  --primary-color: #0f172a;
  /* Deep Blue */
  --secondary-color: #334155;
  /* Slate */
  --accent-color: #3b82f6;
  /* Bright Blue */
  --accent-hover: #2563eb;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #f8fafc;
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Radius */
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

ul {
  list-style: none;
}

/* Fonts */
@font-face {
  font-family: "Montserrat";
  src: url("../font/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
}

@font-face {
  font-family: "Sairra Condensad";
  src: url("../font/SairaCondensed-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Sairra Condensad Bold";
  src: url("../font/SairaCondensed-Bold.ttf") format("truetype");
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.main-header {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-sm) 0;
}

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

.logo {
  height: 50px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: var(--spacing-md);
}

.nav-link {
  font-weight: 600;
  color: var(--secondary-color);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-color);
  background-color: #eff6ff;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-light);
  padding: var(--spacing-xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content h1 {
  font-family: "Sairra Condensad Bold", sans-serif;
  font-size: 3rem;
  margin-bottom: var(--spacing-xs);
}

.hero-content .subtitle {
  font-family: "Sairra Condensad", sans-serif;
  font-weight: normal;
  display: block;
  font-size: 1.5rem;
  opacity: 0.9;
}

.hero-tagline {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.action-card {
  background: rgba(255, 255, 255, 0.1);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(5px);
  max-width: 350px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-card h3 {
  margin-bottom: var(--spacing-xs);
  color: var(--accent-color);
  /* Make headers pop */
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.action-card p {
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  gap: 0.5rem;
}

.primary-btn {
  background-color: #25D366;
  /* WhatsApp Green */
  color: white;
  width: 100%;
  font-size: 1.1rem;
}

.primary-btn:hover {
  background-color: #128C7E;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.secondary-btn {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

.secondary-btn:hover {
  background-color: var(--bg-body);
  border-color: var(--text-secondary);
}

.button-group {
  display: flex;
  gap: var(--spacing-xs);
}

/* Carousel */
.carousel-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  height: 180px;
  margin-top: var(--spacing-lg);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.carousel-track {
  display: flex;
  width: calc(300px * 16 + 20px * 16);
  animation: scroll 60s linear infinite;
  height: 100%;
}

.carousel-track img {
  height: 100%;
  width: 300px;
  object-fit: cover;
  margin: 0 10px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* About Section */
.about-section {
  padding: var(--spacing-xl) var(--spacing-sm);
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  margin-top: -2rem;
  /* Overlap hero */
  position: relative;
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.about-text>p:first-child {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-lg);
  color: var(--secondary-color);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.info-item h3 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
  padding-bottom: 0.2rem;
}

.info-item ul {
  list-style: disc;
  padding-left: 1.2rem;
}

.info-item li {
  margin-bottom: 0.5rem;
}

/* Important Groups */
.important-groups-section {
  padding: var(--spacing-xl) var(--spacing-sm);
}

.important-groups-section h2 {
  text-align: center;
  margin-bottom: var(--spacing-xs);
  color: var(--primary-color);
}

.important-groups-section>p {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  color: var(--text-secondary);
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.group-link {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border-color);
}

.group-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-color);
}

.grupo-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: var(--spacing-sm);
  object-fit: cover;
}

.group-info {
  display: flex;
  flex-direction: column;
}

.group-info strong {
  color: var(--primary-color);
}

.group-info span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Communities Section */
.communities-section {
  padding: var(--spacing-xl) var(--spacing-sm);
}

.communities-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.search-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

/* Custom Card Styles (Adapted from original) */
.custom-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-lg) var(--spacing-md);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  border: 1px solid var(--border-color);
}

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

.card-image-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--spacing-md);
  background: #f5f5f5;
  border: 3px solid var(--bg-body);
  box-shadow: var(--shadow-sm);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-xs);
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-text-full {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-description-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: var(--spacing-md);
  min-height: 2.6rem;
}

.whatsapp-icon {
  color: #25D366;
}

.instagram-icon {
  color: #E4405F;
}

.website-icon {
  color: #4A90E2;
}

.linkedin-icon {
  color: #0077B5;
}

.youtube-icon {
  color: #FF0000;
}

.github-icon {
  color: #333;
}

/* Tooltip */
.custom-card-tooltip {
  display: none;
  position: absolute;
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  max-width: 250px;
  z-index: 10;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  word-wrap: break-word;
}

.custom-card.show-tooltip .custom-card-tooltip {
  display: block;
}

/* New Member Alert */
.novo-membro {
  background-color: #fff1f2;
  border-left: 4px solid #e11d48;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
}

.novo-membro-cabecalho {
  color: #e11d48;
  margin-bottom: var(--spacing-xs);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.novo-membro-texto {
  color: #881337;
  font-size: 0.95rem;
}

/* Footer */
.main-footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: var(--spacing-lg) 0;
  margin-top: auto;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
}

.social-links a {
  font-size: 1.5rem;
  opacity: 0.8;
}

.social-links a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .action-card {
    max-width: 100%;
    width: 100%;
  }

  .communities-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-wrapper {
    width: 100%;
    max-width: none;
  }
}