
/* ==================================================
   XMATHEMATICS.COM
   HOMEPAGE MIDDENGEDEELTE
   Bestand: /stylesheets/home.css

   Algemene header/footer: style.css
   Homepage: home.php
   ================================================== */


/* ==================================================
   1. VIER INFORMATIEBLOKKEN
   ================================================== */

.features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding-top: 20px;
    padding-bottom: 25px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 15px;

    min-width: 0;
    min-height: 100px;
    padding: 17px;

    border-radius: 15px;
    border: 1px solid #d8e4f0;

    box-shadow: 0 4px 12px rgba(10, 48, 85, 0.08);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 55px;
    flex-shrink: 0;

    font-size: 43px;
    line-height: 1;
}

.feature-content {
    min-width: 0;
}

.feature h2 {
    margin: 0 0 5px;

    font-size: clamp(15px, 1.2vw, 20px);
    font-weight: 800;
    line-height: 1.2;
}

.feature p {
    margin: 0;

    font-size: 13px;
    line-height: 1.45;
    color: #40546a;
}

/* Rustige pastelkleuren */

.feature-blue {
    background: linear-gradient(
        130deg,
        #e7f3ff,
        #cfe5f8
    );
}

.feature-blue .feature-icon {
    color: #075a9c;
}

.feature-green {
    background: linear-gradient(
        130deg,
        #f4faf7,
        #dbefe4
    );
}

.feature-green .feature-icon {
    color: #18734a;
}

.feature-gold {
    background: linear-gradient(
        130deg,
        #fffaf0,
        #f7e9cb
    );
}

.feature-gold .feature-icon {
    color: #a6751b;
}

.feature-purple {
    background: linear-gradient(
        130deg,
        #f8f6ff,
        #e8e1fa
    );
}

.feature-purple .feature-icon {
    color: #6b51a7;
}


/* ==================================================
   2. HOOFDINDELING
   ================================================== */

.main-section {
    display: grid;

    grid-template-columns:
        160px minmax(0, 1fr) 160px;

    gap: 22px;
    align-items: center;

    padding-bottom: 25px;
}


/* ==================================================
   3. ZIJPANELEN BY GRADE / BY TOPIC
   ================================================== */

.side-panel {
    min-width: 0;
    min-height: 265px;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 26px 16px;

    text-align: center;

    background: linear-gradient(
        145deg,
        #e6f2ff,
        #d4e6f8
    );

    border: 1px solid #b8d2ec;
    border-radius: 19px;

    box-shadow: 0 4px 9px rgba(13, 59, 109, 0.08);
}

.side-icon {
    font-size: 43px;
    line-height: 1.2;
    color: #095794;
}

.side-panel h2 {
    margin: 9px 0;
    font-size: 23px;
    font-weight: 800;
}

.side-panel p {
    margin: 4px 0;
    font-size: 15px;
    line-height: 1.5;
}

.side-detail {
    font-weight: 700;
}

.side-arrow {
    display: grid;
    place-items: center;

    width: 43px;
    height: 43px;

    flex-shrink: 0;
    margin-top: auto;

    border-radius: 50%;
    border: 2px solid #ffffff;

    background: #2376b6;
    color: #ffffff;

    font-size: 23px;
    font-weight: 700;

    box-shadow: 0 3px 7px #a1bdd5;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.side-arrow:hover {
    background: #07528d;
    transform: translateX(3px);
}


/* ==================================================
   4. BOOMSTRUCTUUR - TITEL
   ================================================== */

.tree-area {
    min-width: 0;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;

    margin-bottom: 15px;
}

.section-heading h1 {
    margin: 0;

    font-size: clamp(23px, 2.25vw, 37px);
    font-weight: 800;
    letter-spacing: -0.6px;

    text-align: center;
    line-height: 1.2;
}

.heading-line {
    height: 2px;
    flex: 1;
    max-width: 200px;

    background: #91c7eb;
}


