/* =========================================================
   ALGEBRA HUB
   Raul The Tutor
   ========================================================= */


/* =========================================================
   GLOBAL HUB HELPERS
   ========================================================= */

.alg-hub-eyebrow {
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #159A9C;
}

.alg-section-heading {
    max-width: 760px;
    margin-bottom: 3rem;
}

.alg-section-heading h2 {
    margin-bottom: 1rem;
    font-weight: 800;
    color: #0F172A;
}

.alg-section-heading p {
    margin-bottom: 0;
    color: #475569;
    line-height: 1.7;
}


/* =========================================================
   INTRO SUMMARY CARD
   ========================================================= */

.alg-summary-card {
    padding: 2rem;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.alg-summary-card h3 {
    font-weight: 800;
    color: #0F172A;
}

.alg-summary-row {
    padding: 1rem 0;
    border-top: 1px solid #E2E8F0;
}

.alg-summary-row:first-of-type {
    margin-top: 1.25rem;
}

.alg-summary-row span {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748B;
}

.alg-summary-row strong {
    display: block;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #0F172A;
}


/* =========================================================
   LEARNING HUB
   ========================================================= */

.alg-hub-section {
    padding: 6rem 0;
    background: #F8FAFC;
}

.alg-hub-heading {
    max-width: 760px;
    margin-bottom: 3.25rem;
}

.alg-hub-heading h2 {
    margin-bottom: 1rem;
    font-weight: 800;
    color: #0F172A;
}

.alg-hub-heading p {
    margin-bottom: 0;
    color: #475569;
    line-height: 1.75;
}

.alg-resource-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.alg-resource-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 2rem;
    border: 1px solid #DCE5EC;
    border-radius: 20px;
    background: #FFFFFF;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.alg-resource-card:hover {
    transform: translateY(-4px);
    border-color: rgba(21, 154, 156, 0.45);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
}

.alg-resource-card-featured {
    grid-column: 1 / -1;
}

.alg-resource-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.alg-resource-number {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #94A3B8;
}

.alg-resource-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(21, 154, 156, 0.12);
    color: #159A9C;
    font-size: 1.15rem;
}

.alg-resource-kicker {
    margin-bottom: 0.6rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #159A9C;
}

.alg-resource-card h3 {
    margin-bottom: 0.85rem;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
    color: #0F172A;
}

.alg-resource-card > p:not(.alg-resource-kicker) {
    margin-bottom: 1.5rem;
    color: #475569;
    line-height: 1.7;
}

.alg-resource-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.alg-resource-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 0.7rem 1.1rem;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    background: #FFFFFF;
    color: #0F172A;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.alg-resource-btn:hover {
    border-color: #159A9C;
    color: #159A9C;
    transform: translateY(-1px);
}

.alg-resource-btn-primary {
    border-color: #159A9C;
    background: #159A9C;
    color: #FFFFFF;
}

.alg-resource-btn-primary:hover {
    border-color: #117F81;
    background: #117F81;
    color: #FFFFFF;
}


/* =========================================================
   TUTORING TOPICS
   ========================================================= */

.alg-topic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.alg-topic-card {
    padding: 1.75rem;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.alg-topic-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: rgba(21, 154, 156, 0.11);
    color: #159A9C;
    font-size: 1rem;
}

.alg-topic-card h3 {
    margin-bottom: 0.65rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0F172A;
}

.alg-topic-card p {
    margin-bottom: 0;
    color: #475569;
    line-height: 1.65;
}


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

.alg-struggle-section {
    padding: 6rem 0;
    background: #F8FAFC;
}

.alg-struggle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.alg-struggle-card {
    padding: 2rem;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.alg-struggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 1.1rem;
    border-radius: 14px;
    background: rgba(21, 154, 156, 0.11);
    color: #159A9C;
}

.alg-struggle-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0F172A;
}

.alg-struggle-card p {
    margin-bottom: 0;
    color: #475569;
    line-height: 1.7;
}


/* =========================================================
   METHOD / APPROACH
   ========================================================= */

.alg-method-card {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
    margin-top: 4rem;
    padding: 2.5rem;
    border-radius: 22px;
    background: #0F172A;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.alg-method-copy h2 {
    margin-bottom: 1rem;
    color: #FFFFFF;
    font-weight: 800;
}

.alg-method-copy p {
    margin-bottom: 0;
    color: #CBD5E1;
    line-height: 1.75;
}

.alg-method-card .alg-hub-eyebrow {
    color: #5EEAD4;
}

