/* Site Videos — light cinematic section + standalone library page */

.sv-section {
    --sv-ink: #0b1220;
    --sv-muted: #5b6b7f;
    --sv-teal: #0f9d8a;
    --sv-sky: #1a7fc4;
    --sv-line: rgba(15, 35, 55, 0.08);
    position: relative;
    width: 100%;
    margin: 0 !important;
    padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(3.2rem, 6vw, 5rem);
    overflow: hidden;
    color: var(--sv-ink);
    border: none !important;
    background: linear-gradient(180deg, #f5f3ff 0%, #f7fafc 22%, #eef6f8 70%, #f3f7fb 100%);
    isolation: isolate;
}

.sv-section__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 55% 45% at 12% 30%, rgba(15, 157, 138, 0.11), transparent 60%),
        radial-gradient(ellipse 50% 40% at 88% 70%, rgba(26, 127, 196, 0.1), transparent 58%);
}

.sv-section__inner {
    position: relative;
    z-index: 1;
}

.sv-head {
    max-width: 640px;
    margin: 0 auto clamp(1.75rem, 3.5vw, 2.5rem);
    text-align: center;
}

.sv-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    margin: 0 0 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #0f766e !important;
    background: rgba(15, 157, 138, 0.12);
    border: 1px solid rgba(15, 157, 138, 0.18);
}

.sv-head h2,
.landing-tech .sv-section .sv-head h2 {
    margin: 0 0 10px;
    font-size: clamp(1.45rem, 2.8vw, 2rem);
    font-weight: 900;
    line-height: 1.4;
    color: var(--sv-ink) !important;
}

.sv-head p,
.landing-tech .sv-section .sv-head p {
    margin: 0 auto;
    max-width: 520px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    color: var(--sv-muted) !important;
}

/* Showcase grid */
.sv-showcase,
.sv-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 18px);
}

.sv-grid--all {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sv-card {
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--sv-line);
    box-shadow: 0 14px 34px rgba(15, 35, 55, 0.06);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
    animation: sv-rise 0.65s ease both;
    min-width: 0;
}

.sv-card[hidden] {
    display: none !important;
}

.sv-card:nth-child(1) { animation-delay: 0.04s; }
.sv-card:nth-child(2) { animation-delay: 0.1s; }
.sv-card:nth-child(3) { animation-delay: 0.16s; }
.sv-card:nth-child(4) { animation-delay: 0.22s; }
.sv-card:nth-child(n+5) { animation-delay: 0.28s; }

.sv-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(15, 35, 55, 0.11);
}

.sv-card__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    padding: 0;
    border: none;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(155deg, #123047 0%, #0f766e 52%, #1d4ed8 120%);
    color: inherit;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.sv-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.sv-card:hover .sv-card__media img {
    transform: scale(1.05);
}

.sv-card__ph {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.14), transparent 45%),
        linear-gradient(155deg, #123047, #0f766e 55%, #2563eb);
}

.sv-card__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.22) 48%, transparent 62%);
    transform: translateX(-120%);
    transition: transform 0.7s ease;
    pointer-events: none;
}

.sv-card:hover .sv-card__shine {
    transform: translateX(120%);
}

.sv-card__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.sv-card__play i {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #0f766e;
    font-size: 15px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    transform: scale(0.96);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    padding-right: 2px;
}

.sv-card:hover .sv-card__play i {
    transform: scale(1.06);
    box-shadow: 0 16px 34px rgba(15, 118, 110, 0.32);
}

