/* ============================================================
   AMAPREP DESIGN SYSTEM — Standardized Utility Classes
   ============================================================
   Import after app.css. Uses the same CSS custom properties.
   ============================================================ */

/* ── Standardized Card ── */
.am-card {
    background: var(--ama-surface, #FFFFFF);
    border: 1px solid var(--ama-border, #E5E7EB);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.15s ease;
}

.am-card-hover:hover {
    border-color: var(--ama-border-light, #D1D5DB);
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    transform: translateY(-1px);
    cursor: pointer;
}

/* ── Clickable area utility ── */
.am-clickable {
    transition: all 0.15s ease;
    cursor: pointer;
}
.am-clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
}

/* ── Focus-visible for accessibility ── */
.am-card-hover:focus-visible,
.am-clickable:focus-visible,
.ama-card-clickable:focus-visible,
.ama-reco-card:focus-visible,
.ama-unit-card:focus-visible,
.ama-lesson-card:focus-visible,
.ama-continue-hero:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(47,107,83,0.3);
}

/* ── Standardized Buttons ── */
.am-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #3a6853;
    color: #FFFFFF;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    cursor: pointer;
    border: 2px solid #1c3628;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    box-shadow: 2px 3px 0px #1c3628;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    line-height: 1.5;
}
.am-btn-primary:hover {
    background-color: #457a62;
    transform: translateY(-2px);
    box-shadow: 3px 5px 0px #1c3628;
    text-decoration: none;
    color: #FFFFFF;
}
.am-btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0px 1px 0px #1c3628;
}

.am-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ama-surface-alt, #F3F4F6);
    color: var(--ama-text, #1F2933);
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    line-height: 1.5;
}
.am-btn-secondary:hover {
    background: var(--ama-border, #E5E7EB);
    text-decoration: none;
}

/* ── Hand-drawn CTA button (Phase 6) ── */
.am-btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #3a6853;
    color: #FFFFFF;
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    padding: 14px 32px;
    cursor: pointer;
    border: 2px solid #1c3628;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    box-shadow: 2px 3px 0px #1c3628;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    line-height: 1.4;
}
.am-btn-cta:hover {
    background-color: #457a62;
    transform: translateY(-2px);
    box-shadow: 3px 5px 0px #1c3628;
    text-decoration: none;
    color: #FFFFFF;
}
.am-btn-cta:active {
    transform: translateY(2px);
    box-shadow: 0px 1px 0px #1c3628;
}

/* Secondary CTA — matches .am-btn-cta's hand-drawn shape/size but outlined,
   so the hero button pair looks intentional rather than mismatched. */
.am-btn-cta-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    color: #1c3628;
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    padding: 14px 32px;
    cursor: pointer;
    border: 2px solid #1c3628;
    border-radius: 15px 225px 15px 255px / 255px 15px 225px 15px;
    box-shadow: 2px 3px 0px #1c3628;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    line-height: 1.4;
}
.am-btn-cta-outline:hover {
    background-color: rgba(28, 54, 40, 0.06);
    transform: translateY(-2px);
    box-shadow: 3px 5px 0px #1c3628;
    text-decoration: none;
    color: #1c3628;
}
.am-btn-cta-outline:active {
    transform: translateY(2px);
    box-shadow: 0px 1px 0px #1c3628;
}

/* ── Standardized Progress Bar ── */
.am-progress {
    height: 6px;
    background: var(--ama-surface-alt, #E5E7EB);
    border-radius: 6px;
    overflow: hidden;
}
.am-progress-fill {
    height: 100%;
    background: var(--ama-brand, #2F6B53);
    border-radius: 6px;
    transition: width 0.4s ease;
}

/* ── Illustrated Background ── */
.am-illustrated-bg {
    background-image: url('/images/pattern-geo.svg');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% auto;
}

/* Subject-specific illustrated backgrounds */
.am-illustrated-bg--accounting {
    background-image: url('/images/pattern-accounting.svg');
}
.am-illustrated-bg--cat {
    background-image: url('/images/pattern-cat.svg');
}
.am-illustrated-bg--mathlit {
    background-image: url('/images/pattern-mathlit.svg');
}

/* ── Mascot ── */
.am-mascot {
    max-height: 200px;
    width: auto;
    opacity: 1;
    pointer-events: none;
    flex-shrink: 0;
}
.am-mascot-sm {
    max-height: 200px;
    width: auto;
    opacity: 1;
    pointer-events: none;
    flex-shrink: 0;
}
.am-mascot-lg {
    max-height: 280px;
    width: auto;
    opacity: 1;
    pointer-events: none;
    flex-shrink: 0;
}

/* ── Breadcrumb ── */
.am-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ama-text-muted, #6B7280);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.am-breadcrumb a {
    color: var(--ama-text-muted, #6B7280);
    text-decoration: none;
}
.am-breadcrumb a:hover {
    color: var(--ama-brand, #2F6B53);
    text-decoration: underline;
}
.am-breadcrumb-sep {
    color: var(--ama-border-light, #D1D5DB);
    font-size: 11px;
}
.am-breadcrumb-current {
    color: var(--ama-text, #1F2933);
    font-weight: 600;
}

/* ── Section spacing utility ── */
.am-section {
    margin-bottom: 48px;
}
.am-section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--ama-text, #1F2933);
}

/* ── Grid utilities ── */
.am-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: stretch;
}
.am-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
