
@font-face {
    font-family: 'K2D';
    src: url('K2D-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'K2D';
    src: url('K2D-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'K2D';
    src: url('K2D-MediumItalic.ttf') format('truetype');
    font-weight: 500;
    font-style: italic;
}
body {
    font-family: 'K2D', Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
    background-image: url('BG-d4a.jpg'); /* Sti til dit baggrundsbillede */
    background-size: cover; /* Dækker hele skærmen */
    background-repeat: no-repeat; /* Forhindrer gentagelse af billedet */
}
header {
    background-color: #0a96ab;
    color: white;
    text-align: center;
	padding: 5px;
    width: 100%;
}

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

.intro-text {
	Padding: 0px 15px 0px 15px;
	text-align: justify;
	text-justify: inter-word;
    max-width: 1200px;
    margin: 0px auto 0px auto; /* Centreret med samme bredde som article */
    box-sizing: border-box;
}

/* Flexbox Grid Container */
article.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0px auto;
    padding: 10px;
    box-sizing: border-box;
}

/* Kortindstilling */
.card {
    flex: 1 1 calc(33.333% - 40px); /* Flex-basis for 3 kolonner, minus gap */
    max-width: 450px; /* Maksimal bredde for kort */
    min-width: 300px; /* Minimum bredde for kort */
    height: 300px;
    margin-bottom: 0px;
    perspective: 1000px;
    position: relative;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card:hover .card-inner,
.card:focus .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 10px;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.card-front {
    background-color: #ffffff;
    border: 4px solid;
}

/* Retter .text-box på forsiden til at have afrundede hjørner og korrekt padding RETTET*/
.card-front .text-box p {
    background-color: var(--tema-color); /* Brug temaets farve */
    padding: 8px;
    border-radius: 8px;
    box-sizing: border-box;
    margin: 8px 0; /* Justeret afstand */
    display: inline-block;
	font-size: 0.85em;
}

/* Justerer h3 til at matche bagsiden */
h3 {
    font-family: 'K2D';
    font-weight: bold;
    font-size: 0.85em;
    text-align: left;
    margin-top: 4px; /* Tilpasset afstand */
    margin-bottom: 4px;
    background-color: transparent;
    padding: 0;
}

.card-back {
    background-color: #ffffff;
    border: 4px solid;
    transform: rotateY(180deg);
    overflow: hidden; /* Forhindrer overflow */
}

.tema-image {
    width: 55px;
    height: 55px;
    margin-right: 10px;
}

.middle-image {
    width: auto; /* Juster efter behov */
    height: 20px;
	align-items: center;
    margin-left: 30px;
    margin-right: 20px;
}

.logo {
    width: auto;
    height: 35px;
    margin-left: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

/* Overskrifter */
h2 {
    font-family: 'K2D';
    font-weight: bold;
    font-size: 0.95em;
    text-align: left;
    margin-bottom: 0;
    margin-top: 0; /* Fjerner bundmargin */
}

/* Farvet baggrund og afrundede hjørner kun på p elementer på bagsiden */
.card-back p {
    background-color: var(--tema-color); /* Brug temaets farve */
    padding: 8px;
    border-radius: 8px;
    box-sizing: border-box;
    margin: 8px 0; /* Justeret afstand */
    display: inline-block;
}

/* Behold den gennemsigtige baggrund for .text-box på bagsiden */
.card-back .text-box {
    background-color: transparent;
    padding: 0;
	font-size: 0.85em;
}

/* Fjerner baggrundsfarve fra h3 elementer på bagsiden */
.card-back h3 {
    background-color: transparent;
    padding: 0;
    margin-top: 4px; /* Tilpasset afstand til tekstboksen */
    margin-bottom: 4px;
}

/* Farvetemaer for de forskellige kort */
.tema1 .card-front, .tema1 .card-back {
    border-color: #d7d98a;
}

.tema1 .text-box p {
    background-color: #d7d98a;
}

.tema2 .card-front, .tema2 .card-back {
    border-color: #e4dad9;
}

.tema2 .text-box p {
    background-color: #e4dad9;
}

.tema3 .card-front, .tema3 .card-back {
    border-color: #e8cda4;
}

.tema3 .text-box p {
    background-color: #e8cda4;
}

.tema4 .card-front, .tema4 .card-back {
    border-color: #e3e7f1;
}

.tema4 .text-box p {
    background-color: #e3e7f1;
}

.tema5 .card-front, .tema5 .card-back {
    border-color: #c8c8c8;
}

.tema5 .text-box p {
    background-color: #c8c8c8;
}

.tema6 .card-front, .tema6 .card-back {
    border-color: #f1eed6;
}

.tema6 .text-box p {
    background-color: #f1eed6;
}

.tema7 .card-front, .tema7 .card-back {
    border-color: #ffd0df;
}

.tema7 .text-box p {
    background-color: #ffd0df;
}

.tema8 .card-front, .tema8 .card-back {
    border-color: #ededed;
}

.tema8 .text-box p {
    background-color: #ededed;
}

/* Media Query for små skærme */
@media only screen and (max-device-width: 411px) {
	header {
		height: auto;
	}	
	.intro-text {
		padding: 5px;
		text-align: center;
		margin: 0px 0px 0px 0px; /* Centreret med samme bredde som article */
	}
    article.container {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .card {
        flex: 1 1 calc(100%); /* Flex-basis for 1 kolonne */
        width: 100%;
        height: 45vh;
    }
	
    h2 {
        font-size: 1em;
    }

    h3 {
        font-size: 0.9em;
    }

    p {
        font-size: 0.85em;
    }

    .tema-image {
        width: 30px;
        height: 30px;
    }
	    .logo {
        width: auto;
        height: 30px;
    }
	
	.middle-image {
		height: 15px;
		margin-left: 40px;
	}
	.footer-image {
		width: 185%;
		height: auto;
	}
}
	
@media only screen and (max-width: 768px) {
	.intro-text {
		padding: 5px;
		text-align: center;
		margin: 0px 0px 0px 0px; /* Centreret med samme bredde som article */
	}
    article.container {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .card {
        flex: 1 1 calc(100%); /* Flex-basis for 1 kolonne */
        width: 100%;
        height: 34vh;
    }

    h2 {
        font-size: 1em;
    }

    h3 {
        font-size: 0.9em;
    }

    p {
        font-size: 0.85em;
    }

    .tema-image {
        width: 30px;
        height: 30px;
    }
	.logo {
		width: auto;
        height: 30px;
    }
	.middle-image {
		height: 15px;
		margin-left: 40px;
	}
	.footer-image {
		width: 75%;
		height: auto;
		display: block;
		margin: 15px auto;
}	
}
@media only screen and (min-width 769px) and (max-width: 1800px) {	
	.intro-text {
		padding: 5px;
		text-align: center;
		max-width: 1200px;
		margin: 0px 0px 0px 0px; /* Centreret med samme bredde som article */
	}
    article.container {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .card {
        flex: 1 1 calc(100%); /* Flex-basis for 1 kolonne */
        width: 100%;
        height: 50vh;
    }

    h2 {
        font-size: 1em;
    }

    h3 {
        font-size: 0.9em;
    }

    p {
        font-size: 0.85em;
    }

    .logo, .tema-image {
        width: 30px;
        height: 30px;
    }
}

/* CSS for italic note on the front side */
.card-front .text-box .italic-note {
    font-family: 'K2D', Arial, sans-serif;
	background-color: transparent;
    font-style: italic;
    text-align: right;
	position: absolute;
    right: 0px;
    bottom: 0px;
    margin-top: auto;
    padding-top: 10px;
    font-size: 0.85em;
    color: #333;
}
footer {
    color: white;
    text-align: center;
    width: 100%;
}

.footer-image {
    width: 55%;
    height: auto;
    display: block;
    margin: 25px auto 0px auto;
}


/* v2: GTranslate integration */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.site-title { margin: 0; line-height: 1.2; }

/* Ensure the widget doesn't wrap awkwardly */
.gtranslate_wrapper { flex-shrink: 0; }

/* Floating alternative: show this if you want a bottom-right floating globe */
.gt-float {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 9999;
    display: none; /* Change to block to use floating version */
}

/* If you prefer floating version, uncomment the rule below
   (or add it to your CSS) to hide inline and show floating:
   .gtranslate_wrapper#gt_inline { display:none; }
   .gtranslate_wrapper#gt_float { display:block; }
*/


/* v3: GTranslate floating widget */
.gtranslate_wrapper#gt_float {
    position: fixed !important;
    right: 14px !important;
    bottom: 14px !important;
    z-index: 9999 !important;
    display: block !important;
}
/* Make sure the header stays centered */
header {
    display: block !important;
    text-align: center !important;
}
header h1, .site-title {
    margin: 0;
}


/* v4: Custom globe & flags size */
.gtranslate_wrapper#gt_float .gt_switcher {
    transform: scale(0.6); /* shrink overall widget */
    transform-origin: bottom right;
}

.gtranslate_wrapper#gt_float .gt_switcher .gt_selected,
.gtranslate_wrapper#gt_float .gt_switcher .gt_option {
    font-size: 13px !important; /* smaller text and flags */
}

.gtranslate_wrapper#gt_float .gt_switcher img {
    width: 13px !important; /* shrink flags */
    height: auto !important;
}


/* v5: Keep background image fixed and anchored bottom */
body {
    background-attachment: fixed;
    background-position: center bottom;
}


/* v10: Balanced side margins = globe width, footer logo matches cards width, mobile globe behavior */

/* 0) Tunables */
:root{
  --page-side-gap: clamp(12px, 3vw, 28px);          /* minimal nice gutters */
  --globe-size: 55px;                                /* approx. width of the globe widget */
  --globe-gap: 10px;                                 /* spacing from screen edge */
  --balanced-gap: max(var(--page-side-gap), calc(var(--globe-size) + var(--globe-gap)));
}

/* 1) Reserve equal space left & right so content never hugs the edges.
   Use body padding so ALL sections (header, intro, cards, footer) align. */
body{
  padding-left: var(--balanced-gap);
  padding-right: var(--balanced-gap);
  box-sizing: border-box;
}

/* 2) Ensure the card grid still centers within its max width */
article.container{
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

/* 3) Floating globe stays bottom-right; size tuned to --globe-size */
.gtranslate_wrapper#gt_float{
  right: var(--globe-gap) !important;
  bottom: var(--globe-gap) !important;
}
.gtranslate_wrapper#gt_float .gt_switcher{
  transform-origin: bottom right;
  /* scale the widget so its overall width ~ --globe-size */
  /* 64px works well for default globe; adjust if needed */
  transform: scale(0.60);
}

/* 4) Footer logo should be exactly as wide as the cards (container width).
      Since the footer image sits outside the .container, constrain it to same width and center it. */
.footer-image{
  display: block;
  width: 100%;
  max-width: 1200px;   /* match article.container */
  height: auto;
  margin: 25px auto 0 auto; /* center */
}

/* 5) Keep background image behavior from v5 */
body{
  background-attachment: fixed;
  background-position: center bottom;
}

/* 6) Mobile adjustments */
@media (max-width: 600px){
  /* Give content a bit less side padding, but still balanced */
  :root{
    --page-side-gap: 12px;
    --globe-size: 48px;
    --globe-gap: 10px;
  }
  /* Shrink globe a bit more on phones */
  .gtranslate_wrapper#gt_float .gt_switcher{
    transform: scale(0.62);
  }
  /* Avoid overlap at the bottom: add padding-bottom roughly equal to globe height */
  body{
    padding-bottom: calc(var(--globe-size) + var(--globe-gap) + 10px);
  }
}

