/**
 * Certification & Safety
 * Current Announcements Stylesheet
 *
 * File:
 * /css/nbc-announcements.css
 *
 * Created By:
 * Nuts and Bolts Coaching (NBC)
 *
 * Author:
 * Thomas L. Vaughn
 *
 * Date Created:
 * 2026-07-20
 *
 * Date Updated:
 * 2026-07-20
 *
 * Purpose:
 * Styles the Current Announcements area near the top of the
 * home page. Multiple announcement lines move horizontally
 * together as one announcement block.
 *
 * Features:
 * - Supports multiple announcement lines.
 * - Moves the complete announcement block from right to left.
 * - Keeps all announcement lines together.
 * - Pauses movement when the visitor hovers over the area.
 *
 * Dependencies:
 * - Divi Text Module
 * - NBC stylesheet loader in functions.php
 *
 * Notes:
 * - No JavaScript is required.
 * - Additional announcements may be added as separate
 *   .nbc-announcement-item elements.
 */


/*--------------------------------------------------------------
>>> CURRENT ANNOUNCEMENTS
--------------------------------------------------------------*/

.nbc-announcements {
    width: 100%;
}

.nbc-announcements-title {
    margin: 0 0 16px;
    padding: 0;

    text-align: center;

    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
}


/*--------------------------------------------------------------
>>> VISIBLE WINDOW
--------------------------------------------------------------*/

.nbc-announcements-window {
    width: 100%;
    overflow: hidden;
}


/*--------------------------------------------------------------
>>> MOVING ANNOUNCEMENT BLOCK
--------------------------------------------------------------*/

.nbc-announcements-content {
    display: inline-block;
    min-width: max-content;
    padding-left: 100%;

    animation: nbc-announcements-scroll 25s linear infinite;
    will-change: transform;
}


/*--------------------------------------------------------------
>>> PAUSE ON HOVER
--------------------------------------------------------------*/

.nbc-announcements-window:hover .nbc-announcements-content {
    animation-play-state: paused;
}


/*--------------------------------------------------------------
>>> INDIVIDUAL ANNOUNCEMENT LINES
--------------------------------------------------------------*/

.nbc-announcement-item {
    margin: 0;
    padding: 2px 20px;

    white-space: nowrap;
    text-align: left;

    font-size: 20px;
    line-height: 1.25;
}

.nbc-announcement-icon {
    display: inline;
    margin-right: 6px;
}


/*--------------------------------------------------------------
>>> HORIZONTAL ANIMATION
--------------------------------------------------------------*/

@keyframes nbc-announcements-scroll {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}


/*--------------------------------------------------------------
>>> MOBILE
--------------------------------------------------------------*/

@media (max-width: 767px) {

    .nbc-announcements-title {
        font-size: 28px;
    }

    .nbc-announcement-item {
        padding: 2px 14px;

        font-size: 17px;
        line-height: 1.25;
    }

    .nbc-announcements-content {
        animation-duration: 30s;
    }
}


/*--------------------------------------------------------------
>>> REDUCED MOTION
--------------------------------------------------------------*/

@media (prefers-reduced-motion: reduce) {

    .nbc-announcements-window {
        overflow: visible;
    }

    .nbc-announcements-content {
        min-width: 0;
        padding-left: 0;

        animation: none;
    }

    .nbc-announcement-item {
        white-space: normal;
        text-align: center;
    }
}