/* ==================================================
   5. BOOMSTRUCTUUR - ROOT
   ================================================== */

.tree-root {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: fit-content;

    margin: 0 auto 30px;
    padding: 10px 28px;

    color: #ffffff;
    background: linear-gradient(
        180deg,
        #128bd4,
        #06467f
    );

    border-radius: 13px;

    font-size: 17px;
    font-weight: 800;

    box-shadow: 0 4px 12px rgba(10, 48, 85, 0.12);
}

.tree-root-icon {
    font-size: 23px;
    line-height: 1;
}

/* Verticale lijn van root naar onderwerpen */

.tree-root::after {
    content: "";

    position: absolute;

    left: 50%;
    top: 100%;

    width: 3px;
    height: 24px;

    background: #173d6e;

    transform: translateX(-50%);
}


/* ==================================================
   6. BOOMSTRUCTUUR - ZES CATEGORIEEN
   ================================================== */

.tree-branches {
    position: relative;

    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 10px;

    padding-top: 18px;
}

/* Horizontale verbindingslijn */

.tree-branches::before {
    content: "";

    position: absolute;

    top: 0;
    left: calc(100% / 12);
    right: calc(100% / 12);

    height: 3px;

    background: #173d6e;
}

/* Categoriekaart */

.tree-column {
    position: relative;
    min-width: 0;

    padding: 0 7px 9px;

    border-radius: 15px;

    background: var(--topic-pale);
    border: 1px solid var(--topic-border);

    box-shadow: 0 3px 8px rgba(10, 48, 85, 0.09);
}

/* Verticale verbinding per categorie */

.tree-column::before {
    content: "";

    position: absolute;

    bottom: 100%;
    left: 50%;

    width: 3px;
    height: 18px;

    transform: translateX(-50%);

    background: #173d6e;
}


/* ==================================================
   7. CATEGORIE TITELS
   ================================================== */

.topic-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 53px;

    margin: 0 -7px 9px;
    padding: 7px 5px;

    text-align: center;

    background: linear-gradient(
        180deg,
        var(--topic-light),
        var(--topic-mid)
    );

    border-radius: 13px;
    border: 1px solid var(--topic-border);

    color: #12283e;

    font-size: clamp(12px, 0.95vw, 17px);
    font-weight: 800;
    line-height: 1.2;

    transition: transform 0.2s ease;
}

.topic-title:hover {
    transform: translateY(-2px);
}

.topic-symbol {
    flex-shrink: 0;

    color: var(--topic-dark);

    font-family: Georgia, serif;
    font-style: italic;

    font-size: clamp(24px, 2vw, 36px);
    line-height: 1;
}


/* ==================================================
   8. ONDERWERP LINKS
   ================================================== */

