/* Шаблоны договоров АРР — тот же neumorphic 3D, что тарифы */

:root {
    --tpl-bg: #f7f3f0;
    --tpl-surface: #ffffff;
    --tpl-green: #00695c;
    --tpl-green-dark: #004d40;
    --tpl-green-glow: rgba(0, 105, 92, 0.28);
    --tpl-orange-1: #ffb74d;
    --tpl-orange-2: #fb8c00;
    --tpl-orange-3: #f57c00;
    --tpl-blue: #4a5bff;
    --tpl-blue-soft: #6ea8ff;
    --tpl-text: #1c1917;
    --tpl-text-muted: #78716c;
    --tpl-shadow-soft: rgba(168, 152, 136, 0.38);
    --tpl-shadow-deep: rgba(120, 100, 80, 0.22);
    --tpl-highlight: rgba(255, 255, 255, 0.92);
    --tpl-radius: 28px;
    --tpl-neu-up: -10px -10px 22px var(--tpl-highlight), 12px 14px 28px var(--tpl-shadow-soft);
    --tpl-neu-up-hover: -12px -12px 26px var(--tpl-highlight), 16px 20px 36px var(--tpl-shadow-deep);
}

.yvo-cabinet-route-templates.yvo-cabinet-virtual,
body.yvo-cabinet-route-templates {
    background: var(--tpl-bg) !important;
}

.yvo-tpl-stage {
    position: relative;
    perspective: 1300px;
    perspective-origin: 50% 18%;
    overflow: hidden;
}

.yvo-tpl-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.yvo-tpl-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: yvoTplOrbDrift 22s ease-in-out infinite;
}

.yvo-tpl-orb--1 {
    width: 380px;
    height: 380px;
    top: -6%;
    left: -4%;
    background: radial-gradient(circle, rgba(251, 140, 0, 0.22), transparent 68%);
}

.yvo-tpl-orb--2 {
    width: 320px;
    height: 320px;
    top: 28%;
    right: -5%;
    background: radial-gradient(circle, rgba(0, 105, 92, 0.16), transparent 70%);
    animation-delay: -8s;
}

.yvo-tpl-orb--3 {
    width: 280px;
    height: 280px;
    bottom: 8%;
    left: 35%;
    background: radial-gradient(circle, rgba(110, 168, 255, 0.18), transparent 70%);
    animation-delay: -15s;
}

@keyframes yvoTplOrbDrift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(14px, -12px); }
}

.yvo-tpl-page {
    position: relative;
    z-index: 1;
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem) clamp(2.5rem, 5vw, 4rem);
    color: var(--tpl-text);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

.yvo-tpl-wrap {
    max-width: 1160px;
    margin: 0 auto;
}

.yvo-tpl-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2rem;
    animation: yvoTplHeadIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.yvo-tpl-head__eyebrow {
    margin: 0 0 0.55rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tpl-green);
}

.yvo-tpl-head__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.9rem, 4.5vw, 2.55rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
    color: var(--tpl-text);
}

.yvo-tpl-head__title span {
    color: var(--tpl-green-dark);
}

.yvo-tpl-head__lead {
    margin: 0 0 1.35rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--tpl-text-muted);
}

.yvo-tpl-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

@keyframes yvoTplHeadIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.yvo-tpl-note.card3d {
    max-width: 820px;
    margin: 0 auto 2rem;
    padding: 1rem 1.25rem;
    border-radius: 20px;
    background: linear-gradient(160deg, #ffffff 0%, #faf7f4 100%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--tpl-neu-up);
}

.yvo-tpl-note p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--tpl-text-muted);
    text-align: center;
}

.yvo-tpl-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 2.2vw, 24px);
    align-items: stretch;
}

