/* ==========================================================================
   CazMaTrans — naslovnica (isključivo /)
   Design tokens + header (netaknut) + hero + sections + footer + responsive
   ========================================================================== */

:root {
    --fp-blue: #0d628d;
    --fp-blue-light: #4a90e2;
    --fp-blue-bg: #f5f9fc;
    --fp-blue-border: #dde8f0;
    --fp-red: #ee2232;
    --fp-red-dark: #c91a26;
    --fp-text: #4a4a4a;
    --fp-text-muted: #7a8590;
    --fp-hover: #e2e2e2;
    --fp-border: #e8ecef;
    --fp-white: #ffffff;
    --fp-container-max: 1140px;
    --fp-section-pad-y: 96px;
    --fp-section-pad-y-mobile: 56px;
    --fp-radius: 12px;
    --fp-radius-lg: 24px;
    --fp-shadow-sm: 0 4px 12px rgba(13, 98, 141, 0.08);
    --fp-shadow-md: 0 20px 40px -20px rgba(13, 98, 141, 0.18);
    --fp-shadow-lg: 0 40px 80px -30px rgba(13, 98, 141, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--fp-text);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.fp-container {
    max-width: var(--fp-container-max);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

.fp-text-center {
    text-align: center;
}

/* ==========================================================================
   FRONT-HEADER (nedirani — finalizirano u prethodnim koracima)
   ========================================================================== */

.front-header {
    padding: 30px 0;
    border-bottom: 1px solid #DFDFDF;
    margin-bottom: 0;
}

.front-header .header-inner::after {
    content: "";
    clear: both;
    display: table;
}

.front-header .header-inner .logo {
    float: left;
}

.front-header .header-inner .logo img {
    width: 200px;
    height: auto;
}

.front-header .header-inner .login-link {
    float: right;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 50px;
}

.front-header .header-inner .login-link .user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.front-header .header-inner .login-link .user-link:hover .user-primary,
.front-header .header-inner .login-link .user-link:hover .user-secondary {
    color: red;
}

.front-header .header-inner .login-link .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}

.front-header .header-inner .login-link .user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.front-header .header-inner .login-link .user-primary {
    font-size: 18px;
    color: #333333;
    font-weight: 500;
    transition: color 0.15s ease;
}

.front-header .header-inner .login-link .user-secondary {
    font-size: 12px;
    color: #888888;
    font-style: italic;
    margin-top: 2px;
}

.front-header .header-inner .login-link a {
    color: #333333;
    font-size: 18px;
    text-decoration: none;
}

.front-header .header-inner .login-link a i {
    position: relative;
    top: 2px;
    margin-left: 4px;
}

.front-header .header-inner .login-link .logout-link:hover {
    color: red;
}

/* ==========================================================================
   MAIN + SECTIONS wrapper
   ========================================================================== */

.front-main {
    display: block;
}

.fp-section {
    padding: var(--fp-section-pad-y) 0;
    position: relative;
}

.fp-section-alt {
    background: var(--fp-blue-bg);
}

.fp-section-muted {
    background: #fafbfc;
    border-top: 1px solid var(--fp-border);
}

.fp-section-title {
    font-family: 'Raleway', 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.2;
    color: var(--fp-blue);
    margin: 0 0 24px;
    letter-spacing: -0.01em;
}

.fp-section-body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--fp-text);
}

.fp-section-body p {
    margin: 0 0 16px;
}

.fp-section-body p:last-child {
    margin-bottom: 0;
}

.fp-section-body b,
.fp-section-body strong {
    font-weight: 700;
    color: var(--fp-blue);
}

.fp-section-body i,
.fp-section-body em {
    font-style: italic;
}

.fp-section-body u {
    text-decoration: underline;
}

