/* ============================================================
   Toon Mentor – Design System
   Premium 2D Animation Learning Platform
   ============================================================ */




/* ── CSS Variables ── */
:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #FAF8F5;
    --bg-card: #FFFFFF;
    --primary: #C97B63;
    --primary-dark: #B76A53;
    --primary-light: #DF9B87;
    --secondary: #1F1F1F;
    --secondary-dark: #000000;
    --accent: #D7B98E;
    --accent-light: #E8D2AF;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --text-primary: #1F1F1F;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #ECE8E1;
    --border-light: #F9F8F6;
    --premium: #D7B98E;
    --premium-light: #FDF9F2;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .04);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, .05);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, .08);
    --shadow-xl: 0 30px 80px rgba(0, 0, 0, .12);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: all .3s cubic-bezier(.4, 0, .2, 1);
    --font-head: 'Sora', 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --gradient-primary: linear-gradient(135deg, #C97B63 0%, #B76A53 100%);
    --gradient-accent: linear-gradient(135deg, #D7B98E 0%, #C97B63 100%);
    --gradient-warm: radial-gradient(circle at top left, rgba(201, 123, 99, 0.06), transparent 50%), radial-gradient(circle at bottom right, rgba(215, 185, 142, 0.06), transparent 50%), #FFFFFF;
    --gradient-card: linear-gradient(145deg, #FFFFFF 0%, #FAF8F5 100%);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14.4px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

/* ── Custom Scrollbars ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

svg[data-lucide] {
    width: 1.25em;
    height: 1.25em;
    vertical-align: middle;
    stroke-width: 2;
    flex-shrink: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.75rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    color: var(--text-secondary);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Layout ── */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 6vw, 5rem);
}

.container-fluid {
    width: 100%;
    padding: 0 clamp(1.5rem, 6vw, 5rem);
}

.section {
    padding: 5rem 0;
}

.section-sm {
    padding: 3rem 0;
}

.section-lg {
    padding: 7rem 0;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-1 {
    gap: .5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(201, 123, 99, .25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--primary-dark);
    box-shadow: 0 8px 24px rgba(201, 123, 99, .35);
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .03);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.btn-accent {
    background: var(--gradient-accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(215, 185, 142, .35);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(215, 185, 142, .45);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-ghost {
    background: rgba(74, 108, 247, .08);
    color: var(--primary);
}

.btn-ghost:hover {
    background: rgba(74, 108, 247, .15);
    color: var(--primary);
}

.btn-white {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn-white:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: .5rem 1.1rem;
    font-size: .85rem;
}

.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1.05rem;
    border-radius: 50px;
}

.btn-xl {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    border-radius: 50px;
}

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .75rem;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.badge-primary {
    background: rgba(74, 108, 247, .12);
    color: var(--primary);
}

.badge-success {
    background: rgba(16, 185, 129, .12);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, .12);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, .12);
    color: var(--danger);
}

.badge-premium {
    background: var(--premium-light);
    color: #92610a;
}

.badge-free {
    background: rgba(16, 185, 129, .12);
    color: var(--success);
    font-weight: 700;
}

.badge-level {
    padding: .2rem .6rem;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
}

/* ── Forms ── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    color: var(--text-primary);
    margin-bottom: .4rem;
}

.form-control {
    width: 100%;
    padding: .8rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 108, 247, .12);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
}

.form-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}

.form-check input[type=checkbox] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-hint {
    font-size: .82rem;
    color: var(--text-muted);
    margin-top: .25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* ── Flash Messages ── */
.flash {
    padding: .9rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    animation: slideDown .3s ease;
}

.flash-success {
    background: rgba(16, 185, 129, .12);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, .25);
}

.flash-error {
    background: rgba(239, 68, 68, .10);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, .2);
}

.flash-info {
    background: rgba(74, 108, 247, .10);
    color: #1e3a8a;
    border: 1px solid rgba(74, 108, 247, .2);
}

.flash-warning {
    background: rgba(245, 158, 11, .10);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, .2);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ── Navigation ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(252, 251, 248, .92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 0 1.5rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-right: 20px;
}

.navbar-brand:hover {
    color: var(--primary);
}

.brand-logo {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.nav-link {
    padding: .5rem .875rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: .95rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(74, 108, 247, .08);
    color: var(--primary);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.mobile-auth-links {
    display: none;
}

.cart-badge {
    position: relative;
    display: inline-flex;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    font-size: .65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: .5rem;
    border: none;
    background: transparent;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ── Hero Section ── */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--gradient-warm);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(74, 108, 247, .08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, .08) 0%, transparent 50%),
        radial-gradient(circle at 60% 80%, rgba(245, 158, 11, .06) 0%, transparent 40%);
}

