/**
 * MOD Notices Horizontal Scroller
 * Version 1.2
 */


/* ==========================================================
   SECTION
   ========================================================== */

.mod-notices {
    width: 100%;
    padding: 36px 0;

    background-color: #ffffff;
    color: #161616;
}

.mod-notices__container {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: center;
    gap: 28px;
}


/* ==========================================================
   HEADING
   ========================================================== */

.mod-notices__heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    min-width: 0;
}

.mod-notices__title {
    margin: 0 0 18px;
    padding: 0;

    color: #161616;

    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.mod-notices__title::after {
    display: block;

    width: 54px;
    height: 2px;

    margin-top: 14px;

    content: "";

    background-color: #ed1c24;
}


/* ==========================================================
   CONTROLS
   ========================================================== */

.mod-notices__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mod-notices__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    margin: 0;
    padding: 0;

    border: 1px solid #d5d5d5;
    border-radius: 2px;

    background-color: #ffffff;
    color: #161616;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        opacity 0.2s ease;
}

.mod-notices__button span {
    display: block;

    margin-top: -2px;

    font-family: Arial, sans-serif;
    font-size: 31px;
    font-weight: 300;
    line-height: 1;
}

.mod-notices__button:hover {
    border-color: #ed1c24;
    background-color: #ed1c24;
    color: #ffffff;
}

.mod-notices__button:focus-visible {
    outline: 2px solid #ed1c24;
    outline-offset: 3px;
}


/* ==========================================================
   VIEWPORT
   ========================================================== */

.mod-notices__viewport {
    min-width: 0;
    overflow: hidden;
}


/* ==========================================================
   TRACK
   ========================================================== */

.mod-notices__track {
    display: flex;
    align-items: stretch;
    gap: 16px;

    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    padding: 2px 2px 12px;

    /*
     * Auto-scroll-i kontrollohet nga JavaScript.
     * Nuk përdorim smooth ose scroll-snap,
     * sepse do të pengonin lëvizjen e vazhdueshme.
     */
    scroll-behavior: auto;
    scroll-snap-type: none;

    overscroll-behavior-x: contain;

    cursor: grab;

    scrollbar-width: thin;
    scrollbar-color: #999999 transparent;

    -webkit-overflow-scrolling: touch;
}

.mod-notices__track:active,
.mod-notices__track.is-dragging {
    cursor: grabbing;
}

.mod-notices__track::-webkit-scrollbar {
    height: 5px;
}

.mod-notices__track::-webkit-scrollbar-track {
    background: transparent;
}

.mod-notices__track::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: #999999;
}

.mod-notices__track:focus-visible {
    outline: 2px solid #ed1c24;
    outline-offset: 3px;
}


/* ==========================================================
   NOTICE CARD
   ========================================================== */

.mod-notice {
    flex: 0 0 clamp(260px, 31%, 360px);

    min-width: 0;

    /*
     * Nuk përdorim scroll-snap në versionin auto-scroll.
     */
    scroll-snap-align: none;
}

.mod-notice__link {
    position: relative;

    display: flex;
    flex-direction: column;

    min-height: 210px;
    height: 100%;

    padding: 24px 54px 22px 24px;

    border: 1px solid #dddddd;

    background-color: #f6f6f6;
    color: #161616;

    text-decoration: none;

    transition:
        background-color 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease;
}

.mod-notice__link:hover {
    border-color: #bdbdbd;

    background-color: #eeeeee;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.10);

    transform: translateY(-2px);
}

.mod-notice__link:focus-visible {
    outline: 2px solid #ed1c24;
    outline-offset: 3px;
}


/* ==========================================================
   LABEL
   ========================================================== */

.mod-notice__label {
    align-self: flex-start;

    margin-bottom: 14px;
    padding: 4px 9px;

    background-color: #ed1c24;
    color: #ffffff;

    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;

    text-transform: uppercase;
    letter-spacing: 0.04em;
}


/* ==========================================================
   NOTICE TITLE
   ========================================================== */

.mod-notice__title {
    display: -webkit-box;
    overflow: hidden;

    margin: 0 0 20px;

    color: #161616;

    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}


/* ==========================================================
   META
   ========================================================== */

