/* ==========================================================
   PregledDiplome — style.css
   Slogovna predloga s svetlo modro temo po vzoru spo.html.
   Uporablja tipografijo Montserrat in Open Sans ter modro barvno paleto.
   Vsi komentarji v kodi so v slovenskem jeziku.
   ========================================================== */

/* ---------- Ponastavitev in osnovne nastavitve ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Primarna barvna paleta (prevzeta iz spo.html) */
    --primary:          #0056b3;
    --primary-dark:     #004494;
    --primary-light:    #e6f2ff;
    --primary-soft:     rgba(230, 242, 255, 0.95);
    --primary-hover:    #cce5ff;
    --accent-blue:      #80bdff;
    --border-blue:      #b8daff;
    --border-soft:      #d0e4ff;

    /* Ozadja strani in elementov */
    --bg-page:          #f0f8ff;   /* Svetlo modro ozadje iz spo.html */
    --bg-card:          #ffffff;
    --bg-card-subtle:   rgba(230, 242, 255, 0.95);
    --bg-card-hover:    #eef6ff;

    /* Barve besedila */
    --text-primary:     #1e293b;
    --text-secondary:   #475569;
    --text-muted:       #64748b;
    --text-on-primary:  #ffffff;

    /* Stanja opozoril in preverjanj */
    --status-success:   #10b981;
    --status-warning:   #d97706;
    --status-danger:    #ef4444;
    --status-major:     #ea580c;

    /* Tipografija */
    --font-heading:     'Montserrat', sans-serif;
    --font-body:        'Open Sans', Arial, sans-serif;
    --font-mono:        'JetBrains Mono', Consolas, monospace;

    /* Zaobljenost in sence */
    --radius-sm:        8px;
    --radius-md:        12px;
    --radius-lg:        16px;
    --shadow-sm:        0 2px 6px rgba(0, 68, 148, 0.06);
    --shadow-md:        0 4px 12px rgba(0, 68, 148, 0.08);
    --shadow-lg:        0 8px 24px rgba(0, 68, 148, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-dark);
}

/* ---------- Glava strani (po vzoru spo.html) ---------- */
.header {
    background: linear-gradient(180deg, #0056b3 0%, #004494 100%);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 68, 148, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: white;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.logo-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.3px;
    color: white;
}

.logo-sub {
    font-size: 12px;
    color: var(--primary-hover);
    font-weight: 500;
}

.nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.nav-link:hover {
    color: var(--primary-hover);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.nav-link-highlight {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ---------- Glavni vsebinski del ---------- */
.main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 24px 70px;
}

/* ---------- Predstavitveni razdelek (Hero) ---------- */
.hero {
    text-align: center;
    padding: 40px 10px 45px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    border: 1px solid var(--border-blue);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: utripPike 2s ease-in-out infinite;
}

@keyframes utripPike {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--primary-dark);
}

.gradient-text {
    color: var(--primary);
    display: inline-block;
}

.hero-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 660px;
    margin: 0 auto;
    line-height: 1.7;
}

.hero-desc strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* ---------- Kartice ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

/* ---------- Nalaganje datoteke ---------- */
.upload-section {
    max-width: 720px;
    margin: 0 auto 40px;
}

.upload-card {
    border-top: 4px solid var(--primary);
}

.drop-zone {
    border: 2px dashed var(--accent-blue);
    background-color: rgba(230, 242, 255, 0.6);
    border-radius: var(--radius-md);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-sm);
}

.drop-icon {
    width: 68px;
    height: 68px;
    background: rgba(0, 86, 179, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary);
    font-size: 28px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.drop-zone:hover .drop-icon {
    transform: translateY(-4px);
    background: rgba(0, 86, 179, 0.18);
}

.drop-title {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.drop-sub {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
}

.drop-formats {
    font-size: 13px;
    color: var(--text-muted);
}

.drop-formats span {
    display: inline-block;
    background: white;
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    padding: 2px 8px;
    margin: 0 3px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-dark);
}

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Prikaz izbrane datoteke */
.file-selected {
    margin-top: 14px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #eef9f2;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
}

.file-icon {
    width: 42px;
    height: 42px;
    background: #d1fae5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--status-success);
    font-size: 20px;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    overflow: hidden;
}

.file-name {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: #065f46;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    display: block;
    font-size: 12px;
    color: #047857;
}

.file-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #065f46;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.file-remove:hover {
    color: var(--status-danger);
    background: #fee2e2;
}

/* Gumb za oddajo */
.btn-submit {
    width: 100%;
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(180deg, #0056b3 0%, #004494 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 68, 148, 0.25);
    letter-spacing: 0.2px;
}

.btn-submit:hover:not(:disabled) {
    background: linear-gradient(180deg, #004494 0%, #003366 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 68, 148, 0.35);
}

.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    background: #94a3b8;
}

/* ---------- Prikaz napredka analize ---------- */
.progress-section {
    max-width: 720px;
    margin: 0 auto 40px;
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.progress-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border-blue);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: zasukVrtenja 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes zasukVrtenja {
    to { transform: rotate(360deg); }
}

.progress-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--primary-dark);
}

