/* =========================
   RESET + BAS
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* FIX: stoppa vit kant / horisontell scroll på små skärmar */
html,
body {
  width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body {
  font-family: "Amiri Quran", serif;
  background-color: #f5f5f5;
  color: #222;
  line-height: 1.6;
}

main {
  flex: 1;
}

/* =========================
   HEADER + LOGGA + NAV
========================= */
header {
  background-color: #082358;
  color: white;
  font-family: "Amiri Quran", serif;
  text-align: center;
  padding-bottom: 25px;
  position: relative;
}

header .logo {
  height: 100px;
  margin-bottom: -65px;
  margin-right: 80%;
}

/* Hamburger menu button - hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 2000;
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
}

.hamburger span {
  width: 30px;
  height: 3px;
  background-color: #082358;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* Nav wrapper */
nav {
  z-index: 1001;
  position: relative;
}

/* Nav list */
nav ul {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 1002;
  position: relative;
}

/* Nav links */
nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 1.3rem;
  font-family: "Georgia", serif;
  padding: 0.5rem 1rem;
  border-radius: 0;
  position: relative;
  z-index: 1003;
  pointer-events: all;
  /* Force links to be clickable */
}

nav ul li a:hover,
nav ul li a:focus {
  background-color: #0a3d91;
}

/* Centrera navigationen */
header nav ul {
  display: flex;
  list-style: none;
  justify-content: center;
  padding: 0;
}

header nav ul li {
  margin-left: 1.5rem;
}

header nav ul li:first-child {
  margin-left: 0;
}

/* =========================
   BILDER
========================= */
.top-image {
  width: 100%;
  object-fit: cover;
}

/* Centrera image 7.png */
img[alt="line"] {
  display: block;
  width: 100%;
  height: auto;
}

/* Avslutande bild */
.end-image {
  width: 100%;
  height: auto;
  margin-bottom: -20px;
}

/* =========================
   ABOUT
========================= */
.about-section {
  max-width: 1000px;
  text-align: center;
}

.about-section h2 {
  font-size: 2.8rem;
  margin-bottom: 2rem;
  color: #000000;
  letter-spacing: 1px;
}

.about-section p {
  font-size: 1.7rem;
  text-align: center;
  color: #000000;
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
}

/* =========================
   FOOTER
========================= */
footer {
  background-color: #313131;
  color: white;
  padding: 1rem 2rem;
  position: relative;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 0;
  border-top: none;
}

.footer-bottom p {
  font-size: 0.9rem;
  margin: 0;
  flex: 1;
}

.footer-center {
  text-align: center;
}

.footer-right {
  text-align: right;
  font-size: 0.8rem;
  opacity: 0.8;
}

.footer-right a {
  color: #bdbdbd;
  text-decoration: none;
}

.footer-right a:hover {
  text-decoration: underline;
}

/* =========================
   INFO-RADER
========================= */
.info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.info-row-reverse {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: row-reverse;
  gap: 3rem;
  max-width: 70%;
}

