/* Courses & Career Opportunities — Arch Card Design */

/* ── Section ─────────────────────────────────────────────────────────── */
.hp-crs-section {
    position: relative;
    background:
        radial-gradient(1200px 500px at 88% -6%, rgba(184,137,43,0.10), transparent 60%),
        #F6F1E4;
    padding: clamp(4rem, 7vw, 6.5rem) 0 clamp(4rem, 7vw, 6.5rem);
    overflow: hidden;
    font-family: 'Jost', sans-serif;
    color: #1B241F;
    isolation: isolate;
}

/* ── Ambient girih lattice ───────────────────────────────────────────── */
.hp-crs-lattice {
    position: absolute;
    top: -220px;
    right: -260px;
    width: 760px;
    height: 760px;
    opacity: 0.16;
    pointer-events: none;
    z-index: 0;
    animation: hp-crs-spin 140s linear infinite;
    background-image:
        repeating-conic-gradient(from 0deg at 50% 50%, transparent 0deg 60deg, rgba(14,92,65,0.03) 60deg 120deg);
    background-size: 50px 50px;
}
.hp-crs-lattice::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(60deg, rgba(14,92,65,0.06) 0px, rgba(14,92,65,0.06) 1px, transparent 1px, transparent 50px),
        repeating-linear-gradient(-60deg, rgba(14,92,65,0.06) 0px, rgba(14,92,65,0.06) 1px, transparent 1px, transparent 50px),
        repeating-linear-gradient(0deg, rgba(14,92,65,0.04) 0px, rgba(14,92,65,0.04) 1px, transparent 1px, transparent 50px);
}
@keyframes hp-crs-spin {
    to { transform: rotate(360deg); }
}

.hp-crs-glow {
    position: absolute;
    width: 820px;
    height: 820px;
    border-radius: 50%;
    top: -360px;
    left: -280px;
    background: radial-gradient(circle, rgba(184,137,43,0.08) 0%, transparent 68%);
    z-index: 0;
    pointer-events: none;
}

/* ── Inner container ─────────────────────────────────────────────────── */
.hp-crs-inner {
    position: relative;
    z-index: 2;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3.5rem);
}

/* ── Eyebrow row ─────────────────────────────────────────────────────── */
.hp-crs-eyebrow-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
    opacity: 0;
    animation: hp-crs-rise 0.8s ease-out 0.15s forwards;
}
.hp-crs-eyebrow-star {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.hp-crs-eyebrow-star path {
    fill: #1E8F5E;
}
.hp-crs-eyebrow {
    font-family: 'Reem Kufi', sans-serif;
    font-size: 13px;
    letter-spacing: 0.32em;
    color: #0E5C41;
    text-transform: uppercase;
    font-weight: 500;
}
.hp-crs-eyebrow-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #B8892B, transparent);
    max-width: 340px;
}

/* ── Hero grid ───────────────────────────────────────────────────────── */
.hp-crs-header {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    align-items: end;
    opacity: 0;
    animation: hp-crs-rise 0.9s ease-out 0.3s forwards;
}
@media (max-width: 900px) {
    .hp-crs-header { grid-template-columns: 1fr; }
}

/* ── Headline ────────────────────────────────────────────────────────── */
.hp-crs-headline {
    font-family: 'Amiri', serif;
    font-weight: 700;
    font-size: clamp(42px, 5.6vw, 78px);
    line-height: 1.02;
    margin: 0 0 28px;
    color: #1B241F;
}
.hp-crs-headline em {
    font-style: italic;
    color: #0E5C41;
    position: relative;
    display: inline-block;
}
.hp-crs-headline em::after {
    content: "";
    position: absolute;
    left: -2%;
    bottom: -0.14em;
    width: 104%;
    height: 0.3em;
    overflow: visible;
}
.hp-crs-headline em svg {
    position: absolute;
    left: -2%;
    bottom: -0.14em;
    width: 104%;
    height: 0.3em;
    overflow: visible;
}
.hp-crs-headline em svg path {
    fill: none;
    stroke: #B8892B;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: hp-crs-draw 1.4s 0.5s cubic-bezier(.65,0,.35,1) forwards;
}
@keyframes hp-crs-draw {
    to { stroke-dashoffset: 0; }
}

.hp-crs-sub {
    font-size: 18px;
    line-height: 1.65;
    color: #4B5650;
    max-width: 520px;
    margin: 0;
    font-weight: 300;
}

/* ── Stat tiles ──────────────────────────────────────────────────────── */
.hp-crs-stats {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    opacity: 0;
    animation: hp-crs-rise 1s ease-out 0.55s forwards;
}
@media (max-width: 900px) {
    .hp-crs-stats { justify-content: flex-start; }
}

