/* ==========================================================================
   SELECTION PRODUCT JOURNEY: FOR LARA EDITION
   Canonical Palette: #0b1116, #121a21, #d4b483, #e5c594
   ========================================================================== */
:root {
    --bg-dark: #0b1116;
    --card-bg: rgba(18, 26, 33, 0.96);
    --gold: #d4b483;
    --gold-hover: #e5c594;
    --text-muted: #a0acb8;
    --admin-border: rgba(255, 255, 255, 0.08);
    --font-sans: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', Consolas, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background-color: var(--bg-dark) !important;
    color: #eeeeee;
    font-family: var(--font-sans);
    scrollbar-gutter: stable;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- 🛡️ NAV BAR --- */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(11, 17, 22, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--admin-border);
    padding: 0.85rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-brand img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Language Switcher */
.language-switch {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--admin-border);
}

.language-option {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.language-option.active {
    background: rgba(212, 180, 131, 0.15);
    color: var(--gold);
}

/* Atlas Navigation Button */
.btn-atlas {
    background: rgba(212, 180, 131, 0.12);
    border: 1px solid var(--gold);
    color: #ffffff;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(212, 180, 131, 0.15);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.journey-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    position: fixed;
    top: 56px;
    left: 0;
    z-index: 1001;
}

.journey-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-hover));
    width: 16.66%;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px var(--gold);
}