/* 7) Support iOS safe areas on the right */
@supports (padding: max(0px)){
  body{
    padding-right: max(var(--balanced-gap), env(safe-area-inset-right));
    padding-left: max(var(--balanced-gap), env(safe-area-inset-left));
  }
}


/* v11: Full-bleed header background + no horizontal scrollbar */

/* Never show a horizontal scrollbar */
html, body {
  overflow-x: hidden;
}

/* Header full-bleed background: extend to viewport edges while keeping content aligned */
header {
  /* pull background out to the edges */
  margin-left: calc(-1 * var(--balanced-gap));
  margin-right: calc(-1 * var(--balanced-gap));
  /* keep inner content aligned with page padding */
  padding-left: var(--balanced-gap);
  padding-right: var(--balanced-gap);
}

/* Respect safe areas (iOS notches etc.) */
@supports (padding: max(0px)) {
  header {
    margin-left: calc(-1 * max(var(--balanced-gap), env(safe-area-inset-left)));
    margin-right: calc(-1 * max(var(--balanced-gap), env(safe-area-inset-right)));
    padding-left: max(var(--balanced-gap), env(safe-area-inset-left));
    padding-right: max(var(--balanced-gap), env(safe-area-inset-right));
  }
}

/* v11.9: Small screens – truly responsive header logo */