.fp-section-body a {
    color: var(--fp-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.fp-section-body a:hover {
    color: var(--fp-red);
}

.fp-section-body ul,
.fp-section-body ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.fp-section-body li {
    margin-bottom: 8px;
}

.fp-section-body h3 {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 20px;
    color: var(--fp-blue);
    margin: 24px 0 12px;
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
    padding: 80px 0 96px;
    background: var(--fp-white);
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-copy {
    max-width: 600px;
}

.hero-eyebrow {
    display: inline-block;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fp-blue);
    background: var(--fp-blue-bg);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.hero-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
    color: var(--fp-blue);
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.65;
    color: var(--fp-text);
    margin: 0 0 40px;
    max-width: 540px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.fp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}

.fp-btn i {
    font-size: 16px;
    position: static;
    top: auto;
    margin-left: 0;
    transition: transform 0.2s ease;
}

.fp-btn-primary {
    background: var(--fp-red);
    color: var(--fp-white);
    box-shadow: 0 10px 24px -8px rgba(238, 34, 50, 0.4);
}

.fp-btn-primary:hover {
    background: var(--fp-red-dark);
    color: var(--fp-white);
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -10px rgba(238, 34, 50, 0.5);
}

.fp-btn-primary:hover i {
    transform: translateX(4px);
}

.fp-btn-primary:focus-visible {
    outline: 3px solid rgba(238, 34, 50, 0.35);
    outline-offset: 3px;
}

.fp-btn-secondary {
    background: transparent;
    color: var(--fp-blue);
    border-color: var(--fp-blue);
}

.fp-btn-secondary:hover {
    background: var(--fp-blue);
    color: var(--fp-white);
    transform: translateY(-2px);
}

.fp-btn-secondary:focus-visible {
    outline: 3px solid rgba(13, 98, 141, 0.35);
    outline-offset: 3px;
}

/* Hero visual — CSS-only orbs */
.hero-visual {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-orb {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--fp-blue-light) 0%, var(--fp-blue) 80%);
    box-shadow: var(--fp-shadow-lg);
    position: relative;
    animation: fp-float 6s ease-in-out infinite;
}

.hero-orb-sm {
    position: absolute;
    border-radius: 50%;
}

.hero-orb-sm-red {
    width: 90px;
    height: 90px;
    background: var(--fp-red);
    top: 65%;
    left: 8%;
    box-shadow: 0 20px 40px -10px rgba(238, 34, 50, 0.45);
    animation: fp-float 7s ease-in-out infinite reverse;
}

.hero-orb-sm-white {
    width: 60px;
    height: 60px;
    background: var(--fp-white);
    top: 12%;
    right: 10%;
    box-shadow: 0 10px 30px rgba(13, 98, 141, 0.15);
    animation: fp-float 5s ease-in-out infinite;
}

.hero-grid-dots {
    position: absolute;
    top: 8%;
    left: 4%;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, var(--fp-blue) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    opacity: 0.25;
    pointer-events: none;
}

@keyframes fp-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-orb,
    .hero-orb-sm-red,
    .hero-orb-sm-white {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ==========================================================================
   SPLIT LAYOUT (about-app, about-company)
   ========================================================================== */

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

.split-reverse .split-text {
    order: 2;
}

.split-reverse .split-visual {
    order: 1;
}

.split-text {
    min-width: 0;
}

.split-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-frame {
    width: 280px;
    height: 280px;
    border-radius: var(--fp-radius-lg);
    background: linear-gradient(135deg, var(--fp-white) 0%, var(--fp-blue-bg) 100%);
    border: 1px solid var(--fp-blue-border);
    box-shadow: var(--fp-shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon-frame:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -25px rgba(13, 98, 141, 0.3);
}

.icon-frame i {
    font-size: 110px;
    color: var(--fp-blue);
    line-height: 1;
}

.fp-section-alt .icon-frame {
    background: linear-gradient(135deg, var(--fp-white) 0%, #eaf2f8 100%);
}

/* ==========================================================================
   PROSE LAYOUT (tutorial, privacy-policy)
   ========================================================================== */

.fp-section-prose .prose-inner {
    max-width: 760px;
    margin: 0 auto;
}

.prose-wide {
    max-width: 820px;
}

.prose-header {
    text-align: center;
    margin-bottom: 48px;
}

.prose-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--fp-white) 0%, var(--fp-blue-bg) 100%);
    border: 1px solid var(--fp-blue-border);
    box-shadow: var(--fp-shadow-sm);
    margin-bottom: 24px;
}

.prose-icon i {
    font-size: 34px;
    color: var(--fp-blue);
    line-height: 1;
}

.fp-section-alt .prose-icon {
    background: linear-gradient(135deg, var(--fp-white) 0%, #eaf2f8 100%);
}

.prose-header .fp-section-title {
    margin: 0;
}

.prose-small {
    max-width: 680px;
}

.prose-small .fp-section-title {
    font-size: clamp(20px, 2.2vw, 24px);
    color: var(--fp-text-muted);
    margin-bottom: 20px;
}

.prose-small .fp-section-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--fp-text-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.fp-footer {
    background: var(--fp-blue);
    color: var(--fp-white);
    padding: 48px 0 36px;
    margin-top: 0;
}

.fp-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.fp-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fp-footer-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.02em;
    color: var(--fp-white);
}

.fp-footer-copy {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.fp-footer-nav {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.fp-footer-nav a {
    color: var(--fp-white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.85;
    transition: opacity 0.15s ease, text-decoration-color 0.15s ease;
    text-underline-offset: 4px;
}

.fp-footer-nav a:hover {
    opacity: 1;
    text-decoration: underline;
    text-decoration-color: var(--fp-white);
}

.fp-footer-nav a:focus-visible {
    outline: 2px solid var(--fp-white);
    outline-offset: 4px;
    border-radius: 2px;
}

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

@media (max-width: 992px) {
    .hero {
        padding: 56px 0 72px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 56px;
        text-align: center;
    }

    .hero-copy {
        margin: 0 auto;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        min-height: 320px;
    }

    .hero-orb {
        width: 300px;
        height: 300px;
    }

    .split-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .split-reverse .split-text {
        order: 1;
    }

    .split-reverse .split-visual {
        order: 2;
    }

    .split-visual {
        order: 2;
    }

    .fp-section {
        padding: var(--fp-section-pad-y-mobile) 0;
    }
}

@media (max-width: 768px) {
    .front-header {
        padding: 20px 0;
    }

    .front-header .header-inner .logo img {
        width: 150px;
    }

    .front-header .header-inner .login-link {
        gap: 20px;
    }

    .front-header .header-inner .login-link .user-primary {
        font-size: 15px;
    }

    .front-header .header-inner .login-link a {
        font-size: 15px;
    }

    .hero {
        padding: 40px 0 56px;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .fp-btn {
        width: 100%;
        padding: 14px 24px;
    }

    .hero-orb {
        width: 240px;
        height: 240px;
    }

    .hero-orb-sm-red {
        width: 70px;
        height: 70px;
    }

    .hero-orb-sm-white {
        width: 45px;
        height: 45px;
    }

    .icon-frame {
        width: 220px;
        height: 220px;
    }

    .icon-frame i {
        font-size: 88px;
    }

    .fp-footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .fp-footer-nav {
        justify-content: center;
        gap: 20px 24px;
    }
}

@media (max-width: 480px) {
    .fp-container {
        padding: 0 20px;
    }

    .front-header .header-inner .login-link .user-info {
        display: none;
    }

    .hero-eyebrow {
        font-size: 11px;
    }

    .icon-frame {
        width: 180px;
        height: 180px;
    }

    .icon-frame i {
        font-size: 72px;
    }
}

/* ==========================================================================
   LOGIN PAGE (/login)
   Brand-konzistentan stil — koristi iste design tokene kao naslovnica
   ========================================================================== */

.fp-login-page {
    background: var(--fp-blue-bg);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--fp-text);
    position: relative;
    overflow-x: hidden;
}

.fp-login-page::before {
    content: '';
    position: absolute;
    top: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.14) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.fp-login-page::after {
    content: '';
    position: absolute;
    bottom: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(238, 34, 50, 0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.fp-login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    position: relative;
    z-index: 1;
}

.fp-login-card {
    background: var(--fp-white);
    border-radius: var(--fp-radius-lg);
    box-shadow: 0 30px 80px -20px rgba(13, 98, 141, 0.25);
    padding: 48px 44px 40px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    box-sizing: border-box;
}

.fp-login-logo-link {
    display: inline-block;
    margin-bottom: 24px;
    text-decoration: none;
}

.fp-login-logo {
    width: 180px;
    height: auto;
    transition: transform 0.2s ease;
}

.fp-login-logo-link:hover .fp-login-logo {
    transform: scale(1.02);
}

.fp-login-logo-link:focus-visible {
    outline: 3px solid rgba(13, 98, 141, 0.35);
    outline-offset: 6px;
    border-radius: 4px;
}

.fp-login-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.2;
    color: var(--fp-blue);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.fp-login-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: var(--fp-text-muted);
    margin: 0 0 28px;
}

/* ===== ALERTS ===== */

.fp-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    margin-bottom: 24px;
}

.fp-alert > i {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1.4;
    margin-top: 1px;
}

.fp-alert > span {
    flex: 1;
}

.fp-alert-error {
    background: #fdecee;
    border: 1px solid #f9c5cb;
    color: #8a1820;
}

.fp-alert-error > i {
    color: var(--fp-red);
}

.fp-alert-warning {
    background: #fdf4e3;
    border: 1px solid #f6dba0;
    color: #7a5a0e;
}

.fp-alert-warning > i {
    color: #d09100;
}

/* ===== FORM ===== */

.fp-login-form {
    text-align: left;
}

.fp-form-group {
    margin-bottom: 20px;
}

.fp-form-label {
    display: block;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--fp-text);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.fp-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.fp-input-wrap > i {
    position: absolute;
    left: 14px;
    color: var(--fp-text-muted);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.15s ease;
}

.fp-form-input,
.fp-input-wrap > input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    color: var(--fp-text);
    background: var(--fp-white);
    border: 1.5px solid var(--fp-border);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    box-sizing: border-box;
    line-height: 1.4;
}

.fp-form-input:hover,
.fp-input-wrap > input:hover {
    border-color: #c5d0d8;
}

.fp-form-input:focus,
.fp-input-wrap > input:focus {
    outline: none;
    border-color: var(--fp-blue);
    box-shadow: 0 0 0 3px rgba(13, 98, 141, 0.12);
}

.fp-form-input::placeholder,
.fp-input-wrap > input::placeholder {
    color: #a8b3bd;
    opacity: 1;
}

.fp-field-error {
    margin: 8px 0 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--fp-red);
    line-height: 1.4;
}

.fp-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fp-white) 0%, var(--fp-blue-bg) 100%);
    border: 1px solid var(--fp-blue-border);
    box-shadow: var(--fp-shadow-sm);
    margin: 0 auto 20px;
}