.yvo-tpl-card.card3d {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.45rem 1.25rem 1.25rem;
    border-radius: var(--tpl-radius);
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: linear-gradient(160deg, #ffffff 0%, #faf7f4 55%, #f3ede8 100%);
    box-shadow: var(--tpl-neu-up);
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
    overflow: hidden;
    animation: yvoTplCardIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(0.08s + var(--tpl-i, 0) * 0.07s);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.yvo-tpl-card.card3d::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.7) 0%, transparent 38%, transparent 62%, rgba(168, 152, 136, 0.06) 100%);
    pointer-events: none;
}

.yvo-tpl-card.card3d > * {
    position: relative;
    z-index: 2;
}

.yvo-tpl-card.card3d:hover {
    box-shadow: var(--tpl-neu-up-hover);
}

.yvo-tpl-card.card3d.is-tilting {
    transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateZ(12px);
    box-shadow: var(--tpl-neu-up-hover);
}

@keyframes yvoTplCardIn {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.yvo-tpl-card--featured.card3d {
    background: linear-gradient(155deg, var(--tpl-orange-1) 0%, var(--tpl-orange-2) 48%, var(--tpl-orange-3) 100%);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow:
        -10px -10px 24px rgba(255, 255, 255, 0.35),
        14px 18px 36px rgba(245, 124, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.yvo-tpl-card--featured .yvo-tpl-card__title,
.yvo-tpl-card--featured .yvo-tpl-card__desc,
.yvo-tpl-card--featured .yvo-tpl-card__link,
.yvo-tpl-card--featured .yvo-tpl-card__tags li {
    color: #fff;
}

.yvo-tpl-card--orange.card3d {
    background: linear-gradient(155deg, #ffe0b8 0%, #ffb74d 55%, #fb8c00 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.yvo-tpl-card--orange .yvo-tpl-card__title,
.yvo-tpl-card--orange .yvo-tpl-card__desc,
.yvo-tpl-card--orange .yvo-tpl-card__link {
    color: #3e2723;
}

.yvo-tpl-card--blue.card3d,
.yvo-tpl-card--green.card3d {
    background: linear-gradient(155deg, #6ea8ff 0%, #4a5bff 52%, #3f51f5 100%);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow:
        -8px -8px 22px rgba(255, 255, 255, 0.16),
        14px 18px 34px rgba(74, 91, 255, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.yvo-tpl-card--blue .yvo-tpl-card__title,
.yvo-tpl-card--blue .yvo-tpl-card__desc,
.yvo-tpl-card--blue .yvo-tpl-card__link,
.yvo-tpl-card--blue .yvo-tpl-card__tags li,
.yvo-tpl-card--green .yvo-tpl-card__title,
.yvo-tpl-card--green .yvo-tpl-card__desc,
.yvo-tpl-card--green .yvo-tpl-card__link,
.yvo-tpl-card--green .yvo-tpl-card__tags li {
    color: #fff;
}

.yvo-tpl-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 1rem;
    min-height: 48px;
}

.yvo-tpl-card__badge {
    flex: 0 1 auto;
    max-width: calc(100% - 60px);
    margin: 0;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, 0.88);
    color: var(--tpl-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.yvo-tpl-card--featured .yvo-tpl-card__badge,
.yvo-tpl-card--blue .yvo-tpl-card__badge,
.yvo-tpl-card--green .yvo-tpl-card__badge {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.yvo-tpl-card--orange .yvo-tpl-card__badge {
    background: rgba(255, 255, 255, 0.55);
    color: #3e2723;
}

.yvo-tpl-card__icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    margin: 0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tpl-blue);
    background: linear-gradient(145deg, #ffffff, #f3ede8);
    box-shadow:
        -4px -4px 10px rgba(255, 255, 255, 0.9),
        6px 8px 14px rgba(168, 152, 136, 0.28);
}

.yvo-tpl-card__icon svg {
    width: 22px;
    height: 22px;
}

.yvo-tpl-card--featured .yvo-tpl-card__icon,
.yvo-tpl-card--blue .yvo-tpl-card__icon,
.yvo-tpl-card--green .yvo-tpl-card__icon {
    color: #fff;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1));
    box-shadow:
        -4px -4px 10px rgba(255, 255, 255, 0.18),
        6px 8px 14px rgba(0, 0, 0, 0.14);
}

.yvo-tpl-card--orange .yvo-tpl-card__icon {
    color: #bf360c;
}

.yvo-tpl-card__title {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--tpl-text);
}

.yvo-tpl-card__desc {
    margin: 0 0 0.85rem;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--tpl-text-muted);
    flex: 1 1 auto;
}

.yvo-tpl-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.yvo-tpl-card__tags li {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--tpl-text-muted);
    background: rgba(255, 255, 255, 0.55);
}

.yvo-tpl-card__foot {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.yvo-tpl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    border: none;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.yvo-tpl-btn--primary {
    background: linear-gradient(145deg, var(--tpl-green-dark), var(--tpl-green));
    color: #fff !important;
    box-shadow: 0 8px 20px var(--tpl-green-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.yvo-tpl-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 105, 92, 0.38);
}

.yvo-tpl-btn--ghost {
    background: linear-gradient(145deg, #fff5ee, #ffffff);
    color: var(--tpl-text) !important;
    box-shadow: var(--tpl-neu-up);
}

.yvo-tpl-btn--ghost:hover {
    transform: translateY(-2px);
}

.yvo-tpl-btn--download {
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(145deg, var(--tpl-green-dark), var(--tpl-green));
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(0, 105, 92, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.yvo-tpl-card--featured .yvo-tpl-btn--download {
    background: linear-gradient(145deg, #ffffff, #fff5ee);
    color: var(--tpl-orange-3) !important;
}

.yvo-tpl-card--blue .yvo-tpl-btn--download,
.yvo-tpl-card--green .yvo-tpl-btn--download {
    background: linear-gradient(145deg, #ffffff, #eef2ff);
    color: #3f51f5 !important;
}

.yvo-tpl-card--orange .yvo-tpl-btn--download {
    background: linear-gradient(145deg, #3e2723, #5d4037);
    color: #fff !important;
}

.yvo-tpl-card__link {
    display: block;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tpl-text-muted);
    text-decoration: none;
}

.yvo-tpl-card__link:hover {
    text-decoration: underline;
    color: var(--tpl-green);
}

.yvo-tpl-cta.card3d {
    margin-top: 2.5rem;
    padding: clamp(1.35rem, 3vw, 1.85rem);
    border-radius: var(--tpl-radius);
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: linear-gradient(160deg, #ffffff 0%, #faf7f4 100%);
    box-shadow: var(--tpl-neu-up);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.yvo-tpl-cta__title {
    margin: 0 0 0.4rem;
    font-size: 1.35rem;
    font-weight: 800;
}

.yvo-tpl-cta__lead {
    margin: 0;
    color: var(--tpl-text-muted);
    max-width: 520px;
}

.yvo-tpl-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.yvo-tpl-seo {
    margin-top: 2.75rem;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    color: var(--tpl-text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.yvo-tpl-seo h2 {
    margin: 0 0 0.85rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--tpl-text);
}

.yvo-tpl-seo p {
    margin: 0 0 0.85rem;
}

@media (max-width: 1024px) {
    .yvo-tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 599px) {
    .yvo-tpl-grid { grid-template-columns: 1fr; }
    .yvo-tpl-page { padding: 12px 10px 28px; }
    .yvo-tpl-card.card3d { border-radius: 22px; }
    .yvo-tpl-cta.card3d { flex-direction: column; align-items: stretch; }
    .yvo-tpl-cta__actions { width: 100%; }
    .yvo-tpl-cta__actions .yvo-tpl-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .yvo-tpl-orb,
    .yvo-tpl-head,
    .yvo-tpl-card {
        animation: none !important;
    }
    .yvo-tpl-card.card3d.is-tilting {
        transform: none !important;
    }
}
