@charset "utf-8";

/* ============================================
   텔레그램 미디어 편집기 종합 가이드
   접두사: tg-med- (기존 사이트 오염 방지)
   CSS 변수 접두사: --tgme-
   컬러 톤: 딥 인디고(Deep Indigo) + 웜 오렌지(Warm Orange)
============================================ */

:root {
    --tgme-indigo: #4f46e5;
    --tgme-indigo-dark: #4338ca;
    --tgme-indigo-deep: #312e81;
    --tgme-indigo-light: #eef2ff;
    --tgme-indigo-border: #a5b4fc;
    --tgme-orange: #f97316;
    --tgme-orange-dark: #ea580c;
    --tgme-orange-light: #fff7ed;
    --tgme-orange-border: #fdba74;
    --tgme-slate-900: #0f172a;
    --tgme-slate-700: #334155;
    --tgme-slate-500: #64748b;
    --tgme-slate-300: #cbd5e1;
    --tgme-slate-200: #e2e8f0;
    --tgme-slate-100: #f1f5f9;
    --tgme-bg: #f8f8ff;
    --tgme-white: #ffffff;
    --tgme-radius: 14px;
}

/* ─── 래퍼 ─── */
.tg-med-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    color: var(--tgme-slate-500);
    background-color: var(--tgme-bg);
    box-sizing: border-box;
    line-height: 1.7;
    overflow: hidden;
    padding-bottom: 60px;
}

.tg-med-wrapper *,
.tg-med-wrapper *::before,
.tg-med-wrapper *::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

.tg-med-wrapper strong {
    font-weight: 700;
    color: var(--tgme-slate-900);
}

.tg-med-wrapper mark {
    background: linear-gradient(120deg, var(--tgme-orange-light) 0%, #fed7aa 100%);
    color: #9a3412;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

/* ─── 히어로 ─── */
.tg-med-hero {
    background: linear-gradient(145deg, #312e81 0%, #3730a3 30%, #4f46e5 60%, #818cf8 100%);
    color: var(--tgme-white);
    padding: 60px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tg-med-hero::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    border: 60px solid rgba(79, 70, 229, 0.06);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.tg-med-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border: 40px solid rgba(165, 180, 252, 0.04);
    border-radius: 50%;
    bottom: -60px;
    left: -50px;
}

.tg-med-hero__floating {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.tg-med-hero__float-icon {
    position: absolute;
    font-size: 28px;
    opacity: 0.18;
    animation: tg-med-float 6s ease-in-out infinite;
}

.tg-med-hero__float-icon i {
    color: rgba(255, 255, 255, 0.9);
}

.tg-med-hero__float-icon--1 {
    top: 14%;
    left: 8%;
    animation-delay: 0s;
}

.tg-med-hero__float-icon--2 {
    top: 20%;
    right: 12%;
    animation-delay: 1s;
    font-size: 24px;
}

.tg-med-hero__float-icon--3 {
    bottom: 22%;
    left: 15%;
    animation-delay: 2s;
}

.tg-med-hero__float-icon--4 {
    bottom: 16%;
    right: 8%;
    animation-delay: 3s;
    font-size: 22px;
}

.tg-med-hero__float-icon--5 {
    top: 55%;
    left: 4%;
    animation-delay: 4s;
    font-size: 20px;
}

.tg-med-hero__float-icon--6 {
    top: 10%;
    right: 30%;
    animation-delay: 5s;
    font-size: 18px;
}

@keyframes tg-med-float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-12px) rotate(8deg);
    }
}

.tg-med-hero__inner {
    position: relative;
    z-index: 1;
}

.tg-med-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(249, 115, 22, 0.2);
    color: var(--tgme-orange-border);
    font-size: 14px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 100px;
    margin-bottom: 22px;
    border: 1px solid rgba(253, 186, 116, 0.25);
    backdrop-filter: blur(4px);
}

.tg-med-hero__badge i {
    font-size: 16px;
}

.tg-med-hero__title {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 18px;
    color: var(--tgme-white);
}

.tg-med-hero__desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 620px;
    margin: 0 auto;
}

