/* style.css */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: #f9f9f9;
  color: #222;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #0073e6;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 0;
}

/* Header */

header {
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

header h1 a {
  font-weight: 700;
  font-size: 1.5rem;
  color: #0073e6;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

nav ul li a {
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  transition: background-color 0.3s ease;
  border-radius: 4px;
}

nav ul li a:hover,
nav ul li a:focus {
  background-color: #0073e6;
  color: white;
}

/* Hero Section */

.hero {
  background-color: #0073e6;
  color: white;
  padding: 3rem 0 4rem 0;
  text-align: center;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

#searchBar {
  width: 100%;
  max-width: 600px;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  outline: none;
}

/* Sections */

section {
  padding: 2rem 0;
}

h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #0073e6;
}

/* Card Grid */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: white;
  border-radius: 8px;
  padding: 1.25rem 1rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  display: block;
}

.card:hover,
.card:focus {
  box-shadow: 0 6px 20px rgba(0, 115, 230, 0.3);
  transform: translateY(-5px);
}

.card h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #111;
}

.card p {
  font-size: 0.95rem;
  color: #555;
}

/* Footer */

footer {
  background-color: #222;
  color: #bbb;
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: auto;
  font-size: 0.9rem;
}

footer a {
  color: #0073e6;
}

footer a:hover,
footer a:focus {
  text-decoration: underline;
}

/* Responsive Adjustments */

@media (max-width: 600px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  nav ul {
    flex-wrap: wrap;
  }

  .hero h2 {
    font-size: 1.5rem;
  }
}

/* Add this to your existing style.css */

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px 6px 0 0;
  margin-bottom: 0.8rem;
}