.alg-method-steps {
    display: grid;
    gap: 1rem;
}

.alg-method-step {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 1rem;
    align-items: start;
}

.alg-method-step > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #159A9C;
    color: #FFFFFF;
    font-weight: 800;
}

.alg-method-step h3 {
    margin-bottom: 0.3rem;
    font-size: 1rem;
    font-weight: 800;
    color: #FFFFFF;
}

.alg-method-step p {
    margin-bottom: 0;
    color: #CBD5E1;
    line-height: 1.6;
}


/* =========================================================
   FAQ
   ========================================================= */

.alg-faq-section {
    padding: 6rem 0;
    background: #FFFFFF;
}

.alg-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.alg-faq-card {
    padding: 2rem;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.alg-faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    border-radius: 13px;
    background: rgba(21, 154, 156, 0.1);
    color: #159A9C;
}

.alg-faq-card h3 {
    margin-bottom: 0.7rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0F172A;
}

.alg-faq-card p {
    margin-bottom: 0;
    color: #475569;
    line-height: 1.7;
}


/* =========================================================
   RELATED SERVICES
   ========================================================= */

.alg-related-section {
    padding: 6rem 0;
    background: #F8FAFC;
}

.alg-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.alg-related-card {
    display: flex;
    gap: 1rem;
    padding: 1.75rem;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    background: #FFFFFF;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.alg-related-card:hover {
    transform: translateY(-3px);
    border-color: rgba(21, 154, 156, 0.45);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
    color: inherit;
}

.alg-related-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: rgba(21, 154, 156, 0.11);
    color: #159A9C;
}

.alg-related-card h3 {
    margin-bottom: 0.45rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0F172A;
}

.alg-related-card p {
    margin-bottom: 0;
    color: #475569;
    line-height: 1.65;
}


/* =========================================================
   CONTACT CTA WRAPPER
   ========================================================= */

