
/* ============================================
   CODEWORD STUDY MATERIALS MARQUEE
   Right-to-left continuous scrolling
============================================ */

.cw-pdf-marquee-section,
.cw-pdf-marquee-section * {
    box-sizing: border-box;
}

.cw-pdf-marquee-section {
    width: 100%;
    padding: 75px 0 55px;
    overflow: hidden;
    background:
        radial-gradient(circle at 5% 10%,
            rgba(37, 99, 235, .08), transparent 30%),
        linear-gradient(135deg, #f8fafc, #eef4ff);
    font-family: "Poppins", sans-serif;
}

.cw-pdf-marquee-container {
    width: 100%;
    margin: 0 auto;
}

.cw-pdf-marquee-heading {
    text-align: center;
    padding: 0 20px;
    margin-bottom: 42px;
}

.cw-pdf-eyebrow {
    display: inline-block;
    padding: 8px 17px;
    background: #e7efff;
    color: #1b3058;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.cw-pdf-marquee-heading h2 {
    margin: 17px 0 12px;
    color: #172b4d;
    font-size: clamp(27px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.3;
}

.cw-pdf-marquee-heading h2 span {
    color: #f59e0b;
}

.cw-pdf-marquee-heading p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
}

/* Marquee viewport */

.cw-pdf-marquee {
    width: 100%;
    overflow: hidden;
    padding: 15px 0 28px;
}

.cw-pdf-marquee-track {
    display: flex;
    align-items: stretch;
    gap: 24px;
    width: max-content;
    padding: 0 12px;
    animation: cwPdfMarqueeScroll 38s linear infinite;
    will-change: transform;
}

/* Continuous scrolling */

@keyframes cwPdfMarqueeScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 12px));
    }
}

/* Pause while visitors read a card */

.cw-pdf-marquee:hover .cw-pdf-marquee-track,
.cw-pdf-marquee:focus-within .cw-pdf-marquee-track {
    animation-play-state: paused;
}

/* Study material card */

.cw-pdf-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 0 0 310px;
    width: 310px;
    min-height: 355px;
    padding: 27px 25px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5eaf2;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
    transition: transform .3s ease, box-shadow .3s ease;
}

.cw-pdf-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1b3058, #f59e0b);
}

.cw-pdf-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .13);
    border-color: #d4deef;
}

/* Icon box */

.cw-pdf-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    border-radius: 16px;
    font-size: 30px;
}

.cw-pdf-card-icon.java {
    background: #fff0e8;
    color: #e76f00;
}

.cw-pdf-card-icon.python {
    background: #e8f1ff;
    color: #2466a8;
}

.cw-pdf-card-icon.web {
    background: #fff0e8;
    color: #e34f26;
}

.cw-pdf-card-icon.javascript {
    background: #fff8d8;
    color: #9b7800;
}

.cw-pdf-card-icon.database {
    background: #e5f7ef;
    color: #07865d;
}

.cw-pdf-card-icon.computer {
    background: #f0eaff;
    color: #7044c8;
}

/* Category */

.cw-pdf-card-category {
    display: inline-block;
    margin-bottom: 11px;
    color: #b77908;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.1px;
}

/* Card content */

.cw-pdf-card h3 {
    margin: 0 0 12px;
    color: #172b4d;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.45;
}

.cw-pdf-card p {
    margin: 0 0 22px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.9;
}

/* Read More button */

.cw-pdf-readmore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    padding: 11px 17px;
    border-radius: 8px;
    background: #1b3058;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .25s ease, gap .25s ease;
}

.cw-pdf-readmore:hover {
    background: #f59e0b;
    color: #ffffff !important;
    gap: 15px;
}

/* Footer */

.cw-pdf-marquee-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 18px auto 0;
    padding: 20px 25px 0;
    max-width: 1250px;
    border-top: 1px solid #dfe6f0;
}

.cw-pdf-marquee-footer span {
    color: #64748b;
    font-size: 12px;
}

