body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #f9fafb;
    margin: 0;
    min-height: 100vh;
    line-height: 1.6;
}

header {
    background: linear-gradient(to right, #0d9488, #10b981);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

h1 {
    margin: 0;
    font-size: 2rem;
}

.concept-accordion {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.accordion-item {
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.accordion-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Rainbow pastel colors for accordions */
.accordion-item:nth-child(1) .accordion-header { background-color: #ffebee; }  /* Light Red */
.accordion-item:nth-child(2) .accordion-header { background-color: #ffe0b2; }  /* Light Orange */
.accordion-item:nth-child(3) .accordion-header { background-color: #fff9c4; }  /* Light Yellow */
.accordion-item:nth-child(4) .accordion-header { background-color: #f1f8e9; }  /* Light Green */
.accordion-item:nth-child(5) .accordion-header { background-color: #e3f2fd; }  /* Light Blue */
.accordion-item:nth-child(6) .accordion-header { background-color: #e8eaf6; }  /* Light Indigo */
.accordion-item:nth-child(7) .accordion-header { background-color: #f3e5f5; }  /* Light Purple */
.accordion-item:nth-child(8) .accordion-header { background-color: #fce4ec; }  /* Pink Red */
.accordion-item:nth-child(9) .accordion-header { background-color: #fff3e0; }  /* Deep Orange */
.accordion-item:nth-child(10) .accordion-header { background-color: #fffde7; }  /* Pale Yellow */
.accordion-item:nth-child(11) .accordion-header { background-color: #e8f5e9; }  /* Pale Green */
.accordion-item:nth-child(12) .accordion-header { background-color: #e1f5fe; }  /* Pale Blue */
.accordion-item:nth-child(13) .accordion-header { background-color: #ede7f6; }  /* Pale Purple */
.accordion-item:nth-child(14) .accordion-header { background-color: #fce4ec; }  /* Pale Pink */
.accordion-item:nth-child(15) .accordion-header { background-color: #ffebee; }  /* Light Red 2 */
.accordion-item:nth-child(16) .accordion-header { background-color: #fff3e0; }  /* Light Orange 2 */

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.accordion-header:hover {
    filter: brightness(0.95);
}

.accordion-header:focus {
    outline: 2px solid #0d9488;
    outline-offset: -2px;
}

.accordion-content {
    display: none;
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.accordion-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.accordion-content p {
    margin: 0 0 1rem 0;
}

.accordion-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.accordion-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 0.5rem;
}

iframe {
    margin: 1rem 0;
    border-radius: 0.5rem;
    width: 100%;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #4b5563;
    font-size: 0.875rem;
    margin-top: 2rem;
}

/* Style for search input */
.search-container {
    display: flex;
    justify-content: center;
    margin: 1rem auto;
    max-width: 500px;
}

.search-box {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-size: 1rem;
}
/* Style for inline code blocks */
code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
    font-family: monospace;
    font-size: 0.95rem;
    color: #d63384;
}

/* Style for tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 1rem;
    text-align: left;
}

th {
    background-color: #f0f0f0;
    font-weight: bold;
}
/* Generelt for PDF */
@media print {
    .accordion-content {
        padding: 2rem;
        margin: 0 auto;
        page-break-inside: avoid; /* Forhindrer at deler av accordion splittes */
        font-family: Arial, sans-serif;
        font-size: 14px;
        line-height: 1.5;
        color: #333;
    }

    h2, h3 {
        page-break-after: avoid; /* Hindrer sidebrudd etter overskrifter */
    }

    p, ul, li, pre {
        page-break-inside: avoid; /* Hindrer sidebrudd inni tekstblokker */
    }

    table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 1rem;
    }

    table, th, td {
        border: 1px solid #ddd;
    }

    th, td {
        padding: 0.5rem;
        text-align: left;
    }

    /* Ekstra styling for en ren PDF */
    body {
        background: #fff;
        margin: 0;
    }

    /* Sidebrudd */
    .page-break {
        page-break-before: always;
    }
}

/* Gjør YouTube-videoer responsive */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 format */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-top: 10px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Skjul YouTube-videoene ved utskrift */
@media print {
    .video-container {
        display: none;
    }
}

/* Styling for PDF-knappen */
.pdf-download-btn {
    float: right;
    background-color: #007bff; /* Blå bakgrunn */
    color: white; /* Hvit tekst */
    border: none; /* Fjern ramme */
    border-radius: 5px; /* Myke hjørner */
    padding: 5px 10px; /* Innvendig marg */
    font-size: 1rem; /* Tekststørrelse */
    cursor: pointer; /* Pekerhånd når musen er over */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Jevne overganger */
}

.pdf-download-btn:hover {
    background-color: #0056b3; /* Mørkere blå ved hover */
    transform: scale(1.05); /* Liten zoom-effekt */
}

.pdf-download-btn:active {
    background-color: #004494; /* Enda mørkere blå ved klikk */
    transform: scale(0.95); /* Liten inntrykk-effekt */
}


.header-download {
    position: relative;
    top: -2px; /* Juster for bedre plassering */
}

/* Forhindre pre/code blokker fra å strekke seg ut til høyre */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 5px;
}

code {
    font-family: monospace;
    font-size: 14px;
    background-color: #f5f5f5;
    padding: 2px 5px;
    border-radius: 4px;
}
/* Container for bokser */
.computational-thinking-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 10px;
    margin-bottom: 20px;
}

/* Boksene */
.thinking-box {
    background-color: #007bff;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    width: 30%;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.thinking-box:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Modaler (pop-ups) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

.close:hover {
    color: red;
}
.computational-thinking-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 20px;
    max-width: 100%;
}

.thinking-box {
    background: none;
    color: #333;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    text-align: center;
    flex: 1;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.thinking-box:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 40%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.close {
    float: right;
    font-size: 20px;
    cursor: pointer;
}

.close:hover {
    color: red;
}
