/**
 * ╔═══════════════════════════════════════════════════════════════════════════╗
 * ║                    SciQuest.io - Glavni stili                             ║
 * ╠═══════════════════════════════════════════════════════════════════════════╣
 * ║  Ustvarjeno:  2025-01-16                                                  ║
 * ║  Osnova:      Agora Protocol style reference                              ║
 * ╚═══════════════════════════════════════════════════════════════════════════╝
 *
 * STRUKTURA:
 * 1. CSS Spremenljivke
 * 2. Reset
 * 3. Body & Noise Overlay
 * 4. Layout (.main, .wrapper, .container)
 * 5. Typography
 * 6. Buttons
 * 7. Inputs
 * 8. Cards
 * 9. Navigation
 * 10. Footer
 * 11. Tooltips
 * 12. Utilities
 * 13. Responsive
 */


/* ═══════════════════════════════════════════════════════════════════════════
   1. CSS SPREMENLJIVKE
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* Barve ozadja */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #1a1a1d;
    
    /* Barve besedila */
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    /* Poudarki - privzeto zelena */
    --accent: #22c55e;
    --accent-dim: #16a34a;
    --accent-glow: rgba(34, 197, 94, 0.3);
    
    /* Obrobe */
    --border: #27272a;
    
    /* Stanja */
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.3);
    
    /* Prehodi */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    
    /* Zaokroženja */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   2. RESET
   ═══════════════════════════════════════════════════════════════════════════ */

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

html, body {
    height: 100%;
}


/* ═══════════════════════════════════════════════════════════════════════════
   3. BODY & NOISE OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */

body {
    font-family: 'Play', sans-serif;
    background: var(--bg-primary);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    margin: 0;
    overflow-x: hidden;
}

/* Main content should expand to push footer down */
main {
    flex: 1;
}

/* Noise overlay - subtilna tekstura */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
}


/* ═══════════════════════════════════════════════════════════════════════════
   4. LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

/* Glavni container - omeji širino */
.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 16px;
}

.container-md {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-lg {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Card wrapper */
.wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
}

/* Centriran layout */
.main {
    text-align: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* Sekcije */
.section {
    margin-bottom: 24px;
}

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


/* ═══════════════════════════════════════════════════════════════════════════
   5. TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

/* Glavni naslov */
.title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.title-lg {
    font-size: 2.5rem;
}

.title-xl {
    font-size: 3rem;
    line-height: 1.1;
}

/* Akcent barva v naslovu */
.accent {
    color: var(--accent);
}

/* Podnaslov */
.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

/* Manjši podnaslov */
.tagline {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 24px;
}

/* Namig/hint */
.hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Naslovi sekcij */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Labele */
.label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Hiperpovezave */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
    color: var(--accent-dim);
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:active {
    opacity: 0.8;
}

/* Eksterni linki (target="_blank") - ikona za prepoznavo */
a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.75em;
    opacity: 0.7;
}

/* Linki v vsebini (znotraj paragrafov) */
p a, li a, td a {
    font-weight: 500;
    border-bottom: 1px solid var(--accent-glow);
}

p a:hover, li a:hover, td a:hover {
    border-bottom-color: var(--accent);
}


/* ═══════════════════════════════════════════════════════════════════════════
   6. BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Play', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

/* Primarni gumb */
.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-dim);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Sekundarni gumb */
.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Velikosti */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Polna širina */
.btn-block {
    display: flex;
    width: 100%;
}

/* Link stil */
.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    padding: 0;
    font-family: 'Play', sans-serif;
    cursor: pointer;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Disabled */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Akcijski gumb (siv → zelen ob hover) */
