/* Dexter Sekce Reference v2.2 - Zarovnaná mřížka + MBA/odborné obory se SEO prokliky */
.dxref-wrap {
    max-width: 1220px;
    margin: 0 auto;
    padding: 36px 20px 64px;
    font-family: inherit;
    color: #1e293b;
}

.dxref-hero {
    text-align: center;
    max-width: 840px;
    margin: 0 auto 38px;
}

.dxref-badge {
    display: inline-block;
    background: #fbf6eb;
    color: #9a7328;
    border: 1px solid #ead8b1;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.dxref-title {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
    color: #0f172a;
    margin: 0 0 14px;
    font-weight: 700;
}

.dxref-subtitle {
    font-size: 17px;
    line-height: 1.65;
    color: #475569;
    margin: 0 0 26px;
}

.dxref-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 36px;
    padding: 18px 26px;
    background: #ffffff;
    border: 1px solid #e8ecf2;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.dxref-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dxref-stat-item strong {
    font-size: 24px;
    font-weight: 700;
    color: #b58932;
    line-height: 1.2;
}

.dxref-stat-item span {
    font-size: 13.5px;
    color: #64748b;
    margin-top: 2px;
}

/* Živá vitrína se stabilní výškou */
.dxref-spotlight {
    background: linear-gradient(135deg, #162032 0%, #1f2d46 100%);
    color: #f8fafc;
    border-radius: 20px;
    padding: 26px 32px 22px;
    margin-bottom: 36px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    position: relative;
    overflow: hidden;
}

.dxref-spotlight-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.dxref-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d4af37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.22);
    animation: dxrefPulse 2.4s infinite;
}

@keyframes dxrefPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.18); }
}

.dxref-spotlight-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #e2c778;
    font-weight: 600;
}

.dxref-spotlight-nav {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.dxref-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.dxref-nav-btn:hover {
    background: #c59b38;
    border-color: #c59b38;
    transform: translateY(-1px);
}

.dxref-spotlight-body {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 186px;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.dxref-spotlight-body.is-fading {
    opacity: 0;
    transform: translateY(5px);
}

.dxref-spotlight-media {
    flex: 0 0 180px;
    height: 180px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(226, 199, 120, 0.45);
    background: #0f172a;
}

.dxref-spotlight-media.is-hidden {
    display: none;
}

.dxref-spotlight-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    display: block;
}

.dxref-spotlight-content {
    flex: 1;
}

.dxref-stars {
    color: #e5b842;
    font-size: 15px;
    line-height: 1;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.dxref-spotlight-quote {
    margin: 0 0 14px;
    padding: 0;
    border: none;
    font-size: clamp(15.5px, 1.8vw, 18.5px);
    line-height: 1.62;
    color: #f8fafc;
    font-style: normal;
}

.dxref-spotlight-author strong {
    display: block;
    font-size: 16px;
    color: #ffffff;
}

.dxref-spot-link {
    display: inline-block;
    font-size: 13.5px;
    color: #e2c778 !important;
    text-decoration: none !important;
    margin-top: 2px;
    transition: color 0.2s ease;
}

.dxref-spot-link:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.dxref-spot-link.is-hidden {
    display: none;
}

.dxref-progress-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    margin-top: 20px;
    overflow: hidden;
}

.dxref-progress-bar {
    height: 100%;
    width: 0%;
    background: #d4af37;
    transition: width 0.1s linear;
}

/* Filtry a lišta */
.dxref-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 26px;
}

