﻿/* =========================================================
   AI MARKETING – CORE DESIGN SYSTEM (APP + LANDING)
   Brand-aligned with new logo (blue → violet)
   ========================================================= */

/* =========================================================
   ROOT VARIABLES – LIGHT MODE
   ========================================================= */
:root {
    /* Backgrounds */
    --bg: #f7f8fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f8;
    /* Text */
    --text: #1e1e2d;
    --text-muted: #6b7280;
    /* Borders */
    --border: rgba(0,0,0,0.08);
    /* BRAND COLORS (from logo) */
    --accent: #4f6cff; /* main blue */
    --accent-soft: #6b7cff; /* hover blue */
    --accent-violet: #8b5cf6; /* logo violet */
    /* States */
    --danger: #ef4444;
    /* Radius & shadows */
    --radius: 14px;
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.10);
}

/* =========================================================
   DARK MODE OVERRIDES
   ========================================================= */
body.dark-mode {
    --bg: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1f2430;
    --text: #e6edf3;
    --text-muted: #9ba4b5;
    --border: rgba(255,255,255,0.08);
    --accent: #6f86ff;
    --accent-soft: #8a9bff;
    --accent-violet: #9f7aea;
}

/* =========================================================
   BASE
   ========================================================= */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont;
    line-height: 1.6;
    transition: background 0.25s ease, color 0.25s ease;
}

/* =========================================================
   CONTAINER
   ========================================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 24px;
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1, h2, h3, h4 {
    margin: 0 0 16px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

p {
    margin: 0;
    color: var(--text-muted);
}

/* =========================================================
   LINKS
   ========================================================= */
a {
    color: var(--accent);
    text-decoration: none;
}

    a:hover {
        color: var(--accent-soft);
    }

/* =========================================================
   BUTTONS – BRAND ALIGNED
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    font-weight: 600;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

/* PRIMARY / CTA */
.btn-primary,
.btn-cta {
    background: linear-gradient( 135deg, var(--accent), var(--accent-violet) );
    color: #fff;
    box-shadow: 0 6px 22px rgba(79,108,255,0.25);
}

    .btn-primary:hover,
    .btn-cta:hover {
        background: linear-gradient( 135deg, var(--accent-soft), var(--accent-violet) );
        transform: translateY(-1px);
        box-shadow: 0 10px 30px rgba(79,108,255,0.35);
    }

/* OUTLINE / SECONDARY */
.btn-outline,
.btn-login {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(79,108,255,0.25);
}

    .btn-outline:hover,
    .btn-login:hover {
        background: rgba(79,108,255,0.08);
    }

/* DANGER (logout etc.) */
.btn-outline-danger {
    border: 1px solid rgba(239,68,68,0.4);
    color: var(--danger);
}

    .btn-outline-danger:hover {
        background: rgba(239,68,68,0.1);
    }

/* =========================================================
   CARDS (GLOBAL)
   ========================================================= */
.card,
.value-card,
.feature,
.step,
.pricing-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .card:hover,
    .value-card:hover,
    .feature:hover,
    .step:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

/* =========================================================
   FORMS
   ========================================================= */
.form-control,
.form-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text);
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--accent);
        outline: none;
        box-shadow: 0 0 0 3px rgba(79,108,255,0.25);
    }

/* =========================================================
   PUBLIC HEADER
   ========================================================= */
.public-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

body.dark-mode .public-header {
    background: rgba(13,17,23,0.75);
}

.public-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
}

/* Logo */
.public-header .logo img {
    height: 36px;
    width: auto;
}

