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

/* --- Hero Tags --- */
.ana-tags {
    display: flex;
    gap: 12px;
    margin-bottom: 35px;
    flex-wrap: nowrap;
}

.ana-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;
}

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

.ana-tag--accent { color: var(--primary); }

/* --- Hero title override --- */
.ana-hero .hero-title { font-size: 52px; margin: 24px 0; line-height: 1.1; }
.ana-hero .hero-content { max-width: 650px; }

/* --- Browser Mockup Enhancements (Analytics-specific) --- */
.ana-hero .browser-mockup {
    transform: rotateY(-8deg) rotateX(2deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.ana-hero .browser-mockup:hover {
    transform: rotateY(0) rotateX(0) translateY(-10px);
}

/* Browser UI internals */
.ana-bui-sidebar {
    width: 44px;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.ana-bui-sidebar-logo {
    width: 28px; height: 28px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px; margin-bottom: 8px;
}

.ana-bui-nav-item {
    width: 28px; height: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.ana-bui-nav-item--active {
    background: rgba(252, 96, 17, 0.2);
    border-color: rgba(252, 96, 17, 0.3);
}

.ana-bui-main {
    flex: 1;
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.ana-bui-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ana-bui-title {
    font-size: 10px; font-weight: 700; color: white;
    display: flex; align-items: center; gap: 6px;
}

.ana-pulse {
    width: 6px; height: 6px;
    background: #4ade80; border-radius: 50%;
    box-shadow: 0 0 8px #4ade80;
    animation: anaPulse 2s infinite;
}

@keyframes anaPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.ana-bui-live {
    width: 32px; height: 14px;
    background: rgba(74, 222, 128, 0.2);
    border-radius: 4px; font-size: 7px;
    color: #4ade80; display: flex;
    align-items: center; justify-content: center;
    font-weight: 800;
}

.ana-bui-stats {
    display: flex; gap: 10px; margin-bottom: 12px;
}

.ana-bui-stat {
    flex: 1; padding: 12px; border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ana-bui-stat__value {
    font-size: 14px; font-weight: 800; display: block;
}

.ana-bui-stat__value--primary { color: var(--primary); }
.ana-bui-stat__value--green { color: #4ade80; }

.ana-bui-stat__label {
    font-size: 7px; color: var(--text-muted);
    text-transform: uppercase; display: block; margin-top: 2px;
}

.ana-bui-chart {
    flex: 1; background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px; margin-bottom: 12px;
}

.ana-bui-chart__label {
    font-size: 7px; color: rgba(255, 255, 255, 0.3);
    margin-bottom: 8px;
}

.ana-chart-line-anim {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: anaDash 3s ease-in-out forwards infinite;
}

@keyframes anaDash { to { stroke-dashoffset: 0; } }

.ana-bui-table-row {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px; padding: 8px;
    display: flex; align-items: center;
    justify-content: space-between;
}

.ana-bui-table-cell {
    display: flex; align-items: center; gap: 12px;
}

.ana-bui-avatar {
    width: 20px; height: 20px;
    background: rgba(252, 96, 17, 0.4);
    border-radius: 50%;
}

.ana-bui-line {
    height: 6px; width: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.ana-bui-badge-sm {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80; font-size: 6px;
    display: flex; align-items: center;
    justify-content: center; height: 14px;
    padding: 0 6px; border-radius: 3px;
    font-weight: 800;
}

/* Floating status — OUTSIDE browser-frame */
.ana-floating {
    position: absolute;
    top: 30px; right: -15px;
    background: rgba(12, 17, 28, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.3);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 12px; font-weight: 700;
    display: flex; align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ana-floating__dot {
    width: 8px; height: 8px;
    background: #4ade80; border-radius: 50%;
    box-shadow: 0 0 10px #4ade80;
    animation: anaPulse 2s infinite;
}

/* --- Transformation Section (Pain → AI) --- */
.ana-transform {
    margin-top: 60px;
    display: flex; flex-direction: column;
    gap: 24px;
}

.ana-transform-card {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 10px;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.ana-transform-card:hover { transform: translateY(-3px); }

.ana-pain, .ana-solution {
    padding: 30px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ana-pain { background: rgba(255, 77, 77, 0.03); }
.ana-solution { background: rgba(74, 222, 128, 0.03); }

.ana-pain__icon, .ana-solution__icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}

.ana-pain__icon { background: rgba(255, 77, 77, 0.1); }
.ana-solution__icon { background: rgba(74, 222, 128, 0.1); }

.ana-pain__label {
    color: #ff4d4d; font-size: 11px;
    margin-bottom: 4px; text-transform: uppercase;
    letter-spacing: 1px; font-weight: 700;
}

.ana-solution__label {
    color: #4ade80; font-size: 11px;
    margin-bottom: 4px; text-transform: uppercase;
    letter-spacing: 1px; font-weight: 700;
}

.ana-pain__text, .ana-solution__text {
    font-size: 18px; font-weight: 600; color: white;
}

.ana-arrow {
    display: flex; justify-content: center;
}

.ana-arrow__circle {
    width: 40px; height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center;
    justify-content: center;
    color: white; font-size: 18px;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* --- Business Value Section --- */
.ana-value-stats {
    display: flex; flex-wrap: wrap;
    gap: 30px; margin-top: 40px;
}

.ana-value-stat { text-align: left; }

.ana-value-stat__number {
    font-size: 48px; font-weight: 800;
    color: var(--primary); display: block;
}

.ana-value-stat__label {
    font-size: 14px; color: var(--text-muted);
}

.ana-value-items { /* right column */ }

.ana-value-item { margin-bottom: 60px; }

.ana-value-item__header {
    display: flex; align-items: baseline; gap: 16px;
}

.ana-value-item__num {
    font-size: 32px; font-weight: 800;
    color: var(--primary); opacity: 0.5;
}

.ana-value-item__title {
    font-size: 24px; color: white; font-weight: 700;
}

.ana-value-item__desc {
    margin: 16px 0 0 50px;
    color: var(--text-muted); line-height: 1.6;
}

/* --- Source Tags (Data section) --- */
.ana-source-tags {
    display: flex; flex-wrap: wrap; gap: 10px;
}

.ana-source-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: 13px; font-weight: 500;
    color: #fff; backdrop-filter: blur(10px);
}

/* --- Tools Grid (scale-cards) --- */
.ana-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px; margin-top: 60px;
}

.ana-tool-card {
    background: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-card);
    padding: 40px;
    transition: all 0.3s ease;
    display: flex; flex-direction: column;
    height: 100%;
}

.ana-tool-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.ana-tool-card--featured {
    border-color: var(--primary);
}

.ana-tool-card__icon {
    width: 60px; height: 60px;
    background: rgba(252, 96, 17, 0.05);
    border-radius: 16px;
    display: flex; align-items: center;
    justify-content: center; margin-bottom: 24px;
}

.ana-tool-card__icon--featured {
    background: var(--primary);
    box-shadow: 0 10px 20px var(--primary-glow);
}

.ana-tool-card__icon--featured svg { stroke: white; }

.ana-tool-card__category {
    color: var(--primary); font-size: 13px;
    text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 12px; font-weight: 700;
}

.ana-tool-card h3 { font-size: 24px; margin-bottom: 16px; }

.ana-tool-card p {
    color: var(--text-muted); line-height: 1.6; font-size: 15px;
}

.ana-tool-card__footer {
    margin-top: auto; padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px; color: var(--primary); font-weight: 600;
}

/* --- Speed Stats --- */
.ana-speed-stat {
    font-size: 64px; color: #fff; line-height: 1;
    font-weight: 800; font-family: var(--font-heading);
}

.ana-speed-stat--accent {
    background: linear-gradient(135deg, var(--primary), #ffa06d);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ana-speed-label {
    font-weight: 700; text-transform: uppercase;
    margin-bottom: 30px;
}

.ana-speed-label--muted { color: var(--text-muted); }
.ana-speed-label--primary { color: var(--primary); }

.ana-speed-saving {
    font-size: 24px; font-weight: 800; color: #fff; margin-top: 30px;
}

.ana-speed-saving span {
    font-size: 14px; color: var(--text-muted);
    text-transform: uppercase; margin-left: 8px;
}

/* --- Steps Grid --- */
.ana-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px; margin-top: 60px;
}

.ana-step-card {
    background: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-card);
    padding: 40px;
    transition: all 0.3s ease;
    display: flex; flex-direction: column;
}

.ana-step-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.ana-step-card__num {
    font-size: 32px; font-weight: 800;
    color: var(--primary); opacity: 0.2;
    margin-bottom: 20px;
}

.ana-step-card h3 { font-size: 20px; margin-bottom: 12px; }

.ana-step-card p {
    font-size: 14px; color: var(--text-muted); line-height: 1.6;
}

/* --- Quote --- */
.ana-quote {
    text-align: center;
    border: 1px dashed var(--primary);
    padding: 60px; border-radius: var(--radius-card);
}

.ana-quote__text {
    font-size: 32px; font-weight: 800;
    color: #fff; line-height: 1.3;
}

.ana-quote__author {
    margin-top: 20px; font-size: 15px;
    color: var(--text-muted);
}

/* --- Data speed card --- */
.ana-data-card {
    padding: 40px; border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex; flex-direction: column; gap: 30px;
    text-align: center;
}

.ana-data-card__icon {
    width: 64px; height: 64px;
    background: rgba(252, 96, 17, 0.1);
    border-radius: 16px;
    display: flex; align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.ana-data-card h3 {
    font-size: 24px; color: #fff; margin-bottom: 15px;
}

.ana-data-card p {
    font-size: 15px; color: rgba(255, 255, 255, 0.5); line-height: 1.6;
}

/* --- Section title overrides --- */
.ana-section-title--lg { font-size: 48px; line-height: 1.1; }
.ana-section-intro { color: rgba(255, 255, 255, 0.8); font-size: 18px; margin-top: 24px; }

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

@media (max-width: 991px) {
    .ana-transform-card { grid-template-columns: 1fr; gap: 15px; }
    .ana-arrow { transform: rotate(90deg); }
    .ana-tools-grid { grid-template-columns: 1fr; }
    .ana-steps-grid { grid-template-columns: 1fr 1fr; }
    .ana-tags { flex-wrap: wrap; }
}

@media (max-width: 768px) {
    .ana-hero .hero-title { font-size: 38px; }
    .ana-steps-grid { grid-template-columns: 1fr; }
    .ana-value-stat__number { font-size: 36px; }
    .ana-speed-stat { font-size: 48px; }
    .ana-quote__text { font-size: 24px; }
    .ana-floating { right: 5px; top: 10px; }
}
