@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
    --primary-color: #005A9E; /* Blå färg */
    --secondary-color: #E87722; /* Orange accent */
    --background-color: #f4f4f4;
    --text-color: #333;
    --slide-background: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

.presentation-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.slide-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

.slide-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
}

h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.icon-header {
    font-size: 2rem;
    margin: 1rem 0;
}

/* Tabell-styling */
.data-table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
}

.table-row {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.table-cell {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
}

.table-row.header .table-cell {
    font-weight: bold;
    background: #f5f5f5;
}

.analysis-text {
    font-style: italic;
    margin-top: 2rem;
}

/* Källförteckning */
.sources-list {
    text-align: left;
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sources-list p {
    margin: 1rem 0;
    line-height: 1.6;
    font-size: 0.9rem;
    color: #333;
    position: relative;
    z-index: 1;
}

.source-link {
    color: #0066cc !important;
    text-decoration: none !important;
    cursor: pointer !important;
    position: relative;
    z-index: 2;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.source-link:hover {
    color: #004499 !important;
    text-decoration: underline !important;
    background-color: rgba(0, 102, 204, 0.1);
}

.source-link:visited {
    color: #660099 !important;
}

.sources-list p:first-child {
    margin-top: 0;
}

.sources-list p:last-child {
    margin-bottom: 0;
}

/* Kontroller */
#prev-btn, #next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    z-index: 10;
}

#prev-btn {
    left: 1rem;
}

#next-btn {
    right: 1rem;
}

/* Språkväxling */
#lang-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
}

/* Svep-indikator */
.swipe-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsivitet */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .table-cell { padding: 0.5rem; font-size: 0.9rem; }
    #prev-btn, #next-btn { display: none; } /* Dölj pilar på mobil, förlita på svep */
}

@media (max-width: 480px) {
    .table-row {
        flex-direction: column;
    }
    
    .table-cell {
        text-align: left;
        padding: 0.5rem;
    }
    
    .table-cell:first-child {
        font-weight: bold;
        background: #f5f5f5;
    }
}

@media (max-width: 600px) {
  .data-table {
    display: block;
    width: 100%;
    font-size: 1em;
  }
  .data-table .table-row {
    display: block;
    margin-bottom: 1.2em;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 0.7em 0.5em;
  }
  .data-table .table-row.header {
    display: none;
  }
  .data-table .table-cell {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0.2em 0;
    border: none;
    background: none;
    font-size: 1em;
  }
  .data-table .table-cell:first-child {
    font-weight: bold;
    color: #1976d2;
    margin-bottom: 0.3em;
    background: none;
    font-size: 1.08em;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.3em;
    margin-top: 0.2em;
  }
  .data-table .table-cell:not(:first-child):before {
    content: attr(data-comm) ": ";
    font-weight: 500;
    color: #444;
    min-width: 70px;
    margin-right: 0.5em;
  }
}