/* ==========================================================================
   MATRITSATA - VIDEO EMBED FRAMES & RICH LINK PREVIEW CARDS
   ========================================================================== */

/* 1. Video Embed Frames & Responsive Players */
.article-entry-content>.matritsata-embed-frame,
.article-entry-content>.wp-block-embed,
.article-entry-content>figure.wp-block-embed,
.article-entry-content>iframe {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.matritsata-embed-frame {
    width: 100%;
    margin-top: 32px;
    margin-bottom: 32px;
    clear: both;
}

.matritsata-embed-responsive {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000000;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid #1E1E24;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.matritsata-embed-responsive:hover {
    border-color: #383842;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.matritsata-embed-responsive iframe,
.matritsata-embed-responsive object,
.matritsata-embed-responsive embed,
.matritsata-embed-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
}

.matritsata-embed-frame.matritsata-embed-vertical {
    max-width: 460px !important;
    margin-left: auto;
    margin-right: auto;
}

.matritsata-embed-frame.matritsata-embed-instagram {
    max-width: 480px !important;
    margin: 32px auto;
}

.matritsata-aspect-instagram {
    aspect-ratio: auto !important;
    height: 580px !important;
    background: #09090C !important;
    border: 1px solid #24242A !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25) !important;
}

.matritsata-embed-frame.matritsata-embed-facebook-reel {
    max-width: 440px !important;
    margin: 32px auto;
}

.matritsata-aspect-facebook-reel {
    aspect-ratio: 9 / 16 !important;
    max-height: 720px;
    background-color: #000000;
}

.matritsata-aspect-tiktok {
    aspect-ratio: 9 / 16 !important;
    max-height: 720px;
}

.matritsata-embed-frame.matritsata-embed-facebook-post {
    max-width: 500px;
    margin: 32px auto;
    display: flex;
    justify-content: center;
}

@supports not (aspect-ratio: 16 / 9) {
    .matritsata-embed-responsive:not(.matritsata-aspect-instagram) {
        height: 0;
        padding-bottom: 56.25%;
    }
}

.matritsata-embed-general {
    display: flex;
    justify-content: center;
    margin: 28px auto;
    overflow: hidden;
}

/* 2. Rich Link Preview Cards */
.article-entry-content>.matritsata-link-preview-card,
.matritsata-link-preview-card {
    width: 100%;
    max-width: 760px;
    margin: 28px auto;
    clear: both;
}

.link-preview-card-inner {
    display: flex;
    align-items: stretch;
    background: #FFFFFF;
    border: 1px solid #E2E2E6;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    position: relative;
}

.link-preview-card-inner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3.5px;
    background: var(--color-accent-red, #E50914);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.link-preview-card-inner:hover {
    border-color: #C8C8D0;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
}

.link-preview-card-inner:hover::before {
    opacity: 1;
}

.link-preview-body {
    flex: 1 1 auto;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.link-preview-meta-top {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    line-height: 1 !important;
}

.link-preview-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: var(--color-accent-red, #E50914) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.link-preview-badge .square-bullet {
    width: 5px !important;
    height: 5px !important;
    background-color: var(--color-accent-red, #E50914) !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
}

.link-preview-badge-text {
    line-height: 1 !important;
}

.link-preview-meta-divider {
    font-size: 0.8rem !important;
    color: #A0A0A8 !important;
    line-height: 1 !important;
    user-select: none !important;
}

.link-preview-date {
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    color: #8E8E94 !important;
    letter-spacing: 0.02em !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.link-preview-title {
    font-family: var(--font-serif, 'Lora', serif);
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.32;
    color: #111113 !important;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.link-preview-card-inner:hover .link-preview-title {
    color: var(--color-accent-red, #E50914) !important;
}

.link-preview-excerpt {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.86rem;
    line-height: 1.5;
    color: #55555E;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #F0F0F4;
    font-size: 0.75rem;
    color: #8E8E94;
}

.link-preview-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64646E;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.72rem;
}

.link-preview-source svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    color: var(--color-accent-red, #E50914);
}

.link-preview-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-text-main, #111113);
    font-weight: 700;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.15s ease;
}

.link-preview-card-inner:hover .link-preview-action {
    color: var(--color-accent-red, #E50914);
}

.link-preview-thumb-wrap {
    flex: 0 0 200px;
    max-width: 200px;
    position: relative;
    overflow: hidden;
    background-color: #F0F0F2;
}

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

.link-preview-card-inner:hover .link-preview-thumb-img {
    transform: scale(1.04);
}

.article-entry-content blockquote.wp-embedded-content {
    display: none !important;
}

.article-entry-content iframe.wp-embedded-content {
    background-color: transparent !important;
}