/**
 * This stylesheet contains CSS specific that are used across the subpages,
 * such as the category pages (Movie, Music, etc.) and the search results page.
*/

@import "global.css";

/**
 * SUBPAGE HEADER
*/
header.subpage-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(4rem + 5.75rem) 0 4rem; /* 5.75 is navbar height */
    background-size: cover;
    background-position: center 25%;
    background-repeat: no-repeat;
}

@media only screen and (max-width: 767px) {
    header.subpage-header {
        padding: calc(4rem + 4rem) 0 4rem; /* 4 is navbar height */
    }
}

header.subpage-header::before {
    /* Allows linear gradient pseudo-element to display */
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    content: '';
}

header.sh-movie::before {
    /* Linear gradient style specific to Movie */
    background: linear-gradient(180deg, rgba(0, 185, 239, 0.4) 0%, rgba(0, 0, 0, 0) 74.48%), linear-gradient(0deg, rgba(28, 30, 35, 0.9), rgba(28, 30, 35, 0.9));
}

header.sh-tv::before {
    /* Linear gradient style specific to Television */
    background: linear-gradient(180deg, rgba(233, 87, 183, 0.4) 0%, rgba(0, 0, 0, 0) 74.48%), linear-gradient(0deg, rgba(28, 30, 35, 0.9), rgba(28, 30, 35, 0.9));
}

header.sh-music::before {
    /* Linear gradient style specific to Music */
    background: linear-gradient(180deg, rgba(166, 206, 40, 0.4) 0%, rgba(0, 0, 0, 0) 74.48%), linear-gradient(0deg, rgba(28, 30, 35, 0.9), rgba(28, 30, 35, 0.9));
}

header.sh-misc::before {
    /* Linear gradient style specific to Misellaneous */
    background: linear-gradient(180deg, rgba(255, 168, 29, 0.4) 0%, rgba(0, 0, 0, 0) 74.48%), linear-gradient(0deg, rgba(28, 30, 35, 0.9), rgba(28, 30, 35, 0.9));
}

header.sh-search::before {
    /* Linear gradient style specific to Misellaneous */
    background: linear-gradient(180deg, rgba(255, 128, 83, 0.4) 0%, rgba(0, 0, 0, 0) 74.48%), linear-gradient(0deg, rgba(28, 30, 35, 0.9), rgba(28, 30, 35, 0.9));
}

img.sh-icon {
    /* Icon for the subcategory */
    margin-bottom: 1rem;
    height: 3rem;
}

img.sh-icon, h1.sh-heading {
    /* Places subcategory icon and heading on top of the linear-gradient */
    z-index: 1;
}

h1.sh-heading {
    font-weight: bold;
}

/**
 * ARTICLE CARDS
*/

section.subpage-articles {
    padding: 3rem 0;
}

section.subpage-articles > .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

div.sp-article-card {
    position: relative;
    display: flex;
    align-items: center;
    margin: .8rem 0;
    padding: .75rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: .5rem;
    transition: 0.2s;
}

div.sp-ac-movie { background-color: rgba(42, 153, 187, 0.15); }
div.sp-ac-tv { background-color: rgba(160, 104, 142, 0.15); }
div.sp-ac-music { background-color: rgba(143, 167, 63, 0.103); }
div.sp-ac-misc { background-color: rgba(180, 146, 91, 0.15); }
div.sp-ac-search { background-color: rgba(210, 117, 83, 0.15); }

div.sp-ac-movie:hover { background-color: rgba(42, 153, 187, 0.25); }
div.sp-ac-tv:hover { background-color: rgba(160, 104, 142, 0.25); }
div.sp-ac-music:hover { background-color: rgba(135, 158, 59, 0.25); }
div.sp-ac-misc:hover { background-color: rgba(180, 146, 91, 0.25); }
div.sp-ac-search:hover { background-color: rgba(225, 118, 79, 0.25); }

div.sp-article-card:hover {
    transform: scale(1.025);
}

img.sp-ac-visual {
    /* Article visual */
    width: 8rem;
    margin-right: 1.2rem;
    border-radius: .25rem;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

h2.sp-ac-title {
    /* Article title */
    font-size: 1.25em;
    margin-bottom: 1rem;
}

p.sp-ac-date,
p.sp-ac-authors {
    /* Article date and authors */
    font-size: 0.75em;
}

p.sp-ac-date {
    margin-bottom: 0.1rem;
    font-weight: 600;
}

p.sp-ac-authors {
    margin-bottom: 0;
}

@media only screen and (max-width: 992px) {
    h2.sp-ac-title {
        /* Article title */
        font-size: 1em;
    }

    p.sp-ac-authors {
        display: none;
    }

    p.sp-ac-date {
        font-weight: 400;
        margin-bottom: 0;
    }
}

@media only screen and (max-width: 768px) {
    h2.sp-ac-title {
        /* Article title */
        font-size: 1.25em;
    }
}

@media only screen and (max-width: 575px) {
    section.subpage-articles {
        padding: 1rem 0;
    }
}

@media only screen and (max-width: 400px) {
    div.sp-article-card {
        margin: .35rem 0;
    }

    h2.sp-ac-title {
        /* Article title */
        font-size: 1em;
        margin-bottom: .75rem;
    }

    img.sp-ac-visual {
        /* Article visual */
        width: 5rem;
        margin-right: .8rem;
    }
}

/**
 * PAGINATION LINKS
*/
ul.pagination {
    margin-top: 3rem;
    border-radius: 8rem !important;
}

li.page-item a {
    color: rgba(255, 255, 255, 0.5);
}

li.page-item:hover a.page-link {
    color: rgb(255, 255, 255);
}

li.page-item:first-child a.page-link {
    border-top-left-radius: 10rem;
    border-bottom-left-radius: 10rem;
}

li.page-item:last-child a.page-link {
    border-top-right-radius: 10rem;
    border-bottom-right-radius: 10rem;
}

