/* Guides section (/guides): listing cards + rendered-Markdown article
   typography. Builds on the landing.css custom properties so the section
   inherits the site theme automatically. */

/* --- Listing --- */
.guides-index__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.guides-index__item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    color: var(--landing-text);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.guides-index__item:hover {
    transform: translateY(-3px);
    border-color: var(--landing-border-strong);
}

.guides-index__item-title {
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0;
}

.guides-index__badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    padding: 1px 7px;
    border: 1px solid var(--landing-border-strong);
    border-radius: 999px;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: var(--landing-accent);
}

.guides-index__item-desc {
    margin: 0;
    color: var(--landing-text-soft);
    font-size: 0.92rem;
    line-height: 1.55;
    flex: 1;
}

.guides-index__item-date {
    color: var(--landing-text-soft);
    font-size: 0.8rem;
    opacity: 0.8;
}

.guides-index__empty {
    margin-top: 28px;
    color: var(--landing-text-soft);
    text-align: center;
}

/* --- Article page --- */
.guide-article {
    max-width: 840px;
    margin: 0 auto;
    padding: 24px 0 8px;
}

.guide-article__breadcrumb {
    margin-bottom: 18px;
}

.guide-article__breadcrumb a {
    color: var(--landing-accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.guide-article__breadcrumb a:hover {
    text-decoration: underline;
}

.guide-article > h1 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.25;
    margin: 10px 0 12px;
}

.guide-article__dates {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--landing-text-soft);
    font-size: 0.85rem;
    margin: 0 0 22px;
}

.guide-article__body {
    padding: clamp(22px, 4vw, 40px);
    line-height: 1.7;
    color: var(--landing-text-soft);
    font-size: 1rem;
    overflow-wrap: break-word;
}

.guide-article__body h2 {
    color: var(--landing-text);
    font-size: 1.35rem;
    line-height: 1.35;
    margin: 1.8em 0 0.6em;
}

.guide-article__body h3 {
    color: var(--landing-text);
    font-size: 1.1rem;
    margin: 1.5em 0 0.5em;
}

.guide-article__body h2:first-child,
.guide-article__body h3:first-child,
.guide-article__body p:first-child {
    margin-top: 0;
}

.guide-article__body p {
    margin: 0 0 1em;
}

.guide-article__body a {
    color: var(--landing-accent);
    text-decoration: none;
}

.guide-article__body a:hover {
    text-decoration: underline;
}

.guide-article__body ul,
.guide-article__body ol {
    margin: 0 0 1.1em;
    padding-left: 1.5em;
}

.guide-article__body li {
    margin-bottom: 0.4em;
}

.guide-article__body strong {
    color: var(--landing-text);
}

.guide-article__body blockquote {
    margin: 1.2em 0;
    padding: 10px 18px;
    border-left: 3px solid var(--landing-border-strong);
    background: rgba(123, 255, 236, 0.05);
    border-radius: 0 8px 8px 0;
}

.guide-article__body code {
    font-family: "Consolas", "Menlo", monospace;
    font-size: 0.88em;
    background: rgba(123, 255, 236, 0.08);
    border: 1px solid var(--landing-border);
    border-radius: 6px;
    padding: 1px 6px;
}

.guide-article__body pre {
    background: rgba(3, 10, 22, 0.75);
    border: 1px solid var(--landing-border);
    border-radius: 10px;
    padding: 14px 18px;
    overflow-x: auto;
    margin: 0 0 1.2em;
}

.guide-article__body pre code {
    background: none;
    border: none;
    padding: 0;
}

.guide-article__body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 0.6em 0;
}

.guide-article__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.2em;
    font-size: 0.92rem;
}

.guide-article__body th,
.guide-article__body td {
    border: 1px solid var(--landing-border);
    padding: 8px 12px;
    text-align: left;
}

.guide-article__body th {
    color: var(--landing-text);
    background: rgba(123, 255, 236, 0.06);
}

.guide-article__body hr {
    border: none;
    border-top: 1px solid var(--landing-border);
    margin: 1.8em 0;
}

/* RTL article body (Arabic) */
html[dir="rtl"] .guide-article__body ul,
html[dir="rtl"] .guide-article__body ol {
    padding-left: 0;
    padding-right: 1.5em;
}

html[dir="rtl"] .guide-article__body th,
html[dir="rtl"] .guide-article__body td {
    text-align: right;
}
