* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #eef3f8;
    color: #1f2937;
}

header {
    background: #123a63;
    color: white;
    padding: 15px 1%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand h2 {
    margin: 0;
    color: white;
}

.logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

nav a:hover {
    text-decoration: underline;
}

.hero {
    background: linear-gradient(135deg, #1e5b96, #2f6da8);
    color: white;
    text-align: center;
    padding: 110px 20px;
}

.hero h1 {
    font-size: 58px;
    margin-bottom: 20px;
    font-weight: bold;
}

.hero p {
    font-size: 24px;
    color: #e8f1ff;
}

.status {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 18px;
    background: white;
    color: #176b3a;
    border-radius: 25px;
    font-weight: bold;
}

main {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.intro {
    text-align: center;
    margin-bottom: 35px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;

}

.card {
    background: #ffffff;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.10);
    transition: all .3s ease;
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-8px);
    border-color: #2d8cff;
    box-shadow: 0 15px 35px rgba(0,0,0,.18);
}

 h3 {
    color: #123a63;
    margin-top: 0;
    white-space: nowrap;
}

.server-info {
    width: 80%;
    max-width: 900px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.server-info h2 {
    text-align: center;
    color: #123a63;
    margin-bottom: 25px;
}

.server-info table {
    width: 100%;
    border-collapse: collapse;
}

.server-info td {
    padding: 14px;
    border-bottom: 1px solid #ddd;
}

.server-info tr:hover {
    background: #f5f8fc;
}

footer {
    background: #123a63;
    color: white;
    text-align: center;
    padding: 22px;
    margin-top: 50px;
}
.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.featured {
    margin-top: 55px;
}

.featured h2 {
    text-align: center;
    color: #123a63;
    margin-bottom: 25px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.feature-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.10);
}

.feature-box h3 {
    color: #123a63;
    margin-top: 0;
}

.button {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 16px;
    background: #1f5f99;
    color: white;
    text-decoration: none;
    border-radius: 7px;
}

.button:hover {
    background: #123a63;
}

@media (max-width: 850px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    nav {
        text-align: center;
    }

    nav a {
        display: inline-block;
        margin: 6px 8px;
    }

    .hero h1 {
        font-size: 32px;
    }
}
.card-link {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.card-link:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}
.logo {
    height: 55px;
    width: auto;
    vertical-align: middle;
    margin-right: 12px;
}
.brand {
    display: flex;
    align-items: center;
}

.brand h2 {
    display: none;
}

.logo {
    width: 170px;
    height: auto;
    display: block;
    margin: 0 auto;
}
nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

nav a,
nav a:visited,
nav a:active {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    color: #7dd3fc;
}
.social-links {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a,
.social-links a:visited {
    color: white;
    text-decoration: none;
}

.social-links a:hover {
    color: #7dd3fc;
}
.page-hero {
    background: #1f5f99;
    color: white;
    text-align: center;
    padding: 55px 20px;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: 38px;
}

.page-hero p {
    margin: 0;
    font-size: 18px;
}
@media (max-width: 900px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .card h3 {
        white-space: normal;
    }
}
/* Teoriprovets stora vita ruta */
.quiz-box {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

/* Frågenummer och tid */
.quiz-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

/* Alla svar ska ligga under varandra */
#answer-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 25px;
}

/* Varje svarsalternativ */
.answer-option {
    display: flex !important;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 14px 18px;
    background: #f5f8fc;
    border: 2px solid #d6e0eb;
    border-radius: 9px;
    cursor: pointer;
    line-height: 1.4;
}

/* När musen hålls över svaret */
.answer-option:hover {
    background: #e7f1fb;
    border-color: #1f5f99;
}

/* Radioknappen */
.answer-option input {
    margin: 0 14px 0 0;
    width: 18px;
    height: 18px;
}

/* Föregående och Nästa */
.quiz-buttons {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    margin-top: 30px;
}

.quiz-buttons button {
    min-width: 140px;
    padding: 12px 22px;
    border: none;
    border-radius: 7px;
    background: #1f5f99;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.quiz-buttons button:hover {
    background: #123a63;
}

.quiz-buttons button:disabled {
    background: #aeb8c3;
    cursor: not-allowed;
}
.brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand-text h1 {
    color: white;
    font-size: 42px;
    margin: 0;
}

.brand-text p {
    color: #d8e8ff;
    margin-top: 8px;
    font-size: 22px;
}

.logo {
    width: 150px;
    height: auto;
    border-radius: 50%;
}
header {
    padding: 12px 20px;
}

.logo {
    width: 125px;
}

.brand-text h1 {
    font-size: 36px;
}

.brand-text p {
    font-size: 18px;
    margin-top: 4px;
}

.hero {
    min-height: 300px;
    padding: 70px 20px;
}

.hero h1 {
    font-size: 48px;
}

.hero p {
    font-size: 21px;
}
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        padding: 12px;
    }

    .brand {
        justify-content: center;
    }

    .logo {
        width: 90px;
    }

    .brand-text h1 {
        font-size: 28px;
    }

    .brand-text p {
        font-size: 15px;
    }

    nav {
        margin-top: 15px;
        text-align: center;
    }

    nav a {
        display: inline-block;
        margin: 6px 8px;
    }

    .hero {
        min-height: auto;
        padding: 55px 15px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero p {
        font-size: 18px;
    }
}
.hero-content {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero-logo {
    flex: 0 0 420px;
    display: flex;
    justify-content: center;
}

.hero-logo img {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
}
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-logo {
        flex: none;
        width: 100%;
    }

    .hero {
    min-height: 0;
    padding: 15px 20px;
}

.hero-content {
    min-height: 0;
}

.hero-logo {
    flex: 0 0 260px;
}

.hero-logo img {
    width: 260px;
    max-width: 260px;
    height: auto;
}
@media (max-width: 768px) {
    .hero-logo {
        flex: none;
    }

    .hero-logo img {
        width: 190px;
        max-width: 190px;
    }
}
/* SLUTLIG HERO-DESIGN */
.hero {
    min-height: 0 !important;
    height: auto !important;
    padding: 18px 20px !important;
}

.hero-content {
    min-height: 0 !important;
    height: auto !important;
    max-width: 1200px;
    gap: 30px;
}

.hero-logo {
    flex: 0 0 250px !important;
}

.hero-logo img {
    width: 250px !important;
    max-width: 250px !important;
    height: auto !important;
}

.hero h1 {
    margin-top: 0;
    margin-bottom: 12px;
}

.hero p {
    margin-bottom: 12px;
}
/* TEST – TVINGA HERO ATT BLI LÄGRE */
.hero {
    height: 320px !important;
    min-height: 320px !important;
    padding: 0 20px !important;
    overflow: hidden;
}

.hero-content {
    height: 100% !important;
    min-height: 0 !important;
    display: flex;
    align-items: center;
}

.hero-logo {
    flex: 0 0 240px !important;
}

.hero-logo img {
    width: 240px !important;
    max-width: 240px !important;
}
}
.hero {
    height: 260px !important;
    min-height: 260px !important;
    padding: 0 20px !important;
}

.hero-content {
    height: 260px !important;
    min-height: 260px !important;
}

.hero-logo img {
    width: 200px !important;
    max-width: 200px !important;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    margin-top: 22px;
}

.hero-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 17px;
    font-weight: bold;
    transition: 0.3s;
}

.primary-button {
    background: #0d6efd;
    color: white;
    border: 2px solid #0d6efd;
}

.primary-button:hover {
    background: #0a58ca;
    border-color: #0a58ca;
    transform: translateY(-2px);
}

.secondary-button {
    background: transparent;
    color: white;
    border: 2px solid #74c7ff;
}

.secondary-button:hover {
    background: white;
    color: #17466f;
    transform: translateY(-2px);
}
@media (max-width: 768px) {
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-button {
        padding: 11px 18px;
        font-size: 16px;
    }
}
/* SLUTLIG KORTDESIGN */
.card {
    background: #ffffff !important;
    border-radius: 18px !important;
    padding: 25px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.10) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
    border: 2px solid transparent !important;
}

