
/* =========================================================
   1. SHARED LIBRARY PAGE LAYOUT
========================================================= */

.library-page {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 8px;

    box-sizing: border-box;
    color: var(--wire-text);
}


/* =========================================================
   2. LIBRARY GRID
   Desktop: 4 columns
   Tablet:  3 columns
   Mobile:  2 columns maximum
========================================================= */
.library-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 8px;
    align-items: start;

    width: 100%;
    margin: 0;
    padding: 0;

    box-sizing: border-box;
}


/* =========================================================
   3. LIBRARY CARD
   Fixed internal styling
   No aspect-ratio scaling
========================================================= */

.library-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    gap: 8px;

    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    aspect-ratio: 3 / 4;
    box-sizing: border-box;
    overflow: hidden;

    padding: 4px;

    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: normal;

    background: var(--wire-card);
    border: 1px solid var(--wire-border2);
    border-radius: 14px;

    color: var(--wire-text);

    /* Prevent visual scaling or animated repositioning */
    transform: none;
    transition: border-color 0.2s ease;
}


/* =========================================================
   5. ICON + STATUS ROW
========================================================= */

.library-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    width: 100%;
    min-height: 30px;

    flex-shrink: 0;
}

.library-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    font-size: 30px;
    line-height: 1;
}

.library-status {
    flex-shrink: 0;

    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.library-status.available {
    color: var(--wire-accent);
}

.library-status.planned {
    color: var(--wire-text-muted2);
}


/* =========================================================
   6. CATEGORY
========================================================= */

.library-card-category {
    margin: 0;

    color: var(--wire-accent);

    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}


/* =========================================================
   7. CARD TITLE
========================================================= */

.library-card h2 {
    margin: 0;

    color: var(--wire-text);

    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;

    overflow-wrap: break-word;
    word-break: normal;
}


/* =========================================================
   8. CARD DESCRIPTION
========================================================= */

.library-description {
    margin: 0;

    color: var(--wire-text-muted2);

    font-size: 14px;
    line-height: 1.6;

    overflow-wrap: break-word;
    word-break: normal;
}


/* =========================================================
   9. CARD FOOTER
   Always positioned at the bottom of its card
========================================================= */

.library-card-footer {
    margin-top: auto;
    padding-top: 8px;

    color: var(--wire-text-muted2);

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   10. CARD LINK
========================================================= */

.library-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;

    gap: 8px;

    max-width: 100%;

    color: var(--wire-accent);

    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}

.library-link:hover {
    color: var(--wire-accent-hover);
}


/* =========================================================
   11. EMPTY SEARCH RESULTS
========================================================= */

.library-empty {
    width: 100%;
    margin-top: 20px;
    padding: 24px;

    box-sizing: border-box;

    border: 1px solid var(--wire-border2);
    border-radius: 14px;

    text-align: center;
}

.library-empty[hidden] {
    display: none;
}


/* =========================================================
   12. COMMUNITY CREATOR SECTION
========================================================= */

.library-creator {
    width: 100%;
    margin-top: 10px;
    padding: 24px;

    box-sizing: border-box;

    border: 1px solid var(--wire-border2);
    border-radius: 14px;

    background: var(--wire-card);
}

.library-eyebrow {
    margin: 0;

    color: var(--wire-accent);

    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 1.2px;
}

.library-creator h2 {
    margin: 8px 0;

    color: var(--wire-text);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.3;
}

.library-creator > p:last-child {
    margin-bottom: 0;

    color: var(--wire-text-muted2);

    font-size: 16px;
    line-height: 1.6;
}










/* =========================================================
   CARD WALLPAPERS
========================================================= */
/* - - - CARD WALLPAPERS - - - */
.library-card {
    position: relative;
    isolation: isolate;
}

.library-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background: inherit;
    filter: blur(2px);
    transform: scale(1.03);
}



