/**
 * Etinion New Carousel — etnc-carousel.css
 * 100% terpisah dari elementor-widgets.css
 * Prefix: etnc- (Etinion New Carousel)
 */

/* ══════════════════════════════════════════════════════
   1. ROOT & LAYOUT
   ══════════════════════════════════════════════════════ */

.etnc-carousel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.etnc-collections {
    position: relative;
}

.etnc-collection {
    display: none;
}

.etnc-collection.is-active {
    display: block;
}

/* ══════════════════════════════════════════════════════
   2. VIEWPORT — 3-LAYER APPROACH
   ══════════════════════════════════════════════════════ */

.etnc-viewport {
    overflow: hidden;
    position: relative;
    width: 100%;
    /* Expand clip area left/right so box-shadow on first & last visible card is not clipped.
       The negative margin pulls viewport edges outward; the matching padding pushes content back.
       Visually, cards still align to the Elementor container boundary. */
    padding-left: 16px;
    padding-right: 16px;
    margin-left: -16px;
    margin-right: -16px;
    /* touch-action handled by JS: horizontal drag = preventDefault, vertical = let browser scroll */
    touch-action: pan-y pinch-zoom;
    /* No cursor:grab here — use default arrow so links/cards feel clickable.
       cursor:grabbing is applied only during active drag via .is-dragging class. */
    -webkit-user-select: none;
    user-select: none;
}

/* Prevent native browser drag on images & links inside track */
.etnc-track img,
.etnc-track a {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: auto;
}

.etnc-track a img {
    pointer-events: none;
}

.etnc-shadow-frame {
    padding: 10px 0;
    box-sizing: border-box;
    width: 100%;
}

.etnc-track {
    display: flex;
    align-items: stretch;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    /* CSS-only fallback gap — JS will override via track.style.gap */
    gap: var(--etnc-gap-d, 24px);
}

/* Disable transition during active finger drag for immediate response */
.etnc-carousel.is-dragging .etnc-track {
    transition: none !important;
}

.etnc-slide {
    flex: 0 0 auto;
    display: flex;
    height: auto;
    min-width: 0;
    /* CSS-only fallback sizing — PHP sets --etnc-slide-w on root.
       JS overrides flex, width & max-width with precise pixel values on init. */
    width: var(--etnc-slide-w, 23%);
    max-width: var(--etnc-slide-w, 23%);
}

.etnc-slide > * {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

/* ══════════════════════════════════════════════════════
   3. CARD BASE — COURSE
   ══════════════════════════════════════════════════════ */

.etnc-card {
    background: #fff;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Variant: Shadow (default) */
.etnc-variant-shadow .etnc-card {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.08);
    border: 1px solid transparent;
}

/* Variant: Border */
.etnc-variant-border .etnc-card {
    box-shadow: none;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

/* Variant: Flat */
.etnc-variant-flat .etnc-card {
    box-shadow: none;
    border: none;
}

/* Hover effect */
.etnc-hover .etnc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 0 12px 28px rgba(15, 23, 42, 0.12);
}

.etnc-variant-border.etnc-hover .etnc-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.18);
}

.etnc-variant-flat.etnc-hover .etnc-card:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}

/* ══════════════════════════════════════════════════════
   4. THUMBNAIL
   ══════════════════════════════════════════════════════ */

.etnc-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
}

.etnc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.etnc-hover .etnc-card:hover .etnc-thumb img {
    transform: scale(1.04);
}

.etnc-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2;
}

/* ══════════════════════════════════════════════════════
   5. BODY
   ══════════════════════════════════════════════════════ */

.etnc-body {
    padding: 14px 16px 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.etnc-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.etnc-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.etnc-title a:hover {
    color: #2563eb;
}

/* Topline: Author + Labels */
.etnc-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.etnc-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    min-width: 0;
}

.etnc-author img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.etnc-author-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.etnc-labels {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
}

.etnc-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.etnc-label-trending {
    background: #fef3c7;
    color: #92400e;
}

.etnc-label-new {
    background: #dcfce7;
    color: #166534;
}

.etnc-label-bestseller {
    background: #ede9fe;
    color: #5b21b6;
}

.etnc-label-updated {
    background: #e0f2fe;
    color: #0c4a6e;
}

/* Description */
.etnc-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta row */
.etnc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 12px;
    color: #94a3b8;
}

.etnc-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.etnc-meta-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* ══════════════════════════════════════════════════════
   6. FOOTER
   ══════════════════════════════════════════════════════ */