.card:hover {
    transform: translateY(-8px) !important;
    border-color: #2d8cff !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.18) !important;
}
.cards {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
}

@media (max-width: 768px) {
    .cards {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .card {
        width: auto !important;
    }
}
@media (max-width: 768px) {

    header {
        padding: 15px 12px !important;
    }

    .brand {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .logo {
        width: 105px !important;
    }

    .brand-text h1 {
        font-size: 30px !important;
    }

    .brand-text p {
        font-size: 16px !important;
        margin: 4px 0 0;
    }

    nav {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 14px;
        margin-top: 18px;
    }

    nav a {
        margin: 0 !important;
        font-size: 15px;
        white-space: nowrap;
    }

    .hero {
        height: auto !important;
        min-height: 0 !important;
        padding: 35px 18px !important;
        overflow: visible !important;
    }

    .hero-content {
        height: auto !important;
        min-height: 0 !important;
        flex-direction: column;
        gap: 25px;
    }

    .hero-text {
        text-align: center;
    }

    .hero h1 {
        font-size: 38px !important;
        line-height: 1.1;
    }

    .hero p {
        font-size: 19px !important;
    }

    .hero-buttons {
        justify-content: center;
        gap: 12px;
    }

    .hero-button {
        padding: 11px 16px;
        font-size: 15px;
    }

    .hero-logo {
        flex: none !important;
        width: 100%;
    }

    .hero-logo img {
        width: 190px !important;
        max-width: 190px !important;
        margin: 0 auto;
    }

    main {
        padding: 35px 18px !important;
    }

    .intro {
        margin-bottom: 25px;
    }

    .intro h2 {
        font-size: 30px;
    }

    .intro p {
        font-size: 17px;
        line-height: 1.5;
    }
}
/* ===== MIKIS PORTAL HEADER - SLUTLIG ===== */

header {
    background: #123f68 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 20px !important;
}

.brand {
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
}

.logo {
    width: 110px !important;
    height: auto !important;
}

.brand-text {
    text-align: left !important;
}

.brand-text h1 {
    color: white !important;
    font-size: 32px !important;
    margin: 0 !important;
}

.brand-text p {
    color: white !important;
    font-size: 16px !important;
    margin: 4px 0 0 !important;
}
/* ÖVNINGAR */

.exercise-box {
    max-width: 750px;
    margin: 15px auto;
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
}

#exercise-image {
    display: block;
    max-width: 260px;
    width: 100%;
    margin: 12px auto;
    border-radius: 8px;
}

.exercise-option {
    display: block;
    width: 100%;
    padding: 11px 15px;
    margin: 6px 0;
    text-align: left;
    border: 2px solid #d5dce5;
    border-radius: 8px;
    background: #f5f8fc;
    cursor: pointer;
    font-size: 16px;
}

/* Rätt svar */
.exercise-option.correct {
    background: #d4edda;
    border-color: #28a745;
}

/* Fel valt svar */
.exercise-option.wrong {
    background: #f8d7da;
    border-color: #dc3545;
}

.exercise-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
}