.sv-card__tag {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    max-width: calc(100% - 20px);
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(8, 16, 28, 0.72);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sv-card__body {
    padding: 14px 15px 16px;
    display: grid;
    gap: 6px;
    flex: 1;
    background: #fff;
    min-width: 0;
}

.sv-card__body h3,
.sv-card__body strong,
.landing-tech .sv-section .sv-card__body h3,
.landing-tech .sv-section .sv-card__body strong {
    margin: 0;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    font-weight: 900;
    line-height: 1.45;
    color: var(--sv-ink) !important;
    overflow-wrap: anywhere;
}

.sv-card__path {
    display: block;
    font-size: 11.5px;
    font-weight: 800;
    color: #0f766e !important;
    line-height: 1.5;
}

.sv-card__body p,
.landing-tech .sv-section .sv-card__body p {
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.7;
    color: var(--sv-muted) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Empty / coming-soon ghost cards */
.sv-card--ghost {
    pointer-events: none;
}

.sv-card--ghost .sv-card__media {
    cursor: default;
    background:
        linear-gradient(145deg, #dbe7ef 0%, #c5dde0 45%, #c7d7f0 100%);
}

.sv-card--ghost:nth-child(2) .sv-card__media {
    background: linear-gradient(145deg, #d4e4f2, #c9ebe4 50%, #d7dff5);
}

.sv-card--ghost:nth-child(3) .sv-card__media {
    background: linear-gradient(145deg, #0f766e, #0e7490 55%, #1d4ed8);
}

.sv-card--ghost:nth-child(4) .sv-card__media {
    background: linear-gradient(145deg, #e2e8f0, #d1e7e4 50%, #dbe4f5);
}

.sv-card--ghost .sv-card__play i {
    background: rgba(255, 255, 255, 0.88);
    color: #0f766e;
    box-shadow: 0 10px 22px rgba(15, 35, 55, 0.12);
}

.sv-card--ghost.is-featured {
    box-shadow: 0 18px 40px rgba(15, 118, 110, 0.16);
    border-color: rgba(15, 157, 138, 0.22);
}

.sv-skel {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e8eef5 20%, #f4f7fb 50%, #e8eef5 80%);
    background-size: 200% 100%;
    animation: sv-shimmer 1.6s ease-in-out infinite;
}

.sv-skel--title {
    width: 72%;
    height: 12px;
    margin-bottom: 2px;
}

.sv-skel:not(.sv-skel--title) {
    width: 92%;
}

.sv-section__cta {
    display: flex;
    justify-content: center;
    margin-top: clamp(1.5rem, 3vw, 2.1rem);
}

.sv-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    color: #fff !important;
    background: linear-gradient(135deg, #0f9d8a 0%, #1a7fc4 100%);
    box-shadow: 0 14px 30px rgba(26, 127, 196, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sv-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 157, 138, 0.28);
    color: #fff !important;
}

.sv-all-btn i {
    font-size: 13px;
}

.sv-empty {
    text-align: center;
    padding: clamp(2.2rem, 4vw, 3.2rem) 1.25rem;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--sv-line);
    box-shadow: 0 12px 30px rgba(15, 35, 55, 0.05);
    color: var(--sv-ink);
}

.sv-empty i {
    font-size: 1.8rem;
    color: var(--sv-teal);
    margin-bottom: 12px;
}

.sv-empty h2,
.landing-tech .sv-section .sv-empty h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--sv-ink) !important;
}

.sv-empty p,
.landing-tech .sv-section .sv-empty p {
    margin: 0 0 18px;
    color: var(--sv-muted) !important;
    font-weight: 600;
}

.sv-empty--filter {
    margin-top: 8px;
}

.sv-empty--filter[hidden] {
    display: none !important;
}

/* Filters on library page */
.sv-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 0 1.25rem;
    padding: 2px 2px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.sv-filters::-webkit-scrollbar {
    display: none;
}

.sv-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 35, 55, 0.1);
    background: #fff;
    color: #475569;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sv-filter i {
    font-size: 11px;
    opacity: 0.85;
}

.sv-filter:hover {
    border-color: rgba(15, 157, 138, 0.35);
    color: #0f766e;
}

.sv-filter.is-active {
    color: #fff;
    background: linear-gradient(135deg, #0f9d8a 0%, #1a7fc4 100%);
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(26, 127, 196, 0.2);
}

/* Standalone /Site/Videos page */
.sv-page {
    --sv-ink: #0b1220;
    --sv-muted: #5b6b7f;
    --sv-teal: #0f9d8a;
    --sv-sky: #1a7fc4;
    --sv-line: rgba(15, 35, 55, 0.1);
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
    color: var(--sv-ink);
    font-family: IranSans, Tahoma, sans-serif;
    padding: 0 0 100px;
    background:
        radial-gradient(900px 420px at 92% -8%, rgba(15, 157, 138, 0.12), transparent 55%),
        radial-gradient(700px 380px at 0% 18%, rgba(26, 127, 196, 0.1), transparent 50%),
        linear-gradient(180deg, #f8fafc 0%, #eef5f8 45%, #f4f7fb 100%);
}

.sv-page *,
.sv-page *::before,
.sv-page *::after {
    box-sizing: border-box;
}

.sv-page__top {
    max-width: 1100px;
    margin: 0 auto;
    padding: 22px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sv-page__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.sv-page__brand img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
}

.sv-page__brand strong {
    display: block;
    font-size: 15px;
    font-weight: 900;
    color: var(--sv-ink);
}

.sv-page__brand small {
    display: block;
    color: var(--sv-muted);
    font-size: 12px;
    font-weight: 600;
}

.sv-page__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--sv-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 35, 55, 0.08);
}

.sv-page__back:hover {
    color: var(--sv-teal);
}

.sv-page__hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.2rem) 20px 0.75rem;
    text-align: center;
}

.sv-page__eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sv-teal);
}

.sv-page__hero h1 {
    margin: 0 0 10px;
    font-size: clamp(1.6rem, 4vw, 2.35rem);
    font-weight: 900;
    color: var(--sv-ink);
    line-height: 1.35;
}