.progress-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.progress-bar-wrap {
    height: 8px;
    background: #e2e8f0;
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0056b3, #007bff);
    border-radius: 100px;
    transition: width 0.4s ease;
}

/* ---------- Rezultati analize ---------- */
.results-section {
    margin-top: 10px;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
    gap: 20px;
    flex-wrap: wrap;
    background: white;
    padding: 24px 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-blue);
    box-shadow: var(--shadow-sm);
}

.results-score {
    display: flex;
    align-items: center;
    gap: 22px;
}

.score-circle {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 5px solid var(--border-blue);
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.score-number {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    font-family: var(--font-heading);
}

.score-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

.score-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.score-desc {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Kartice s povzetki */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.summary-card {
    background: white;
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-sm);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sc-label {
    font-size: 12px;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
}

.sc-value {
    font-size: 32px;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: -1px;
    margin-top: 6px;
}

/* Zavihki za prikaz rezultatov */
.results-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border-blue);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    font-family: var(--font-heading);
    border-radius: 6px 6px 0 0;
}

.tab-btn:hover {
    color: var(--primary-dark);
    background: var(--primary-light);
}

.tab-btn.active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
    background: rgba(230, 242, 255, 0.7);
    font-weight: 700;
}

.tab-content.hidden {
    display: none;
}

/* Seznam napak in priporočil */
.issues-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.issue-item {
    background: white;
    border: 1px solid var(--border-soft);
    border-left-width: 5px;
    border-radius: var(--radius-sm);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.issue-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.issue-item.sev-critical { border-left-color: var(--status-danger); }
.issue-item.sev-major    { border-left-color: var(--status-major); }
.issue-item.sev-minor    { border-left-color: var(--status-warning); }
.issue-item.sev-ok       { border-left-color: var(--status-success); }

.issue-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.issue-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.badge-critical { background: #fee2e2; color: #991b1b; }
.badge-major    { background: #ffedd5; color: #9a3412; }
.badge-minor    { background: #fef3c7; color: #92400e; }
.badge-ok       { background: #d1fae5; color: #065f46; }

.issue-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.issue-category {
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--border-blue);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
    font-weight: 600;
}

.issue-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.issue-fix {
    font-size: 13.5px;
    color: var(--primary-dark);
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
}

.issue-fix strong {
    color: var(--primary-dark);
}

/* Kontrolni seznam (Checklist) */
.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
}

.cl-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: white;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.cl-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cl-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cl-icon.pass { background: #d1fae5; color: var(--status-success); }
.cl-icon.fail { background: #fee2e2; color: var(--status-danger); }
.cl-icon.warn { background: #fef3c7; color: var(--status-warning); }

.cl-text {
    font-size: 14px;
    line-height: 1.5;
}

.cl-label {
    font-weight: 600;
    color: var(--text-primary);
}

.cl-detail {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Celotno surovo poročilo */
.raw-report {
    white-space: pre-wrap;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    color: #334155;
    background: white;
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-sm);
    padding: 24px;
    max-height: 650px;
    overflow-y: auto;
}

/* Sekundarni gumb */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-sm);
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

/* ---------- Obvestilo o napaki ---------- */
.error-section {
    max-width: 520px;
    margin: 0 auto 40px;
}

.error-card {
    text-align: center;
    padding: 44px 30px;
    border-top: 4px solid var(--status-danger);
}

.error-icon {
    width: 64px;
    height: 64px;
    background: #fee2e2;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--status-danger);
    font-size: 28px;
}

.error-title {
    font-size: 22px;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 8px;
}

.error-msg {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 24px;
}

/* ---------- Razdelek funkcionalnosti (po vzoru spo.html) ---------- */
.features-section {
    margin-top: 70px;
    text-align: center;
}

.features-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 36px;
    color: var(--primary-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
    text-align: left;
}

.feature-card {
    background: rgba(230, 242, 255, 0.95); /* Enako kot #spo-content in .column-category na spo.html */
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: white;
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--primary);
    font-size: 20px;
    box-shadow: var(--shadow-sm);
}

.feature-card h3 {
    font-family: var(--font-heading);
    color: var(--primary);
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-size: 1.15rem;
    text-transform: none;
}

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

/* ---------- Noga strani (Footer - po vzoru spo.html) ---------- */
.footer {
    background-color: #004494; /* Natančno enako kot na spo.html */
    color: white;
    text-align: center;
    padding: 28px 20px;
    margin-top: auto;
    font-size: 14px;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer strong {
    font-family: var(--font-heading);
    letter-spacing: 0.3px;
}

.footer a {
    color: var(--primary-hover);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

.footer-copy {
    margin-top: 8px;
    font-size: 13px;
    opacity: 0.85;
}

/* ---------- Drsniki (Scrollbar) ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
    background: var(--border-blue);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* ---------- Prilagodljivost za mobilne naprave ---------- */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
    }

    .nav {
        justify-content: center;
        width: 100%;
    }

    .main {
        padding: 20px 16px 50px;
    }

    .hero {
        padding: 24px 0 30px;
    }

    .hero-title {
        font-size: 28px;
    }

    .card {
        padding: 20px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
    }

    .checklist-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
}