.correct-feedback {
    background: #d4edda;
}

.wrong-feedback {
    background: #f8d7da;
}

.exercise-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.exercise-buttons button {
    padding: 12px 25px;
    cursor: pointer;
}
/* PROVKARTA */

#question-map {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin: 25px 0;
}

.map-button {
    padding: 8px 0;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-weight: bold;
}

.map-button.current {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.map-button.answered {
    background: #d4edda;
    border-color: #28a745;
}

.map-button.current.answered {
    background: #0d6efd;
    color: white;
}

@media (max-width: 768px) {
    #question-map {
        grid-template-columns: repeat(5, 1fr);
    }
}
.quiz-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

#finish-button {
    grid-column: 1 / -1;
    width: 100%;
}

.quiz-buttons button {
    width: 100%;
}
.quiz-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.quiz-buttons button {
    width: auto;
}

#finish-button {
    width: auto;
}
@media (max-width: 768px) {
    .quiz-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
#previous-button {
    grid-column: 1;
    grid-row: 1;
}

#next-button {
    grid-column: 2;
    grid-row: 1;
}

#finish-button {
    grid-column: 1 / 3;
    grid-row: 2;
    width: 100%;
}

}
.map-button.correct-result {
    background: #d4edda !important;
    border-color: #28a745 !important;
    color: #155724 !important;
}

.map-button.wrong-result {
    background: #f8d7da !important;
    border-color: #dc3545 !important;
    color: #721c24 !important;
}

.map-button.unanswered-result {
    background: #fff3cd !important;
    border-color: #ffc107 !important;
    color: #856404 !important;
}
/* Mindre blå rubrik på övningssidan */
.exercise-hero {
    padding: 25px 20px;
    min-height: auto;
}
/* Lägre blå rubrik på övningssidan */
.exercise-hero {
    padding: 15px 20px !important;
    min-height: auto !important;
}

.exercise-hero h1 {
    margin: 0 0 8px;
}

.exercise-hero p {
    margin: 0;
}
/* Övningsnummer uppe till höger */
#exercise-number {
    text-align: right;
    margin: 0 0 -25px 0;
}

/* Frågan högre upp */
#exercise-question {
    margin-top: 0;
    margin-bottom: 10px;
}
/* MOBIL – centrera logga och portaltext */
@media (max-width: 768px) {

    header .brand {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    header .brand-text {
        width: 100%;
        text-align: center;
    }

    header .brand-text h1,
    header .brand-text p {
        text-align: center;
        margin-left: 0;
        margin-right: 0;
    }
}
.section-intro {
    text-align: center;
    width: 100%;
    margin: 0 auto 25px auto;
}

.section-intro h2 {
    text-align: center;
    margin-bottom: 10px;
}

.section-intro p {
    text-align: center;
    margin: 0;
}
html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

footer {
    margin-top: auto;
}
/* Centrera Prov-kortet på dator */
@media (min-width: 769px) {
    .korkort-cards .card:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: 280px;
    }
}