.alg-contact-wrapper {
    padding: 6rem 0;
    background: #FFFFFF;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1199.98px) {

    .alg-topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .alg-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 991.98px) {

    .alg-resource-grid {
        grid-template-columns: 1fr;
    }

    .alg-resource-card-featured {
        grid-column: auto;
    }

    .alg-struggle-grid {
        grid-template-columns: 1fr;
    }

    .alg-method-card {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .alg-related-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 767.98px) {

    .alg-hub-section,
    .alg-struggle-section,
    .alg-faq-section,
    .alg-related-section,
    .alg-contact-wrapper {
        padding: 4.5rem 0;
    }

    .alg-topic-grid {
        grid-template-columns: 1fr;
    }

    .alg-faq-grid {
        grid-template-columns: 1fr;
    }

    .alg-resource-card,
    .alg-summary-card,
    .alg-struggle-card,
    .alg-faq-card,
    .alg-related-card {
        padding: 1.5rem;
    }

    .alg-method-card {
        padding: 1.75rem;
    }

}


@media (max-width: 575.98px) {

    .alg-resource-actions {
        flex-direction: column;
    }

    .alg-resource-btn {
        width: 100%;
    }

    .alg-resource-card h3 {
        font-size: 1.22rem;
    }

    .alg-method-step {
        grid-template-columns: 38px 1fr;
    }

    .alg-method-step > span {
        width: 38px;
        height: 38px;
    }

}

/* =========================================================
   INTERACTIVE ALGEBRA TOOLS
   ========================================================= */

.alg-tools-section
{
    padding:
        clamp(
            4.5rem,
            8vw,
            6.5rem
        )
        0;

    background: #f8fafc;
}


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

.alg-tools-grid
{
    display: grid;

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

    gap: 1rem;
}


/* =========================================================
   TOOL CARDS
   ========================================================= */

.alg-tool-card
{
    display: flex;

    gap: 1rem;

    align-items: flex-start;

    min-width: 0;
    min-height: 100%;

    padding: 1.25rem;

    color: var(--alg-slate);

    text-decoration: none;

    background: var(--alg-white);

    border:
        1px solid
        var(--alg-border);

    border-radius: 1rem;

    box-shadow:
        0 10px 30px
        rgba(15, 23, 42, 0.06);

    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}


.alg-tool-card:hover
{
    color: var(--alg-slate);

    text-decoration: none;

    border-color:
        rgba(
            21,
            158,
            156,
            0.42
        );

    box-shadow:
        0 18px 42px
        rgba(15, 23, 42, 0.11);

    transform: translateY(-3px);
}


/* =========================================================
   FEATURED TOOL CARD
   ========================================================= */

.alg-tool-card-featured
{
    background:
        linear-gradient(
            135deg,
            var(--alg-teal-soft),
            #eff6ff
        );

    border-color:
        rgba(
            21,
            158,
            156,
            0.28
        );
}


/* =========================================================
   TOOL ICON
   ========================================================= */

.alg-tool-icon
{
    display: grid;

    flex:
        0
        0
        3rem;

    width: 3rem;
    height: 3rem;

    place-items: center;

    color: var(--alg-teal);

    font-size: 1.05rem;

    background: var(--alg-teal-soft);

    border-radius: 0.85rem;
}


.alg-tool-card-featured .alg-tool-icon
{
    background:
        rgba(
            255,
            255,
            255,
            0.82
        );
}


/* =========================================================
   TOOL LABEL
   ========================================================= */

.alg-tool-label
{
    display: inline-block;

    margin-bottom: 0.3rem;

    color: var(--alg-teal);

    font-size: 0.68rem;
    font-weight: 800;

    letter-spacing: 0.07em;

    line-height: 1.3;

    text-transform: uppercase;
}


/* =========================================================
   TOOL TYPOGRAPHY
   ========================================================= */

.alg-tool-card h3
{
    margin:
        0
        0
        0.4rem;

    color: var(--alg-navy);

    font-size: 1.02rem;
    font-weight: 800;

    letter-spacing: -0.015em;

    line-height: 1.3;
}


.alg-tool-card p
{
    margin: 0;

    color: var(--alg-slate);

    font-size: 0.84rem;

    line-height: 1.6;
}


/* =========================================================
   TOOL BUTTON ON LEARNING CARDS
   ========================================================= */

.alg-resource-btn-tool
{
    color: var(--alg-teal);

    background: var(--alg-teal-soft);

    border-color:
        rgba(
            21,
            158,
            156,
            0.32
        );
}


.alg-resource-btn-tool:hover
{
    color: var(--alg-white);

    background: var(--alg-teal);

    border-color: var(--alg-teal);
}


/* =========================================================
   TOOLS FOOTER / VIEW ALL
   ========================================================= */

.alg-tools-footer
{
    display: flex;

    gap: 2rem;

    align-items: center;
    justify-content: space-between;

    margin-top: 1.5rem;

    padding:
        clamp(
            1.35rem,
            3vw,
            1.75rem
        );

    background:
        linear-gradient(
            135deg,
            var(--alg-teal-soft),
            #eff6ff
        );

    border:
        1px solid
        rgba(
            21,
            158,
            156,
            0.22
        );

    border-radius: 1.1rem;
}


.alg-tools-footer > div
{
    max-width: 42rem;
}


.alg-tools-footer h3
{
    margin:
        0
        0
        0.45rem;

    color: var(--alg-navy);

    font-size:
        clamp(
            1.15rem,
            2vw,
            1.35rem
        );

    font-weight: 800;

    letter-spacing: -0.02em;
}


.alg-tools-footer p:not(.alg-hub-eyebrow)
{
    margin: 0;

    color: var(--alg-slate);

    font-size: 0.88rem;

    line-height: 1.65;
}


.alg-tools-footer > .alg-resource-btn
{
    flex:
        0
        0
        auto;

    white-space: nowrap;
}


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

@media (max-width: 1199.98px)
{
    .alg-tools-grid
    {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


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

@media (max-width: 767.98px)
{
    .alg-tools-section
    {
        padding:
            4rem
            0;
    }


    .alg-tools-grid
    {
        grid-template-columns: 1fr;
    }


    .alg-tool-card
    {
        padding: 1.1rem;
    }


    .alg-tools-footer
    {
        align-items: stretch;

        flex-direction: column;

        gap: 1.25rem;
    }


    .alg-tools-footer > .alg-resource-btn
    {
        width: 100%;
    }
}


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

@media (max-width: 479.98px)
{
    .alg-tool-card
    {
        gap: 0.85rem;
    }


    .alg-tool-icon
    {
        flex:
            0
            0
            2.7rem;

        width: 2.7rem;
        height: 2.7rem;
    }
}


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

@media (prefers-reduced-motion: reduce)
{
    .alg-tool-card,
    .alg-resource-btn-tool
    {
        transition: none;
    }


    .alg-tool-card:hover,
    .alg-resource-btn-tool:hover
    {
        transform: none;
    }
}


/* =========================================================
   PRINT
   ========================================================= */

@media print
{
    .alg-tool-card,
    .alg-tools-footer
    {
        break-inside: avoid;

        box-shadow: none;
    }
}