/* ─── 메인 ─── */
.tg-med-main {
    padding: 30px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ─── 도입부 ─── */
.tg-med-intro {
    background-color: var(--tgme-white);
    padding: 28px 24px;
    border-radius: var(--tgme-radius);
    border-left: 4px solid var(--tgme-indigo);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.tg-med-intro p {
    font-size: 16px;
    margin-bottom: 14px;
}

.tg-med-intro p:last-child {
    margin-bottom: 0;
}

/* ─── 섹션 공통 ─── */
.tg-med-section {
    background-color: var(--tgme-white);
    padding: 34px 24px;
    border-radius: var(--tgme-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--tgme-slate-200);
}

.tg-med-section--accent {
    background: linear-gradient(135deg, var(--tgme-indigo-light) 0%, #c7d2fe40 100%);
    border-color: var(--tgme-indigo-border);
}

.tg-med-section--dark {
    background: linear-gradient(135deg, var(--tgme-slate-900) 0%, #1e293b 100%);
    border-color: var(--tgme-slate-700);
    color: var(--tgme-slate-300);
}

.tg-med-section--demo {
    background: linear-gradient(135deg, var(--tgme-orange-light) 0%, #fde68a40 50%, #fef3c740 100%);
    border-color: var(--tgme-orange-border);
}

.tg-med-section__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.tg-med-section__num {
    font-size: 38px;
    font-weight: 900;
    color: var(--tgme-indigo);
    opacity: 0.2;
    line-height: 1;
    flex-shrink: 0;
}

.tg-med-section__num--accent {
    opacity: 0.25;
}

.tg-med-section__tip-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--tgme-orange) 0%, #fb923c 100%);
    color: var(--tgme-white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.tg-med-section__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--tgme-slate-900);
    line-height: 1.35;
    padding-top: 6px;
}

.tg-med-section__title--light {
    color: var(--tgme-white);
}

.tg-med-section__desc {
    font-size: 16px;
    margin-bottom: 24px;
}

/* ─── 변수 그리드 (10종) ─── */
.tg-med-var-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tg-med-var-card {
    padding: 16px;
    border-radius: 10px;
    background-color: var(--tgme-white);
    border: 1px solid var(--tgme-indigo-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.tg-med-var-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.1);
}

.tg-med-var-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--tgme-indigo) 0%, var(--tgme-indigo-dark) 100%);
    color: var(--tgme-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin: 0 auto 8px;
}

.tg-med-var-card__name {
    font-size: 14px;
    font-weight: 800;
    color: var(--tgme-slate-900);
    margin-bottom: 1px;
}

.tg-med-var-card__eng {
    font-size: 10px;
    font-weight: 600;
    color: var(--tgme-indigo);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tg-med-var-card__desc {
    font-size: 11px;
    line-height: 1.55;
}

/* ─── 스텝 카드 ─── */
.tg-med-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tg-med-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background-color: var(--tgme-white);
    border: 1px solid var(--tgme-slate-200);
    border-radius: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tg-med-step:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.1);
}

