/* =========================================================
   Amin Classes Page
   Path: wp-content/themes/tutor-starter-child/assets/css/amin-classes.css
   Clean version: layout + dynamic filters + premium course cards
========================================================= */

:root {
    --amin-classes-text: #1f1738;
    --amin-classes-muted: rgba(31, 23, 56, 0.68);
    --amin-classes-soft: #f8fafc;
    --amin-classes-border: rgba(124, 58, 237, 0.14);
    --amin-classes-primary: #7c3aed;
    --amin-classes-primary-dark: #4c1d95;
    --amin-classes-gold: #d6a13c;
    --amin-classes-shadow: 0 18px 45px rgba(30, 27, 75, 0.10);
    --amin-classes-radius: 30px;
}

/* Page wrapper */
.amin-classes-page {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 16px 64px;
    direction: rtl;
    color: var(--amin-classes-text);
}

/* Hero */
.amin-classes-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.amin-classes-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(214, 161, 60, 0.12);
    color: #a06f12;
    font-size: 12px;
    font-weight: 900;
}

.amin-classes-hero h1 {
    margin: 0;
    color: #111827;
    font-size: 30px;
    font-weight: 950;
    letter-spacing: -0.8px;
}

.amin-classes-hero p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.9;
}

.amin-classes-count {
    min-width: 106px;
    height: 88px;
    border-radius: 26px;
    background: #111827;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 950;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.amin-classes-count small {
    display: block;
    margin-top: -12px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 11px;
    font-weight: 800;
}

/* Layout */
.amin-classes-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.amin-classes-sidebar {
    position: sticky;
    top: 96px;
}

.amin-classes-content {
    min-width: 0;
}

/* Desktop filters */
.amin-filter-box {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
}

.amin-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.amin-filter-head h3 {
    margin: 0;
    color: #111827;
    font-size: 16px;
    font-weight: 950;
}

.amin-filter-clear {
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    padding: 7px 11px;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.amin-filter-group {
    padding-top: 16px;
}

.amin-filter-group h4 {
    margin: 0 0 10px;
    color: #a06f12;
    font-size: 14px;
    font-weight: 950;
}

.amin-filter-option {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: right;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #475569;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.amin-filter-option:hover,
.amin-filter-option.is-active {
    background: #111827;
    color: #ffffff;
}

/* Toolbar */
.amin-classes-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.amin-classes-toolbar h2 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    font-weight: 950;
}

.amin-classes-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    padding: 9px 13px;
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
    font-size: 12px;
}

.amin-classes-sort span {
    color: #64748b;
    font-weight: 800;
}

.amin-classes-sort strong {
    color: #111827;
    font-weight: 950;
}

/* Grid */
.amin-classes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 22px;
}

/* Course card */
.amin-course-card {
    min-height: 382px;
    height: 100%;
    border-radius: var(--amin-classes-radius);
    padding: 22px 22px 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--amin-classes-border);
    box-shadow: var(--amin-classes-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    color: var(--amin-classes-text);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.amin-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 54px rgba(30, 27, 75, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.amin-course-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.88), transparent 34%),
        radial-gradient(circle at 82% 100%, rgba(255, 255, 255, 0.60), transparent 40%);
    pointer-events: none;
}

.amin-course-card > * {
    position: relative;
    z-index: 1;
}