/* --- 🏛️ CONTAINER --- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-header {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(212, 180, 131, 0.1);
    color: var(--gold);
    border: 1px solid rgba(212, 180, 131, 0.25);
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 32px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(to right, #d4b483 20%, #ffffff 50%, #d4b483 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
    margin-bottom: 0.5rem;
}

@keyframes shine {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- 🗺️ JOURNEY CARD --- */
.journey-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: relative;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.step-indicator-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--admin-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.step-counter {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.atlas-link-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.step-content {
    flex: 1;
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.step-content.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-heading {
    font-size: 1.45rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.step-description {
    color: #eeeeee;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.interactive-preview-box {
    background: #070b0e;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* FIX BUBA 1: Safe text wrapping za Journey pre tagove */
.step-content .interactive-preview-box pre {
    width: 100%;
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: center;
}

/* PREVIEW SYSTEM */
.website-tree-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    width: 100%;
}

.page-node-card {
    background: rgba(18, 26, 33, 0.8);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.page-node-card.selected {
    border-color: var(--gold);
    background: rgba(212, 180, 131, 0.12);
    transform: translateY(-2px);
}

.page-node-card h5 {
    color: var(--gold);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.page-node-card span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.mock-inspector-input {
    width: 100%;
    max-width: 420px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--gold);
    color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    margin-bottom: 12px;
    text-align: center;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

/* ==========================================================================
   JOURNEY NAVIGATION — QUIET TEXT ACTION SYSTEM
   ========================================================================== */
.journey-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.btn-nav {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    padding: 0.8rem 0.25rem;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 1.15px;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Sekundarna akcija */
.btn-nav-back {
    color: var(--text-muted);
    opacity: 0.72;
}

/* Glavna akcija */
.btn-nav-primary {
    color: var(--gold);
    opacity: 0.92;
}

/* Strelice imaju zaseban, mekši pokret */
.btn-nav i {
    font-size: 0.78rem;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

/* Disabled Back ostaje prisutan, ali tih */
.btn-nav:disabled {
    opacity: 0.22;
    cursor: default;
    pointer-events: none;
}

/* Accessibility fokus bez teških okvira */
.btn-nav:focus {
    outline: none;
}

.btn-nav:focus-visible {
    outline: 1px solid rgba(212, 180, 131, 0.75);
    outline-offset: 6px;
    border-radius: 6px;
}

/* --- 📖 ATLAS MODAL LAYER --- */
.atlas-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 17, 22, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.atlas-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.atlas-modal-container {
    width: 100%;
    max-width: 1100px;
    height: 100vh;
    overflow-y: auto;
    padding: 3rem 2rem;
    position: relative;
}

.btn-close-atlas {
    position: fixed;
    top: 20px;
    right: 30px;
    background: rgba(212, 180, 131, 0.15);
    border: 1px solid var(--gold);
    color: #ffffff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 2010;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* ATLAS DOCUMENT STYLING */
.atlas-doc pre {
    background: #070b0e;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #34d399;
    overflow-x: auto;
    margin: 1rem 0;
    line-height: 1.4;
}

.atlas-doc .diagram-box pre {
    color: #eeeeee;
}

.atlas-doc table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: rgba(18, 26, 33, 0.6);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--admin-border);
}

.atlas-doc th,
.atlas-doc td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
    font-size: 0.85rem;
}

.atlas-doc th {
    background: rgba(0, 0, 0, 0.4);
    color: var(--gold);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.atlas-doc h2 {
    font-size: 1.35rem;
    color: #ffffff;
    margin: 2.5rem 0 1rem 0;
    border-left: 4px solid var(--gold);
    padding-left: 0.8rem;
}

.atlas-doc h3 {
    font-size: 1.15rem;
    color: #ffffff;
    margin: 1.5rem 0 1rem 0;
}

.atlas-doc p {
    color: #eeeeee;
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.callout-box,
.callout {
    background: rgba(212, 180, 131, 0.05);
    border: 1px solid rgba(212, 180, 131, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.callout-rose {
    background: rgba(244, 63, 94, 0.05);
    border-color: rgba(244, 63, 94, 0.2);
}

.callout-rose h4 {
    color: #fb7185;
}

.callout-amber {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.2);
}

.callout-amber h4 {
    color: #fbbf24;
}

.callout-box h4,
.callout h4 {
    color: var(--gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.atlas-doc ul,
.atlas-doc ol {
    color: #eeeeee;
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.toc-grid {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.toc-grid a {
    color: var(--gold);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.toc h3 {
    margin-bottom: 1rem;
    color: #ffffff;
}

body.atlas-open {
    overflow: hidden;
}

/* ==========================================================================
   HOVER RULES (Samo za prave miševe na Desktopu)
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
    .language-option:hover {
        color: #fff;
    }

    .btn-atlas:hover {
        background: var(--gold);
        color: #0f171e;
        box-shadow: 0 0 20px rgba(212, 180, 131, 0.4);
    }

    .atlas-link-tag:hover {
        color: var(--gold-hover);
    }

    .page-node-card:hover {
        border-color: var(--gold);
        background: rgba(212, 180, 131, 0.12);
        transform: translateY(-2px);
    }

    .btn-nav-back:hover:not(:disabled) {
        color: #ffffff;
        opacity: 1;
    }

    .btn-nav-primary:hover:not(:disabled) {
        color: #ffffff;
        opacity: 1;
    }

    .btn-nav-back:hover:not(:disabled) i {
        transform: translateX(-5px);
    }

    .btn-nav-primary:hover:not(:disabled) i {
        transform: translateX(6px);
    }

    .btn-nav-primary:hover:not(:disabled) .fa-rotate-right {
        transform: rotate(90deg);
    }

    .btn-close-atlas:hover {
        background: var(--gold);
        color: #0f171e;
        transform: rotate(90deg);
    }

    .toc-grid a:hover {
        color: var(--gold-hover);
    }

    .gateway-footer:hover {
        opacity: 0.7;
    }
}

/* ==========================================================================
   TOUCH RULES (Fizička aktivacija bez lepljenja stanja)
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
    .btn-atlas:active {
        transform: scale(0.97);
        background: var(--gold);
        color: #0f171e;
        box-shadow: none;
    }

    .btn-nav:active:not(:disabled) {
        opacity: 1;
        transform: scale(0.97);
    }

    .btn-nav-back:active:not(:disabled) i {
        transform: translateX(-3px);
    }

    .btn-nav-primary:active:not(:disabled) i {
        transform: translateX(4px);
    }

    .btn-nav-primary:active:not(:disabled) .fa-rotate-right {
        transform: rotate(60deg);
    }

    .btn-close-atlas:active {
        transform: scale(0.95);
        background: var(--gold);
        color: #0f171e;
    }
}

/* ==========================================================================
   RESPONSIVE (MOBILE)
   ========================================================================== */
@media (max-width: 720px) {
    .top-nav {
        padding: 0.75rem 1rem;
    }

    .nav-actions {
        gap: 0.55rem;
    }

    .language-option {
        padding: 0.3rem 0.55rem;
    }

    .top-nav>.nav-actions>.btn-atlas span {
        display: none;
    }

    .top-nav>.nav-actions>.btn-atlas {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
    }

    .journey-progress {
        top: 55px;
    }

    .container {
        padding: 1.75rem 1rem;
    }

    .hero-title {
        font-size: 23px;
        letter-spacing: 2px;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .journey-card {
        padding: 1.35rem;
        border-radius: 18px;
        min-height: 500px;
    }

    .step-indicator-bar {
        gap: 1rem;
    }

    .step-counter {
        font-size: 0.68rem;
        letter-spacing: 1px;
        white-space: nowrap;
    }

    .atlas-link-tag {
        font-size: 0.7rem;
        text-align: right;
    }

    .step-heading {
        font-size: 1.25rem;
    }

    .interactive-preview-box {
        padding: 1rem;
    }

    /* FIX BUBA 1: Mobilno smanjenje i prored za zeleni tekst u Step 1 */
    .step-content .interactive-preview-box pre {
        font-size: 0.72rem !important;
        line-height: 1.65;
    }

    .website-tree-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .journey-controls {
        gap: 1rem;
    }

    .btn-nav {
        padding: 0.6rem 0.25rem;
    }

    .atlas-modal-container {
        padding: 4.5rem 1rem 2rem;
    }

    .btn-close-atlas {
        top: 12px;
        right: 12px;
    }

    .toc-grid {
        grid-template-columns: 1fr;
    }

    .atlas-doc table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .atlas-doc pre {
        font-size: 0.72rem;
    }
}

/* --- 4. FOOTER --- */
.gateway-footer {
    position: relative;
    width: 100%;
    min-height: 75px;
    margin-top: auto;
    padding: 20px 1rem 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-muted);
    opacity: 0.3;
    transition: opacity 0.3s ease;
    z-index: 10;
    text-decoration: none;
    white-space: nowrap;
}

.gateway-footer img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    vertical-align: middle;
}

.gateway-footer span.footer-shimmer {
    font-weight: 700;
    background: linear-gradient(to right, #ffffff 20%, #d4b483 50%, #ffffff 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
}

a.gateway-reset,
a.gateway-reset span:not(.footer-shimmer) {
    color: var(--text-muted) !important;
    font-size: 11px;
    font-weight: 400;
}

.gateway-reset,
.gateway-reset span:not(.footer-shimmer) {
    color: var(--text-muted) !important;
    font-size: 11px;
    font-weight: 400;
}

/* ==========================================================================
   PRODUCT JOURNEY CTA
   ========================================================================== */

.demo-cta-group {
    display: flex;
    width: 100%;
    max-width: 340px;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

.demo-cta {
    flex: 1 1 145px;
    justify-content: center;
    text-decoration: none;
}

.demo-cta-primary {
    background: rgba(212, 180, 131, 0.25);
}

.demo-cta-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.atlas-final-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.atlas-final-actions .demo-cta {
    flex: 0 1 auto;
    padding: 0.7rem 1.4rem;
}

@media (max-width: 480px) {

    .demo-cta-group,
    .atlas-final-actions {
        flex-direction: column;
    }

    .demo-cta,
    .atlas-final-actions .demo-cta {
        width: 100%;
        flex-basis: auto;
    }
}
