.hero {
    position: relative;
    overflow: hidden;
    background: var(--elb-green);
    color: #ffffff;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -12% -38% 42%;
    height: 320px;
    background: rgba(243, 165, 28, 0.18);
    transform: rotate(-8deg);
}

.hero-inner {
    position: relative;
    z-index: 1;
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: center;
}

.hero h1 {
    max-width: 650px;
    font-size: clamp(2.8rem, 4.4vw, 3.3rem);
    line-height: 1.14;
    font-weight: 900;
    letter-spacing: 0;
}

.hero-art {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    margin: 0;
    padding: 14px;
    border-radius: 9px;
    background: #ffffff;
    justify-self: end;
}

.hero-art img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: none;
}

.hero-map-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.85rem;
    padding: 0;
    text-align: center;
}

.hero-map-stats div {
    display: grid;
    gap: 0.12rem;
    min-height: 70px;
    align-content: center;
    padding: 0.65rem 0.35rem;
    border-radius: 6px;
    background: #e8f5ee;
}

.hero-map-stats strong {
    color: #075c35;
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    line-height: 1;
    font-weight: 900;
}

.hero-map-stats span {
    color: #355848;
    font-size: 0.73rem;
    line-height: 1.2;
    font-weight: 700;
}

.hero-copy {
    max-width: 650px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
}

/* Keep the home-page content sections compact without affecting shared layouts. */
main .section-pad {
    padding: 3rem 0;
}

.resource-card,
.module-card,
.audience-card,
.skill-card,
.quote-card {
    height: 100%;
    border: 1px solid var(--elb-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(24, 62, 46, 0.07);
}

.resource-card {
    overflow: hidden;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 56px rgba(24, 62, 46, 0.12);
}

.resource-card > img,
.module-card img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.web-app-previews {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 249, 237, 0.2) 0%, rgba(226, 239, 227, 0.24) 100%),
        url('../images/home-resources/online-courses-laptop.png') center / 118% auto no-repeat,
        #f7e9cd;
}

.mobile-app-previews {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 249, 237, 0.2) 0%, rgba(226, 239, 227, 0.24) 100%),
        url('../images/home-resources/mobile-apps-smartphone.png') center / 118% auto no-repeat,
        #f7e9cd;
}

.audio-tool-previews {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 245, 223, 0.1) 100%),
        url('../images/home-resources/audio-pronunciation-learner.png') center / cover no-repeat,
        #f7e9cd;
}

.guide-book-previews {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(232, 244, 235, 0.28) 100%),
        url('../images/home-resources/self-study-pdf-guide.png') center / cover no-repeat,
        #f7e9cd;
}

.guide-book-cover {
    position: absolute;
    z-index: 2;
    top: 5%;
    right: 8%;
    height: 90%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 3px solid #c9a227;
    border-radius: 6px;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.32);
    transform: rotate(3deg);
    animation: guide-book-float 5s ease-in-out infinite;
}

.guide-book-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% center;
}

.web-app-preview {
    position: absolute;
    display: block;
    width: 68%;
    height: auto;
    border: 4px solid #ffffff;
    border-radius: 7px;
    box-shadow: 0 13px 24px rgba(12, 67, 46, 0.25);
    transition: transform 0.25s ease;
}

.mobile-app-preview {
    position: absolute;
    display: block;
    box-sizing: border-box;
    overflow: hidden;
    padding: 14px 7px 15px;
    border: 7px solid #111111;
    border-radius: 28px;
    background: #151515;
    box-shadow: 0 13px 24px rgba(0, 0, 0, 0.28);
    transition: transform 0.25s ease;
}

.mobile-app-preview::before,
.mobile-app-preview::after {
    position: absolute;
    z-index: 1;
    left: 50%;
    border-radius: 999px;
    background: #c9a227;
    content: "";
    transform: translateX(-50%);
}

.mobile-app-preview::before {
    top: 5px;
    width: 30%;
    height: 3px;
}

.mobile-app-preview::after {
    bottom: 5px;
    width: 22%;
    height: 3px;
}

.mobile-app-screen {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: fill;
}

.web-app-preview-primary {
    z-index: 1;
    top: 8%;
    left: 5%;
    width: 80%;
    animation: web-app-float-primary 4.6s ease-in-out infinite;
}

.web-app-preview-secondary {
    z-index: 2;
    right: 4%;
    bottom: 8%;
    width: 54%;
    animation: web-app-float-secondary 5.2s ease-in-out 0.4s infinite;
}

.mobile-app-preview-primary {
    z-index: 1;
    top: 2%;
    left: 7%;
    height: 96%;
    aspect-ratio: 62 / 100;
    box-shadow:
        0 0 0 3px #c9a227,
        0 16px 28px rgba(0, 0, 0, 0.34);
    animation: web-app-float-primary 4.8s ease-in-out infinite;
}

.mobile-app-preview-secondary {
    z-index: 2;
    right: 5%;
    bottom: 5%;
    height: 70%;
    aspect-ratio: 68 / 100;
    box-shadow:
        0 0 0 3px #c9a227,
        0 16px 28px rgba(0, 0, 0, 0.34);
    animation: web-app-float-secondary 5.4s ease-in-out 0.35s infinite;
}

