/*
 * Custom styles for the enhanced ColorMeAmazed website.
 *
 * This stylesheet builds upon the original inline styles by extracting
 * them into a separate file and adding kid‑friendly colours and layouts.
 * The goal is to make the site bright, cheerful and easy to navigate.
 */

/* Base styles */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  background-color: #fdf6e3; /* warm light background */
  color: #333;
  line-height: 1.5;
}

/* Hero section */
.hero {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 300px;
  overflow: hidden;
}
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
}
.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.hero h1 {
  margin: 0;
  font-size: 3.5rem;
  letter-spacing: 1px;
}
.hero .tagline {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 500;
}

/* Introduction */
.intro {
  width: 90%;
  max-width: 800px;
  margin: 2rem auto;
  font-size: 1.2rem;
  text-align: center;
  color: #555;
}

/* Gallery grid */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto;
}
.item {
  background-color: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  width: 200px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}
.item:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.item img {
  width: 100%;
  height: auto;
  display: block;
  background-color: #fafafa;
}
.item h2 {
  margin: 0.5rem 0 1rem;
  font-size: 1.2rem;
  color: #0073aa;
}

/* Category list (popular themes) */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  width: 90%;
  max-width: 1000px;
  margin: 2rem auto;
}
.category-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.category-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-bottom: 1px solid #e5e5e5;
}
.category-card h3 {
  margin: 0.5rem;
  font-size: 1rem;
  color: #333;
}

/* Search bar and filters */
.search-filter {
  width: 90%;
  max-width: 1000px;
  margin: 2rem auto;
  text-align: center;
}
.search-filter input[type="search"] {
  width: 60%;
  max-width: 400px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: 2px solid #0073aa;
  border-radius: 6px;
  outline: none;
  margin-bottom: 1rem;
}
.search-filter .filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.filter-buttons button {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  border: 2px solid #0073aa;
  background-color: #fff;
  color: #0073aa;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.filter-buttons button.active,
.filter-buttons button:hover {
  background-color: #0073aa;
  color: #fff;
}

/* Footer */
.footer-note {
  width: 90%;
  max-width: 800px;
  margin: 2rem auto;
  text-align: center;
}
.footer-note .small {
  font-size: 0.8rem;
  color: #777;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero .tagline {
    font-size: 1.1rem;
  }
  .item {
    width: 45%;
  }
}

@media (max-width: 400px) {
  .item {
    width: 100%;
  }
  .search-filter input[type="search"] {
    width: 90%;
  }
}