.etnc-footer {
    padding: 12px 16px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.etnc-pricing {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.etnc-price-current {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

.etnc-price-original {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
    white-space: nowrap;
}

.etnc-price-free {
    font-size: 14px;
    font-weight: 700;
    color: #16a34a;
}

.etnc-price-subscription {
    font-size: 12px;
    font-weight: 600;
    color: #7c3aed;
    background: #ede9fe;
    padding: 2px 8px;
    border-radius: 4px;
}

.etnc-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #f59e0b;
    white-space: nowrap;
}

.etnc-rating svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.etnc-rating-count {
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
}

/* ══════════════════════════════════════════════════════
   7. STYLE VARIANTS — COURSE
   ══════════════════════════════════════════════════════ */

/* Focus — default card look, thumb top, body, footer */
.etnc-style-focus .etnc-card {
    /* default styling already applies */
}

.etnc-style-focus .etnc-thumb {
    border-radius: 16px 16px 0 0;
}

/* Cover — image overlay, text on bottom */
.etnc-style-cover .etnc-card {
    position: relative;
    overflow: hidden;
    min-height: 320px;
}

.etnc-style-cover .etnc-thumb {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    border-radius: 0;
    z-index: 0;
}

.etnc-style-cover .etnc-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.3) 45%, transparent 100%);
    z-index: 1;
}

.etnc-style-cover .etnc-body {
    position: relative;
    z-index: 2;
    color: #fff;
    margin-top: auto;
    padding: 16px 18px 0;
}

.etnc-style-cover .etnc-title,
.etnc-style-cover .etnc-title a {
    color: #fff;
}

.etnc-style-cover .etnc-title a:hover {
    color: #93c5fd;
}

.etnc-style-cover .etnc-desc {
    color: rgba(255, 255, 255, 0.8);
}

.etnc-style-cover .etnc-author {
    color: rgba(255, 255, 255, 0.85);
}

.etnc-style-cover .etnc-meta {
    color: rgba(255, 255, 255, 0.7);
}

.etnc-style-cover .etnc-footer {
    position: relative;
    z-index: 2;
    border-top-color: rgba(255, 255, 255, 0.15);
    padding: 12px 18px 18px;
}

.etnc-style-cover .etnc-price-current {
    color: #fff;
}

.etnc-style-cover .etnc-price-original {
    color: rgba(255, 255, 255, 0.55);
}

.etnc-style-cover .etnc-badge {
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Minimal — clean, no shadow, subtle line */
.etnc-style-minimal .etnc-card {
    border-radius: 10px;
    box-shadow: none;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: transparent;
}

.etnc-style-minimal .etnc-thumb {
    border-radius: 10px 10px 0 0;
}

.etnc-style-minimal .etnc-footer {
    border-top-color: rgba(15, 23, 42, 0.08);
}

.etnc-style-minimal.etnc-hover .etnc-card:hover {
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
}

/* ══════════════════════════════════════════════════════
   8. TEACHER CARD
   ══════════════════════════════════════════════════════ */

.etnc-teacher .etnc-card {
    overflow: visible;
}

.etnc-teacher-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px 24px;
    flex: 1 1 auto;
    gap: 10px;
}

.etnc-teacher-avatar {
    width: var(--etnc-teacher-avatar-size, 92px);
    height: var(--etnc-teacher-avatar-size, 92px);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
    margin-bottom: 4px;
}

.etnc-teacher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.etnc-teacher-avatar .etnc-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    border-radius: 50%;
}

.etnc-teacher-name {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #1e293b;
}

.etnc-teacher-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.etnc-teacher-name a:hover {
    color: #2563eb;
}

.etnc-teacher-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.etnc-teacher-specialist {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.etnc-teacher-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
}

.etnc-teacher-rating-badge svg {
    width: 14px;
    height: 14px;
    fill: #f59e0b;
}

.etnc-teacher-rating-count {
    font-weight: 400;
    opacity: 0.7;
}

.etnc-teacher-bio {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.etnc-teacher-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.etnc-teacher-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 12px;
    line-height: 1;
    transition: background 0.2s ease;
}

.etnc-teacher-stat-icon {
    display: inline-flex;
    color: #94a3b8;
}

.etnc-teacher-stat-icon svg {
    width: 16px;
    height: 16px;
}

.etnc-teacher-stat .stat-value {
    font-weight: 700;
    color: #334155;
}

.etnc-teacher-stat .stat-label {
    color: #94a3b8;
    font-weight: 400;
}

