/* ==========================================================================
   PAGE AI-PLANNING V3 — Optimized, Design System compliant
   Принцип: тільки page-specific стилі. Глобальні — в global.css.
   ========================================================================== */

/* --- Plan Hero Visual (wrapper для mockup + floating badge) --- */
.plan-hero-visual {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
}

/* --- Plan Mockup (browser frame) --- */
.plan-mockup {
    background: #0c111c;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
}

.plan-mockup__topbar {
    padding: 16px 24px;
    background: rgba(21, 27, 40, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.plan-mockup__dots {
    display: flex;
    gap: 8px;
}

.plan-mockup__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.plan-mockup__dot--red { background: #ff5f56; }
.plan-mockup__dot--yellow { background: #ffbd2e; }
.plan-mockup__dot--green { background: #27c93f; }

.plan-mockup__url {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 16px;
    border-radius: 6px;
    font-family: monospace;
}

.plan-mockup__body {
    padding: 30px;
    flex-grow: 1;
    background: linear-gradient(135deg, #0c111c 0%, #151b28 100%);
}

/* --- KPI Cards inside mockup --- */
.plan-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.plan-kpi {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px;
    border-radius: 14px;
    transition: transform 0.3s ease;
}

.plan-kpi:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.05);
}

.plan-kpi__label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-kpi__value {
    font-size: 18px;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
}

.plan-kpi__value--green { color: #00ff87; }
.plan-kpi__value--yellow { color: #ffbd2e; }

/* --- Chart inside mockup --- */
.plan-chart {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    height: 200px;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    gap: 12px;
}

.plan-chart__bar {
    flex-grow: 1;
    background: linear-gradient(to top, var(--primary), #ffa06d);
    opacity: 0.4;
    border-radius: 6px 6px 0 0;
    transition: height 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.plan-chart__bar--predict {
    background: linear-gradient(to top, #00f2fe, #4facfe);
    opacity: 0.7;
    border-top: 2px dashed rgba(255, 255, 255, 0.5);
}

/* --- Floating Badge (OUTSIDE mockup — no clipping) --- */
.plan-floating {
    position: absolute;
    bottom: 40px;
    right: -30px;
    background: rgba(12, 17, 28, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.3);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
}

.plan-floating__dot {
    width: 10px;
    height: 10px;
    background: #00f2fe;
    border-radius: 50%;
    box-shadow: 0 0 15px #00f2fe;
    animation: planPulseCyan 2s infinite;
    flex-shrink: 0;
}

@keyframes planPulseCyan {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

.plan-floating__text {
    font-size: 11px;
    color: #fff;
}

.plan-floating__sub {
    opacity: 0.6;
}

/* --- Tag Pills (Hero) --- */
.plan-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.plan-tag {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.plan-tag:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* --- Hero title override --- */
.plan-hero .hero-title {
    font-size: 52px;
    margin: 24px 0;
    line-height: 1.1;
}

.plan-hero .hero-content {
    max-width: 650px;
}

/* --- Compare Grid (Problem vs Solution) --- */
.plan-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 60px;
}

.plan-compare-card {
    padding: 50px;
    border-radius: 36px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.plan-compare-card--problem {
    background: rgba(255, 59, 48, 0.02);
    border: 1px solid rgba(255, 59, 48, 0.08);
}

.plan-compare-card--solution {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(252, 96, 17, 0.1);
    backdrop-filter: blur(10px);
}

.plan-compare-card__glow {
    position: absolute;
    top: -50%; right: -50%; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(252, 96, 17, 0.1), transparent 70%);
    z-index: 0;
}

.plan-compare-card h3 {
    font-size: 28px;
    margin-bottom: 35px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.plan-compare-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.plan-compare-list li {
    display: flex;
    gap: 18px;
    font-size: 16px;
    line-height: 1.6;
    align-items: flex-start;
}

.plan-compare-list li svg { flex-shrink: 0; margin-top: 4px; }
.plan-compare-card--problem .plan-compare-list li { color: rgba(255, 255, 255, 0.5); }
.plan-compare-card--solution .plan-compare-list li { color: #fff; }

/* --- Metrics --- */
.plan-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 80px;
}

.plan-metric {
    text-align: center;
    padding: 40px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.plan-metric:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.plan-metric__number {
    font-size: 72px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #ffa06d);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    font-family: var(--font-heading);
    display: block;
}

.plan-metric p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- Promo Card (why-us section) --- */
.plan-promo-card {
    margin-top: 20px;
    background: rgba(252, 96, 17, 0.05) !important;
    border-color: rgba(252, 96, 17, 0.2) !important;
}

.plan-promo-card__label {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-promo-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Data/Industry Cards --- */
.plan-data-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.plan-data-card {
    padding: 40px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.plan-data-card:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    transform: translateY(-8px);
}

.plan-data-card h3 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.plan-data-card__icon {
    width: 56px;
    height: 56px;
    background: rgba(252, 96, 17, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    color: var(--primary);
}

.plan-data-card__icon--cyan { background: rgba(0, 242, 254, 0.1); color: #00f2fe; }
.plan-data-card__icon--green { background: rgba(0, 255, 135, 0.1); color: #00ff87; }

.plan-data-card__icon svg { width: 24px; height: 24px; }

.plan-data-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.plan-data-list li { font-size: 15px; color: rgba(255, 255, 255, 0.6); position: relative; padding-left: 20px; line-height: 1.5; }
.plan-data-list li::before { content: "•"; color: var(--primary); font-weight: bold; position: absolute; left: 0; }

/* --- Department Tabs --- */
.plan-dept-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.plan-dept-tabs::-webkit-scrollbar { display: none; }

.plan-dept-tab {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.plan-dept-tab:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.plan-dept-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 15px var(--primary-glow); }

.plan-dept-panel {
    display: none;
    grid-template-columns: 1fr 1fr 300px;
    gap: 40px;
    padding: 40px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    backdrop-filter: blur(20px);
}

.plan-dept-panel.active { display: grid; }

.plan-dept-panel__title {
    font-size: 12px; font-weight: 700; color: var(--primary);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px; display: block;
}

.plan-dept-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.plan-dept-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: rgba(255, 255, 255, 0.9); }
.plan-dept-list li::before { content: ""; width: 6px; height: 6px; background: var(--primary); border-radius: 50%; flex-shrink: 0; }

.plan-int-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.plan-int-tag { padding: 8px 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; font-size: 13px; color: var(--text-muted); }

.plan-dept-result {
    background: rgba(252, 96, 17, 0.05);
    border: 1px solid rgba(252, 96, 17, 0.1);
    border-radius: var(--radius-card);
    padding: 30px;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}

.plan-dept-result__number { font-size: 48px; font-weight: 800; color: var(--primary); margin-bottom: 8px; font-family: var(--font-heading); }
.plan-dept-result__label { font-size: 14px; color: #fff; line-height: 1.4; }

/* --- Comparison Table --- */
.plan-table {
    margin-top: 60px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-card);
    padding: 40px;
}

.plan-table__header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

.plan-table__header span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
}

.plan-table__header-ai { color: var(--primary) !important; }

.plan-table-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    align-items: center;
    transition: background 0.3s ease;
}

.plan-table-row:last-child { border-bottom: none; }
.plan-table-row:hover { background: rgba(255, 255, 255, 0.02); }

.plan-table-row__feature { display: flex; align-items: center; gap: 20px; }
.plan-table-row__feature svg { width: 32px; height: 32px; color: var(--primary); opacity: 0.8; flex-shrink: 0; }
.plan-table-row__name { font-size: 18px; font-weight: 700; color: #fff; }
.plan-table-row__old { font-size: 15px; color: rgba(255, 255, 255, 0.4); font-weight: 500; }

.plan-table-row__new {
    font-size: 16px; color: #fff; font-weight: 700;
    position: relative; padding-left: 20px;
}

.plan-table-row__new::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 4px; background: var(--primary); border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

/* --- Market Section --- */
.plan-market-card {
    margin-top: 60px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 40px;
    padding: 60px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    text-align: center;
}

.plan-market-card__inner { max-width: 900px; margin: 0 auto; }

.plan-market-card__stat {
    font-size: 84px; font-weight: 900; line-height: 1; margin-bottom: 15px;
    font-family: var(--font-heading); letter-spacing: -2px;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; display: block;
}

.plan-market-card__cagr {
    font-weight: 800; font-size: 20px; letter-spacing: 2px;
    text-transform: uppercase; margin-bottom: 20px; color: var(--primary);
}

.plan-market-card__desc {
    font-size: 17px; color: rgba(255, 255, 255, 0.7);
    max-width: 700px; margin: 0 auto 50px auto; line-height: 1.6;
}

.plan-market-drivers {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px; margin-top: 60px; text-align: left;
}

.plan-market-driver {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 30px; border-radius: var(--radius-card);
    transition: all 0.3s ease;
}

.plan-market-driver:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.plan-market-driver h4 {
    font-size: 14px; color: var(--primary); text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 12px; font-weight: 700;
}

.plan-market-driver p { font-size: 15px; color: rgba(255, 255, 255, 0.7); line-height: 1.6; }

/* --- Evolution --- */
.plan-evo-split {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 40px; margin-top: 60px;
}

.plan-evo-side {
    padding: 50px; border-radius: 40px; position: relative;
    transition: all 0.4s ease;
    display: flex; flex-direction: column; gap: 30px;
}

.plan-evo-side--now {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.plan-evo-side--tomorrow {
    background: linear-gradient(135deg, rgba(252, 96, 17, 0.1), rgba(0, 0, 0, 0.3));
    border: 1px solid rgba(252, 96, 17, 0.2);
    box-shadow: 0 30px 60px -15px rgba(252, 96, 17, 0.2);
}

.plan-evo-badge {
    padding: 6px 16px; font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 2px;
    border-radius: 6px; width: fit-content;
}

.plan-evo-badge--now { background: rgba(255, 255, 255, 0.05); color: #fff; }
.plan-evo-badge--tomorrow { background: var(--primary); color: #000; }

.plan-evo-side h3 { font-size: 24px; color: #fff; font-family: var(--font-heading); }

.plan-evo-desc {
    color: rgba(255, 255, 255, 0.5); line-height: 1.6; font-size: 15px;
}

.plan-evo-side--tomorrow .plan-evo-desc { color: rgba(255, 255, 255, 0.8); }

.plan-evo-progress { margin-top: auto; }
.plan-evo-progress__label { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 13px; font-weight: 700; color: #fff; }
.plan-evo-progress__bar { width: 100%; height: 6px; background: rgba(255, 255, 255, 0.05); border-radius: 100px; overflow: hidden; }
.plan-evo-progress__fill { height: 100%; background: var(--primary); border-radius: 100px; }

/* --- Section title overrides --- */
.plan-section-title--lg { font-size: 48px; line-height: 1.1; }
.plan-section-intro { color: var(--text-muted); font-size: 18px; margin-top: 24px; line-height: 1.6; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1200px) {
    .plan-dept-panel { grid-template-columns: 1fr 1fr; }
    .plan-dept-result { grid-column: span 2; }
}

@media (max-width: 991px) {
    .plan-compare-grid { grid-template-columns: 1fr; }
    .plan-metrics { grid-template-columns: 1fr; gap: 24px; }
    .plan-evo-split { grid-template-columns: 1fr; }
    .plan-data-grid { grid-template-columns: 1fr; }
    .plan-market-card { padding: 40px; }
    .plan-market-card__stat { font-size: 64px; }
    .plan-market-drivers { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .plan-hero .hero-title { font-size: 38px; }
    .plan-tags { flex-wrap: wrap; }
    .plan-table__header { display: none; }
    .plan-table-row { grid-template-columns: 1fr; gap: 15px; text-align: left; }
    .plan-table-row__new { padding-left: 0; margin-top: 5px; }
    .plan-table-row__new::before { display: none; }
    .plan-dept-panel { grid-template-columns: 1fr; }
    .plan-dept-result { grid-column: span 1; }
    .plan-kpi-grid { grid-template-columns: 1fr; }
    .plan-floating { right: 10px; bottom: -20px; }
    .plan-metric__number { font-size: 48px; }
}