.cw-pdf-marquee-footer span i {
    margin-right: 7px;
    color: #f59e0b;
}

.cw-pdf-marquee-footer > a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #1b3058 !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
}

.cw-pdf-marquee-footer > a:hover {
    color: #e99400 !important;
}

/* Responsive */

@media (max-width: 600px) {
    .cw-pdf-marquee-section {
        padding: 50px 0 35px;
    }

    .cw-pdf-marquee-heading {
        margin-bottom: 25px;
    }

    .cw-pdf-marquee-track {
        gap: 15px;
        animation-duration: 32s;
    }

    .cw-pdf-card {
        flex-basis: 275px;
        width: 275px;
        min-height: 340px;
        padding: 23px 20px;
    }

    .cw-pdf-marquee-footer {
        justify-content: center;
        text-align: center;
        flex-direction: column;
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .cw-pdf-marquee-track {
        animation: none;
        transform: none;
    }

    .cw-pdf-marquee {
        overflow-x: auto;
    }
}

/* Latest Study Materials Heading */

.cw-pdf-latest-heading {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 35px;
    padding: 10px 20px;
    font-family: "Poppins", sans-serif;
}

.cw-pdf-latest-heading .cw-pdf-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: #f58220;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

.cw-pdf-latest-heading h2 {
    margin: 0 0 14px;
    color: #1b3058;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.3;
}

.cw-pdf-latest-heading h2 span {
    color: #f58220;
}

.cw-pdf-latest-heading p {
    margin: 0;
    color: #667085;
    font-size: 15px;
    line-height: 1.8;
}

@media (max-width: 576px) {
    .cw-pdf-latest-heading {
        margin-bottom: 25px;
        padding: 8px 15px;
    }

    .cw-pdf-latest-heading p {
        font-size: 13px;
    }
}

/* ==========================================
   CODEWORD ANNOUNCEMENT TICKER
========================================== */

.cw-latest-marquee-section {
    --cw-navy: #142746;
    --cw-orange: #ff8a24;

    width: 100%;
    padding: 22px 20px;
    background: #eef2f9;
    font-family: 'Poppins', sans-serif;
}

.cw-latest-marquee-container {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 1350px;
    min-height: 88px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #dce4f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(20, 39, 70, .08);
}

/* Left announcement branding */

.cw-latest-marquee-section .cw-marquee-label {
    display: flex;
    flex: 0 0 195px;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--cw-navy);
}

.cw-latest-marquee-section .cw-marquee-bell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffad57, #ff7b18);
    color: #fff;
    font-size: 19px;
    box-shadow: 0 5px 14px rgba(255, 138, 36, .2);
}

.cw-latest-marquee-section .cw-marquee-label-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cw-latest-marquee-section .cw-marquee-label-text strong {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
}

.cw-latest-marquee-section .cw-marquee-label-text span {
    color: #c8d5e9;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .7px;
    white-space: nowrap;
}

/* Scrolling area */

.cw-latest-marquee-section .cw-marquee-content {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 15px 20px;
    background: linear-gradient(100deg, #fff8ef 0%, #fff 75%);
}

.cw-latest-marquee-section .cw-marquee-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #bfead1;
    border-radius: 6px;
    background: #e7f8ef;
    color: #147847;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .5px;
    white-space: nowrap;
}

.cw-latest-marquee-section .cw-marquee-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #15a366;
    box-shadow: 0 0 0 3px rgba(21, 163, 102, .12);
    animation: cwLivePulse 1.3s infinite;
}

@keyframes cwLivePulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(21, 163, 102, .12);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(21, 163, 102, .04);
    }
}

/* True continuous right-to-left marquee */

.cw-latest-marquee-section .cw-marquee-track-wrapper {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        #000 2%,
        #000 98%,
        transparent
    );
    mask-image: linear-gradient(
        to right,
        transparent,
        #000 2%,
        #000 98%,
        transparent
    );
}