.tg-med-step__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--tgme-indigo) 0%, var(--tgme-indigo-dark) 100%);
    color: var(--tgme-white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.tg-med-step__body {
    flex: 1;
}

.tg-med-step__num {
    font-size: 11px;
    font-weight: 800;
    color: var(--tgme-orange);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.tg-med-step__title {
    font-size: 16px;
    font-weight: 800;
    color: var(--tgme-slate-900);
    margin-bottom: 4px;
}

.tg-med-step__text {
    font-size: 14px;
    line-height: 1.6;
}

/* ─── 보정 데모 ─── */
.tg-med-demo {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tg-med-demo__preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--tgme-orange-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tg-med-demo__scene {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    transition: filter 0.3s ease;
}

.tg-med-demo__sky {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(180deg, #64748b 0%, #94a3b8 40%, #cbd5e1 100%);
    transition: background 0.4s ease;
}

.tg-med-demo__mountain {
    position: absolute;
    bottom: 32%;
    left: 0;
    right: 0;
    height: 38%;
    background: linear-gradient(135deg, #475569 0%, #334155 50%, #1e293b 100%);
    clip-path: polygon(0% 100%, 10% 40%, 25% 70%, 40% 20%, 55% 55%, 70% 15%, 85% 45%, 100% 30%, 100% 100%);
    transition: background 0.4s ease;
}

.tg-med-demo__ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 38%;
    background: linear-gradient(180deg, #475569 0%, #334155 100%);
    transition: background 0.4s ease;
}

.tg-med-demo__sun {
    position: absolute;
    top: 15%;
    right: 20%;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle, #94a3b8 0%, #64748b40 70%);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.tg-med-demo__tree {
    position: absolute;
    bottom: 32%;
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 50px solid #334155;
    transition: border-color 0.4s ease;
}

.tg-med-demo__tree--1 {
    left: 20%;
    border-bottom-width: 55px;
}

.tg-med-demo__tree--2 {
    left: 28%;
    border-bottom-width: 40px;
    border-left-width: 10px;
    border-right-width: 10px;
}

.tg-med-demo__cloud {
    position: absolute;
    width: 50px;
    height: 16px;
    background: rgba(148, 163, 184, 0.3);
    border-radius: 16px;
    transition: background 0.4s ease;
}

.tg-med-demo__cloud--1 {
    top: 18%;
    left: 12%;
}

.tg-med-demo__cloud--2 {
    top: 26%;
    left: 52%;
    width: 40px;
    height: 12px;
}

.tg-med-demo__vignette {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, transparent 100%);
    transition: background 0.4s ease;
}

.tg-med-demo__info {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--tgme-white);
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

/* 슬라이더 패널 */
.tg-med-demo__panel {
    background-color: var(--tgme-white);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--tgme-orange-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tg-med-demo__slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tg-med-demo__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--tgme-slate-700);
    width: 68px;
    flex-shrink: 0;
}

.tg-med-demo__label i {
    color: var(--tgme-indigo);
    margin-right: 3px;
    font-size: 11px;
}

.tg-med-demo__slider {
    flex: 1;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, var(--tgme-slate-200) 0%, var(--tgme-indigo-border) 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.tg-med-demo__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tgme-indigo) 0%, var(--tgme-indigo-dark) 100%);
    border: 2px solid var(--tgme-white);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
    cursor: pointer;
}

.tg-med-demo__slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tgme-indigo) 0%, var(--tgme-indigo-dark) 100%);
    border: 2px solid var(--tgme-white);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
    cursor: pointer;
}

.tg-med-demo__slider--warmth {
    background: linear-gradient(90deg, #60a5fa 0%, #fb923c 100%);
}

.tg-med-demo__slider--warmth::-webkit-slider-thumb {
    background: linear-gradient(135deg, var(--tgme-orange) 0%, var(--tgme-orange-dark) 100%);
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
}

.tg-med-demo__slider--warmth::-moz-range-thumb {
    background: linear-gradient(135deg, var(--tgme-orange) 0%, var(--tgme-orange-dark) 100%);
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
}

.tg-med-demo__slider--vignette {
    background: linear-gradient(90deg, var(--tgme-slate-200) 0%, var(--tgme-slate-900) 100%);
}

.tg-med-demo__slider--vignette::-webkit-slider-thumb {
    background: linear-gradient(135deg, var(--tgme-slate-700) 0%, var(--tgme-slate-900) 100%);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.3);
}

.tg-med-demo__slider--vignette::-moz-range-thumb {
    background: linear-gradient(135deg, var(--tgme-slate-700) 0%, var(--tgme-slate-900) 100%);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.3);
}