.mod-notice__meta {
    margin: auto 0 0;

    color: #666666;

    font-size: 0.92rem;
    line-height: 1.4;
}


/* ==========================================================
   ARROW
   ========================================================== */

.mod-notice__arrow {
    position: absolute;

    right: 20px;
    bottom: 18px;

    color: #161616;

    font-family: Arial, sans-serif;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.mod-notice__link:hover .mod-notice__arrow {
    color: #ed1c24;
    transform: translateX(4px);
}


/* ==========================================================
   CLONED CARDS
   ========================================================== */

/*
 * Klonet krijohen nga JavaScript për loop-in.
 * Pamja e tyre është identike me kartat origjinale.
 */

.mod-notice[data-notice-clone="true"] {
    pointer-events: none;
}

.mod-notice[data-notice-clone="true"] .mod-notice__link {
    pointer-events: none;
}


/* ==========================================================
   DARK MODE
   ========================================================== */

html[data-theme="dark"] .mod-notices {
    background-color: #161616;
    color: #eeeeee;
}

html[data-theme="dark"] .mod-notices__title {
    color: #ffffff;
}

html[data-theme="dark"] .mod-notices__button {
    border-color: #444444;

    background-color: #242424;
    color: #ffffff;
}

html[data-theme="dark"] .mod-notices__button:hover {
    border-color: #ed1c24;

    background-color: #ed1c24;
    color: #ffffff;
}

html[data-theme="dark"] .mod-notices__track {
    scrollbar-color: #666666 transparent;
}

html[data-theme="dark"]
.mod-notices__track::-webkit-scrollbar-thumb {
    background-color: #666666;
}

html[data-theme="dark"] .mod-notice__link {
    border-color: #383838;

    background-color: #202020;
    color: #eeeeee;
}

html[data-theme="dark"] .mod-notice__link:hover {
    border-color: #505050;

    background-color: #282828;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .mod-notice__title {
    color: #ffffff;
}

html[data-theme="dark"] .mod-notice__meta {
    color: #bdbdbd;
}

html[data-theme="dark"] .mod-notice__arrow {
    color: #ffffff;
}

html[data-theme="dark"]
.mod-notice__link:hover
.mod-notice__arrow {
    color: #ed1c24;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 991px) {

    .mod-notices {
        padding: 30px 0;
    }

    .mod-notices__container {
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 20px;
    }

    .mod-notices__title {
        font-size: 1.7rem;
    }

    .mod-notice {
        flex-basis: clamp(250px, 47%, 330px);
    }
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767px) {

    .mod-notices {
        padding: 28px 0 30px;
    }

    .mod-notices__container {
        display: block;
    }

    .mod-notices__heading {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;

        margin-bottom: 18px;
    }

    .mod-notices__title {
        margin: 0;

        font-size: 1.65rem;
    }

    .mod-notices__title::after {
        width: 46px;
        margin-top: 9px;
    }

    .mod-notices__controls {
        margin-left: 18px;
    }

    .mod-notices__button {
        width: 36px;
        height: 36px;
    }

    .mod-notices__viewport {
        overflow: hidden;
    }

    .mod-notices__track {
        gap: 12px;

        width: calc(100% + 1rem);

        padding-right: 2rem;
        padding-bottom: 10px;
    }

    .mod-notice {
        /*
         * Një kartë e plotë dhe pak nga karta pasuese.
         */
        flex: 0 0 calc(88% - 8px);
    }

    .mod-notice__link {
        min-height: 195px;

        padding:
            21px
            50px
            20px
            20px;
    }

    .mod-notice__title {
        font-size: 1.15rem;
    }

    .mod-notice__meta {
        font-size: 0.88rem;
    }
}


/* ==========================================================
   SMALL MOBILE
   ========================================================== */

@media (max-width: 380px) {

    .mod-notices__title {
        font-size: 1.5rem;
    }

    .mod-notice {
        flex-basis: 91%;
    }

    .mod-notices__button {
        width: 34px;
        height: 34px;
    }
}


/* ==========================================================
   REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .mod-notice__link,
    .mod-notice__arrow,
    .mod-notices__button {
        transition: none;
    }

    .mod-notice__link:hover {
        transform: none;
    }

    .mod-notice__link:hover .mod-notice__arrow {
        transform: none;
    }
}