/* =========================================================
   HOMEPAGE STYLES — index.html ONLY
   This file is linked exclusively from index.html.
   It does not override or remove anything in styles.css;
   it only styles the new .home-* homepage sections.
   Uses the existing 3OLOUM ACADEMY brand colors:
     #ff8800 (orange) / #242244 (navy) / #171622 (text)
   and the existing Poppins font already loaded by styles.css.
========================================================= */

.home-page {
    --home-orange: #ff8800;
    --home-orange-dark: #c1670a;
    --home-navy: #242244;
    --home-text: #171622;
    --home-muted: #666666;
    --home-border: #ececf3;
    --home-soft: #fff8f0;
}


/* =========================
   HERO
========================= */

.home-hero {
    position: relative;
    background-color: var(--home-soft);
    padding-bottom: 60px;
    overflow: hidden;
}

.home-hero-inner {
    position: relative;
    z-index: 1;

    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 20px;

    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 40px;
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin-bottom: 22px;

    background-color: var(--home-soft);
    border: 1px solid #ffd9a8;
    border-radius: 999px;

    color: var(--home-orange-dark);
    font-size: 13.5px;
    font-weight: 600;
}

.home-hero-title {
    font-size: 46px;
    line-height: 1.2;
    color: var(--home-navy);
    margin-bottom: 18px;
}

.home-hero-title-accent {
    color: var(--home-orange);
}

.home-hero-text {
    max-width: 520px;
    margin: 0 0 32px;
    line-height: 1.8;
    color: var(--home-muted);
    font-size: 16px;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}


/* =========================
   BUTTONS
========================= */

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 10px;

    font-size: 15px;
    font-weight: 600;
    text-decoration: none;

    transition: 0.25s ease;
    cursor: pointer;
}

.home-btn--primary {
    background-color: var(--home-orange);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(255, 136, 0, 0.25);
}

.home-btn--primary:hover {
    background-color: var(--home-orange-dark);
    transform: translateY(-2px);
}

.home-btn--secondary {
    background-color: #ffffff;
    color: var(--home-navy);
    border: 2px solid var(--home-navy);
}

.home-btn--secondary:hover {
    background-color: var(--home-navy);
    color: #ffffff;
    transform: translateY(-2px);
}

.home-btn--large {
    padding: 16px 36px;
    font-size: 16px;
}


/* =========================
   HERO VISUAL (pure CSS illustration)
========================= */

.home-hero-visual {
    position: relative;
    min-height: 360px;
}

/* soft background blob behind the poster card */
.home-hero-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 340px;
    height: 340px;
    transform: translate(-50%, -50%);

    background-color: #ffe9cf;
    border-radius: 62% 38% 55% 45% / 45% 55% 45% 55%;
}

/* small diagonal-stripe accent, top-left of the visual */
.home-hero-stripes {
    position: absolute;
    top: 4%;
    left: 4%;
    width: 70px;
    height: 90px;
    border-radius: 14px;

    background-image: repeating-linear-gradient(
        45deg,
        var(--home-orange) 0,
        var(--home-orange) 3px,
        transparent 3px,
        transparent 10px
    );
    opacity: 0.55;
}

/* dotted accent, bottom-left of the visual */
.home-hero-dots {
    position: absolute;
    bottom: 6%;
    left: 0;
    width: 70px;
    height: 60px;

    background-image: radial-gradient(var(--home-navy) 2px, transparent 2px);
    background-size: 14px 14px;
    opacity: 0.3;
}

/* main poster card */
.home-hero-poster {
    position: relative;
    z-index: 1;

    width: 260px;
    margin: 0 auto;
    padding: 28px 18px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    background-color: #ffffff;
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(36, 34, 68, 0.14);
}

.home-hero-logo {
    display: block;
    width: 200px;
    max-width: 88%;
    height: auto;
    object-fit: contain;
}

.home-hero-orbit {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    border-radius: 14px;

    background-color: #ffffff;
    border: 2px solid var(--home-border);
    box-shadow: 0 10px 20px rgba(36, 34, 68, 0.08);

    color: var(--home-orange);
    font-size: 18px;
    font-weight: 700;

    animation: home-float 6s ease-in-out infinite;
}

