/* ============================================================
   City Listing Page (/cities)
   Card started as a straight port of homepage.css's .hp_city-card (the
   "Exhibiting Cities" marquee card) — same brand tokens, laid out as a
   static grid instead of a scrolling track. Since diverged on purpose: no
   name/state text over the photo (and so no darkening gradient behind it
   either — plain, uncropped-looking photo instead), no blurb line; the
   name/state moved into the body where the blurb used to sit. hp_city-card
   itself is untouched.
   .trad_list_1 / .search_wrap / .search_box are shared, page-agnostic
   classes already styled in style.css (see blog_list.blade.php for the
   other page that reuses them).
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .city_card,
    .city_card .city_card-img img,
    .city_card-btn svg,
    .city_list_grid {
        transition: none !important;
        animation: none !important;
    }
}

.trad_list_1 .search_box {
    transition: border-color .2s ease, box-shadow .2s ease;
}

.trad_list_1 .search_box:focus-within {
    border-color: #0C2E16;
    box-shadow: 0 0 0 3px rgba(12, 46, 22, .12);
}

#citySearchInput {
    padding: 11px 0;
}

.city_list_wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 60px;
}

/* Clears the site-wide fixed "Get your 3 quotes now" tab — see the
   identical rule + full rationale in blog_list.css. Scoped to this page
   only — city_list.css is only loaded on /cities. */
.trad_list_1,
.city_list_wrap {
    padding-left: 30px;
    padding-right: 30px;
}

@media (min-width: 768px) {
    .trad_list_1,
    .city_list_wrap {
        padding-left: 45px;
        padding-right: 45px;
    }
}

/* ---------------- Results count ---------------- */
.city_list_wrap .results {
    font-size: 15px;
    color: #555;
    margin-bottom: 18px;
}

/* ---------------- Empty state ---------------- */
.city_empty_state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 15px;
}

/* ---------------- Grid ---------------- */
.city_list_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    transition: opacity .2s ease;
}

@media (max-width: 992px) {
    .city_list_grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .city_list_grid { grid-template-columns: 1fr; }
}

/* ---------------- Card ---------------- */
.city_card {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow .25s, transform .25s;
}

.city_card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
    transform: translateY(-4px);
}

.city_card:active {
    transform: translateY(-1px) scale(.99);
}

.city_card-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.city_card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.city_card:hover .city_card-img img {
    transform: scale(1.06);
}

.city_card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Was an absolute-positioned white badge over the photo (needed the gradient
   above for contrast); now sits in normal flow at the top of the body, so
   it reads as plain dark text like the rest of the card. */
.city_card-loc {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #0C2E16;
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 16px;
}

.city_card-loc svg {
    width: 15px;
    height: 15px;
    color: #6b7280;
    flex-shrink: 0;
}

.city_card-loc span.state {
    font-weight: 500;
    font-size: 14px;
    color: #6b7280;
}

.city_card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    /* No blurb above it anymore to naturally separate cards of different
       name lengths — pushed to the bottom of the flex column instead, so
       every button in a grid row still lines up. */
    margin-top: auto;
    background: #0C2E16;
    color: #CFFF7F;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    transition: gap .2s ease;
}

.city_card:hover .city_card-btn {
    gap: 12px;
}

.city_card-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ---------------- Entrance animation ----------------
   Same bouncy timing as blog_list.css's .blog_card.card-enter, for
   consistency across the site's two listing pages. Cards above the fold
   animate in staggered on load; cards revealed by scrolling get the same
   treatment the moment they enter the viewport (see city_list.js). */
@keyframes cityCardIn {
    from { opacity: 0; transform: translateY(16px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Applied by city_list.js only — never present in the server-rendered HTML,
   so a visitor with JS disabled or blocked simply sees every card already
   in place, no animation, nothing to unhide. */
.city_card.pre-reveal {
    opacity: 0;
}

.city_card.card-enter {
    animation: cityCardIn .4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