.tg-med-demo__slider--fade {
    background: linear-gradient(90deg, var(--tgme-slate-200) 0%, #a78bfa 100%);
}

.tg-med-demo__slider--fade::-webkit-slider-thumb {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

.tg-med-demo__slider--fade::-moz-range-thumb {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

.tg-med-demo__val {
    font-size: 12px;
    font-weight: 800;
    color: var(--tgme-indigo);
    width: 30px;
    text-align: right;
    flex-shrink: 0;
}

.tg-med-demo__reset {
    width: 100%;
    padding: 10px;
    background-color: var(--tgme-slate-100);
    color: var(--tgme-slate-500);
    border: 1px solid var(--tgme-slate-200);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tg-med-demo__reset:hover {
    background-color: var(--tgme-slate-200);
    color: var(--tgme-slate-700);
}

/* ─── 팁 ─── */
.tg-med-tips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.tg-med-tip {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(165, 180, 252, 0.12);
    padding: 22px;
    border-radius: 10px;
    position: relative;
}

.tg-med-tip__number {
    position: absolute;
    top: -10px;
    left: 18px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--tgme-orange) 0%, #fb923c 100%);
    color: var(--tgme-white);
    font-weight: 900;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.tg-med-tip__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--tgme-white);
    margin-bottom: 8px;
    padding-top: 6px;
}

.tg-med-tip__title i {
    color: var(--tgme-indigo-border);
    margin-right: 4px;
}

.tg-med-tip__text {
    font-size: 14px;
    color: var(--tgme-slate-300);
}

.tg-med-tip__text strong {
    color: var(--tgme-white);
}

/* ─── 결론 ─── */
.tg-med-summary {
    background: linear-gradient(135deg, #312e81 0%, #3730a3 50%, var(--tgme-indigo-dark) 100%);
    color: var(--tgme-white);
    padding: 44px 28px;
    border-radius: var(--tgme-radius);
    text-align: center;
    box-shadow: 0 10px 30px rgba(49, 46, 129, 0.4);
}

.tg-med-summary__title {
    font-size: 24px;
    font-weight: 800;
    color: var(--tgme-white);
    margin-bottom: 20px;
}

.tg-med-summary__body p {
    font-size: 16px;
    margin-bottom: 14px;
    color: var(--tgme-indigo-border);
}

.tg-med-summary strong {
    color: var(--tgme-white);
}

.tg-med-summary__highlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 24px 0;
}

.tg-med-summary__highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(165, 180, 252, 0.12);
    border-radius: 10px;
}

.tg-med-summary__highlight-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--tgme-orange) 0%, #fb923c 100%);
    color: var(--tgme-white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.tg-med-summary__highlight strong {
    font-size: 13px;
    color: var(--tgme-white);
}

.tg-med-summary__highlight span {
    font-size: 11px;
    color: var(--tgme-indigo-border);
    text-align: center;
}

.tg-med-summary__checklist {
    list-style: none;
    display: inline-block;
    text-align: left;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 24px 32px;
    border-radius: 12px;
    margin: 0 0 24px;
}

.tg-med-summary__checklist li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    font-size: 15px;
    color: #a5b4fc;
}

.tg-med-summary__checklist li:last-child {
    margin-bottom: 0;
}

.tg-med-summary__checklist li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 13px;
    color: var(--tgme-orange-border);
}

.tg-med-summary__checklist strong {
    color: var(--tgme-white);
}

.tg-med-summary__footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
    color: var(--tgme-indigo-border);
    line-height: 1.8;
}

.tg-med-summary__footer strong {
    color: var(--tgme-white);
}

/* ============================================
   반응형
============================================ */
@media (min-width: 768px) {
    .tg-med-hero {
        padding: 80px 40px;
    }

    .tg-med-hero__title {
        font-size: 38px;
    }

    .tg-med-main {
        padding: 40px 36px 0;
        gap: 40px;
    }

    .tg-med-intro {
        padding: 36px 32px;
    }

    .tg-med-section {
        padding: 40px 36px;
    }

    .tg-med-section__title {
        font-size: 24px;
    }

    .tg-med-section__num {
        font-size: 44px;
    }

    .tg-med-var-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .tg-med-tips {
        grid-template-columns: repeat(3, 1fr);
    }

    .tg-med-demo__scene {
        height: 300px;
    }

    .tg-med-summary__highlights {
        grid-template-columns: repeat(3, 1fr);
    }

    .tg-med-summary {
        padding: 56px 44px;
    }
}

@media (min-width: 1024px) {
    .tg-med-hero__title {
        font-size: 44px;
    }

    .tg-med-main {
        gap: 46px;
    }

    .tg-med-demo {
        flex-direction: row;
    }

    .tg-med-demo__preview {
        flex: 1;
    }

    .tg-med-demo__panel {
        flex: 0 0 340px;
    }
}

/* ============================================
   스크롤 등장 애니메이션
============================================ */
.tg-med-motion {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.tg-med-motion.is-visible {
    opacity: 1;
    transform: translateY(0);
}