.home-hero-orbit--1 { top: -18px;   left: -18px; animation-delay: 0s; }
.home-hero-orbit--2 { top: -18px;   right: -18px; color: var(--home-navy); animation-delay: 1s; }
.home-hero-orbit--3 { bottom: -18px; right: 30%;  animation-delay: 2s; }
.home-hero-orbit--4 { top: -18px;   left: calc(50% - 23px); color: var(--home-navy); animation-delay: 0.5s; }
.home-hero-orbit--5 { bottom: -18px; left: -18px; animation-delay: 1.5s; }
.home-hero-orbit--6 { bottom: -18px; right: -18px; color: var(--home-navy); animation-delay: 2.5s; }

@keyframes home-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* floating overlapping info bubble, bottom of the visual */
.home-hero-float {
    position: absolute;
    left: 4%;
    bottom: 4%;
    z-index: 1;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 20px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 32px rgba(36, 34, 68, 0.14);
}

.home-hero-float-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--home-soft);
    font-size: 18px;
}

.home-hero-float strong {
    display: block;
    font-size: 13.5px;
    color: var(--home-navy);
}

.home-hero-float small {
    display: block;
    color: var(--home-muted);
    font-size: 11.5px;
}

/* wavy divider at the bottom edge of the hero */
.home-hero-wave {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 60px;
    z-index: 0;
}

.home-hero-wave path {
    fill: #f8f8f8;
}


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

.home-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.home-section-title {
    max-width: 640px;
    margin: 0 auto 44px;
    text-align: center;
}

.home-section-title h2 {
    font-size: 30px;
    color: var(--home-navy);
    margin-bottom: 10px;
}

.home-section-title p {
    color: var(--home-muted);
    font-size: 15.5px;
    line-height: 1.6;
}


/* =========================
   EXPLORE / SUBJECT CARDS
========================= */

.home-subject-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.home-subject-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    padding: 30px 26px;
    background-color: #ffffff;
    border: 2px solid var(--home-border);
    border-radius: 16px;

    text-decoration: none;
    color: var(--home-text);
    transition: 0.25s ease;
}

.home-subject-card:hover {
    border-color: var(--home-orange);
    transform: translateY(-6px);
    box-shadow: 0 18px 32px rgba(36, 34, 68, 0.1);
}

.home-subject-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 56px;
    height: 56px;
    margin-bottom: 18px;
    border-radius: 14px;

    background-color: var(--home-soft);
    font-size: 26px;
}

.home-subject-card h3 {
    display: flex;
    align-items: baseline;
    gap: 8px;

    font-size: 19px;
    color: var(--home-navy);
    margin-bottom: 10px;
}

.home-subject-card h3 small {
    font-size: 13px;
    font-weight: 500;
    color: var(--home-muted);
}

.home-subject-card p {
    flex: 1;
    margin-bottom: 18px;
    line-height: 1.7;
    color: var(--home-muted);
    font-size: 14.5px;
}

.home-subject-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--home-orange);
    transition: 0.2s;
}

.home-subject-card:hover .home-subject-link {
    color: var(--home-orange-dark);
}


/* =========================
   LEARNING PATH
========================= */

.home-path-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.home-path-step {
    position: relative;
    padding: 30px 22px;

    background-color: #ffffff;
    border: 2px solid var(--home-border);
    border-radius: 16px;
    text-align: center;
}

.home-path-step:not(:last-child)::after {
    content: "→";
    position: absolute;
    top: 50%;
    right: -22px;
    transform: translateY(-50%);
    color: var(--home-orange);
    font-size: 18px;
    font-weight: 700;
}

.home-path-number {
    display: block;
    margin-bottom: 6px;
    color: var(--home-border);
    font-size: 26px;
    font-weight: 700;
}

.home-path-icon {
    display: block;
    margin-bottom: 12px;
    font-size: 28px;
}

.home-path-step h3 {
    margin-bottom: 8px;
    color: var(--home-navy);
    font-size: 17px;
}

.home-path-step p {
    color: var(--home-muted);
    font-size: 14px;
    line-height: 1.6;
}


/* =========================
   CTA
========================= */

.home-cta {
    padding-bottom: 20px;
}

