:root {
    --max: 1000px;
    --pad: 16px;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #ffffff;
    --fg: #0f172a
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.6
}

.container {
    max-width: var(--max);
    margin: auto;
    padding: 0 var(--pad)
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--border)
}

.header nav a {
    margin-left: 12px;
    text-decoration: none;
    color: inherit
}

.hero {
    padding: 28px 0
}

.controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin: 12px 0
}

#search {
    flex: 1;
    min-width: 260px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.chip {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 10px;
    background: #fff;
    color: var(--fg);   /* <— add this */
    cursor: pointer
}

.chip-small {
    padding: 2px 8px;
    font-size: 12px
}

.chip-active {
    background: #111;
    color: #fff;
    border-color: #111
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin: 20px 0
}

.card {
    display: block;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .06s ease
}

.card:hover {
    transform: translateY(-2px)
}

.card-media {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #f8fafc
}

.card-body {
    padding: 14px
}

.muted {
    color: var(--muted)
}

.about,
.contact {
    padding: 20px 0;
    border-top: 1px solid var(--border)
}

.row {
    margin-bottom: 10px
}

input,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px
}

button {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #111;
  color: #fff;
  cursor: pointer;
  transition: transform .05s ease;
}
button:active {
  transform: translateY(1px);
}


.footer {
    padding: 28px 0;
    border-top: 1px solid var(--border);
    margin-top: 24px;
    color: var(--muted)
}

.article {
    padding: 20px 0
}

.article .banner {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border)
}

.metrics {
    list-style: disc;
    margin-left: 18px
}

.links a {
    margin-right: 12px
}

.logo {
    text-decoration: none
}

@media (max-width:600px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px
    }
}

/* make selects look like inputs */
input,
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font: inherit;
    background: #fff;
}

/* nicer select arrow (no external assets) */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #6b7280 50%),
        linear-gradient(135deg, #6b7280 50%, transparent 50%),
        linear-gradient(to right, transparent, transparent);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%,
        100% 0;
    background-size: 6px 6px, 6px 6px, 2.5em 100%;
    background-repeat: no-repeat;
    padding-right: 36px;
    /* room for arrow */
}

/* label layout + spacing */
.row label {
    display: grid;
    gap: 6px;
}

/* put From / To on one line (responsive) */
.row.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .row.two-col {
        grid-template-columns: 1fr;
    }
}


/* --- Card Enhancements --- */
.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

/* Maintain consistent media height; use cover images if available */
.card-media {
  position: relative;
  height: 160px;                /* consistent banner height */
  background-size: cover;
  background-position: center;
  background-color: #f8fafc;
}

/* Subtle gradient and title pop on hover */
.card-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.38), rgba(0,0,0,0));
  opacity: .0; transition: opacity .15s ease;
}
.card:hover .card-media::after { opacity: 1; }

.card-title-on-media {
  position: absolute; left: 12px; bottom: 10px; right: 12px;
  color: #fff; font-weight: 700; font-size: 1.05rem;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* Body: clamp summary so all cards feel even */
.card-body {
  padding: 14px;
  min-height: 120px;            /* keeps heights aligned */
  display: grid; gap: 8px;
}

/* Two-line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Tiny chips row inside card */
.card-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.card-chips .chip-small {
  background: #f8fafc;
}

#btPretty { width: 100%; max-width: 1200px; height: auto; }
