/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
}

body {
  background-color: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.5;
}

/* Visually hidden (for accessible labels) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header styles */
header {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1d1d1f;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: #1d1d1f;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.nav-links a:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Hamburger button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #1d1d1f;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
}

.menu-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.search-container {
  display: flex;
  align-items: center;
  background-color: #f5f5f7;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  width: 300px;
}

.search-container input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 0.9rem;
  color: #1d1d1f;
}

.search-container button {
  background: none;
  border: none;
  color: #86868b;
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 8rem 2rem 4rem;
  background: linear-gradient(180deg, #f5f5f7 0%, #ffffff 100%);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #1d1d1f 0%, #434344 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: #86868b;
  max-width: 600px;
  margin: 0 auto;
}

/* Categories section */
.categories {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.category {
  margin-bottom: 4rem;
}

/* Offset anchor scroll for fixed header */
.category {
  scroll-margin-top: 100px;
}

.category h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category h2 i {
  color: #0066cc;
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.site-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: #1d1d1f;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.site-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.site-card img {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.site-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.site-card p {
  color: #86868b;
  font-size: 0.9rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background-color: #f5f5f7;
  color: #86868b;
  margin-top: 4rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  /* Show hamburger, hide links until opened */
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
    flex-direction: column;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0.75rem;
  }

  .search-container {
    width: 200px;
  }

  .sites-grid {
    grid-template-columns: 1fr;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-card {
  animation: fadeIn 0.5s ease forwards;
}
