@layer components {
    .department-notice-board {
        padding-block-end: 2rem;
    }

    .notice-board {
        background: #795548; /* Cork color */
        padding: 1.5rem;
        border: 12px solid #5d4037; /* Darker wooden frame */
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-lg), inset 0 0 50px rgba(0, 0, 0, 0.2);
        position: relative;
        overflow: hidden;

        &::before {
            content: "";
            position: absolute;
            inset: 0;
            background-image: radial-gradient(rgba(0, 0, 0, 0.15) 1.5px, transparent 1.5px);
            background-size: 8px 8px;
            pointer-events: none;
        }

        & .notice-board__header {
            background: var(--clr-stamp-red);
            margin: -1.5rem -1.5rem 1.5rem -1.5rem;
            padding: 1rem;
            text-align: center;
            border-bottom: 4px solid rgba(0, 0, 0, 0.2);
            position: relative;
            z-index: 2;

            [data-theme="dark"] & {
                background: var(--clr-stamp-red-muted);
            }
        }

        & .notice-board__title {
            color: white;
            font-family: var(--font-serif);
            font-size: 1.25rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            margin: 0;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        }

        & .notice-board__content {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 1.5rem;
            position: relative;
            z-index: 1;
        }

        [data-theme="dark"] & {
            background: #4e342e;
            border-color: #3e2723;
        }
    }

    .notice-paper {
        background: #fff9c4; /* Yellow paper */
        padding: 1rem;
        box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
        transform: rotate(var(--rotation)) translate(var(--x), var(--y));
        position: relative;
        min-height: 120px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease;

        [data-theme="dark"] & {
            background: #4a462a; /* Muted dark yellow */
            box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
        }

        &:hover {
            transform: rotate(0) scale(1.05) translate(0, -5px);
            z-index: 10;
        }

        &:nth-child(even) {
            background: #e1f5fe; /* Blue paper */

            [data-theme="dark"] & {
                background: #2b3a42; /* Muted dark blue */
            }
        }

        &:nth-child(3n) {
            background: #f1f8e9; /* Green paper */

            [data-theme="dark"] & {
                background: #2d3828; /* Muted dark green */
            }
        }

        & .notice-paper__pin {
            position: absolute;
            top: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 16px;
            height: 16px;
            background: var(--clr-stamp-red);
            border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
            z-index: 2;

            [data-theme="dark"] & {
                background: var(--clr-stamp-red-muted);
            }

            &::after {
                content: "";
                position: absolute;
                top: 3px;
                left: 3px;
                width: 5px;
                height: 5px;
                background: rgba(255, 255, 255, 0.6);
                border-radius: 50%;
            }
        }

        & .notice-paper__text {
            font-family: "Kalam", "Comic Sans MS", cursive, sans-serif;
            font-size: 0.85rem;
            line-height: 1.3;
            color: #333;
            text-align: center;
            word-break: break-word;

            [data-theme="dark"] & {
                color: #ddd;
            }
        }
    }
}