.hp-crs-tile {
    position: relative;
    width: 132px;
    padding: 26px 10px 20px;
    text-align: center;
    background: #EFE7D3;
    border: 1px solid rgba(184,137,43,0.35);
    clip-path: path('M0,144 L0,46 C0,18 14,0 66,0 C118,0 132,18 132,46 L132,144 Z');
}
.hp-crs-tile:nth-child(2) {
    background: #0E5C41;
    border-color: #0E5C41;
    transform: translateY(-14px);
}
.hp-crs-tile-num {
    font-family: 'Amiri', serif;
    font-weight: 700;
    font-size: 32px;
    color: #0E5C41;
    display: block;
    line-height: 1.1;
}
.hp-crs-tile:nth-child(2) .hp-crs-tile-num {
    color: #E8C766;
    font-size: 30px;
}
.hp-crs-tile-label {
    font-family: 'Reem Kufi', sans-serif;
    font-size: 10.5px;
    letter-spacing: 0.1em;
    color: #4B5650;
    text-transform: uppercase;
    display: block;
    margin-top: 6px;
}
.hp-crs-tile:nth-child(2) .hp-crs-tile-label {
    color: #EAF3EC;
}
.hp-crs-tile-star {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    opacity: 0.55;
}
.hp-crs-tile:nth-child(2) .hp-crs-tile-star path { fill: #E8C766; }
.hp-crs-tile:not(:nth-child(2)) .hp-crs-tile-star path { fill: #0E5C41; }

/* ── CTA button ──────────────────────────────────────────────────────── */
.hp-crs-cta-row {
    margin-top: 34px;
    opacity: 0;
    animation: hp-crs-rise 0.9s ease-out 0.65s forwards;
}
.hp-crs-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: #fff;
    background: #0E5C41;
    padding: 17px 30px 17px 34px;
    border: none;
    cursor: pointer;
    position: relative;
    clip-path: path('M0,20 C0,7 14,0 34,0 C54,0 68,7 68,20 L340,20 L340,58 L0,58 Z');
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.35s ease;
}
.hp-crs-cta:hover {
    transform: translateY(-2px);
}
.hp-crs-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 20%, rgba(232,199,102,0.55) 40%, transparent 60%);
    transform: translateX(-120%);
    transition: transform 0.7s ease;
}
.hp-crs-cta:hover::before {
    transform: translateX(60%);
}
.hp-crs-cta span,
.hp-crs-cta svg {
    position: relative;
    z-index: 1;
}
.hp-crs-cta svg {
    width: 16px;
    height: 16px;
    transition: transform 0.35s ease;
}
.hp-crs-cta:hover svg {
    transform: translateX(4px);
}

@keyframes hp-crs-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Star divider ────────────────────────────────────────────────────── */
.hp-crs-star-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin: 88px 0 74px;
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: hp-crs-rise 0.8s ease-out 0.75s forwards;
}
.hp-crs-star-divider .hp-crs-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(27,36,31,0.14);
    max-width: 420px;
}
.hp-crs-star-divider .hp-crs-divider-stars {
    display: flex;
    gap: 16px;
}
.hp-crs-star-divider .hp-crs-divider-star {
    width: 14px;
    height: 14px;
    animation: hp-crs-twinkle 3.2s ease-in-out infinite;
}
.hp-crs-star-divider .hp-crs-divider-star path { fill: #B8892B; }
.hp-crs-star-divider .hp-crs-divider-star:nth-child(1) { animation-delay: 0s; }
.hp-crs-star-divider .hp-crs-divider-star:nth-child(2) {
    animation-delay: 0.3s;
    width: 20px;
    height: 20px;
}
.hp-crs-star-divider .hp-crs-divider-star:nth-child(2) path { fill: #1E8F5E; }
.hp-crs-star-divider .hp-crs-divider-star:nth-child(3) { animation-delay: 0.6s; }
@keyframes hp-crs-twinkle {
    0%, 100% { opacity: 0.4; transform: scale(0.85) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(20deg); }
}

/* ── Featured label ──────────────────────────────────────────────────── */
.hp-crs-label {
    font-family: 'Reem Kufi', sans-serif;
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #4B5650;
    text-align: center;
    margin-bottom: 44px;
    opacity: 0;
    animation: hp-crs-rise 0.8s ease-out 0.85s forwards;
}

/* ── Infinite Marquee ────────────────────────────────────────────────── */
.hp-crs-marquee {
    position: relative;
    overflow: hidden;
    padding-bottom: 40px;
}
/* Edge fade masks */
.hp-crs-marquee::before,
.hp-crs-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 5;
    pointer-events: none;
}
.hp-crs-marquee::before {
    left: 0;
    background: linear-gradient(90deg, #FBF7EE 0%, transparent 100%);
}
.hp-crs-marquee::after {
    right: 0;
    background: linear-gradient(-90deg, #FBF7EE 0%, transparent 100%);
}

.hp-crs-marquee-track {
    display: flex;
    gap: 26px;
    width: max-content;
    animation: hp-crs-marqueeLeft 40s linear infinite;
    padding: 0 13px; /* half of gap for seamless loop */
}
.hp-crs-marquee:hover .hp-crs-marquee-track {
    animation-play-state: paused;
}

@keyframes hp-crs-marqueeLeft {
    0%   { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 13px)); }
}

/* ── Arch card (Redesign: Islamic Theme) ───────────────────────────────── */
.hp-crs-card {
    --hp-crs-arch-w: 272px;
    --hp-crs-arch-h: 348px;
    width: var(--hp-crs-arch-w);
    height: var(--hp-crs-arch-h);
    position: relative;
    opacity: 0;
    transform: translateY(38px);
    transition: opacity 0.8s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 16px;
    background: #0B120F; /* deep base */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.hp-crs-card.in-view {
    opacity: 1;
    transform: translateY(0);
}
.hp-crs-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 45px rgba(232, 199, 102, 0.15);
}
.hp-crs-card:nth-child(1) { transition-delay: 0.05s; }
.hp-crs-card:nth-child(2) { transition-delay: 0.18s; }
.hp-crs-card:nth-child(3) { transition-delay: 0.31s; }
.hp-crs-card:nth-child(4) { transition-delay: 0.44s; }