/* Header right actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Language flags */
.lang-switch {
    display: flex;
    gap: 10px;
}

    .lang-switch a {
        font-size: 18px;
        opacity: 0.7;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

        .lang-switch a:hover {
            opacity: 1;
            transform: translateY(-1px);
        }

/* =========================================================
   APP NAVIGATION (DASHBOARD)
   ========================================================= */
.modern-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.nav-btn {
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 600;
    color: #fff;
    background: linear-gradient( 135deg, rgba(79,108,255,0.85), rgba(139,92,246,0.85) );
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

    .nav-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

body.dark-mode .nav-btn {
    background: linear-gradient( 135deg, rgba(111,134,255,0.65), rgba(159,122,234,0.65) );
}

/* Special nav (integrations) */
.nav-btn.special {
    background: linear-gradient( 135deg, rgba(202,165,95,0.85), rgba(232,195,122,0.85) );
}

/* =========================================================
   UTILITIES
   ========================================================= */
.text-center {
    text-align: center;
}

.mt-lg {
    margin-top: 64px;
}

/* =========================================================
   THEME TOGGLE – ICON ONLY (immersed in background)
   ========================================================= */

.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent; /* ⬅️ GALVENAIS */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    color: var(--text);
    transition: background 0.2s ease, transform 0.2s ease;
}

    /* hover — tikai viegls halo */
    .theme-btn:hover {
        background: rgba(79,108,255,0.08);
        transform: translateY(-1px);
    }

/* dark mode hover */
body.dark-mode .theme-btn:hover {
    background: rgba(255,255,255,0.08);
}

/* focus (accessibility) */
.theme-btn:focus-visible {
    outline: none;
    background: rgba(79,108,255,0.12);
}
/* Language switch (profile) */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .lang-switch button {
        border: none;
        background: transparent;
        font-size: 18px;
        cursor: pointer;
        opacity: 0.6;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

        .lang-switch button:hover {
            opacity: 1;
            transform: translateY(-1px);
        }

        .lang-switch button.active {
            opacity: 1;
        }

.user-actions {
    background: rgba(0,0,0,0.03);
    padding: 6px 10px;
    border-radius: 12px;
}

.theme-btn {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .theme-btn:hover {
        transform: scale(1.15);
    }

/* ================================
   APP HEADER – responsive (SaaS)
   ================================ */

.app-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 1030; /* virs satura */
}

.app-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.app-logo {
    height: 172px;
    width: auto;
    border-radius: 0px;
}

@media (max-width: 576px) {
    .app-logo {
        height: 52px;
    }
}

/* Billing summary – nerādām uz xs (vietas taupīšana) */
.billing-summary {
    background: rgba(0,0,0,0.05);
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 12px;
    display: none; /* JS pārslēdz uz inline-block */
    align-items: center;
}

body.dark-mode .billing-summary {
    background: rgba(255,255,255,0.06);
}

/* Small icon buttons (hamburger u.c.) */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

    .icon-btn:hover {
        background: rgba(79,108,255,0.08);
        transform: translateY(-1px);
    }

/* Desktop nav */
.modern-nav {
    display: flex;
    flex-wrap: wrap; /* svarīgākais: pogas pāriet nākamajā rindā */
    justify-content: center;
    gap: 12px;
}

/* Fix: vairs nebūs teksts 2 rindās uz pogas */
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap; /* kritiski */
    line-height: 1;
    flex: 0 0 auto; /* neļauj “saspiest” līdz teksts lūzt */
    border: 0;
}

    .nav-btn span {
        white-space: nowrap;
    }

/* Tablet – nedaudz kompaktāk */
@media (max-width: 992px) {
    .nav-btn {
        padding: 9px 14px;
        font-size: 0.92rem;
    }
}

/* Mobile quick nav */
.mobile-nav {
    display: flex;
    gap: 8px;
}

.mobile-tab {
    flex: 1 1 0;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    padding: 8px 6px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

    .mobile-tab .icon {
        font-size: 20px;
        line-height: 1;
    }

    .mobile-tab .label {
        margin-top: 4px;
        font-size: 11px;
        white-space: nowrap;
    }

    .mobile-tab.active {
        border-color: rgba(79,108,255,0.30);
        background: rgba(79,108,255,0.10);
    }

    .mobile-tab:active {
        transform: translateY(1px);
    }

/* Offcanvas styling */
.app-offcanvas {
    background: var(--bg-secondary);
    color: var(--text);
}

.app-logo-sm {
    height: 34px;
    width: auto;
    border-radius: 10px;
}

.menu-section {
    margin-bottom: 14px;
}

.menu-title {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 8px 0;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
}

    .menu-link:hover {
        background: rgba(79,108,255,0.08);
    }

    .menu-link.active {
        background: rgba(79,108,255,0.12);
    }

/* IMPORTANT: images responsive (bieži “bildēm nekas nestrādā” tieši šī dēļ) */
img {
    max-width: 100%;
    height: auto;
}

/* Main container – mazāk padding uz mobilā */
@media (max-width: 576px) {
    .container {
        padding: 28px 14px;
    }
}

@media (min-width: 577px) and (max-width: 992px) {
    .container {
        padding: 46px 18px;
    }
}
/* =========================
   Canva Live Preview
   ========================= */

.canva-slide-frame {
    width: 100%;
    max-width: 540px;
    aspect-ratio: 4 / 5; /* 1080x1350 */
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(0,0,0,0.04);
}

.canva-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.canva-slide-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02));
}

