/* ==========================================================
   AUTO SMART PARKING - Dynamic blog styles
   Complements the template (main.css / asp-theme.css) for the
   API-driven blog: filters, grid, pagination, skeletons and the
   typography of Markdown-rendered articles (.asp-prose).
   ========================================================== */

:root {
   --asp-amber: #ffc107;
   --asp-amber-soft: #ffd54f;
   --asp-surface: #161616;
   --asp-surface-2: #1f1f1f;
   --asp-line: rgba(55, 65, 81, .7);
   --asp-text: #c0c0c0;
   --asp-white: #ffffff;
}

/* Utilities used by the blog components that the precompiled template CSS
   does not include. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.flex-wrap { flex-wrap: wrap; }
.w-1\/4 { width: 25%; }
.w-1\/3 { width: 33.333%; }
.w-3\/5 { width: 60%; }
.w-4\/5 { width: 80%; }

/* ---------- Toolbar: category pills + search ---------- */
.asp-blog-toolbar {
   display: flex; flex-wrap: wrap; gap: 16px 24px;
   align-items: center; justify-content: space-between;
}
.asp-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.asp-pill {
   display: inline-flex; align-items: center; gap: 8px;
   min-height: 44px; padding: 0 18px; border-radius: 8px;
   background: var(--asp-surface); border: 1px solid var(--asp-line);
   color: var(--asp-text); font-size: 16px; font-weight: 500; cursor: pointer;
   transition: color .25s, border-color .25s, background-color .25s;
}
.asp-pill:hover { color: var(--asp-white); border-color: var(--asp-amber); }
.asp-pill:focus-visible { outline: 2px solid var(--asp-amber); outline-offset: 2px; }
.asp-pill.is-active { background: var(--asp-amber); border-color: var(--asp-amber); color: #0a0a0a; }
.asp-pill-count {
   font-size: 12px; line-height: 1; padding: 4px 7px; border-radius: 999px;
   background: rgba(255, 255, 255, .08);
}
.asp-pill.is-active .asp-pill-count { background: rgba(10, 10, 10, .15); }

.asp-search { display: flex; gap: 10px; width: 100%; max-width: 380px; }
.asp-search .form-control {
   flex: 1; height: 48px; padding: 0 16px; border-radius: 8px;
   background: var(--asp-surface); border: 1.5px solid var(--asp-line); color: var(--asp-white);
}
.asp-search .form-control::placeholder { color: #8a8a8a; }
.asp-search .btn { height: 48px; padding: 0 20px; display: inline-flex; align-items: center; }
@media (max-width: 767px) { .asp-search { max-width: none; } }

/* ---------- Post grid ---------- */
.asp-post-grid {
   display: grid; grid-template-columns: 1fr; gap: 40px 36px;
}
@media (min-width: 768px) { .asp-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .asp-post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 32px; } }

.asp-card-title a { color: var(--asp-white); transition: color .25s; }
.asp-card-title a:hover { color: var(--asp-amber); }
.blog-post h2 a:hover { color: var(--asp-amber); }

/* ---------- Pagination ---------- */
.asp-pagination {
   display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
   gap: 8px; margin-top: 56px;
}
.asp-pagination button {
   min-width: 44px; height: 44px; padding: 0 14px; border-radius: 8px;
   background: var(--asp-surface); border: 1px solid var(--asp-line);
   color: var(--asp-text); font-weight: 600; cursor: pointer; transition: all .25s;
}
.asp-pagination button:hover:not(:disabled) { color: var(--asp-white); border-color: var(--asp-amber); }
.asp-pagination button:disabled { opacity: .4; cursor: not-allowed; }
.asp-pagination button.is-active { background: var(--asp-amber); border-color: var(--asp-amber); color: #0a0a0a; }
.asp-page-gap { padding: 0 4px; color: #8a8a8a; }

/* ---------- Empty / error states ---------- */
.asp-empty {
   text-align: center; padding: 64px 24px; border-radius: 16px;
   background: var(--asp-surface); border: 1px dashed var(--asp-line);
}

/* ---------- Skeletons ---------- */
@keyframes asp-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.asp-skeleton {
   border-radius: 10px; margin-bottom: 14px;
   background: linear-gradient(90deg, #1a1a1a 0px, #262626 160px, #1a1a1a 320px);
   background-size: 800px 100%;
   animation: asp-shimmer 1.4s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .asp-skeleton { animation: none; } }
.asp-skeleton-img { width: 100%; aspect-ratio: 8 / 7; margin-bottom: 24px; border-radius: 12px; }
.asp-skeleton-line { height: 16px; }
.asp-skeleton-title { height: 44px; width: 85%; margin: 18px 0 22px; }
.asp-skeleton-featured { height: 300px; border-radius: 12px; margin-bottom: 48px; }
@media (min-width: 1024px) { .asp-skeleton-featured { height: 476px; margin-bottom: 80px; } }

/* ---------- Article typography (Markdown output) ---------- */
.asp-prose { color: var(--asp-text); font-size: 17px; line-height: 1.75; overflow-wrap: anywhere; }
@media (min-width: 1280px) { .asp-prose { font-size: 18px; } }
.asp-prose > * + * { margin-top: 1.15em; }
.asp-prose h2, .asp-prose h3, .asp-prose h4 {
   color: var(--asp-white); line-height: 1.3; margin-top: 1.8em; margin-bottom: .6em;
   scroll-margin-top: 110px;
}
.asp-prose > h2:first-child, .asp-prose > h3:first-child { margin-top: 0; }
.asp-prose h2 { font-size: 24px; }
.asp-prose h3 { font-size: 21px; }
.asp-prose h4 { font-size: 18px; }
@media (min-width: 1024px) { .asp-prose h2 { font-size: 28px; } .asp-prose h3 { font-size: 23px; } }
.asp-prose strong { color: var(--asp-white); font-weight: 600; }
.asp-prose a { color: var(--asp-amber); text-decoration: underline; text-underline-offset: 3px; }
.asp-prose a:hover { color: var(--asp-amber-soft); }
.asp-prose ul, .asp-prose ol { padding-left: 1.35em; }
.asp-prose ul { list-style: disc; }
.asp-prose ol { list-style: decimal; }
.asp-prose li + li { margin-top: .55em; }
.asp-prose li::marker { color: var(--asp-amber); }
.asp-prose img { width: 100%; height: auto; border-radius: 16px; margin: 1.6em 0; }
.asp-prose p > img:only-child { margin: .4em 0; }
.asp-prose blockquote {
   border-left: 4px solid var(--asp-amber); background: var(--asp-surface);
   padding: 18px 22px; border-radius: 0 12px 12px 0; color: #e5e5e5;
}
.asp-prose code {
   background: var(--asp-surface-2); color: var(--asp-amber-soft);
   padding: .15em .45em; border-radius: 6px; font-size: .9em;
}
.asp-prose pre {
   background: #111; border: 1px solid var(--asp-line); border-radius: 12px;
   padding: 18px 20px; overflow-x: auto; font-size: 15px; line-height: 1.6;
}
.asp-prose pre code { background: none; padding: 0; color: #e5e5e5; }
.asp-prose hr { border: 0; border-top: 1px solid var(--asp-line); margin: 2.4em 0; }
.asp-prose table { width: 100%; border-collapse: collapse; font-size: .95em; display: block; overflow-x: auto; }
.asp-prose th, .asp-prose td { border: 1px solid var(--asp-line); padding: 10px 14px; text-align: left; }
.asp-prose th { background: var(--asp-surface); color: var(--asp-white); font-weight: 600; }
.asp-prose del { opacity: .7; }
.asp-prose input[type="checkbox"] { accent-color: var(--asp-amber); margin-right: .4em; }

/* Article cover image spacing (the template CSS lacks pb-* utilities). */
.asp-post-cover { margin-bottom: 36px; }
@media (min-width: 1024px) { .asp-post-cover { margin-bottom: 48px; } }