.dxref-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dxref-tab {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #dce3ec;
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.dxref-tab:hover {
    border-color: #c59b38;
    color: #0f172a;
}

.dxref-tab.is-active {
    background: #162032;
    color: #ffffff;
    border-color: #162032;
}

.dxref-count {
    background: rgba(148, 163, 184, 0.22);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.dxref-tab.is-active .dxref-count {
    background: rgba(212, 175, 55, 0.28);
    color: #f6dc8b;
}

.dxref-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.dxref-search {
    padding: 9px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    font-size: 14px;
    min-width: 235px;
    background: #fff;
}

.dxref-shuffle-btn {
    background: #fbf6eb;
    color: #8a651e;
    border: 1px solid #e6d2a2;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dxref-shuffle-btn:hover {
    background: #f3e6c8;
}

/* Zarovnaná mřížka karet (CSS Grid - vše v jedné vodorovné rovině) */
.dxref-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

@media (max-width: 980px) {
    .dxref-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dxref-spotlight-body { flex-direction: column; align-items: flex-start; min-height: 0; }
    .dxref-spotlight-media { width: 140px; height: 140px; flex: none; }
}

@media (max-width: 640px) {
    .dxref-grid { grid-template-columns: 1fr; }
    .dxref-spotlight { padding: 20px; }
    .dxref-search { width: 100%; }
}

.dxref-card {
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.dxref-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
}

.dxref-card.has-photo {
    border-color: #ead9b5;
}

/* Jednotná výška všech fotografií v řádku */
.dxref-card-photo {
    position: relative;
    cursor: zoom-in;
    overflow: hidden;
    background: #f1f5f9;
    height: 230px;
    flex-shrink: 0;
}

.dxref-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    display: block;
    transition: transform 0.35s ease;
}

.dxref-card-photo:hover img {
    transform: scale(1.03);
}

.dxref-zoom-hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(15, 23, 42, 0.74);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.dxref-card-photo:hover .dxref-zoom-hint {
    opacity: 1;
}

.dxref-card-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dxref-card-text-wrap {
    display: flex;
    flex-direction: column;
}

/* Sjednocená výška 4 řádků ve sbaleném stavu -> všechny karty v řádku lícují na pixel přesně */
.dxref-card-text {
    font-size: 15px;
    line-height: 1.62;
    color: #334155;
    margin: 0;
}

.dxref-card-text.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(15px * 1.62 * 4);
}

.dxref-card.is-expanded .dxref-card-text {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}

.dxref-readmore-row {
    min-height: 24px;
    margin-top: 6px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.dxref-readmore-btn {
    background: none;
    border: none;
    padding: 0;
    color: #9a7328;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.18s ease;
}

.dxref-readmore-btn:hover {
    color: #162032;
    text-decoration: underline;
}

.dxref-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
    min-height: 54px;
}

.dxref-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fbf4e4;
    color: #9a7328;
    font-weight: 700;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #ead8b1;
}

.dxref-meta {
    min-width: 0;
    flex: 1;
}

.dxref-meta strong {
    display: block;
    font-size: 14.5px;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dxref-course-link,
.dxref-meta span {
    display: block;
    font-size: 12.5px;
    color: #8a651e !important;
    text-decoration: none !important;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.18s ease;
}

.dxref-course-link:hover {
    color: #0f172a !important;
    text-decoration: underline !important;
}

.dxref-more-wrap {
    text-align: center;
    margin-top: 32px;
}

.dxref-more-btn {
    background: #162032;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.dxref-more-btn:hover {
    background: #b58932;
    transform: translateY(-1px);
}

/* Lightbox */
.dxref-lightbox[hidden] {
    display: none !important;
}

.dxref-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.dxref-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(3px);
}

.dxref-lightbox-dialog {
    position: relative;
    z-index: 2;
    max-width: 860px;
    max-height: 90vh;
    background: #0f172a;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.dxref-lightbox-dialog img {
    max-width: 100%;
    max-height: 76vh;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.dxref-lightbox-caption {
    color: #f1f5f9;
    font-size: 14.5px;
    padding: 12px 14px 6px;
    line-height: 1.5;
}

.dxref-lightbox-x {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #d4af37;
    color: #0f172a;
    border: none;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

/* Numbered Pagination & Admin Auto-Translation Bar (v1.2.0) */
.dxref-pagination-wrap {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dxref-page-info {
    font-size: 13.5px;
    color: #64748b;
    font-weight: 500;
}

.dxref-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.dxref-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.16s ease;
}

.dxref-page-btn:hover:not(:disabled) {
    border-color: #b58932;
    color: #b58932;
    transform: translateY(-1px);
}

.dxref-page-btn.is-active {
    background: #162032;
    color: #f6dc8b;
    border-color: #b58932;
    cursor: default;
}

.dxref-page-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.dxref-page-dots {
    color: #94a3b8;
    font-weight: 700;
    padding: 0 4px;
}

.dxref-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #ead8b1;
}

.dxref-admin-sync-bar {
    background: #0f1b33;
    color: #f8fafc;
    border: 1.5px solid #c5a059;
    border-radius: 14px;
    padding: 14px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13.5px;
}

.dxref-admin-sync-bar strong {
    color: #f6dc8b;
}

.dxref-admin-sync-btn {
    background: #c5a059;
    color: #0b1324;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}
