/* =========================
   LOGO
========================= */

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: cursive;
  letter-spacing: -0.02em;
  color: #020617;
  white-space: nowrap;
  line-height: 1;
}

.logo a {
  color: inherit;
  text-decoration: none;
}
/* =========================
   CLEAN SAAS SEARCH
========================= */

#header-search {

  width: 100%;

  max-width: 420px;

  min-width: 240px;

}

/* =========================
   SEARCH BAR
========================= */

.search-bar {

  position: relative;

  display: flex;

  align-items: center;

  width: 100%;

  height: 46px;

  padding: 0 8px 0 14px;

  border-radius: 14px;

  background:
    rgba(255,255,255,0.06);

  border:
    1px solid rgba(255,255,255,0.08);

  backdrop-filter:
    blur(12px);

  -webkit-backdrop-filter:
    blur(12px);

  transition:
    all 0.25s ease;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04);

}

/* HOVER */

.search-bar:hover {

  background:
    rgba(255,255,255,0.08);

  border-color:
    rgba(255,255,255,0.12);

}

/* FOCUS */

.search-bar:focus-within {

  border-color:
    rgba(59,130,246,0.45);

  box-shadow:
    0 0 0 3px rgba(59,130,246,0.12);

}

/* =========================
   INPUT
========================= */

.search-bar input {

  flex: 1;

  min-width: 0;

  height: 100%;

  border: none;

  outline: none;

  background: transparent;

  padding: 0 10px;

  color: rgba(255,255,255,0.96);

  font-size: 0.92rem;

  font-weight: 500;

  font-family:
    Inter,
    system-ui,
    sans-serif;

}

/* PLACEHOLDER */

.search-bar input::placeholder {

  color:
    rgba(255,255,255,0.42);

}

/* REMOVE DEFAULT FOCUS */

.search-bar input:focus {

  outline: none;

  box-shadow: none;

}

/* =========================
   SEARCH BUTTON
========================= */

.search-bar button {

  border: none;

  cursor: pointer;

  height: 32px;

  min-width: 32px;

  padding: 0 10px;

  border-radius: 10px;

  background:
    rgba(255,255,255,0.08);

  color:
    rgba(255,255,255,0.68);

  font-size: 0.74rem;

  font-weight: 700;

  letter-spacing: 0.02em;

  display: flex;

  align-items: center;

  justify-content: center;

  transition:
    all 0.2s ease;

}

/* BUTTON HOVER */

.search-bar button:hover {

  background:
    rgba(255,255,255,0.14);

  color: white;

}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 980px) {

  #header-search {

    max-width: 100%;

  }

}

@media (max-width: 640px) {

  .search-bar {

    height: 42px;

    border-radius: 12px;

  }

  .search-bar button {

    display: none;

  }

}/* =========================
   HERO (SAAS MODERN)
========================= */

.hero {
  position: relative;
  display: grid;
  align-items: center;

  min-height: 72vh;
  padding: clamp(4rem, 7vw, 6rem) 1rem
           clamp(5rem, 8vw, 7rem);

  background:
    radial-gradient(
      1200px 520px at 50% -15%,
      rgba(35, 114, 241, 0.22),
      transparent 65%
    ),
    linear-gradient(180deg, #f8fafc, #ffffff);

  /* IMPORTANT: allow dropdown to escape */
  overflow: visible;
}

/* Constrain hero width */
.hero > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero headline */
.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #020617;
}

/* Hero description */
.hero p {
  margin-top: 0.85rem;
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #334155;
}

/* =========================
   HERO SEARCH (PRIMARY CTA)
========================= */

.hero .search-bar {
  margin-top: 2rem;
  max-width: 520px;

  /* slightly smaller than before */
  padding: 0.55rem 0.8rem;

  border: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);

  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.22);
}

/* Single clean focus ring */
.hero .search-bar:focus-within {
  box-shadow:
    0 0 0 4px rgba(35, 114, 241, 0.22),
    0 22px 55px rgba(15, 23, 42, 0.22);
}

.hero .search-bar input {
  font-size: 0.95rem;
}

/* =========================
   NAVIGATION
========================= */

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.main-nav a {
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
  color: #334155;
  text-decoration: none;
  border-radius: 999px;
}

.main-nav a:hover {
  background: #f1f5f9;
  color: #020617;
}

/* CTA */
.main-nav a:last-child {
  margin-left: 0.6rem;
  padding: 0.45rem 0.95rem;
  background: #2372f1;
  color: #ffffff;
  font-size: 0.85rem;
}

.main-nav a:last-child:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* ========/* =========================
   Cards (Production)
   ========================= */

.card-grid {
  display: flex;
  flex-wrap: wrap;
  column-gap: 2.5%;
  row-gap: 32px; /* space between rows */
}

.card-grid .card {
  flex: 0 0 calc(25% - 2.5%);
}


/* Card container */
.card {
  position: relative;
  padding: 1.5rem;
  border-radius: 18px;
  width: fit-content;
  background: #ffffff;
  border: 1px solid #b1b9c9;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow:
    0 10px 25px rgba(15, 23, 42, 0.08),
    0 4px 10px rgba(15, 23, 42, 0.04);
}

/* Card content */
.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.4rem;
  color: #020617;
}

.card p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #475569;
}

/* =========================
   Category Links (Tags)
   ========================= */

.caterories-links {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;

  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1d4ed8;
}

/* Tag */
.caterories-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  padding: 0.28rem 0.65rem;
  border-radius: 999px;

  background: #f8fafc;
  border: 1px solid #dbeafe;
  color: inherit;
  text-decoration: none;

  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.caterories-links a:hover {
  background: #ffffff;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.18);
}

/* Focus (Accessibility) */
.caterories-links a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* =========================
   Optional States
   ========================= */

/* Active / current category */
.caterories-links a.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

/* =========================
   Responsive Tweaks
   ========================= */

@media (max-width: 640px) {
  .card {
    padding: 1.35rem;
  }

  .card h3 {
    font-size: 1rem;
  }

  .card p {
    font-size: 0.88rem;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  #header-search {
    max-width: 100%;
  }

  .main-nav {
    justify-content: space-between;
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding-top: 3.5rem;
    padding-bottom: 2.5rem;
  }
}

@media (max-width: 640px) {
  .card-grid {
    display: flex;
    flex-direction: column; /* vertical stack */
    gap: 16px;              /* space between cards */
    align-items: center;
  }

  .card {
    padding: 1.25rem;
  }
}