.hp-crs-card-inner {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    overflow: hidden;
}

/* Jewel Tone Gradients */
.hp-crs-bg-fill {
    position: absolute;
    inset: 0;
    transition: opacity 0.6s ease;
}
.hp-crs-card--emerald .hp-crs-bg-fill {
    background: radial-gradient(circle at 50% 100%, rgba(14,92,65,0.8), #062319 80%);
}
.hp-crs-card--teal .hp-crs-bg-fill {
    background: radial-gradient(circle at 50% 100%, rgba(44,122,123,0.8), #0A2F33 80%);
}
.hp-crs-card--henna .hp-crs-bg-fill {
    background: radial-gradient(circle at 50% 100%, rgba(166,87,46,0.8), #2E140C 80%);
}
.hp-crs-card--indigo .hp-crs-bg-fill {
    background: radial-gradient(circle at 50% 100%, rgba(60,75,140,0.8), #11152B 80%);
}

/* Geometric Pattern Overlay */
.hp-crs-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(232,199,102,0.12) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    opacity: 0.4;
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease;
}
.hp-crs-card:hover .hp-crs-bg-pattern {
    transform: scale(1.15) rotate(5deg);
    opacity: 0.7;
}

/* Frame SVG */
.hp-crs-frame {
    position: absolute;
    inset: 6px;
    pointer-events: none;
}
.hp-crs-frame-svg {
    width: 100%;
    height: 100%;
    fill: none;
}
.hp-crs-frame-path {
    stroke: #E8C766;
    stroke-width: 1.5;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    opacity: 0.5;
    transition: stroke-dashoffset 1s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
}
.hp-crs-card:hover .hp-crs-frame-path {
    stroke-dashoffset: 0;
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(232,199,102,0.6));
}

/* Content Area */
.hp-crs-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 24px;
}

/* Icon & Glow */
.hp-crs-icon-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hp-crs-card:hover .hp-crs-icon-wrap {
    transform: scale(1.15);
}
.hp-crs-icon-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(232,199,102,0.3) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.hp-crs-card:hover .hp-crs-icon-glow {
    opacity: 1;
}
.hp-crs-icon-wrap svg {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}
.hp-crs-icon-wrap svg * {
    stroke: #E8C766;
    stroke-width: 1.8;
}

/* Title */
.hp-crs-title {
    font-family: 'Amiri', serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #F7F4EA !important;
    text-align: center;
    margin: auto 0;
    padding: 0 10px;
    transition: color 0.4s ease;
}
.hp-crs-card:hover .hp-crs-title {
    color: #E8C766 !important;
}

/* Badge */
.hp-crs-badge-wrap {
    margin-top: 20px;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hp-crs-card:hover .hp-crs-badge-wrap {
    transform: translateY(-4px);
}
.hp-crs-badge {
    font-family: 'Reem Kufi', sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0B120F;
    background: linear-gradient(135deg, #F0D98F, #C89B3C);
    padding: 6px 16px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    font-weight: 600;
}

/* Card focus */
.hp-crs-card:focus-visible {
    outline: 2px solid #E8C766;
    outline-offset: 4px;
}

/* ── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .hp-crs-lattice,
    .hp-crs-headline em svg path,
    .hp-crs-star-divider .hp-crs-divider-star,
    .hp-crs-card,
    .hp-crs-card .hp-crs-arch-shape,
    .hp-crs-card .hp-crs-tile-pattern,
    .hp-crs-card .hp-crs-arch-outline,
    .hp-crs-eyebrow-row,
    .hp-crs-header,
    .hp-crs-stats,
    .hp-crs-cta-row,
    .hp-crs-star-divider,
    .hp-crs-label {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        stroke-dashoffset: 0 !important;
    }
}

/* ── Mobile fixes ── */
@media (max-width: 575px) {
    .hp-crs-header { grid-template-columns: 1fr; gap: 24px; }
    .hp-crs-stats {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px;
    }
    .hp-crs-tile { width: calc(33.333% - 7px); min-width: 90px; padding: 18px 6px 14px; }
    .hp-crs-star-divider { margin: 40px 0 36px; gap: 14px; }
    .hp-crs-content { padding: 20px 16px 18px; }
}