/* Card color palette */
.amin-course-card--color-1 {
    background: linear-gradient(155deg, #fff2db 0%, #ffd5a3 100%);
}

.amin-course-card--color-2 {
    background: linear-gradient(155deg, #fbf7ff 0%, #eadcff 100%);
}

.amin-course-card--color-3 {
    background: linear-gradient(155deg, #f2feff 0%, #c7f2fb 100%);
}

.amin-course-card--color-4 {
    background: linear-gradient(155deg, #fff0f6 0%, #ffc7dc 100%);
}

.amin-course-card--color-5 {
    background: linear-gradient(155deg, #f1fff7 0%, #c7f7dc 100%);
}

.amin-course-card--color-6 {
    background: linear-gradient(155deg, #f4f6ff 0%, #d2dcff 100%);
}

/* Card top */
.amin-course-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 36px;
    margin-bottom: 10px;
}

.amin-course-card-top span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    max-width: 72%;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    color: #5b3db6;
    font-size: 13px;
    font-weight: 950;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: inset 0 0 0 1px rgba(91, 61, 182, 0.08);
}

.amin-course-card-top strong {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #241b3f;
    font-size: 24px;
    line-height: 1;
    font-weight: 950;
}

/* Card main */
.amin-course-card-main {
    text-align: center;
    padding: 14px 4px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.amin-course-card-main h3 {
    margin: 0 0 14px;
    color: #241b3f;
    font-size: 25px;
    font-weight: 950;
    line-height: 1.55;
    letter-spacing: -0.6px;
}

.amin-course-card-main h3 a {
    color: inherit !important;
    text-decoration: none !important;
}

.amin-course-card-main p {
    max-width: 92%;
    margin: 0 auto;
    color: rgba(36, 27, 63, 0.72);
    font-size: 14px;
    font-weight: 750;
    line-height: 2.05;
}

/* Course content section */
.amin-course-meta-area {
    margin-top: 18px;
}

.amin-course-meta-title {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #241b3f;
    font-size: 13px;
    font-weight: 950;
}

.amin-course-meta-title::after {
    content: "";
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: inline-block;
    border-radius: 9px;
    background-color: rgba(124, 58, 237, 0.13);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 15px 15px;
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 5.5C5 4.67 5.67 4 6.5 4H17.5C18.33 4 19 4.67 19 5.5V18.5C19 19.33 18.33 20 17.5 20H6.5C5.67 20 5 19.33 5 18.5V5.5Z' stroke='%237c3aed' stroke-width='2'/%3E%3Cpath d='M8 8H16M8 12H16M8 16H13' stroke='%237c3aed' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.amin-course-line {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    overflow: hidden;
}

.amin-course-line span {
    display: block;
    height: 100%;
    min-width: 28px;
    border-radius: inherit;
    background: linear-gradient(90deg, #4c1d95, #7c3aed);
}

.amin-course-meta-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px dashed rgba(124, 58, 237, 0.18);
    color: #241b3f;
}

.amin-course-meta-values span,
.amin-course-meta-values strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #241b3f;
    font-size: 13px;
    font-weight: 950;
    line-height: 1.7;
    white-space: normal;
}

.amin-course-meta-values span::before,
.amin-course-meta-values strong::before {
    content: "";
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: inline-block;
    border-radius: 999px;
    background-color: rgba(124, 58, 237, 0.13);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
}

.amin-course-meta-values span::before {
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8.5' stroke='%237c3aed' stroke-width='2'/%3E%3Cpath d='M12 7V12L15.5 14' stroke='%237c3aed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.amin-course-meta-values strong::before {
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 4V7M17 4V7M5.5 9.5H18.5M7 6H17C18.1 6 19 6.9 19 8V18C19 19.1 18.1 20 17 20H7C5.9 20 5 19.1 5 18V8C5 6.9 5.9 6 7 6Z' stroke='%237c3aed' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Card footer */
.amin-course-card-bottom {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    margin-top: 20px;
}

.amin-course-card-bottom a,
.amin-course-price {
    min-height: 54px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0) !important;
    box-shadow: 0 10px 22px rgba(30, 27, 75, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #241b3f;
    line-height: 1.7;
    font-size: 14px;
    font-weight: 950;
}

.amin-course-card-bottom a {
    flex: 0 0 118px;
    padding: 10px 14px;
    text-decoration: none !important;
    color: #241b3f !important;
    background: #fff !important;
}

.amin-course-price {
    flex: 1 1 auto;
    max-width: none;
    padding: 10px 14px;
    white-space: normal;
}

.amin-course-price--free {
    color: #059669;
}

.amin-course-price--paid {
    color: #2563eb;
}

/* Empty state */
.amin-classes-empty {
    padding: 28px;
    border-radius: 24px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-weight: 900;
}

.amin-hidden-course {
    display: none !important;
}

/* Mobile filter defaults */
.amin-mobile-filter-btn,
.amin-mobile-filter-panel {
    display: none;
}

/* Tablet */
@media (max-width: 1024px) {
    .amin-classes-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 18px;
    }

    .amin-classes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .amin-classes-page {
        padding: 14px 12px 88px;
    }

    .amin-classes-hero {
        align-items: flex-start;
        margin-bottom: 14px;
    }

    .amin-classes-hero h1 {
        font-size: 24px;
    }

    .amin-classes-hero p {
        font-size: 13px;
    }

    .amin-classes-count {
        min-width: 78px;
        height: 70px;
        border-radius: 22px;
        font-size: 22px;
    }

    .amin-classes-count small {
        font-size: 9px;
    }

    .amin-classes-layout {
        display: block;
    }

    .amin-classes-sidebar {
        display: none;
    }

    .amin-mobile-filter-btn {
        width: 100%;
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border: 0;
        border-radius: 14px;
        background: #ffe3a9;
        color: #111827;
        padding: 10px 14px;
        margin: 0 0 14px;
        box-shadow: 0 8px 20px rgba(210, 186, 135, 0.45);
        font-size: 14px;
        font-weight: 950;
        cursor: pointer;
    }

    .amin-mobile-filter-btn strong {
        font-size: 18px;
    }

    .amin-classes-toolbar {
        margin-bottom: 14px;
    }

    .amin-classes-toolbar h2 {
        font-size: 17px;
    }

    .amin-classes-sort {
        padding: 7px 10px;
        font-size: 11px;
    }

    .amin-classes-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 14px;
    }

    .amin-course-card {
        min-height: 360px;
        border-radius: 28px;
        padding: 20px 18px 18px;
    }

    .amin-course-card-main h3 {
        font-size: 23px;
    }

    .amin-course-card-main p {
        font-size: 13px;
    }

    .amin-course-meta-values {
        gap: 10px;
    }

    .amin-course-meta-values span,
    .amin-course-meta-values strong {
        font-size: 12.5px;
    }

    .amin-course-card-bottom a {
        flex-basis: 106px;
    }

    .amin-course-card-bottom a,
    .amin-course-price {
        min-height: 50px;
        font-size: 13px;
    }
}

/* Mobile filter drawer */
@media (max-width: 767px) {
    body.amin-filter-lock {
        overflow: hidden;
    }

    .amin-mobile-filter-panel {
        display: block;
        margin: 0;
    }

    .amin-mobile-filter-drawer {
        position: fixed;
        inset: 0;
        z-index: 999999;
        background: #ffffff;
        direction: rtl;
        display: flex;
        flex-direction: column;
        transform: translateY(100%);
        transition: transform 0.25s ease;
    }

    .amin-mobile-filter-panel.is-open .amin-mobile-filter-drawer {
        transform: translateY(0);
    }

    .amin-mobile-filter-backdrop {
        position: fixed;
        inset: 0;
        z-index: 999998;
        background: rgba(15, 23, 42, 0.36);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .amin-mobile-filter-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .amin-mobile-filter-header {
        min-height: 58px;
        display: grid;
        grid-template-columns: 44px 1fr auto;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        background: #ffffff;
    }

    .amin-mobile-filter-close {
        width: 38px;
        height: 38px;
        border: 0;
        border-radius: 14px;
        background: #f8fafc;
        color: #111827;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }

    .amin-mobile-filter-header h3 {
        margin: 0;
        color: #111827;
        text-align: right;
        font-size: 17px;
        font-weight: 950;
    }

    .amin-mobile-clear {
        border: 0;
        background: transparent;
        color: #111827;
        padding: 8px;
        white-space: nowrap;
        font-size: 12px;
        font-weight: 900;
        cursor: pointer;
    }

    .amin-mobile-filter-body {
        flex: 1;
        overflow-y: auto;
        padding: 14px 14px 96px;
        background: #ffffff;
    }

    .amin-mobile-filter-group {
        padding: 16px 0 18px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    }

    .amin-mobile-filter-group:first-child {
        padding-top: 4px;
    }

    .amin-mobile-filter-title {
        margin-bottom: 12px;
        color: #111827;
        font-size: 14px;
        font-weight: 950;
    }

    .amin-mobile-segment-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        border: 1px solid #d6a13c;
        border-radius: 12px;
        overflow: hidden;
        background: #ffffff;
    }

    .amin-mobile-segment-grid .amin-filter-option {
        flex: 1 0 33.333%;
        min-width: 33.333%;
        min-height: 42px;
        border: 0;
        border-left: 1px solid rgba(214, 161, 60, 0.35);
        border-bottom: 1px solid rgba(214, 161, 60, 0.22);
        border-radius: 0;
        background: #ffffff;
        color: #464950;
        justify-content: center;
        text-align: center;
        padding: 9px 8px;
        font-size: 12px;
        font-weight: 900;
    }

    .amin-mobile-segment-grid .amin-filter-option:nth-child(3n) {
        border-left: 0;
    }

    .amin-mobile-segment-grid .amin-filter-option:hover,
    .amin-mobile-segment-grid .amin-filter-option.is-active {
        background: #ffe3a9;
        color: #111827;
    }

    .amin-mobile-filter-footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000000;
        padding: 12px 14px 14px;
        background: #ffffff;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.08);
    }

    .amin-mobile-show-results {
        width: 100%;
        min-height: 48px;
        border: 0;
        border-radius: 14px;
        background: #ffe3a9;
        color: #111827;
        font-size: 15px;
        font-weight: 950;
        cursor: pointer;
    }
}