.home-cta-box {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;

    background: linear-gradient(135deg, var(--home-navy), #322f5c);
    border-radius: 24px;

    text-align: center;
}

.home-cta-box h2 {
    color: #ffffff;
    font-size: 30px;
    margin-bottom: 12px;
}

.home-cta-box p {
    max-width: 520px;
    margin: 0 auto 28px;
    color: #d8d7e8;
    font-size: 15.5px;
    line-height: 1.7;
}


/* =========================================================
   RESPONSIVE — TABLET (matches styles.css breakpoint: 900px)
========================================================= */

@media (max-width: 900px) {

    .home-hero-inner {
        grid-template-columns: 1fr;
        padding: 40px 20px 10px;
        text-align: center;
    }

    .home-hero-content {
        order: 1;
    }

    .home-hero-visual {
        order: 2;
        min-height: 260px;
    }

    .home-hero-text {
        margin-left: auto;
        margin-right: auto;
    }

    .home-hero-actions {
        justify-content: center;
    }

    .home-subject-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-path-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 34px 24px;
    }

    .home-path-step:nth-child(2)::after {
        content: none;
    }

    .home-path-step:not(:last-child)::after {
        top: auto;
        bottom: -26px;
        right: 50%;
        transform: translateX(50%) rotate(90deg);
    }
}


/* =========================================================
   RESPONSIVE — MOBILE (matches styles.css breakpoint: 650px)
========================================================= */

@media (max-width: 650px) {

    .home-hero-title {
        font-size: 32px;
    }

    .home-hero-text {
        font-size: 14.5px;
    }

    .home-hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .home-btn {
        width: 100%;
    }

    .home-hero-visual {
        display: none;
    }

    .home-hero-wave {
        height: 36px;
    }

    .home-section {
        padding: 30px 15px 45px;
    }

    .home-section-title h2 {
        font-size: 24px;
    }

    .home-subject-grid {
        grid-template-columns: 1fr;
    }

    .home-path-steps {
        grid-template-columns: 1fr;
    }

    .home-path-step:not(:last-child)::after {
        content: none;
    }

    .home-cta-box {
        padding: 40px 22px;
        border-radius: 18px;
    }

    .home-cta-box h2 {
        font-size: 24px;
    }
}


/* =========================================================
   RESPONSIVE — SMALL MOBILE (matches styles.css: 360px)
========================================================= */

@media (max-width: 360px) {

    .home-hero-title {
        font-size: 27px;
    }

    .home-hero-badge {
        font-size: 12px;
        padding: 7px 12px;
    }

    .home-subject-card {
        padding: 24px 20px;
    }
}


/* =========================================================
   POURQUOI 3OLOUM ACADEMY ? (isolated section styles)
   Scoped entirely under .home-why to avoid touching
   any existing styles / sections.
========================================================= */

.home-why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
}

.home-why-card {
    position: relative;

    padding: 26px 24px;
    background-color: #ffffff;
    border: 2px solid var(--home-border);
    border-radius: 16px;

    cursor: pointer;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.home-why-card:hover,
.home-why-card:focus-visible,
.home-why-card.is-active {
    border-color: var(--home-orange);
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(36, 34, 68, 0.1);
}

.home-why-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    border-radius: 12px;

    background-color: var(--home-soft);
    font-size: 22px;
}

.home-why-title {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 16.5px;
    color: var(--home-navy);
    margin: 0;
}

.home-why-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 50%;

    background-color: var(--home-soft);
    color: var(--home-orange);
    font-size: 12px;
    font-weight: 700;

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

.home-why-card:hover .home-why-check,
.home-why-card:focus-visible .home-why-check,
.home-why-card.is-active .home-why-check {
    background-color: var(--home-orange);
    color: #ffffff;
}

.home-why-desc {
    max-height: 0;
    margin: 0;
    overflow: hidden;

    color: var(--home-muted);
    font-size: 13.5px;
    line-height: 1.6;

    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.3s ease, transform 0.3s ease;
}

.home-why-card:hover .home-why-desc,
.home-why-card:focus-visible .home-why-desc,
.home-why-card.is-active .home-why-desc {
    max-height: 120px;
    margin-top: 10px;
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   POURQUOI 3OLOUM ACADEMY ? — RESPONSIVE
========================================================= */

@media (max-width: 900px) {

    .home-why-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 650px) {

    .home-why-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .home-why-card {
        padding: 20px 18px;
    }
}
