/* =========================================================
   FEATURED WORKSHEETS — LANDING PAGE V4
   PLAYFUL • COLOURFUL • CLEAN
========================================================= */


/* =========================================================
   SECTION
========================================================= */

.featured {
    width: 100%;
    max-width: 1400px;

    margin: 80px auto;

    padding: 20px 32px;

    box-sizing: border-box;
}


/* =========================================================
   HEADING
========================================================= */

.featured h2 {
    margin: 0;

    text-align: center;

    color: var(--heading);

    font-size: 42px;
    line-height: 1.2;

    font-weight: 800;

    letter-spacing: -0.5px;
}


/* =========================================================
   SUBTITLE
========================================================= */

.featured .section-subtitle {
    margin: 12px 0 42px;

    text-align: center;

    color: var(--text-muted);

    font-size: 18px;

    line-height: 1.5;
}


/* =========================================================
   GRID
========================================================= */

.featured .worksheet-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 28px;

    align-items: stretch;
}


/* =========================================================
   CARD
========================================================= */

.featured .worksheet-card {

    --category-color: #4DA3FF;

    position: relative;

    display: flex;

    flex-direction: column;

    min-width: 0;

    height: 100%;

    overflow: hidden;

    box-sizing: border-box;

    background: var(--surface);

    border: 2px solid transparent;

    border-radius: 28px;

    box-shadow:
        0 8px 25px rgba(45, 65, 90, 0.10);

    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}


/* =========================================================
   TOP COLOUR STRIP
========================================================= */

.featured .worksheet-card::before {

    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 8px;

    background: var(--category-color);

    z-index: 5;
}


/* =========================================================
   SMALL DECORATIVE CORNER
========================================================= */

.featured .worksheet-card::after {

    content: "";

    position: absolute;

    width: 75px;
    height: 75px;

    top: -38px;
    right: -38px;

    border-radius: 50%;

    background: var(--category-color);

    opacity: 0.10;

    pointer-events: none;
}


/* =========================================================
   HOVER
========================================================= */

.featured .worksheet-card:hover {

    transform: translateY(-9px);

    border-color: var(--category-color);

    box-shadow:
        0 18px 38px rgba(45, 65, 90, 0.17);
}


/* =========================================================
   IMAGE WRAPPER EFFECT
========================================================= */

.featured .worksheet-card img {

    display: block;

    width: calc(100% - 20px);

    height: 220px;

    margin: 10px 10px 0;

    object-fit: cover;

    object-position: center;

    background: #ffffff;

    border-radius: 21px;

    transition:
        transform 0.35s ease;
}


/* =========================================================
   IMAGE HOVER
========================================================= */

.featured .worksheet-card:hover img {

    transform: scale(1.025);
}


/* =========================================================
   TITLE
========================================================= */

.featured .worksheet-card h3 {

    position: relative;

    margin: 0;

    padding: 20px 18px 7px;

    box-sizing: border-box;

    text-align: center;

    color: var(--heading);

    font-size: 23px;

    line-height: 1.3;

    font-weight: 800;

    transition:
        color 0.25s ease;
}


/* =========================================================
   TITLE HOVER
========================================================= */

.featured .worksheet-card:hover h3 {

    color: var(--category-color);
}


/* =========================================================
   CATEGORY / AGE
========================================================= */

.featured .worksheet-card p {

    display: block;

    width: fit-content;

    max-width: calc(100% - 36px);

    margin: 4px auto 20px;

    padding: 7px 14px;

    box-sizing: border-box;

    text-align: center;

    color: var(--text-muted);

    background: var(--surface);

    border: 1px solid var(--category-color);

    border-radius: 50px;

    font-size: 14px;

    line-height: 1.25;

    white-space: nowrap;

    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}


/* =========================================================
   CATEGORY PILL HOVER
========================================================= */

.featured .worksheet-card:hover p {

    background: var(--category-color);

    color: #ffffff;
}


/* =========================================================
   BUTTON
========================================================= */

.featured .worksheet-card .worksheet-btn {

    display: flex;

    align-items: center;

    justify-content: center;

    width: calc(100% - 36px);

    min-height: 52px;

    margin: auto 18px 18px;

    padding: 14px 18px;

    box-sizing: border-box;

    background: var(--category-color);

    color: #ffffff;

    border: 2px solid var(--category-color);

    border-radius: 15px;

    text-align: center;

    text-decoration: none;

    font-family: inherit;

    font-size: 15px;

    font-weight: 800;

    line-height: 1.2;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}


/* =========================================================
   BUTTON HOVER
========================================================= */

.featured .worksheet-card .worksheet-btn:hover {

    color: #ffffff;

    transform: translateY(-2px);

    filter: brightness(1.06);

    box-shadow:
        0 7px 16px rgba(45, 65, 90, 0.18);
}


/* =========================================================
   BUTTON ACTIVE
========================================================= */

.featured .worksheet-card .worksheet-btn:active {

    transform: translateY(0);

    box-shadow: none;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .featured {

        padding-left: 22px;
        padding-right: 22px;
    }


    .featured .worksheet-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 26px;
    }


    .featured .worksheet-card img {

        height: 230px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .featured {

        margin: 55px auto;

        padding:
            10px 20px;
    }


    .featured h2 {

        font-size: 34px;
    }


    .featured .section-subtitle {

        font-size: 17px;

        margin:
            12px 0 32px;
    }


    .featured .worksheet-grid {

        grid-template-columns: 1fr;

        gap: 24px;
    }


    .featured .worksheet-card img {

        height: 250px;
    }


    .featured .worksheet-card h3 {

        font-size: 23px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .featured {

        margin:
            40px auto;

        padding:
            10px 15px;
    }


    .featured h2 {

        font-size: 30px;
    }


    .featured .section-subtitle {

        font-size: 16px;

        margin-bottom: 28px;
    }


    .featured .worksheet-grid {

        gap: 20px;
    }


    .featured .worksheet-card {

        border-radius: 24px;
    }


    .featured .worksheet-card img {

        height: 230px;

        border-radius: 19px;
    }


    .featured .worksheet-card h3 {

        font-size: 21px;

        padding-top: 18px;
    }


    .featured .worksheet-card p {

        font-size: 14px;
    }


    .featured .worksheet-card .worksheet-btn {

        width:
            calc(100% - 32px);

        margin-left: 16px;

        margin-right: 16px;

        margin-bottom: 16px;
    }
}


/* =========================================================
   DARK MODE
========================================================= */

[data-theme="dark"] .featured .worksheet-card {

    background: var(--surface);

    border-color: var(--border);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.28);
}


[data-theme="dark"] .featured .worksheet-card:hover {

    border-color: var(--category-color);

    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.40);
}


[data-theme="dark"] .featured .worksheet-card img {

    background: #ffffff;
}


/* =========================================================
   REDUCED MOTION
========================================================= */

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

    .featured .worksheet-card,
    .featured .worksheet-card img,
    .featured .worksheet-card h3,
    .featured .worksheet-card p,
    .featured .worksheet-card .worksheet-btn {

        transition: none;
    }


    .featured .worksheet-card:hover {

        transform: none;
    }


    .featured .worksheet-card:hover img {

        transform: none;
    }


    .featured .worksheet-card .worksheet-btn:hover {

        transform: none;
    }
}
/* =========================================================
   REDUCE SPACE BETWEEN HERO AND FEATURED
========================================================= */

.featured {
    margin-top: 25px;
    margin-bottom: 60px;
}