.etnc-teacher-stat .stat-extra {
    color: #94a3b8;
    font-weight: 400;
}

.etnc-teacher-footer {
    padding: 0 20px 24px;
    display: flex;
    justify-content: center;
    margin-top: auto;
}

.etnc-teacher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: transparent;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.etnc-teacher-btn:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}

.etnc-teacher-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Teacher Style: box-1 — default centered */
.etnc-style-box-1 .etnc-card {
    /* default teacher card style */
}

/* Teacher Style: box-2 — horizontal layout */
.etnc-style-box-2 .etnc-teacher-inner {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
}

.etnc-style-box-2 .etnc-teacher-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.etnc-style-box-2 .etnc-teacher-stats {
    justify-content: flex-start;
}

.etnc-style-box-2 .etnc-teacher-title-row {
    justify-content: flex-start;
}

.etnc-style-box-2 .etnc-teacher-footer {
    justify-content: flex-start;
    padding: 0 20px 20px;
}

/* Teacher Style: box-3 — compact with accent top */
.etnc-style-box-3 .etnc-card {
    border-top: 3px solid #2563eb;
}

.etnc-style-box-3 .etnc-teacher-inner {
    padding-top: 20px;
}

.etnc-style-box-3 .etnc-teacher-avatar {
    width: calc(var(--etnc-teacher-avatar-size, 92px) * 0.85);
    height: calc(var(--etnc-teacher-avatar-size, 92px) * 0.85);
}

/* ══════════════════════════════════════════════════════
   9. NAVIGATION — OUTSIDE VIEWPORT
   ══════════════════════════════════════════════════════ */

.etnc-collection {
    position: relative;
}

.etnc-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
}

.etnc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.06);
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    outline: none;
    z-index: 6;
}

.etnc-arrow:hover {
    background: #1e293b;
    color: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.etnc-arrow:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.etnc-arrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.etnc-prev {
    left: -20px;
}

.etnc-next {
    right: -20px;
}

.etnc-arrow[disabled] {
    opacity: 0.3;
    pointer-events: none;
}

/* Dots */
.etnc-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.etnc-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.etnc-dot.is-active {
    background: #2563eb;
    transform: scale(1.25);
}

.etnc-dot:hover:not(.is-active) {
    background: #94a3b8;
}

/* Hide nav when only 1 page */
.etnc-nav-none .etnc-nav,
.etnc-nav-none .etnc-dots {
    display: none;
}

.etnc-nav-dots .etnc-nav {
    display: none;
}

.etnc-nav-arrows .etnc-dots {
    display: none;
}

/* ══════════════════════════════════════════════════════
   10. TABS
   ══════════════════════════════════════════════════════ */

.etnc-tabs-wrap {
    position: relative;
    overflow: hidden;
}

.etnc-tabs-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
}

.etnc-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.etnc-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
    outline: none;
}

.etnc-tab:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.18);
    color: #334155;
}

.etnc-tab.is-active {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
    font-weight: 600;
}

.etnc-tab-count {
    font-size: 11px;
    opacity: 0.7;
}

.etnc-tabs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    color: #475569;
}

.etnc-tabs-arrow svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.etnc-tabs-arrow.etnc-tabs-prev {
    left: 0;
}

.etnc-tabs-arrow.etnc-tabs-next {
    right: 0;
}

.etnc-tabs-wrap.has-overflow .etnc-tabs-arrow {
    display: inline-flex;
}

/* ══════════════════════════════════════════════════════
   11. SKELETON SHIMMER
   ══════════════════════════════════════════════════════ */

@keyframes etnc-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.etnc-skeleton {
    display: flex;
    gap: var(--etnc-skeleton-gap, var(--etnc-skeleton-gap-desktop, 24px));
    overflow: hidden;
    padding: 8px;
}

.etnc-skeleton-card {
    flex: 0 0 calc((100% - var(--etnc-skeleton-gap, var(--etnc-skeleton-gap-desktop, 24px)) * (var(--etnc-skeleton-cols, var(--etnc-skeleton-cols-desktop, 4)) - 1)) / var(--etnc-skeleton-cols, var(--etnc-skeleton-cols-desktop, 4)));
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.etnc-skeleton-thumb {
    aspect-ratio: 16 / 9;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: etnc-shimmer 1.5s ease-in-out infinite;
}

.etnc-skeleton-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.etnc-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: etnc-shimmer 1.5s ease-in-out infinite;
}