.btn-action {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-family: 'Play', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-action:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

.btn-action.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   7. INPUTS
   ═══════════════════════════════════════════════════════════════════════════ */

.input {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Play', sans-serif;
    font-size: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input::placeholder {
    color: var(--text-muted);
}

/* Select */
.select {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Play', sans-serif;
    font-size: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Input group */
.input-group {
    margin-bottom: 16px;
}

.input-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   8. CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
}

.card-hover:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}


/* ═══════════════════════════════════════════════════════════════════════════
   9. NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 11, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.nav-logo .logo-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nav-logo .logo-text {
    line-height: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-left: 48px;
    margin-right: auto;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--accent);
}

/* Skrij mobilne elemente na desktopu */
.nav-mobile-only {
    display: none;
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* ═══════════════════════════════════════════════════════════════════════════
   10. FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.social-link:hover {
    color: var(--accent);
    background: var(--bg-primary);
    transform: translateY(-2px);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 250px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
    line-height: 1.5;
}

.footer-links h4 {
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: var(--text);
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 6px 0;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════════════════════════════
   11. TOOLTIPS
   ═══════════════════════════════════════════════════════════════════════════ */

.tooltip {
    position: fixed;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 0.8rem;
    font-family: 'Play', sans-serif;
    color: var(--text);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
    white-space: nowrap;
    z-index: 1000;
}

.tooltip.visible {
    opacity: 1;
}

/* Tooltip s puščico - spodaj */
.tooltip--bottom::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--bg-tertiary);
}

/* Tooltip s puščico - zgoraj */
.tooltip--top::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-tertiary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   12. UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Skrij */
.hidden {
    display: none !important;
}

/* Tekst poravnava */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Barve teksta */
.text-muted {
    color: var(--text-muted);
}

.text-accent {
    color: var(--accent);
}

.text-danger {
    color: var(--danger);
}

/* Odmiki */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* Flex */
.flex {
    display: flex;
}

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

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }


/* ═══════════════════════════════════════════════════════════════════════════
   13. RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .container-lg {
        padding: 0 16px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-actions {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* Mobile nav open */
    .nav-links.nav-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        padding: 24px;
        gap: 16px;
    }
    
    .nav-links.nav-open .nav-link {
        font-size: 1.1rem;
        padding: 8px 0;
    }
    
    .nav-links.nav-open .nav-mobile-only {
        display: block;
    }
    
    .nav-links.nav-open .btn {
        margin-top: 8px;
    }
    
    .title-xl {
        font-size: 2.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container,
    .container-md,
    .container-lg {
        padding: 0 12px;
    }
    
    .wrapper {
        padding: 16px;
    }
    
    .title-xl {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   KONEC DATOTEKE
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════════════
   LANGUAGE SELECTOR
   ═══════════════════════════════════════════════════════════════════════════ */

.lang-dropdown {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-family: 'Play', sans-serif;
    font-size: 0.85rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    border-color: var(--text-muted);
    background: var(--bg-tertiary);
}

.lang-btn .flag {
    font-size: 1rem;
}

.lang-btn .arrow {
    font-size: 0.6rem;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.lang-dropdown.open .lang-btn .arrow {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    min-width: 150px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    z-index: 200;
}

.lang-dropdown.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* V nav meniju odpri navzdol */
.nav-actions .lang-menu {
    bottom: auto;
    top: 100%;
    margin-top: 8px;
    margin-bottom: 0;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    font-family: 'Play', sans-serif;
    font-size: 0.9rem;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background var(--transition-fast);
}

.lang-option:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.lang-option:hover {
    background: var(--bg-tertiary);
}

.lang-option.active {
    background: var(--accent);
    color: var(--bg-primary);
}

.lang-option .flag {
    font-size: 1.1rem;
}


/* ═══════════════════════════════════════════════════════════════════════════
   USER DROPDOWN
   ═══════════════════════════════════════════════════════════════════════════ */

.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-family: 'Play', sans-serif;
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-btn:hover {
    border-color: var(--text-muted);
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-btn .arrow {
    font-size: 0.6rem;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.user-dropdown.open .user-btn .arrow {
    transform: rotate(180deg);
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 180px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    z-index: 200;
}

.user-dropdown.open .user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: block;
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text);
    text-decoration: none;
    transition: background var(--transition-fast);
}

.user-menu-item:hover {
    background: var(--bg-tertiary);
}

.user-menu hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}


.footer-lang {
    display: flex;
    align-items: center;
}