.audio-mobile-preview {
    z-index: 2;
    top: 5%;
    right: auto;
    left: 6%;
    height: 90%;
    aspect-ratio: 297 / 524;
    box-shadow:
        0 0 0 3px #c9a227,
        0 16px 28px rgba(0, 0, 0, 0.34);
    animation: web-app-float-secondary 5.2s ease-in-out 0.25s infinite;
}

@keyframes guide-book-float {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    50% { transform: translateY(-6px) rotate(2deg); }
}

.resource-card:hover .web-app-preview-primary {
    transform: translateY(-5px);
}

.resource-card:hover .web-app-preview-secondary {
    transform: translateY(-5px);
}

@keyframes web-app-float-primary {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes web-app-float-secondary {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) {
    .web-app-preview,
    .mobile-app-preview,
    .guide-book-cover {
        animation: none;
    }
}

.resource-card .card-body,
.module-card .card-body {
    padding: 1.35rem;
}

.resource-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.resource-card-link:focus-visible {
    outline: 3px solid rgba(8, 114, 70, 0.52);
    outline-offset: -3px;
}

.stat-card {
    border: 1px solid rgba(8, 114, 70, 0.26);
    border-radius: 8px;
    padding: 2rem 1.25rem;
    background: #ffffff;
    box-shadow: 0 15px 28px rgba(8, 114, 70, 0.11);
}

.stat-card strong {
    color: var(--elb-green);
    font-size: 2rem;
    font-weight: 900;
}

.about-logo {
    width: min(180px, 52vw);
    filter: drop-shadow(0 18px 28px rgba(5, 63, 44, 0.13));
}

.quote-card img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
}

.repository-pillar {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    height: 100%;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(8, 114, 70, 0.18);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(24, 62, 46, 0.06);
}

.repository-pillar-icon {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: rgba(8, 114, 70, 0.1);
    color: var(--elb-green);
    font-size: 1.2rem;
}

.repository-pillar h3 {
    margin: 0 0 0.2rem;
    color: var(--elb-green-dark);
    font-size: 1rem;
    font-weight: 800;
}

.repository-pillar p {
    margin: 0;
    color: var(--elb-muted);
    font-size: 0.93rem;
    line-height: 1.55;
}

.learning-path-card,
.communication-skill-card {
    position: relative;
    overflow: hidden;
    padding: 1.6rem;
    text-align: left;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.learning-path-card:hover,
.communication-skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 42px rgba(24, 62, 46, 0.12);
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.card-heading .icon-badge {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    margin-bottom: 0;
    font-size: 1.25rem;
}

.card-heading h3 {
    margin-bottom: 0;
}

.learning-path-card > .icon-badge,
.communication-skill-card > .icon-badge {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.learning-path-card h3,
.communication-skill-card h3 {
    color: var(--elb-green-dark);
    line-height: 1.25;
}

.communication-skill-card::after {
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--elb-green);
    content: "";
}

@media (max-width: 991.98px) {
    .hero {
        background: var(--elb-green);
    }

    .hero-inner {
        min-height: auto;
        grid-template-columns: 1fr;
        padding-top: 4rem;
        padding-bottom: 3rem;
    }

    .hero-art {
        width: min(78vw, 430px);
        padding: 11px;
        justify-self: center;
    }
}

@media (max-width: 575.98px) {
    main .section-pad {
        padding: 2.5rem 0;
    }

    .hero h1 {
        font-size: clamp(2rem, 9vw, 2.35rem);
        line-height: 1.16;
    }

    .hero-inner {
        min-height: auto;
        padding-top: 2.25rem;
        padding-bottom: 2.5rem;
    }

    .hero-actions {
        flex-wrap: nowrap;
        transform: translateY(-6px);
    }

    .language-finder {
        margin-top: 0;
    }

    .hero-action {
        flex: 1 1 0;
        min-width: 0;
        padding: 0.72rem 0.5rem !important;
        font-size: 0.82rem;
        line-height: 1.2;
        text-align: center;
        white-space: nowrap;
    }

    .hero-action .bi {
        margin-right: 0.3rem !important;
    }

    .hero-map-stats {
        margin-top: 0.75rem;
        padding: 0.72rem 0.4rem;
    }

    .hero-map-stats span {
        font-size: 0.66rem;
    }

    .home-language-finder {
        padding: 0.9rem !important;
    }

    .home-language-finder-form {
        row-gap: 0.7rem !important;
    }

    .home-language-finder .form-label {
        margin-bottom: 0.3rem;
        font-size: 0.9rem;
    }

    .home-language-finder .form-select-lg,
    .home-language-finder-submit {
        min-height: 2.85rem;
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
        font-size: 1rem;
    }

    .home-language-finder > .mt-3 {
        margin-top: 0.75rem !important;
    }

    .repository-pillar,
    .learning-path-card,
    .communication-skill-card {
        padding: 1.2rem;
    }

    .stats-row .stat-card {
        min-height: 112px;
        padding: 1.15rem 0.3rem;
    }

    .stats-row .stat-card strong {
        font-size: 1.45rem;
    }

    .stats-row .stat-card p {
        font-size: 0.76rem;
        line-height: 1.35;
    }
}