/* ELECTRICAL THEORY CARD WALLPAPER */
.card-electrical-theory {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.646),
            rgba(0, 0, 0, 0.385)
        ),
        url("../z-images/card-electrical-theory.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* TRANSPARENT WHITE TEXT PANEL */
.card-electrical-theory .library-card-category,
.card-electrical-theory h2,
.card-electrical-theory .library-description,
.card-electrical-theory .library-card-footer {
    background: var(--wire-text-bg);
    padding: 3px 5px;
    border-radius: 10px;
    width: fit-content;
}

/* KEEP THE DESCRIPTION READABLE */
.card-electrical-theory .library-description {
    max-width: 100%;
    box-sizing: border-box;
}





/* WASTE WATER OPERATIONS WALLPAPER */
.card-waste-water-operations {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.646),
            rgba(0, 0, 0, 0.385)
        ),
        url("../z-images/card-waste-water-operations.webp");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* TRANSPARENT WHITE TEXT PANEL */
.card-waste-water-operations .library-card-category,
.card-waste-water-operations h2,
.card-waste-water-operations .library-description,
.card-waste-water-operations .library-card-footer {
    background: rgba(147, 142, 142, 0.195);
    padding: 3px 5px;
    border-radius: 10px;
    width: fit-content;
}

/* KEEP THE DESCRIPTION READABLE */
.card-waste-water-operations .library-description {
    max-width: 100%;
    box-sizing: border-box;
}





/* CONSTRUCTION WALLPAPER */
.card-construction {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.646),
            rgba(0, 0, 0, 0.385)
        ),
        url("../z-images/card-construction.webp");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* TRANSPARENT WHITE TEXT PANEL */
.card-construction .library-card-category,
.card-construction h2,
.card-construction .library-description,
.card-construction .library-card-footer {
    background: rgba(147, 142, 142, 0.195);
    padding: 3px 5px;
    border-radius: 10px;
    width: fit-content;
}

/* KEEP THE DESCRIPTION READABLE */
.card-construction .library-description {
    max-width: 100%;
    box-sizing: border-box;
}





/* DIY & HOME PROJECTS WALLPAPER */
.card-diy-and-home-projects {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.646),
            rgba(0, 0, 0, 0.385)
        ),
        url("../z-images/card-diy-and-home-projects.webp");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* TRANSPARENT WHITE TEXT PANEL */
.card-diy-and-home-projects .library-card-category,
.card-diy-and-home-projects h2,
.card-diy-and-home-projects .library-description,
.card-diy-and-home-projects .library-card-footer {
    background: rgba(147, 142, 142, 0.195);
    padding: 3px 5px;
    border-radius: 10px;
    width: fit-content;
}

/* KEEP THE DESCRIPTION READABLE */
.card-diy-and-home-projects .library-description {
    max-width: 100%;
    box-sizing: border-box;
}





/* LANDSCAPING WALLPAPER */
.card-landscaping {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.646),
            rgba(0, 0, 0, 0.385)
        ),
        url("../z-images/card-landscaping.webp");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* TRANSPARENT WHITE TEXT PANEL */
.card-landscaping .library-card-category,
.card-landscaping h2,
.card-landscaping .library-description,
.card-landscaping .library-card-footer {
    background: rgba(147, 142, 142, 0.195);
    padding: 3px 5px;
    border-radius: 10px;
    width: fit-content;
}

/* KEEP THE DESCRIPTION READABLE */
.card-landscaping .library-description {
    max-width: 100%;
    box-sizing: border-box;
}








/* FITNESS WALLPAPER */
.card-fitness {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.646),
            rgba(0, 0, 0, 0.385)
        ),
        url("../z-images/card-fitness.webp");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* TRANSPARENT WHITE TEXT PANEL */
.card-fitness .library-card-category,
.card-fitness h2,
.card-fitness .library-description,
.card-fitness .library-card-footer {
    background: rgba(147, 142, 142, 0.195);
    padding: 3px 5px;
    border-radius: 10px;
    width: fit-content;
}

/* KEEP THE DESCRIPTION READABLE */
.card-fitness .library-description {
    max-width: 100%;
    box-sizing: border-box;
}











/* =========================================================
   13. TABLET
   Three columns
========================================================= */

@media (max-width: 799px) {
    .library-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* =========================================================
   14. MOBILE
   Never more than two columns
========================================================= */

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


