/* Homepage grid styles */
.homepage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 40px;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  min-height: 100vh;
}

.country-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 320px;
  text-decoration: none;
  color: inherit;
}

.country-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.country-card-title {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  color: var(--text-light);
  margin-bottom: 8px;
  min-height: 28px;
}

.country-preview {
  width: 100%;
  height: auto;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
}

.hexagon-preview {
  pointer-events: none;
}

/* Loading state */
.country-card.loading {
  cursor: default;
  pointer-events: none;
}

.country-card.loading:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.loading-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.loading-text {
  font-size: 14px;
  text-align: center;
  color: var(--text-light);
  opacity: 0.6;
  margin-top: 8px;
}

/* Large screen styles */
@media (min-width: 1600px) {
  .homepage-grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 32px;
  }
}

/* Mobile responsive styles */
@media (max-width: 1200px) {
  .homepage-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    padding: 20px 30px;
  }
}

@media (max-width: 768px) {
  .homepage-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 16px 20px;
  }

  .country-card {
    min-height: 280px;
  }

  .country-card-title {
    font-size: 16px;
    min-height: 24px;
  }
}

@media (max-width: 480px) {
  .homepage-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 16px;
  }

  .country-card {
    min-height: 300px;
  }

  .country-card-title {
    font-size: 14px;
    min-height: 22px;
  }
}