.topic-links {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.topic-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;

    min-width: 0;
    min-height: 36px;

    padding: 7px 9px;

    border-radius: 11px;
    border: 1px solid var(--topic-border);

    background: linear-gradient(
        180deg,
        #ffffff,
        #f8fbff
    );

    font-size: clamp(11px, 0.83vw, 14px);
    font-weight: 700;
    line-height: 1.35;

    overflow-wrap: anywhere;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

/* Klein plusje bij elk onderwerp */

.topic-links a::before {
    content: "+";

    flex-shrink: 0;

    color: var(--topic-dark);
    font-weight: 900;
}

.topic-links a span {
    flex: 1;
    min-width: 0;
}

.topic-links a b {
    flex-shrink: 0;

    color: var(--topic-dark);

    font-size: 20px;
    font-weight: 400;
    line-height: 1;
}

.topic-links a:hover {
    background: var(--topic-light);
    transform: translateX(2px);
}


/* ==================================================
   9. PROFESSIONELE CATEGORIEKLEUREN
   ================================================== */

/* Arithmetic - blauw */

.theme-blue {
    --topic-pale: #eff7ff;
    --topic-light: #daeeff;
    --topic-mid: #a4d0f5;
    --topic-border: #b5d6ef;
    --topic-dark: #075fa5;
}

/* Algebra - groen */

.theme-green {
    --topic-pale: #f1faf5;
    --topic-light: #def2e5;
    --topic-mid: #aedac1;
    --topic-border: #b7d9c5;
    --topic-dark: #20734d;
}

/* Geometry - goud */

.theme-gold {
    --topic-pale: #fffbf4;
    --topic-light: #fff1d4;
    --topic-mid: #f2d497;
    --topic-border: #e7d3a9;
    --topic-dark: #a7781e;
}

/* Calculus - paars */

.theme-purple {
    --topic-pale: #f8f6ff;
    --topic-light: #ece6fc;
    --topic-mid: #cbbbef;
    --topic-border: #d2c7eb;
    --topic-dark: #6650a8;
}

/* Statistics - turquoise */

.theme-teal {
    --topic-pale: #f1fbfa;
    --topic-light: #d5f2ef;
    --topic-mid: #96d6d0;
    --topic-border: #a8d9d4;
    --topic-dark: #147f7d;
}

/* Trigonometry - zacht goud */

.theme-sand {
    --topic-pale: #fffbf3;
    --topic-light: #fff0ce;
    --topic-mid: #efcf8b;
    --topic-border: #e4d0a4;
    --topic-dark: #a87619;
}


/* ==================================================
   10. ONDERSTE BANNER
   ================================================== */

.bottom-section {
    display: grid;

    grid-template-columns:
        220px minmax(0, 1fr) 260px 225px;

    align-items: center;
    gap: 20px;

    margin-top: 15px;
    margin-bottom: 25px;

    padding: 20px;

    border-radius: 21px;
    border: 1px solid #b4d6f0;

    background: linear-gradient(
        115deg,
        #e5f1ff,
        #ffffff,
        #e2effb
    );

    box-shadow: 0 4px 12px rgba(10, 48, 85, 0.10);
}


/* Knoppen */

.get-started,
.start-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 15px 22px;

    border-radius: 35px;

    color: #ffffff;

    font-size: 17px;
    font-weight: 800;

    white-space: nowrap;

    box-shadow: 0 4px 7px rgba(10, 40, 70, 0.18);

    transition:
        filter 0.2s ease,
        transform 0.2s ease;
}

.get-started {
    background: linear-gradient(
        180deg,
        #1b8fd7,
        #07457e
    );
}

.start-button {
    background: linear-gradient(
        180deg,
        #32966b,
        #0d6046
    );
}

.get-started:hover,
.start-button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}


/* Beschrijvende tekst */

.bottom-description {
    min-width: 0;

    padding-left: 20px;

    border-left: 2px solid #b7d5ee;
}

.bottom-description h2 {
    margin: 0 0 5px;

    font-size: 18px;
    line-height: 1.3;
}

.bottom-description p {
    margin: 0;

    font-size: 13px;
    color: #40546a;
}


/* Checklist */

.bottom-checks {
    padding: 0;
    margin: 0;

    list-style: none;

    font-size: 13px;
}

.bottom-checks li {
    position: relative;

    padding: 4px 0 4px 24px;
}

.bottom-checks li::before {
    content: "✓";

    position: absolute;
    left: 0;
    top: 4px;

    color: #147a4f;

    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}


/* ==================================================
   11. KLEINERE DESKTOP / LAPTOP
   ================================================== */

@media (max-width: 1350px) {

    .main-section {
        grid-template-columns:
            135px minmax(0, 1fr) 135px;

        gap: 12px;
    }

    .side-panel {
        padding: 20px 10px;
    }

    .side-panel h2 {
        font-size: 20px;
    }

    .tree-branches {
        gap: 6px;
    }

    .tree-column {
        padding-left: 5px;
        padding-right: 5px;
    }

    .topic-title {
        margin-left: -5px;
        margin-right: -5px;

        flex-direction: column;
        gap: 3px;
    }

    .bottom-section {
        grid-template-columns:
            190px minmax(0, 1fr) 230px;
    }

    .start-button {
        grid-column: 3;
    }

    .bottom-checks {
        grid-column: 2;
        grid-row: 2;
    }
}