.canva-overlay {
    position: absolute;
    left: 18px;
    right: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #fff;
    background: rgba(0,0,0,0.55);
    font-weight: 800;
    line-height: 1.1;
    text-transform: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.canva-sticker {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 28px;
    text-shadow: 0 6px 18px rgba(0,0,0,0.35);
    display: none;
}

/* Positions */
.pos-Top {
    top: 16px;
    bottom: auto;
}

.pos-Center {
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
}

.pos-Bottom {
    bottom: 16px;
    top: auto;
}

/* Fonts */
.font-Poppins {
    font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.font-Montserrat {
    font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.font-Playfair {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}
.ai-loader {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(17,24,39,.55);
    backdrop-filter: blur(3px);
    z-index: 9999;
}

.ai-loader-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px 20px;
    min-width: 260px;
    box-shadow: 0 18px 60px rgba(0,0,0,.22);
    text-align: center;
}

.ai-robot {
    font-size: 38px;
    animation: ai-bounce 0.9s ease-in-out infinite;
}

@keyframes ai-bounce {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.ai-loader-text {
    margin-top: 6px;
    font-weight: 700;
}

.ai-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
}

    .ai-dots span {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: #6d5efc;
        animation: ai-dot 1.1s infinite ease-in-out;
    }

        .ai-dots span:nth-child(2) {
            animation-delay: .12s;
        }

        .ai-dots span:nth-child(3) {
            animation-delay: .24s;
        }

@keyframes ai-dot {
    0%,100% {
        transform: translateY(0);
        opacity: .35;
    }

    50% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* =========================================================
   Social platform icon toggles (Canva drafts + Scenarios)
   ========================================================= */

.platform-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.14);
    background: #fff;
    cursor: pointer;
    user-select: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
    /* default (inactive) */
    color: #9ca3af;
}

    .platform-icon-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(0,0,0,0.10);
    }

    .platform-icon-btn i {
        font-size: 16px;
        line-height: 1;
    }

    /* X fallback (ja nelieto bi-twitter-x) */
    .platform-icon-btn .x-letter {
        font-weight: 900;
        font-size: 15px;
        line-height: 1;
    }

    /* =========================
   ACTIVE states (match Canva)
   ========================= */

    /* Facebook: tava “Canva” stilā (accent gradient) */
    .platform-icon-btn.active.facebook {
        color: #fff;
        border-color: transparent;
        background: linear-gradient(135deg, #4f6cff, #8b5cf6);
    }

    /* Instagram: balta poga + rozā ikona (kā Canva draftos) */
    .platform-icon-btn.active.instagram {
        background: #fff;
        color: #E1306C;
        border-color: rgba(225, 48, 108, 0.25);
    }

    /* X: balta poga + melns X */
    .platform-icon-btn.active.x {
        background: #fff;
        color: #111;
        border-color: rgba(0,0,0,0.28);
    }

    /* LinkedIn: balta poga + zila ikona */
    .platform-icon-btn.active.linkedin {
        background: #fff;
        color: #0A66C2;
        border-color: rgba(10, 102, 194, 0.25);
    }

/* (Optional) dark-mode tweak, ja tev ir dark-mode klase */
body.dark-mode .platform-icon-btn {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.16);
}

    body.dark-mode .platform-icon-btn.active.instagram,
    body.dark-mode .platform-icon-btn.active.x,
    body.dark-mode .platform-icon-btn.active.linkedin {
        background: #fff; /* lai logo ir smuki redzami */
    }

.lang-switch a {
    text-decoration: none;
    font-size: 20px;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
}

    .lang-switch a.active {
        outline: 2px solid rgba(255,255,255,0.35);
    }