/* =========================
   CATEGORIES PAGE
========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #000000;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* HEADER */

header {
    min-height: 75px;
    padding: 12px clamp(16px, 4vw, 40px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background-color: #000000;
    border-bottom: 1px solid #22c55e;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.logo {
    color: #eab308;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
}

nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 22px;
}

nav a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover,
nav a[href="categories.html"] {
    color: #eab308;
}

nav .new-item {
    border: none;
    border-radius: 7px;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

nav .new-item a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 7px;
    background: #eab308;
    color: #000000;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

nav .new-item:hover a {
    background: #fde047;
    transform: translateY(-1px);
}

/* PAGE CONTENT */

.categories-page {
    width: 100%;
    max-width: 1320px;
    min-height: calc(100vh - 75px);
    margin: 0 auto;
    padding: 56px 5%;
    flex: 1;
}

/* PAGE TITLE */

.categories-header {
    margin-bottom: 36px;
}

.categories-header h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.2;
    letter-spacing: -0.8px;
    color: #ffffff;
}

.categories-header p {
    max-width: 560px;
    margin: 0;
    color: #9ca3af;
    font-size: 15px;
    line-height: 1.7;
}

/* CATEGORY GRID */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

/* CATEGORY CARDS */

.category-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    min-height: 245px;
    padding: 25px;
    overflow: hidden;

    color: #ffffff;
    text-decoration: none;

    background: rgba(12, 12, 12, 0.95);
    border: 1px solid #1f2937;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: #eab308;
    background: #141414;
    box-shadow: 0 8px 24px rgba(234, 179, 8, 0.15);
}

.category-card:focus-visible {
    outline: 2px solid #eab308;
    outline-offset: 4px;
}

/* ICON */

.category-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 22px;
    border: 1px solid #1f2937;
    border-radius: 12px;
    background: #000000;
    font-size: 30px;
}

/* CATEGORY NAME */

.category-card h2 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
    color: #ffffff;
}

/* DESCRIPTION */

.category-card p {
    margin: 0 0 18px;
    color: #9ca3af;
    font-size: 13px;
    line-height: 1.6;
}

/* LISTING COUNT */

.category-card > span {
    margin-top: auto;
    color: #eab308;
    font-size: 12px;
    font-weight: 700;
}

/* CARD LINK HINT */

.category-action {
    margin-top: 15px;
    color: #d1d5db;
    font-size: 12px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.category-card:hover .category-action {
    color: #eab308;
}

/* FOOTER */

footer {
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    color: #9ca3af;
    padding: 20px;
    border-top: 1px solid #1f2937;
    margin-top: auto;
}

/* TABLET */

@media (max-width: 1000px) {
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    header {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        justify-content: flex-start;
        gap: 16px;
    }
}

/* PHONE */

@media (max-width: 520px) {
    .categories-page {
        padding: 36px 18px;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .category-card {
        min-height: 220px;
        padding: 22px;
    }

    nav {
        gap: 13px;
    }

    nav a {
        font-size: 12px;
    }
}