.sv-page__hero > p {
    margin: 0 auto;
    max-width: 540px;
    color: var(--sv-muted);
    font-weight: 600;
    line-height: 1.8;
    font-size: 14px;
}

.sv-page__content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 20px clamp(3rem, 6vw, 4rem);
}

.sv-page .sv-empty {
    background: #fff;
}

body:has(.sv-page) {
    margin: 0;
    overflow-x: hidden;
    background: #f4f7fb;
}

/* Player modal */
.sv-player[hidden] {
    display: none !important;
}

.sv-player {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.sv-player__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 16, 28, 0.62);
    backdrop-filter: blur(6px);
}

.sv-player__panel {
    position: relative;
    width: min(920px, 100%);
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(8, 16, 28, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.35);
    animation: sv-pop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sv-player__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(15, 35, 55, 0.08);
}

.sv-player__head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 900;
    color: #0b1220;
    line-height: 1.4;
}

.sv-player__close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    flex-shrink: 0;
}

.sv-player__stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0b1220;
}

.sv-player__stage iframe,
.sv-player__stage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}

@keyframes sv-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sv-pop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@media (max-width: 1100px) {
    .sv-showcase,
    .sv-grid,
    .sv-grid--all {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    /* Homepage: horizontal snap rail instead of tall stacked cards */
    .sv-section .sv-showcase {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding: 4px 2px 14px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
        margin-inline: -4px;
    }

    .sv-section .sv-showcase::-webkit-scrollbar {
        display: none;
    }

    .sv-section .sv-showcase > .sv-card {
        flex: 0 0 min(78vw, 280px);
        scroll-snap-align: start;
        max-width: 280px;
    }

    .sv-section .sv-showcase > .sv-card:hover {
        transform: none;
    }

    .sv-grid--all {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 640px) {
    .sv-section {
        padding: 2.2rem 0 2rem;
    }

    .sv-head {
        margin-bottom: 1.25rem;
        padding: 0 2px;
    }

    .sv-head h2,
    .landing-tech .sv-section .sv-head h2 {
        font-size: 1.28rem;
        line-height: 1.45;
    }

    .sv-head p,
    .landing-tech .sv-section .sv-head p {
        font-size: 13px;
        line-height: 1.75;
    }

    .sv-card {
        border-radius: 18px;
        box-shadow: 0 10px 24px rgba(15, 35, 55, 0.06);
    }

    .sv-card:hover {
        transform: none;
    }

    .sv-card__media {
        aspect-ratio: 16 / 9;
    }

    .sv-card__play i {
        width: 46px;
        height: 46px;
        font-size: 14px;
    }

    .sv-card__body {
        padding: 12px 13px 14px;
        gap: 5px;
    }

    .sv-card__body h3,
    .landing-tech .sv-section .sv-card__body h3 {
        font-size: 0.95rem;
    }

    .sv-card__body p,
    .landing-tech .sv-section .sv-card__body p {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .sv-all-btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }

    .sv-section__cta {
        margin-top: 1.15rem;
    }

    .sv-player {
        padding: 0;
        align-items: stretch;
        place-items: stretch;
    }

    .sv-player__panel {
        border-radius: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        max-height: 100%;
    }

    .sv-player__stage {
        flex: 1;
        aspect-ratio: auto;
        min-height: 0;
    }

    .sv-page {
        padding-bottom: 110px;
    }

    .sv-page__top {
        padding: 14px 14px 0;
        gap: 10px;
    }

    .sv-page__brand img {
        width: 40px;
        height: 40px;
        border-radius: 11px;
    }

    .sv-page__brand strong {
        font-size: 13.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 46vw;
    }

    .sv-page__brand small {
        font-size: 11px;
    }

    .sv-page__back {
        padding: 0 10px;
        font-size: 12px;
        min-height: 38px;
    }

    .sv-page__back span {
        display: none;
    }

    .sv-page__hero {
        padding: 1.35rem 14px 0.4rem;
        text-align: right;
    }

    .sv-page__hero h1 {
        font-size: 1.45rem;
        line-height: 1.4;
    }

    .sv-page__hero > p {
        font-size: 13px;
        margin: 0;
        max-width: none;
        text-align: right;
    }

    .sv-page__content {
        padding: 1rem 14px 2.5rem;
    }

    .sv-filters {
        margin: 0 -14px 1rem;
        padding: 0 14px 10px;
    }

    .sv-filter {
        min-height: 38px;
        padding: 0 12px;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sv-card,
    .sv-card__media img,
    .sv-card__shine,
    .sv-skel,
    .sv-player__panel {
        animation: none !important;
        transition: none !important;
    }
}