.cw-latest-marquee-section .cw-marquee-track {
    display: flex;
    align-items: center;
    width: max-content;
    max-width: none;
    animation: cwAnnouncementScroll 50s linear infinite !important;
    will-change: transform;
}

.cw-latest-marquee-section .cw-marquee-track span {
    display: block;
    flex: 0 0 auto;
    padding-right: 75px;
    color: #243b60;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.7;
    white-space: nowrap;
}

/* Pause while hovering over the ticker */

.cw-latest-marquee-section .cw-marquee-content:hover .cw-marquee-track {
    animation-play-state: paused;
}

/* Move exactly one duplicated text group */

@keyframes cwAnnouncementScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Date and time */

.cw-latest-marquee-section .cw-marquee-date {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding-left: 12px;
    border-left: 1px solid #e6eaf1;
    color: #738096;
    font-size: 10px;
    white-space: nowrap;
}

.cw-latest-marquee-section .cw-marquee-date i {
    color: var(--cw-orange);
}

/* Read More button */

.cw-latest-marquee-section .cw-marquee-readmore {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    align-self: center;
    margin: 10px 12px;
    padding: 13px 17px;
    border: 0;
    border-radius: 8px;
    background: var(--cw-navy);
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .2s ease, transform .2s ease;
}

.cw-latest-marquee-section .cw-marquee-readmore:hover {
    transform: translateY(-2px);
    background: var(--cw-orange);
    color: #fff !important;
}

.cw-latest-marquee-section .cw-marquee-readmore i {
    transition: transform .2s ease;
}

.cw-latest-marquee-section .cw-marquee-readmore:hover i {
    transform: translateX(4px);
}

/* Loading / empty state */

.cw-latest-marquee-section .cw-marquee-track.cw-marquee-static {
    width: 100%;
    animation: none;
}

.cw-latest-marquee-section .cw-marquee-track.cw-marquee-static span {
    padding-right: 0;
    white-space: normal;
    color: #68758a;
    font-size: 12px;
}

/* Tablet */

@media (max-width: 1100px) {
    .cw-latest-marquee-container {
        flex-wrap: wrap;
    }

    .cw-marquee-label {
        flex-basis: 180px;
    }

    .cw-marquee-content {
        flex-basis: calc(100% - 180px);
    }

    .cw-marquee-readmore {
        margin: 0 15px 15px auto;
    }

    .cw-marquee-date {
        display: none;
    }
}

/* Mobile */

@media (max-width: 600px) {
    .cw-latest-marquee-section {
        padding: 14px 10px;
    }

    .cw-latest-marquee-container {
        border-radius: 11px;
    }

    .cw-marquee-label {
        flex: 1 1 100%;
        padding: 12px 15px;
    }

    .cw-marquee-bell {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .cw-marquee-content {
        flex: 1 1 100%;
        gap: 10px;
        padding: 14px;
    }

    .cw-marquee-status {
        display: none;
    }

    .cw-marquee-track span {
        padding-right: 45px;
        font-size: 12px;
    }

    .cw-marquee-readmore {
        margin: 0 14px 14px auto;
        padding: 11px 14px;
        font-size: 11px;
    }
}

/* Respect accessibility preferences */

@media (prefers-reduced-motion: reduce) {
    .cw-marquee-live-dot {
        animation: none;
    }

    .cw-marquee-track {
        animation: none !important;
        width: 100%;
    }

    .cw-marquee-track span {
        padding-right: 0;
        white-space: normal;
    }
}

/* Pause marquee when user hovers over announcement text */
.cw-latest-marquee-section .cw-marquee-track-wrapper:hover
.cw-marquee-track {
    animation-play-state: paused !important;
}

/* Make announcement text clickable */
.cw-latest-marquee-section .cw-marquee-track span {
    cursor: pointer;
}

/* Optional: indicate that the announcement is clickable */
.cw-latest-marquee-section .cw-marquee-track span:hover {
    color: #ff8a24;
}
