/* ==================================================
   RESET
================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================================================
   BODY
================================================== */

body {

    background: #f8fafc;

    color: #1e293b;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;

    line-height: 1.8;

    max-width: 1100px;

    margin: auto;

    padding: 24px;

}

/* ==================================================
   HERO
================================================== */

.hero {

    text-align: center;

    padding: 60px 20px;

}

.hero h1 {

    font-size: clamp(
        2.4rem,
        6vw,
        4.5rem
    );

    font-weight: 800;

    margin-bottom: 16px;

    color: #0f172a;

}

.hero p {

    max-width: 750px;

    margin: auto;

    font-size: 1.1rem;

    color: #64748b;

}

/* ==================================================
   SEARCH
================================================== */

.search-container {

    position: sticky;

    top: 0;

    z-index: 100;

    background:
        rgba(248, 250, 252, 0.92);

    backdrop-filter: blur(12px);

    padding-bottom: 16px;

    margin-bottom: 30px;

}

#searchBox {

    width: 100%;

    padding: 18px 22px;

    border-radius: 16px;

    border: 1px solid #dbeafe;

    background: white;

    font-size: 1rem;

    outline: none;

    transition: all 0.25s ease;

    box-shadow:
        0 2px 12px rgba(0,0,0,0.05);

}

#searchBox:focus {

    border-color: #2563eb;

    box-shadow:
        0 0 0 4px rgba(37,99,235,0.15);

}

/* ==================================================
   RESULT COUNT
================================================== */

#resultCount {

    margin-top: 12px;

    color: #64748b;

    font-size: 0.95rem;

}

/* ==================================================
   GRID
================================================== */

#results {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(320px, 1fr)
        );

    gap: 24px;

}

/* ==================================================
   CARD
================================================== */

.card {

    background: white;

    border: 1px solid #e2e8f0;

    border-radius: 20px;

    padding: 24px;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;

    box-shadow:
        0 4px 14px rgba(0,0,0,0.04);

}

.card:hover {

    transform: translateY(-6px);

    box-shadow:
        0 18px 40px rgba(0,0,0,0.08);

}

.card h3 {

    margin-bottom: 10px;

    line-height: 1.3;

}

.card a {

    color: #0f172a;

    text-decoration: none;

}

.card a:hover {

    color: #2563eb;

}

.card p {

    color: #64748b;

    margin-bottom: 18px;

}

/* ==================================================
   TAGS
================================================== */

.tags {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

}

.tag {

    background: #eff6ff;

    color: #2563eb;

    padding: 6px 12px;

    border-radius: 999px;

    font-size: 0.8rem;

    font-weight: 600;

}

/* ==================================================
   EMPTY STATE
================================================== */

.empty-state {

    grid-column: 1 / -1;

    background: white;

    border-radius: 20px;

    border: 1px dashed #cbd5e1;

    text-align: center;

    padding: 80px 20px;

}

.empty-state h3 {

    margin-bottom: 10px;

}

.empty-state p {

    color: #64748b;

}

/* ==================================================
   ARTICLE PAGES
================================================== */

main,
article {

    max-width: 900px;

    margin: auto;

}

h1 {

    margin-top: 20px;

    margin-bottom: 20px;

    line-height: 1.2;

}

h2 {

    margin-top: 40px;

    margin-bottom: 16px;

    color: #0f172a;

}

h3 {

    margin-top: 24px;

    margin-bottom: 10px;

}

p {

    margin-bottom: 16px;

}

ul,
ol {

    margin-left: 24px;

    margin-bottom: 20px;

}

li {

    margin-bottom: 6px;

}

hr {

    margin: 40px 0;

    border: none;

    border-top: 1px solid #e2e8f0;

}

/* ==================================================
   RELATED CONCEPTS
================================================== */

h2 + ul {

    background: white;

    border: 1px solid #e2e8f0;

    border-radius: 16px;

    padding: 20px 24px;

}

/* ==================================================
   HOME BUTTON
================================================== */

.home-button {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin: 24px 0;

    padding: 12px 18px;

    background: #2563eb;

    color: white !important;

    text-decoration: none;

    border-radius: 12px;

    font-weight: 600;

    transition: all 0.2s ease;

}

.home-button:hover {

    background: #1d4ed8;

    transform: translateY(-2px);

}

/* ==================================================
   BREADCRUMB
================================================== */

.breadcrumb {

    margin: 24px 0;

    color: #64748b;

    font-size: 0.95rem;

}

.breadcrumb a {

    color: #2563eb;

    text-decoration: none;

}

.breadcrumb span {

    margin: 0 6px;

}

/* ==================================================
   IMAGES
================================================== */

img {

    width: 100%;

    height: auto;

    border-radius: 14px;

    box-shadow:
        0 8px 24px rgba(0,0,0,0.06);

}

/* ==================================================
   LINKS
================================================== */

a {

    color: #2563eb;

}

a:hover {

    text-decoration: underline;

}

/* ==================================================
   TABLET
================================================== */

@media (max-width: 768px) {

    body {

        padding: 16px;

    }

    .hero {

        padding: 40px 10px;

    }

    .hero p {

        font-size: 1rem;

    }

}

/* ==================================================
   MOBILE
================================================== */

@media (max-width: 480px) {

    body {

        padding: 14px;

    }

    #results {

        grid-template-columns: 1fr;

    }

    .card {

        padding: 20px;

    }

    #searchBox {

        padding: 16px;

    }

    .home-button {

        width: 100%;

        justify-content: center;

    }

}