.hero-grid {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 4rem;
    align-items: center;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    animation: fadeUp .6s ease;
    flex-wrap: wrap;
}

.hero-tag span.highlight {
    color: var(--primary);
}

.hero-title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    animation: fadeUp .6s .1s ease both;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin-bottom: 2.5rem;
    animation: fadeUp .6s .2s ease both;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    animation: fadeUp .6s .3s ease both;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
    animation: fadeUp .6s .4s ease both;
}

.hero-stat .number {
    font-family: var(--font-head);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.hero-stat .label {
    font-size: .85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90vh;
    max-height: 700px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent), linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-composite: intersect;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent), linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-composite: source-in;
}

.hero-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    height: 150%;
    transform: rotate(-5deg) scale(1.1);
}

.showcase-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow: hidden;
    contain: layout paint;
}

.showcase-col:nth-child(2) {
    margin-top: -20%;
}

.showcase-col:nth-child(3) {
    margin-top: 10%;
}

.showcase-track {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    will-change: transform;
}

.showcase-track.up {
    animation: scrollUp 120s linear infinite;
}

.showcase-track.down {
    animation: scrollDown 120s linear infinite;
}

.hero-showcase.paused .showcase-track {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {

    .showcase-track.up,
    .showcase-track.down {
        animation: none;
    }
}

.showcase-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: .5rem;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.showcase-item img {
    border-radius: calc(var(--radius-lg) - 6px);
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

@keyframes scrollUp {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(0, -50%, 0);
    }
}

@keyframes scrollDown {
    0% {
        transform: translate3d(0, -50%, 0);
    }

    100% {
        transform: translate3d(0, 0, 0);
    }
}

.hero-float-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: .85rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.float-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* ── Section Headers ── */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    padding: .35rem .875rem;
    background: rgba(74, 108, 247, .1);
    color: var(--primary);
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .875rem;
}

.section-title {
    margin-bottom: .75rem;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* ── Course Card ── */
.course-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.course-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.course-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.course-card:hover .course-thumb img {
    transform: scale(1.05);
}

.course-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .4) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-card:hover .course-thumb-overlay {
    opacity: 1;
}

.play-btn {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, .95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    transform: scale(.8);
    transition: var(--transition);
}

.course-card:hover .play-btn {
    transform: scale(1);
}

.course-meta-top {
    position: absolute;
    top: .75rem;
    left: .75rem;
    right: .75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.course-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-category {
    font-size: .78rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .4rem;
}

.course-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: .75rem;
    color: var(--text-primary);
}

.course-title a {
    color: inherit;
}

.course-title a:hover {
    color: var(--primary);
}

.course-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.course-info-item {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
    color: var(--text-muted);
}

.panel-content {
    flex: 1;
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
    order: -1;
}

.global-flash {
    order: 0;
    margin-bottom: 1.5rem;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.course-price {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.course-price.free {
    color: var(--success);
}


/* ── Product Card ── */
.product-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.product-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.product-card:hover .product-thumb img {
    transform: scale(1.05);
}

.product-body {
    padding: 1.25rem;
}

.product-cat {
    font-size: .75rem;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .35rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.product-meta {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 800;
}

/* ── Blog Card ── */
.post-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.post-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.post-card:hover .post-thumb img {
    transform: scale(1.04);
}

.post-body {
    padding: 1.25rem;
}

.post-cat {
    font-size: .75rem;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.post-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: .5rem 0;
    line-height: 1.3;
}

.post-title a {
    color: inherit;
}

.post-title a:hover {
    color: var(--primary);
}

.post-meta {
    font-size: .8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: .75rem;
}

/* ── Testimonial ── */
.testimonial-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 1.5rem;
    font-size: 8rem;
    font-family: var(--font-head);
    color: var(--primary);
    opacity: .07;
    line-height: 1;
}

.star-rating {
    color: var(--accent);
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: .75rem;
}

.testimonial-text {
    color: var(--text-secondary);
    font-size: .95rem;
    margin-bottom: 1.25rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
}

.author-name {
    font-weight: 700;
    font-size: .9rem;
}

.author-role {
    font-size: .78rem;
    color: var(--text-muted);
}

/* ── Stats Counter ── */
.stats-section {
    background: var(--gradient-primary);
    color: #fff;
    padding: 4rem 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-head);
    font-size: 2.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: .5rem;
}

.stat-label {
    font-size: .95rem;
    opacity: .85;
    font-weight: 500;
}

/* ── YouTube Section ── */
.yt-section {
    background: var(--bg-secondary);
}

.yt-stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.yt-stat {
    text-align: center;
}

.yt-stat .val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.yt-stat .lbl {
    font-size: .8rem;
    color: var(--text-muted);
}

.yt-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.yt-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.yt-video-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    background: #000;
}