/* Keep large screen globe adjustments */
.gtranslate_wrapper#gt_float .gt_switcher {
  transform: scale(0.60) !important;
  transform-origin: bottom right !important;
}
.gtranslate_wrapper#gt_float .gt_switcher img {
  width: 14px !important;
  height: auto !important;
}
.gtranslate_wrapper#gt_float .gt_switcher .gt_selected,
.gtranslate_wrapper#gt_float .gt_switcher .gt_option {
  font-size: 12px !important;
}

/* Small screens */
@media (max-width: 600px) {
  body {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 80px; /* reserve space for footer with globe */
  }
  header {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  header h1 {
    background-color: #0a96ab; /* bg only under title */
    color: white;
    width: 100%;
    margin: 0 0 8px 0;
    padding: 6px 0;
  }
  /* Responsive logo below title without any background color */
  header::after {
    content: "" !important;
    display: block;
    background-color: #ffff; 
    background-image: url('NSR-D4A-logo.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 100%;
    max-width: 100%;
    height: clamp(48px, 14vw, 120px);
    margin: 8px auto;
  }

  /* Hide the original footer image on small screens (we show it in header instead) */
  footer .footer-image {
    display: none;
  }

  /* Keep footer fixed with globe visible */
  footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.0);
    z-index: 9999;
    padding: 5px;
    text-align: center;
  }
  footer .gtranslate_wrapper#gt_float {
    position: static !important;
    display: inline-block !important;
    margin: 0 auto;
  }
}
