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

/* ====== GLOBAL ====== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #fafafa;
  color: #2c2b2b;
  line-height: 1.6;
}

h1, h2 {
  font-weight: 700;
  margin-bottom: 15px;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }

p { margin-bottom: 15px; }

section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 40px;
}

.top-logo {
  display: block;
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1000px;
  padding: 0 40px;
  z-index: 10;
}

.top-logo img {
  height: 50px;
  width: auto;
  transition: transform 0.2s ease;
}

.top-logo:hover img {
  transform: scale(1.05);
}

/* ====== HERO ====== */
.hero {
  position: relative;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4rem;
  font-family: 'Raleway', sans-serif;
}

.hero img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(95%);
  top: 0;
  left: 0;
}

.hero-text {
  position: relative;
  text-align: center;
  color: #fff;
  z-index: 1;
  max-width: 500px;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.hero-text p {
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.btn {
  display: inline-block;
  margin-top: 15px;
  padding: 12px 24px;
  background: #fff;
  color: #2c2b2b;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transform: translateY(-3px);
}

/* ====== TEXTBLOCK ====== */
.text-block {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.text-block .text {
  flex: 1;
}

.text-block .image {
  flex: 1;
}

.text-block .image img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Små skärmar – stapla text och bild under varandra */
@media (max-width: 768px) {
  .text-block-inner {
    flex-direction: column; /* stapla vertikalt */
    gap: 20px;              /* lite mindre mellanrum */
  }

  .text-block .text,
  .text-block .image {
    flex: 1 1 100%;         /* ta hela bredden */
  }
}

/* ====== FLIP-CARDS ====== */
.flipcards {
  text-align: center;
}

.card-grid {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  justify-content: center;
}

.card {
  perspective: 1000px;
}

.card-inner {
  width: 290px;
  height: 290px;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.2rem;
  padding: 20px;
}

.card-front {
  background: #ffcf4d;
  color: #2c2b2b;
}
.card-back {
  background: #fff;
  color: #2c2b2b;
  transform: rotateY(180deg);
}

/* ====== ACCORDION ====== */
.accordion h2 {
  margin-bottom: 20px;
}

.accordion-item {
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.accordion-header {
  position: relative;
  width: 100%;
  text-align: left;
  background: #ffcf4d;
  color: #2c2b2b;
  padding: 15px;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

.accordion-header::after {
  content: "+";
  position: absolute;
  right: 20px;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.accordion-header.active::after {
  content: "−";
}

.accordion-content {
  display: none;
  padding: 15px;
  background: #fff;
}

/* ====== VIDEO ====== */
.video-block video {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ====== QUIZ ====== */
.quiz h2 {
  margin-bottom: 10px;
}

.quiz-option {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 12px;
  border: 2px solid #2c2b2b;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  font-weight: 500;
  color: #2c2b2b;
}

.quiz-option:hover {
  background: #2c2b2b;
  color: #fff;
}

.quiz-option.correct {
  background: #4CAF50;
  color: #fff;
  border-color: #4CAF50;
}

.quiz-option.wrong {
  background: #ddd;
  color: #555;
  border-color: #bbb;
}

/* ====== FOOTER ====== */
footer {
  text-align: center;
  padding: 60px 20px;
  background: #2c2b2b;
  color: #fff;
  font-family: 'Raleway', sans-serif;
}

footer h2 {
  margin-bottom: 20px;
}

footer .btn {
  background: #fff;
  color: #2c2b2b;
}

footer .btn:hover {
  background: #f0f0f0;
}

/* POPUP-MODAL SLUTFÖR KURS */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.6);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
  max-width: 400px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.close {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
}

#completionForm input[type="text"],
#completionForm input[type="email"],
#coursePassword {
  width: 100%;
  padding: 12px 10px;
  font-size: 1rem;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}