.fp-success-icon i {
    font-size: 38px;
    color: var(--fp-blue);
    line-height: 1;
}

.fp-login-help {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: var(--fp-text-muted);
    margin: 24px 0 0;
    line-height: 1.55;
}

.fp-login-help a {
    color: var(--fp-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.fp-login-help a:hover {
    color: var(--fp-red);
    text-decoration: underline;
}

.fp-input-wrap:focus-within > i {
    color: var(--fp-blue);
}

/* ===== BUTTON BLOCK MODIFIER ===== */

.fp-btn-block {
    width: 100%;
    margin-top: 8px;
}

/* ===== FOOTER LINKS ===== */

.fp-login-footer {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--fp-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.fp-login-link {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--fp-blue);
    text-decoration: none;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.fp-login-link:hover {
    color: var(--fp-red);
    text-decoration: underline;
}

.fp-login-link:focus-visible {
    outline: 2px solid rgba(13, 98, 141, 0.35);
    outline-offset: 3px;
    border-radius: 2px;
}

.fp-login-link-muted {
    font-size: 13px;
    color: var(--fp-text-muted);
}

.fp-login-link-muted i {
    margin-right: 4px;
}

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

@media (max-width: 480px) {
    .fp-login-wrapper {
        padding: 32px 16px;
    }

    .fp-login-card {
        padding: 36px 28px 32px;
        border-radius: 16px;
    }

    .fp-login-logo {
        width: 150px;
    }

    .fp-login-title {
        font-size: 20px;
    }
}