.yt-video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .85;
    transition: var(--transition);
}

.yt-video-card:hover img {
    opacity: .6;
}

.yt-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-play-btn {
    width: 54px;
    height: 54px;
    background: #ff0000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    transition: var(--transition);
    box-shadow: 0 8px 24px rgba(255, 0, 0, .4);
}

.yt-video-card:hover .yt-play-btn {
    transform: scale(1.1);
}

/* ── Course Player ── */
.player-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

.player-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow-y: auto;
    max-height: 80vh;
    position: sticky;
    top: 88px;
}

.sidebar-course-title {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-light);
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-head);
}

.sidebar-module {
    border-bottom: 1px solid var(--border-light);
}

.sidebar-module-title {
    padding: .9rem 1.25rem;
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    background: rgba(0, 0, 0, .02);
}

.sidebar-module-title:hover {
    background: rgba(0, 0, 0, .04);
}

.sidebar-lessons {
    display: none;
}

.sidebar-module.active .sidebar-lessons {
    display: block;
}

.sidebar-lesson {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.25rem;
    font-size: .85rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.sidebar-lesson:hover {
    background: rgba(74, 108, 247, .05);
    color: var(--primary);
}

.sidebar-lesson.active {
    background: rgba(74, 108, 247, .1);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar-lesson.completed {
    color: var(--success);
}

.lesson-icon {
    font-size: .8rem;
    flex-shrink: 0;
}

.player-main {
    padding: 0;
    background: var(--bg-primary);
}

.video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.video-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.player-info {
    padding: 1.75rem;
}

.player-lesson-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.player-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.5rem;
}

.progress-bar-wrap {
    background: var(--border);
    border-radius: 50px;
    height: 8px;
    margin-bottom: .5rem;
}

.progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

/* ── Print Styles ── */
@media print {
    body * {
        visibility: hidden;
    }

    .certificate-card,
    .certificate-card * {
        visibility: visible;
    }

    .certificate-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 0;
    }

    .btn {
        display: none !important;
    }
}

.player-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.player-tab {
    padding: .6rem 1.25rem;
    font-weight: 600;
    font-size: .9rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.player-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.note-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: .875rem;
    margin-bottom: .75rem;
    font-size: .9rem;
    color: var(--text-secondary);
}

/* ── Accordion (Curriculum) ── */
.accordion-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: .5rem;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: .95rem;
    background: var(--bg-secondary);
    user-select: none;
    transition: var(--transition);
}

.accordion-header:hover {
    background: var(--border-light);
}

.accordion-body {
    display: none;
}

.accordion-item.open .accordion-body {
    display: block;
}

.accordion-item.open .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-chevron {
    transition: transform .25s ease;
}

.lesson-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 1.25rem;
    border-top: 1px solid var(--border-light);
    font-size: .9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.lesson-row:hover {
    background: rgba(74, 108, 247, .04);
    color: var(--primary);
}

.lesson-row .duration {
    margin-left: auto;
    color: var(--text-muted);
    font-size: .8rem;
}

.free-label {
    background: rgba(16, 185, 129, .12);
    color: var(--success);
    padding: .1rem .4rem;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 700;
}

/* ── Cart / Checkout ── */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    padding: .75rem;
    font-size: .85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid var(--border);
}

