/**
 * Anabaptist Trail Core — landmarks grid styles ([at_landmarks] shortcode).
 * Card-based grid for featured / popular / recent / random / category-filtered
 * landmark lists. v0.3.2: improved empty-image state and featured card styling.
 */

.at-landmarks-grid {
    margin: 32px auto;
    max-width: 1200px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.at-landmarks-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8em;
    color: #2f3e46;
    margin: 0 0 32px;
    text-align: center;
    letter-spacing: 0.02em;
    font-weight: 600;
}

.at-landmarks-cards {
    display: grid;
    gap: 28px;
    align-items: stretch;
}
.at-landmarks-cols-2 .at-landmarks-cards { grid-template-columns: repeat(2, 1fr); }
.at-landmarks-cols-3 .at-landmarks-cards { grid-template-columns: repeat(3, 1fr); }
.at-landmarks-cols-4 .at-landmarks-cards { grid-template-columns: repeat(4, 1fr); }

/* ─── CARD ───────────────────────────────────────────────────────────────── */

.at-lm-card {
    position: relative;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(47, 62, 70, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    color: inherit !important;
    border: 1px solid rgba(47, 62, 70, 0.06);
}
.at-lm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(47, 62, 70, 0.15);
    text-decoration: none !important;
}

/* Featured cards — gold accent strip across the top, subtle gold tint */
.at-lm-card.is-featured {
    border-color: #d4be72;
}
.at-lm-card.is-featured::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c8a849, #e0c878, #c8a849);
    z-index: 2;
}

.at-lm-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    background: #4a5234;
    color: #f0e7d0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    border: 2px solid #f0e7d0;
}

/* ─── IMAGE AREA — robust against missing images ─────────────────────────── */

.at-lm-card-image {
    /* explicit min-height ensures the image area always shows even without aspect-ratio support */
    min-height: 180px;
    aspect-ratio: 16 / 10;
    background-color: #c4b599;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    flex-shrink: 0;
}

/* Empty-state placeholder: warm parchment background, centered building icon, "Photo coming" label */
.at-lm-card-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #c4b599;
    background-image: repeating-linear-gradient(
        135deg,
        transparent 0,
        transparent 14px,
        rgba(74, 82, 52, 0.05) 14px,
        rgba(74, 82, 52, 0.05) 28px
    );
    color: rgba(74, 82, 52, 0.65);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.72em;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.at-lm-card-image-placeholder::before {
    content: "";
    width: 52px;
    height: 52px;
    margin-bottom: 10px;
    opacity: 0.55;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%234a5234'><path d='M32 4 L30 6 L30 9 L24 9 L24 14 L18 14 L18 22 L14 22 L14 60 L26 60 L26 44 L38 44 L38 60 L50 60 L50 22 L46 22 L46 14 L40 14 L40 9 L34 9 L34 6 Z M22 28 L28 28 L28 34 L22 34 Z M36 28 L42 28 L42 34 L36 34 Z' opacity='0.85'/><rect x='31' y='2' width='2' height='5'/><rect x='29' y='3' width='6' height='1'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.at-lm-card-image-placeholder::after {
    content: "Photo Coming";
    opacity: 0.7;
}

/* ─── CARD BODY ──────────────────────────────────────────────────────────── */

.at-lm-card-body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.at-lm-card-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2em;
    color: #2f3e46;
    margin: 0 0 8px;
    font-weight: 600;
    line-height: 1.3;
}

.at-lm-card-meta {
    color: #776b6e;
    font-size: 0.85em;
    margin: 0 0 12px;
    line-height: 1.4;
    letter-spacing: 0.02em;
    font-style: italic;
}

.at-lm-card-excerpt {
    color: #3a3f45;
    font-size: 0.94em;
    margin: 0;
    line-height: 1.6;
    flex-grow: 1;
}

/* ─── EMPTY STATE ────────────────────────────────────────────────────────── */

.at-landmarks-empty {
    text-align: center;
    color: #776b6e;
    padding: 48px 24px;
    font-style: italic;
    background: #f6f4ef;
    border-radius: 6px;
    border: 1px dashed #d8cec2;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .at-landmarks-cols-3 .at-landmarks-cards,
    .at-landmarks-cols-4 .at-landmarks-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 540px) {
    .at-landmarks-cards {
        grid-template-columns: 1fr !important;
    }
}