/* ==================================================
   12. TABLET
   ================================================== */

@media (max-width: 1050px) {

    /* Vier kaarten in twee kolommen */

    .features {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    /* Boomstructuur krijgt volledige breedte */

    .main-section {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

    .tree-area {
        order: 1;
    }

    /* Zijpanelen horizontaal */

    .side-panel {
        order: 2;

        min-height: auto;

        flex-direction: row;
        justify-content: space-between;

        padding: 15px;
        gap: 12px;

        text-align: left;
    }

    .side-panel h2 {
        margin: 0;
    }

    .side-icon {
        font-size: 30px;
    }

    .side-arrow {
        margin: 0 0 0 auto;
    }

    /* Zes categorieen in drie kolommen */

    .tree-branches {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 15px;
        padding-top: 0;
    }

    /* Geen verbindingslijnen bij meerdere rijen */

    .tree-branches::before,
    .tree-column::before,
    .tree-root::after {
        display: none;
    }

    .tree-root {
        margin-bottom: 20px;
    }

    .topic-title {
        flex-direction: row;
        min-height: 56px;
    }

    .topic-links a {
        font-size: 14px;
    }
}


/* ==================================================
   13. MOBIELE TELEFOONS
   ================================================== */

@media (max-width: 700px) {

    /* Informatieblokken */

    .features {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;

        padding-top: 15px;
        padding-bottom: 20px;
    }

    .feature {
        min-height: 108px;

        flex-direction: column;
        justify-content: center;

        text-align: center;

        gap: 8px;
        padding: 12px 8px;
    }

    .feature-icon {
        width: auto;
        font-size: 29px;
    }

    .feature h2 {
        font-size: 14px;
    }

    .feature p {
        font-size: 11px;
    }

    /* Boomstructuur */

    .section-heading {
        gap: 8px;
    }

    .section-heading h1 {
        font-size: 23px;
    }

    .heading-line {
        display: none;
    }

    .tree-root {
        width: 100%;

        font-size: 16px;
        padding: 11px 15px;
    }

    /* Twee categorieen naast elkaar */

    .tree-branches {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .tree-column {
        padding: 0 7px 9px;
    }

    .topic-title {
        flex-direction: column;

        min-height: 68px;

        margin: 0 -7px 8px;
        padding: 7px 4px;

        gap: 4px;

        font-size: 14px;
    }

    .topic-symbol {
        font-size: 28px;
    }

    .topic-links a {
        min-height: 41px;

        padding: 8px 6px;

        font-size: 12px;
    }

    .topic-links a::before {
        display: none;
    }

    /* Zijpanelen */

    .side-panel p {
        font-size: 13px;
    }

    .side-panel .side-detail {
        display: none;
    }

    /* Onderste banner */

    .bottom-section {
        grid-template-columns: 1fr;

        gap: 16px;

        padding: 17px;
        margin-top: 17px;
    }

    .get-started,
    .start-button {
        grid-column: auto;
        grid-row: auto;

        justify-content: center;

        gap: 20px;
        text-align: center;
    }

    .bottom-description {
        padding: 0;
        border-left: 0;

        text-align: center;
    }

    .bottom-checks {
        grid-column: auto;
        grid-row: auto;

        width: fit-content;
        margin: auto;
    }
}


/* ==================================================
   14. ZEER KLEINE TELEFOONS
   ================================================== */

@media (max-width: 380px) {

    /* Onderwerpen onder elkaar */

    .tree-branches {
        grid-template-columns: 1fr;
    }

    .topic-title {
        min-height: 49px;
        flex-direction: row;
    }

    .feature h2 {
        font-size: 12px;
    }

    .feature p {
        font-size: 10px;
    }
}