/* =========================
   TEXT (reverse)
========================= */
.text-content-reverse {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.text-content-reverse h2 {
  font-size: 4rem;
  margin-bottom: 2rem;
  color: #000000;
  text-align: left;
  margin-left: 24rem;
}

.text-content-reverse p {
  font-size: 2rem;
  line-height: 1.6;
  color: #000000;
  text-align: left;
  max-width: 800px;
  margin: 0;
  margin-left: 10rem;
  margin-bottom: 15rem;
}

/* =========================
   TEXT (normal)
========================= */
.text-content h2 {
  font-size: 6rem;
  color: #000000;
  text-align: center;
  margin-right: 15rem;
  margin-bottom: 3rem;
  margin-top: 10rem;
}

.text-content p {
  font-size: 2rem;
  line-height: 1.6;
  color: #000000;
  text-align: left;
  max-width: 1000px;
  margin: 0;
  padding-right: 10rem;
}

/* =========================
   LOGO BIG
   (GÄLLER ALLA SKÄRMAR: absolut till höger)
========================= */
.logo-big {
  width: 900px;
  height: auto;
}

/* Ankare + absolut placering */
.info-row-reverse {
  position: relative;
}

.info-row-reverse .logo-big {
  position: absolute;
  right: -550px;
  top: 0;
  width: 900px;
}

/* =========================
   Övrigt
========================= */
.info-row p {
  font-size: 2rem;
  margin: 0;
  margin-left: 0;
  margin-top: 0;
}

.info-row.reverse img {
  width: 70%;
  height: auto;
}

.info-row.reverse p {
  font-size: 2rem;
  margin: 0;
  max-width: 600px;
  margin-left: 3rem;
  margin-right: 0;
  margin-top: 0;
  text-align: center;
}

/* Ny klass för centrerade bilder */
.centered-image {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  height: auto;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.centered-image.full-width-image {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  height: auto;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.about-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(1.2);
}

/* OBS: Görgen + bakgrund ORÖRT (inga ändringar här) */
.gorgen-background {
  width: 40%;
  height: auto;
  z-index: 1;
}

.gorgen-character {
  position: absolute;
  width: 45%;
  height: auto;
  z-index: 2;
  top: 8%;
}

/* =========================
   FRÅN HÄR (trans + overlay + images) HAR JAG FIXAT
   - images-row alltid horisontell (även på mobil)
   - inga wraps/columns; bilderna skalar ner istället
========================= */

/* Container */
.trans {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* så overlay inte kan "spilla" */
}

/* Bakgrundsbilden */
.trans .centered-image.full-width-image {
  display: block;
  width: 100%;
  height: auto;
}

/* Overlay: läggs exakt ovanpå bilden */
.overlay-content {
  position: absolute;
  inset: 0;
  z-index: 3;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: clamp(1rem, 3vw, 3rem);
  gap: clamp(1rem, 2vw, 2.5rem);
}

/* Text boxes row */
.text-boxes-row {
  display: flex;
  width: min(1600px, 100%);
  gap: clamp(1rem, 2vw, 3rem);
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

/* Individual text box */
.text-box {
  flex: 1 1 280px;
  background-color: #101a2d;
  color: white;

  padding: clamp(1.25rem, 2.5vw, 3rem);
  text-align: center;

  border-radius: 2px;
}

.text-box h3 {
  font-size: clamp(1.4rem, 1.2vw + 1rem, 2.2rem);
  margin-bottom: 1rem;
  color: white;
}

.text-box p {
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.25rem);
  line-height: 1.6;
  margin: 0;
}

/* Images row (ALLTID HORISONTELL) */
.images-row {
  display: flex;
  width: min(1600px, 100%);
  justify-content: center;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 3rem);

  flex-direction: row;
  flex-wrap: nowrap;
  /* ❗ aldrig wrap */
  padding: 0 1rem;
  /* lite luft på små skärmar */
}

/* Images (skalar ner istället för wrap/column) */
.overlay-image {
  width: 48%;
  max-width: 700px;
  min-width: 0;
  height: auto;
  display: block;
  border-radius: 0;
}

/* =========================================================
   RESPONSIVE (behåll horisontell – skala bara)
========================================================= */

@media (max-width: 1024px) {
  .overlay-content {
    justify-content: flex-start;
    padding-top: 4rem;
    /* FIX: mer luft uppåt så boxarna hamnar lägre */
  }

  .text-boxes-row {
    margin-top: 2rem;
  }

  .overlay-image {
    width: 46%;
    max-width: 520px;
  }
}

/* Mobil: fortfarande horisontell (ingen column) */
@media (max-width: 640px) {
  .text-boxes-row {
    gap: 1rem;
    margin-top: 3rem;
    /* FIX: ännu mer ner på mobil */
  }

  .overlay-content {
    padding-top: 6rem;
    /* FIX: mer topp-luft på mobil */
  }

  .images-row {
    gap: 0.75rem;
    padding: 0 0.75rem;
    flex-direction: row;
    /* ✅ tvinga horisontell */
    flex-wrap: nowrap;
    /* ✅ aldrig wrap */
  }

  .overlay-image {
    width: 49%;
    max-width: 100%;
  }
}

/* =========================================================
   DINA ÄNDRINGAR (breakpoints) – ORÖRDA
========================================================= */

@media (max-width: 1800px) {
  .info-row-reverse .logo-big {
    width: 700px;
    right: -40%;
  }
}

@media (max-width: 1700px) {
  .info-row-reverse .logo-big {
    width: 600px;
    right: -40%;
    margin-top: 100px;
  }

}

@media (max-width: 1600px) {
  .info-row-reverse .logo-big {
    width: 500px;
    right: -40%;
    margin-top: 100px;
  }

}

/* 1500px och ner  */
@media (max-width: 1500px) {
  .text-content h2 {
    margin-right: 0;
    text-align: center;
    white-space: normal;
  }

  .text-content p {
    padding-right: 0;
    text-align: center;
   margin-right: 3rem;
     transform: translateX(-31%);
     margin-top: 25%;
     width: 600px;
  }

  .info-row-reverse {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 60%;
    margin: 0 auto;
    align-items: center;
    text-align: center;
  }

  .info-row-reverse .text-content-reverse h2 {
    margin-top: 4rem;
  }

  .info-row-reverse .logo-big {
    position: static;
    width: min(700px, 90%);
    margin-top: 50px;
  }

  .info-row-reverse .text-content-reverse h2,
  .info-row-reverse .text-content-reverse p {
    margin-left: 0;
    text-align: center;
  }

  .info-row-reverse .text-content-reverse p {
    max-width: 60ch;
    margin: 0 auto 2rem auto;
  }


  /* Viktigt: behåll horisontell även här */
  .images-row {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .overlay-image {
    width: 48%;
    max-width: 700px;
  }
  .text-boxes-row {
    margin-top: 10rem;
  }
}

/* =========================================================
   TILLÄGG: ANNAN BAKGRUND PÅ NEDRE DELEN AV SIDAN
========================================================= */

.trans {
  background-color: #101a2d;
}

.end-image {
  background-color: #101a2d;
}

footer {
  background-color: #101a2d;
}

/* =========================================================
   TILLÄGG: images-row ska följa bakgrunden
   + bilderna ska alltid passa skärmstorlek
   (FIXAT: ingen wrap + horisontell)
========================================================= */

.images-row {
  background: transparent;
  width: 100%;
  padding: 0 2rem;
  flex-wrap: nowrap;
  /* ✅ ändrat från wrap */
  flex-direction: row;
  /* ✅ säkerställ horisontell */
  gap: 2rem;
  margin-top: 4rem;
}

/* Responsiva bilder (FIXAT: två bredvid varandra) */
.overlay-image {
  width: 48%;
  /* ✅ ändrat från 100% */
  max-width: 700px;
  min-width: 0;
  height: auto;
  display: block;
}

/* =========================================================
   EXTRA RESPONSIVT
========================================================= */

/* Tablet */
@media (max-width: 1024px) {
  .overlay-image {
    max-width: 520px;
  }

  .text-boxes-row {
    margin-top: 20rem;
  }

.text-content h2 {
    margin-right: 0;      /* ❗ tar bort orsaken till vit kant */
    font-size: 4rem;      /* mindre så den får plats */
    text-align: center;
    white-space: normal;  /* tillåt radbrytning */
  }

}

/* =========================================================
   MOBILE ONLY - Optimerade stilar för mobil (640px och mindre)
========================================================= */
@media (max-width: 640px) {
  /* Show hamburger menu */
  .hamburger {
    display: flex;
  }
  
  /* Header och logo */
  header .logo {
    height: 70px;
    margin-bottom: -45px;
    margin-right: 75%;
    max-width: 90%;
  }
  
  header {
    padding-bottom: 15px;
    background-color: transparent;
    position: absolute;
    width: 100%;
    z-index: 100;
  }
  
  /* Navigation - mobile menu */
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background-color: #082358;
    transition: right 0.3s ease;
    z-index: 1500;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
  }
  
  nav.active {
    right: 0;
  }
  
  nav ul {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 4rem 0 1rem 0;
    height: 100%;
    gap: 0;
  }
  
  nav ul li {
    margin: 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  nav ul li a {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    text-align: left;
  }
  
  nav ul li a:hover {
    background-color: #0a3d91;
  }
  
  /* Info-row sections - stack vertically */
  .info-row {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    padding-top: 17rem;
    gap: 1.5rem;
  }
  
  .info-row-reverse {
    flex-direction: column;
    max-width: 95%;
    padding: 1rem;
    gap: 1.5rem;
    margin: 0 auto;
  }
  
  /* Görgen images */
  .gorgen-background {
    display: none;
  }
  
  .gorgen-character {
    width: 80%;
    max-width: 350px;
    position: relative;
    top: 0;
    margin-top: 0;
    left: 0;
  }
  
  /* Text content */
  .text-content,
  .text-content-reverse {
    width: 100%;
  }
  
  .text-content h2 {
    font-size: 2.2rem;
    margin: 0.5rem 0 1rem 0;
    text-align: center;
    padding: 0 1rem;
  }
  
  .text-content p {
    font-size: 1.1rem;
    text-align: center;
    margin: 0 auto 1.5rem auto;
    padding: 0 1rem;
    max-width: 100%;
    transform: none;
  }
  
  .text-content-reverse h2 {
    font-size: 2.2rem;
    margin: 0.5rem 0 1rem 0;
    text-align: center;
    padding: 0 1rem;
  }
  
  .text-content-reverse p {
    font-size: 1.1rem;
    text-align: center;
    margin: 0 auto 1.5rem auto;
    padding: 0 1rem;
    max-width: 100%;
  }
  
  /* Logo big - make static and centered */
  .info-row-reverse .logo-big {
    position: static;
    width: 70%;
    max-width: 400px;
    margin: 1.5rem auto;
  }
  
  /* Trans section - show background at top on mobile */
  .trans {
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
    background-color: #101a2d;
  }
  
  .trans .centered-image.full-width-image {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    object-position: top;
    margin: 0;
  }
  
  /* Overlay content - below background image */
  .overlay-content {
    position: relative;
    padding: 0.5rem;
    background-color: #101a2d;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: auto;
  }
  
  /* Text boxes - vertical stack on mobile */
  .text-boxes-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin: 0;
  }
  
  .text-box {
    flex: 1 1 auto;
    padding: 0.75rem;
    max-width: 100%;
    margin: 0;
  }
  
  .text-box h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }
  
  .text-box p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  /* Images row - vertical stack on mobile */
  .images-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .overlay-image {
    width: 100%;
    max-width: 100%;
  }
  
  /* Footer */
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
  }
  
  .footer-center,
  .footer-right {
    text-align: center;
  }
  
  .footer-bottom p {
    font-size: 0.75rem;
  }
  
  footer {
    padding: 0.75rem 1rem;
  }
}

/* Extra small mobile (480px och mindre) */
@media (max-width: 480px) {
  header .logo {
    height: 60px;
    margin-bottom: -35px;
    margin-right: 70%;
  }
  
  nav ul li a {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }
  
  .text-content h2,
  .text-content-reverse h2 {
    font-size: 1.8rem;
  }
  
  .text-content p,
  .text-content-reverse p {
    font-size: 1rem;
  }
  
  .gorgen-background {
    width: 80%;
  }
  
  .gorgen-character {
    width: 85%;
    margin-top: -58%;
  }
}

/* Members page specific styles */
.members-main {
  padding-top: 5rem;
}

.members-content {
  text-align: center;
}

.members-content h1 {
  font-size: 3rem;
  color: #082358;
  margin-bottom: 2rem;
}

.members-content p {
  font-size: 1.5rem;
  color: #444;
}