.cart-table td {
    padding: 1rem .75rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.cart-item-thumb {
    width: 60px;
    height: 45px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.cart-summary {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 88px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: .6rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: .95rem;
}

.summary-row.total {
    font-weight: 800;
    font-size: 1.15rem;
    border-bottom: none;
    color: var(--text-primary);
}

.coupon-form {
    display: flex;
    gap: .5rem;
    margin-top: 1rem;
}

/* ── Pagination ── */
.pagination ul {
    display: flex;
    gap: .4rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 2rem 0 0;
}

.pagination li {
    list-style: none;
}

.pagination li a,
.pagination li.active span {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .9rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
}

.pagination li span.dots {
    width: auto;
    height: auto;
    padding: .5rem .25rem;
    background: transparent;
    box-shadow: none;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.pagination li a:hover {
    background: var(--primary);
    color: #fff;
}

.pagination li.active a {
    background: var(--primary);
    color: #fff;
}

/* ── Footer ── */
.footer {
    background: #1a1d2e;
    color: rgba(255, 255, 255, .75);
    padding: 5rem 0 2rem;
}

.footer-brand {
    margin-bottom: 1.25rem;
}

.footer-brand .name {
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: .5rem;
}

.footer-brand .desc {
    font-size: .9rem;
    max-width: 280px;
    line-height: 1.65;
}

.footer h4 {
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1.1rem;
}

.footer-links li {
    margin-bottom: .55rem;
}

.footer-links a {
    color: rgba(255, 255, 255, .6);
    font-size: .9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-social {
    display: flex;
    gap: .75rem;
    margin-top: 1.25rem;
}

.social-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, .08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    color: rgba(255, 255, 255, .6);
    transition: var(--transition);
}

.social-icon svg {
    stroke: currentColor !important;
    color: inherit;
}

.social-icon:hover {
    background: var(--primary);
    color: #fff;
}

.footer-bottom {
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: .85rem;
    color: rgba(255, 255, 255, .4);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
}

/* ── User/Admin Panel ── */
.panel-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.panel-sidebar {
    background: #1a1d2e;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.panel-sidebar .brand {
    padding: 1.5rem;
    margin-bottom: .5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.panel-sidebar .brand a {
    display: block;
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

.sidebar-nav {
    padding: 1rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, .6);
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: .25rem;
    transition: var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(74, 108, 247, .2);
    color: #fff;
}

.sidebar-nav a .icon {
    width: 18px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, .08);
    margin: 1rem 0;
}

.sidebar-section-label {
    font-size: .72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .3);
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: .5rem 1rem;
}

.panel-content {
    padding: 2rem;
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 1.5rem 2rem;
    margin: -2rem -2rem 2rem -2rem;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    order: -1;
    /* Push to the very top */
}

.panel-title {
    font-size: 1.35rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.flash-container {
    order: 0;
    /* Placed immediately below panel header */
    margin-bottom: 1.5rem;
}

/* ── Admin Stats Cards ── */
.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    position: relative;
    overflow: hidden;
}

.admin-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(74, 108, 247, .03) 100%);
}

.stat-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.stat-icon-wrap.blue {
    background: rgba(74, 108, 247, .12);
    color: var(--primary);
}

.stat-icon-wrap.purple {
    background: rgba(139, 92, 246, .12);
    color: var(--secondary);
}

.stat-icon-wrap.green {
    background: rgba(16, 185, 129, .12);
    color: var(--success);
}

.stat-icon-wrap.amber {
    background: rgba(245, 158, 11, .12);
    color: var(--accent);
}

.stat-icon-wrap.red {
    background: rgba(239, 68, 68, .12);
    color: var(--danger);
}

.stat-val {
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.stat-lbl {
    font-size: .78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: .2rem;
}

/* ── Tables ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: .875rem 1rem;
    font-size: .82rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid var(--border);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: .9rem;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(74, 108, 247, .02);
}

.table-wrap {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-inner {
    overflow-x: auto;
}

/* ── Admin Form Panel ── */
.form-panel {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

/* ── Breadcrumb ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb-sep {
    color: var(--border);
}

/* ── Status Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .7rem;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 600;
}

.status-published,
.status-active,
.status-paid {
    background: rgba(16, 185, 129, .12);
    color: #065f46;
}

.status-draft,
.status-inactive,
.status-pending {
    background: rgba(245, 158, 11, .12);
    color: #92400e;
}

.status-suspended,
.status-failed {
    background: rgba(239, 68, 68, .12);
    color: #991b1b;
}

/* ── About Section ── */
.about-section {
    background: var(--bg-secondary);
}

.creator-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
}

.creator-photo {
    position: relative;
}

.creator-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 420px;
}



.creator-info {
    padding: 3rem 2.5rem;
}

.creator-info h2 {
    font-size: 1.75rem;
    margin-bottom: .5rem;
}

.creator-info .role {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.creator-achievements {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.achievement {
    text-align: center;
}

.achievement .val {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.achievement .lbl {
    font-size: .78rem;
    color: var(--text-muted);
}

/* ── Filters Bar ── */
.filters-bar {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

.filter-select {
    padding: .6rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .9rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    border-color: var(--primary);
    outline: none;
}

.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input-wrap .form-control {
    padding-left: 2.5rem;
}

.search-icon {
    position: absolute;
    left: .875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ── Gradient Orbs (decorative) ── */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .4;
    pointer-events: none;
}

.orb-primary {
    background: var(--primary);
}

.orb-secondary {
    background: var(--secondary);
}

.orb-accent {
    background: var(--accent);
}

/* ── Course Layout ── */
.course-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2.5rem;
    align-items: start;
}

/* ── Auth Layout ── */
.auth-section {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-warm);
    padding: 2rem;
}

/* ── Blog Layout ── */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}
@media (min-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr 300px;
        gap: 2.5rem;
    }
}