.etnc-skeleton-line.etnc-sk-title {
    width: 80%;
    height: 14px;
}

.etnc-skeleton-line.etnc-sk-author {
    width: 55%;
}

.etnc-skeleton-line.etnc-sk-meta {
    width: 70%;
}

.etnc-skeleton-line.etnc-sk-price {
    width: 40%;
    height: 16px;
    margin-top: 6px;
}

/* Teacher skeleton */
.etnc-skeleton-card.etnc-sk-teacher {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px 24px;
    gap: 10px;
}

.etnc-skeleton-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: etnc-shimmer 1.5s ease-in-out infinite;
}

.etnc-sk-teacher .etnc-skeleton-line {
    align-self: center;
}

/* Skeleton visibility toggle —
   Use visibility + height:0 instead of display:none so that
   frame.clientWidth is still measurable for JS carousel init. */
.etnc-carousel.has-skeleton .etnc-collections {
    visibility: hidden;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.etnc-carousel.has-skeleton .etnc-tabs-wrap {
    visibility: hidden;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.etnc-carousel.has-skeleton.is-loaded .etnc-skeleton {
    display: none;
}

.etnc-carousel.has-skeleton.is-loaded .etnc-collections {
    visibility: visible;
    height: auto;
    overflow: visible;
    pointer-events: auto;
}

.etnc-carousel.has-skeleton.is-loaded .etnc-tabs-wrap {
    visibility: visible;
    height: auto;
    overflow: visible;
    pointer-events: auto;
    margin: 0 10px -10px 10px;
}

/* ══════════════════════════════════════════════════════
   12. DRAG STATE
   ══════════════════════════════════════════════════════ */

.etnc-carousel.is-dragging .etnc-track {
    transition: none !important;
}

.etnc-carousel.is-dragging .etnc-card {
    pointer-events: none;
    user-select: none;
}

.etnc-carousel.is-dragging,
.etnc-carousel.is-dragging .etnc-viewport,
.etnc-carousel.is-dragging .etnc-card,
.etnc-carousel.is-dragging .etnc-card a {
    cursor: grabbing !important;
}

/* ══════════════════════════════════════════════════════
   13. EQUAL HEIGHT
   ══════════════════════════════════════════════════════ */

.etnc-carousel.etnc-equal-height .etnc-card {
    height: var(--etnc-card-height, auto);
}

/* ══════════════════════════════════════════════════════
   14. ELEMENTOR EDITOR
   ══════════════════════════════════════════════════════ */

.elementor-editor-active .etnc-carousel .etnc-card a {
    pointer-events: none;
}

.etinion-elementor-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    font-size: 14px;
}

/* ══════════════════════════════════════════════════════
   15. RESPONSIVE
   ══════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .etnc-skeleton {
        --etnc-skeleton-cols: var(--etnc-skeleton-cols-tablet, 3);
        --etnc-skeleton-gap: var(--etnc-skeleton-gap-tablet, 20px);
    }

    .etnc-prev {
        left: -16px;
    }

    .etnc-next {
        right: -16px;
    }
}

@media (max-width: 768px) {
    .etnc-skeleton {
        --etnc-skeleton-cols: var(--etnc-skeleton-cols-mobile, 1.5);
        --etnc-skeleton-gap: var(--etnc-skeleton-gap-mobile, 16px);
    }

    /* Mobile: remove the negative margin trick, keep normal shadow padding */
    .etnc-viewport {
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .etnc-shadow-frame {
        padding: 6px;
    }

    .etnc-carousel:not(.etnc-show-arrows-mobile) .etnc-nav {
        display: none;
    }

    .etnc-arrow {
        width: 34px;
        height: 34px;
    }

    .etnc-arrow svg {
        width: 16px;
        height: 16px;
    }

    .etnc-prev {
        left: -10px;
    }

    .etnc-next {
        right: -10px;
    }

    .etnc-body {
        padding: 12px 14px 0;
        gap: 6px;
    }

    .etnc-footer {
        padding: 10px 14px 14px;
    }

    .etnc-title {
        font-size: 14px;
    }

    .etnc-teacher-inner {
        padding: 22px 16px 20px;
    }

    .etnc-teacher-footer {
        padding: 0 16px 20px;
    }

    .etnc-style-cover .etnc-card {
        min-height: 260px;
    }
}

@media (max-width: 480px) {
    .etnc-tabs-wrap {
        margin: 0 -4px;
    }

    .etnc-tab {
        padding: 6px 14px;
        font-size: 12px;
    }
}