/* Post Content Formatting */
.post-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}
.post-content img, .post-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}
.post-content pre, .post-content code, .post-content table {
    max-width: 100%;
    overflow-x: auto;
}

/* ── User Account Layout ── */
.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
    padding: 3rem 0;
}

.account-content {
    min-width: 0;
}

.account-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    position: sticky;
    top: 88px;
}

.account-user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.user-avatar-wrap img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
}

.user-info .user-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.user-info .user-email {
    font-size: .8rem;
    color: var(--text-muted);
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.account-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: var(--transition);
}

.account-nav a i {
    width: 18px;
    height: 18px;
}

.account-nav a:hover {
    background: rgba(74, 108, 247, .05);
    color: var(--primary);
}

.account-nav a.active {
    background: var(--primary);
    color: #fff;
}

.nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: .5rem 0;
}

.text-danger {
    color: var(--danger);
}

.text-danger:hover {
    background: rgba(239, 68, 68, .05) !important;
    color: var(--danger) !important;
}

/* ── Utilities ── */
.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-5 {
    margin-top: 1.25rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-12 {
    margin-top: 3rem;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: .75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-5 {
    margin-bottom: 1.25rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: .25rem;
}

.mt-2 {
    margin-top: .5rem;
}

.mt-3 {
    margin-top: .75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mr-3 {
    margin-right: .75rem;
}

.p-0 {
    padding: 0;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.py-3 {
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.stretched-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.text-success {
    color: var(--success);
}

.text-primary {
    color: var(--primary);
}

.text-sm {
    font-size: 0.85rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.w-full {
    width: 100%;
}

.max-w-xs {
    max-width: 20rem;
}

.max-w-sm {
    max-width: 24rem;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-auth {
    max-width: calc(28rem + 10px);
}

.max-w-lg {
    max-width: 32rem;
}

.max-w-xl {
    max-width: 36rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.d-inline-flex {
    display: inline-flex;
}

.inline-block {
    display: inline-block;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.inline-flex {
    display: inline-flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.ml-auto {
    margin-left: auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.hidden {
    display: none !important;
}

.relative {
    position: relative;
}

.flex-1 {
    flex: 1;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.min-h-screen {
    min-height: 100vh;
}

.min-h-80vh {
    min-height: 80vh;
}

.bg-admin-auth {
    background: #fdfbf8;
}

.brand-logo-img {
    position: relative;
    margin-bottom: 5px;
}

.overflow-hidden {
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.opacity-40 {
    opacity: 0.4;
}

.opacity-60 {
    opacity: 0.6;
}

.rounded-full {
    border-radius: 50%;
}

.object-cover {
    object-fit: cover;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.border-3 {
    border-width: 3px;
    border-style: solid;
}

.border-border {
    border-color: var(--border);
}

/* ── Grids ── */
.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid-cols-auto-200 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.grid-cols-orders {
    grid-template-columns: 1fr 300px;
}

.grid-cols-sidebar {
    grid-template-columns: 1fr 320px;
}

.grid-cols-cart {
    grid-template-columns: 1fr 340px;
}

/* ── Progress Bar ── */
.progress-bg {
    background: var(--border);
    border-radius: 50px;
    height: 8px;
}

.progress-fill {
    height: 8px;
    border-radius: 50px;
    background: var(--gradient-primary);
    transition: width .4s;
}

/* ── Upload Dropzone ── */
.upload-dropzone {
    padding: 2rem;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    text-align: center;
    background: var(--bg-secondary);
}

/* ── Animations ── */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ── Common Components ── */
.auth-wrapper {
    width: 100%;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 0, 0, .05);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
}

.page-title {
    font-size: 1.75rem;
    margin-bottom: .25rem;
    margin-top: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 4rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state-icon svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
}


/* ── Keyframe Animations ── */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-16px);
    }
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(1deg);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: none;
}

/* ── Checkout Coupon Animation ── */
@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.coupon-state-anim {
    animation: slideFadeIn 0.3s ease-out;
}

/* ── Contact Hero ── */
#contact-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 992px) {
    #contact-hero {
        min-height: 350px !important;
        height: 350px !important;
        padding-bottom: 0 !important;
    }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .creator-card {
        grid-template-columns: 1fr;
    }

    .creator-photo img {
        min-height: 280px;
    }

    .player-layout {
        grid-template-columns: 1fr;
    }

    .player-sidebar {
        max-height: 60vh;
        position: relative;
        top: 0;
    }

    .panel-layout {
        grid-template-columns: 1fr;
    }

    .panel-sidebar {
        display: none;
        height: auto;
        position: relative;
    }
}

@media (max-width: 991px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    .yt-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .course-layout {
        grid-template-columns: 1fr;
    }

    .blog-layout {
        grid-template-columns: 1fr;
    }

    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .auth-section {
        min-height: auto;
        padding: 1.5rem 1rem 3rem;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .navbar-nav {
        display: none;
    }

    .navbar-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 10px);
        right: 1.5rem;
        left: auto;
        width: 220px;
        background: var(--bg-card);
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-light);
        border-radius: var(--radius-lg);
        padding: 1rem;
        gap: .5rem;
        align-items: stretch;
        text-align: left;
    }

    .mobile-auth-links {
        display: block;
        border-top: 1px solid var(--border);
        padding-top: 1rem;
        margin-top: .5rem;
    }

    .desktop-auth-links {
        display: none !important;
    }

    .navbar-brand {
        font-size: 1.15rem;
        gap: .4rem;
    }

    .navbar-brand .brand-logo {
        width: 35px;
        height: 35px;
    }

    .navbar-actions .btn {
        padding: .4rem .8rem;
        font-size: .8rem;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-tag {
        justify-content: center;
    }

    .hamburger {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding: 1.5rem 0 3rem;
    }

    .hero-visual {
        margin-top: 2rem;
        height: 350px;
    }

    .hero-showcase {
        height: 750px;
        gap: .75rem;
        transform: rotate(-5deg) scale(0.95);
    }

    .showcase-col:nth-child(2) {
        margin-top: -2%;
    }

    .showcase-col:nth-child(3) {
        margin-top: 2%;
    }

    .about-section .grid-2 {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .panel-layout {
        grid-template-columns: 1fr;
    }

    .admin-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {

    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .panel-header p {
        display: none;
    }

    .filters-bar .btn-ghost {
        display: none;
    }

    .admin-stat-grid {
        grid-template-columns: 1fr;
    }

    #products-list,
    #products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem !important;
    }

    .hero-title {
        font-size: clamp(1.7rem, 7.5vw, 2.2rem) !important;
    }

    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .hero-cta {
        width: 100%;
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .product-card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .product-card .product-body {
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .product-card .product-footer {
        margin-top: auto;
    }

    .product-card .product-thumb {
        aspect-ratio: 1 / 1;
    }

    .creator-achievements {
        justify-content: center;
    }

    #visit-yt-btn {
        display: flex;
        margin: 0 auto;
        width: max-content;
    }

    .yt-section {
        border-top: 3px solid var(--border);
    }

    .auth-wrapper {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem 1.25rem;
    }

    .auth-card form {
        padding: 0 1rem;
    }

    .product-card .product-cat {
        display: none;
    }

    .product-card .product-title {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.35;
        height: 2.7em;
        margin-bottom: 0.5rem;
    }

    .product-card .product-footer .btn {
        display: none;
    }
}

/* ── Reviews Slider ── */
.review-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 1rem 0 3rem 0;
    cursor: grab;
}

.review-slider-wrapper:active {
    cursor: grabbing;
}

.review-slider-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    will-change: transform;
}

.review-slide {
    width: 320px;
    flex-shrink: 0;
    user-select: none;
}

.review-slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.review-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.review-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .review-slider-dots {
        display: none;
    }
}

/* Responsive Tables and Grid Fix */
@media (max-width: 991px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    /* Fix grid blowout */
    .account-content,
    .panel-content {
        min-width: 0;
    }

    /* Make all data tables horizontally scrollable */
    .data-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent text wrapping in tables to force scrolling instead of crushing columns */
    .data-table th,
    .data-table td {
        white-space: nowrap;
    }
}

/* ?? Commercial License Card ?? */
.license-card {
    margin-top: 1.5rem;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.license-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.license-icon {
    color: #D97706;
    width: 24px;
    height: 24px;
}

.license-title {
    font-size: 1.15rem;
    margin: 0;
    color: #92400E;
    font-weight: 700;
}

.license-text {
    color: #92400E;
    line-height: 1.75;
    font-size: 0.95rem;
    margin-bottom: 0;
    opacity: 0.9;
}

/* ── Cart & Orders ── */
.order-items-card {
    background: var(--bg-card);
    text-align: left;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-xl);
    padding: clamp(1.25rem, 4vw, 2rem);
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: .75rem 0;
    border-bottom: 1px solid var(--border-light);
    gap: 1rem;
}

.order-item-title {
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: .25rem;
}

.order-item-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
}

.order-item-price {
    font-weight: 700;
    white-space: nowrap;
    margin-top: .25rem;
}

/* ── Mobile Overrides ── */
@media (max-width: 991px) {
    .player-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .player-sidebar {
        max-height: none !important;
        position: static !important;
        width: 100% !important;
    }

    .player-main {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .player-tabs {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .player-tabs::-webkit-scrollbar {
        height: 4px;
    }

    .player-tabs::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 4px;
    }
}


/* Gallery Default (Desktop) */
.gallery-track::-webkit-scrollbar,
.gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.gallery-arrow {
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-main:hover .gallery-arrow {
    opacity: 1;
}

/* Profile Grid Default (Desktop) */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Mobile Bottom Navigation Default (Desktop) */
.mobile-bottom-nav {
    display: none;
}

/* ── Unified Mobile Styles (max-width: 768px) ── */
@media (max-width: 768px) {

    /* Sticky Mobile Purchase Card */
    .purchase-card-wrapper {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto !important;
        z-index: 999;
        background: var(--bg-card);
        border-top: 1px solid var(--border-light);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        border-radius: 24px 24px 0 0 !important;
    }

    .purchase-card-inner {
        border-radius: 24px 24px 0 0 !important;
        box-shadow: none !important;
        padding: 1rem 1.25rem 1.5rem 1.25rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
    }

    .purchase-card-img {
        display: none !important;
    }

    .purchase-card-content {
        padding: 0 !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
    }

    .purchase-card-inner .purchase-price,
    .purchase-card-content .purchase-price {
        margin-bottom: 0 !important;
        font-size: 1.5rem !important;
        line-height: 1 !important;
    }

    .purchase-card-inner form,
    .purchase-card-inner>a.btn,
    .purchase-card-content .purchase-action {
        margin-bottom: 0 !important;
        flex: 1;
        min-width: 0;
    }

    .purchase-card-content .purchase-action form,
    .purchase-card-content .purchase-action>a.btn,
    .purchase-card-content .purchase-action form button,
    .purchase-card-inner form button {
        margin-bottom: 0 !important;
        width: 100% !important;
    }

    .purchase-card-features {
        display: none !important;
    }

    /* Gallery Mobile overrides */
    .product-gallery-container {
        flex-direction: column !important;
        max-width: 100% !important;
        margin-bottom: 1.5rem !important;
    }

    .gallery-arrow,
    .gallery-thumbs {
        display: none !important;
    }

    .mobile-title {
        display: block !important;
    }

    .desktop-title {
        display: none !important;
    }

    /* Profile Grid */
    .profile-grid {
        grid-template-columns: 1fr;
    }

    /* User Panel & Cart Responsive Card Tables */
    .account-content .table-wrap,
    .table-wrap:has(.cart-table) {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .account-content .data-table,
    .cart-table {
        display: block;
        width: 100%;
        background: transparent;
    }

    .account-content .data-table thead,
    .cart-table thead {
        display: none;
    }

    .account-content .data-table tbody,
    .cart-table tbody {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .account-content .data-table tr,
    .cart-table tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 1.25rem;
        box-shadow: var(--shadow-sm);
    }

    .account-content .data-table td,
    .cart-table td {
        padding: 0;
        border: none;
        white-space: normal !important;
        display: flex;
        align-items: center;
        font-size: 0.9rem;
    }

    .account-content .data-table td:first-child,
    .cart-table td:first-child {
        width: 100%;
        border-bottom: 1px solid var(--border-light);
        padding-bottom: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .account-content .data-table td:last-child,
    .cart-table td:last-child {
        margin-left: auto;
    }

    /* Mobile Bottom Navigation & Sidebar */
    .account-sidebar {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-top: 1px solid var(--border-light);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        border-radius: 24px 24px 0 0;
        z-index: 1000;
        justify-content: space-around;
        padding: 1rem 1.25rem 1.5rem 1.25rem;
    }

    .mobile-bottom-nav .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        color: var(--text-muted);
        font-size: 0.7rem;
        font-weight: 600;
        text-decoration: none;
        flex: 1;
        transition: var(--transition);
    }

    .mobile-bottom-nav .bottom-nav-item i {
        width: 22px;
        height: 22px;
    }

    .mobile-bottom-nav .bottom-nav-item.active {
        color: var(--primary);
    }

    /* Price Offer Mobile Restructure */
    .purchase-price .price-offer-wrap {
        display: grid !important;
        grid-template-columns: auto auto !important;
        grid-template-rows: auto auto !important;
        grid-template-areas:
            "current badge"
            "current original" !important;
        column-gap: 0.5rem !important;
        row-gap: 0.1rem !important;
        align-items: center !important;
        justify-content: start !important;
    }

    .purchase-price .price-current {
        grid-area: current;
        line-height: 1 !important;
    }

    .purchase-price .price-badge {
        grid-area: badge;
        align-self: end;
        width: max-content;
        font-size: 0.65rem !important;
        padding: 0.1rem 0.3rem !important;
        margin: 0 !important;
    }

    .purchase-price .price-original {
        grid-area: original;
        align-self: start;
        font-size: 0.9rem !important;
        opacity: 0.7;
        line-height: 1 !important;
        margin: 0 !important;
    }

    /* Global Mobile Footer Padding Fixes */
    body:has(.purchase-card-wrapper) .footer {
        padding-bottom: 110px !important;
    }

    body:has(.mobile-bottom-nav) .footer {
        padding-bottom: 60px !important;
    }
}

/* ── CKEditor WYSIWYG: mirror frontend post-content styles ── */
.ck-editor__editable_inline {
    min-height: 340px;
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.ck-content p {
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4,
.ck-content h5,
.ck-content h6 {
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.ck-content h1 {
    font-size: 2.25rem;
}

.ck-content h2 {
    font-size: 1.8rem;
}

.ck-content h3 {
    font-size: 1.5rem;
}

.ck-content h4 {
    font-size: 1.25rem;
}

.ck-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ck-content ul,
.ck-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.ck-content li {
    margin-bottom: 0.5rem;
}

.ck-content blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--primary);
    background: var(--bg-secondary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-primary);
}

.ck-content pre {
    background: #1e1e1e;
    color: #fff;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.ck-content code {
    background: var(--bg-secondary);
    color: var(--primary-dark);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: monospace;
}

.ck-content strong {
    font-weight: 700;
    color: var(--text-primary);
}

/* ── Rich Text / Blog Content Formatting ── */
.post-content {
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.8;
    word-wrap: break-word;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.post-content h1 {
    font-size: 2.25rem;
}

.post-content h2 {
    font-size: 1.8rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content h4 {
    font-size: 1.25rem;
}

.post-content p {
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.post-content a:hover {
    color: var(--primary-dark);
}

.post-content ul,
.post-content ol {
    margin-top: 0;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.post-content ul {
    list-style-type: disc;
}

.post-content ol {
    list-style-type: decimal;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content li>ul,
.post-content li>ol {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--primary);
    background: var(--bg-secondary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-primary);
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content pre {
    background: #1e1e1e;
    color: #fff;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.post-content code {
    background: var(--bg-secondary);
    color: var(--primary-dark);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: monospace;
}

.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.post-content table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.post-content th,
.post-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    text-align: left;
}

.post-content th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.post-content strong {
    font-weight: 700;
    color: var(--text-primary);
}

.post-content hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

/* ── Rich Text Content (from CKEditor) ── */
.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4,
.rich-text-content h5 {
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}
.rich-text-content h2 { font-size: 1.5rem; }
.rich-text-content h3 { font-size: 1.25rem; }
.rich-text-content p {
    margin-bottom: 1rem;
}
.rich-text-content ul,
.rich-text-content ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}
.rich-text-content ul {
    list-style-type: disc;
}
.rich-text-content ol {
    list-style-type: decimal;
}
.rich-text-content li {
    margin-bottom: 0.4rem;
}
.rich-text-content strong,
.rich-text-content b {
    font-weight: 600;
    color: var(--text-primary);
}
.rich-text-content a {
    color: var(--primary);
    text-decoration: underline;
}

/* ── Load More Pagination ── */
.load-more-wrapper {
    text-align: center;
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.load-more-btn {
    border-radius: 30px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
.load-more-btn.btn-primary {
    padding: 0.75rem 2.5rem;
}
.load-more-btn svg {
    width: 18px;
    height: 18px;
}
.load-more-btn .lucide-arrow-left {
    margin-right: 4px;
}
.load-more-btn .lucide-arrow-right {
    margin-left: 4px;
}