/*
================================================================
== BASE & SWIPER STYLES ==
================================================================
*/
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap");

:root {
  --font-size-h1: clamp(1.5rem, 4vw, 2.25rem);
  --font-size-h2: clamp(1.2rem, 3vw, 1.75rem);
  --font-size-p: clamp(0.9rem, 2vw, 1.1rem);
  --font-size-small: clamp(0.8rem, 1.5vw, 0.95rem);
}

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

body {
  font-family: "Roboto", sans-serif;
  background-image: radial-gradient(
    circle farthest-corner at 10% 20%,
    rgb(117, 25, 229) 0%,
    rgb(46, 143, 241) 90%
  );
}

.main-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  text-align: center;
  pointer-events: none;
  padding: 40px 0 60px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, transparent 100%);
}

.main-header h1 {
  color: #ffffff;
  font-size: clamp(1.1rem, 2.8vw, 1.7rem);
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  margin: 0;
  padding: 0 30px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
  opacity: 0.95;
}

.main-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.mpi-logo {
  height: clamp(40px, 8vw, 60px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0.8;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

section {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.swiper {
  width: 100%;
  padding: 50px 0;
}

.swiper-slide {
  width: clamp(300px, 60vw, 400px);
  aspect-ratio: 2 / 3;
  background: none;
  box-shadow: none;
  filter: blur(1px);
  perspective: 1200px;
  transition: filter 0.4s ease, z-index 0.4s ease;
}

.swiper-slide-active {
  filter: blur(0px);
}

.swiper-3d .swiper-slide-shadow-left,
.swiper-3d .swiper-slide-shadow-right {
  background-image: none;
}

.swiper-pagination-bullet,
.swiper-pagination-bullet-active {
  background: #fff;
}

/* 
================================================================
== HOVER EFFECT STYLES ==
================================================================
*/
.swiper-slide:hover {
  filter: blur(0px);
  z-index: 10;
}

.swiper-slide:hover .card-flipper {
  transform: scale(1.05);
}

.swiper-slide.is-flipped:hover .card-flipper {
  transform: rotateY(180deg) scale(1.05);
}

/* 
================================================================
== CARD FLIP & VISUAL STYLES ==
================================================================
*/
.click-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: pointer;
}

.card-flipper {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  transform-style: preserve-3d;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.swiper-slide.is-flipped .card-flipper {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 18px;
  overflow: hidden;
  background-image: radial-gradient(
    circle farthest-corner at 10% 20%,
    rgb(80, 25, 170) 0%,
    rgb(35, 100, 180) 90%
  );
}

.card-front {
  background-color: transparent;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.large-image .card-front {
  padding: 5px; /* Reduced from 20px */
}

.large-image .image-container {
  transform: scale(1.15); /* Scale up the container to fill more space */
}

.image-container {
  width: 100%;
  height: 100%;
}

/* --- THIS IS THE CORRECTED RULE --- */
.image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-back {
  color: white;
  transform: rotateY(180deg);
  background-color: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 25px;
  overflow-y: auto;
}

/* 
================================================================
== INFO BUTTON STYLES ==
================================================================
*/
.info-button {
  position: absolute;
  bottom: 15px;
  left: 15px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.info-button svg {
  width: 22px;
  height: 22px;
  stroke: white;
}

/* 
================================================================
== MODERN MARKDOWN STYLING ==
================================================================
*/
.markdown-content {
  text-align: left;
}

.markdown-content h1,
.markdown-content h2 {
  font-weight: 700;
  margin-bottom: 0.75em;
  line-height: 1.2;
}

.markdown-content h1 {
  font-size: var(--font-size-h1);
}

.markdown-content h2 {
  font-size: var(--font-size-h2);
}

.markdown-content p,
.markdown-content ul {
  font-size: var(--font-size-p);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 1em;
}

.markdown-content em {
  display: block;
  font-size: var(--font-size-small);
  color: rgba(255, 255, 255, 0.7);
  margin: -0.5em 0 1.5em 0;
  font-style: normal;
}

.markdown-content ul {
  padding-left: 20px;
}

.markdown-content li {
  margin-bottom: 0.5em;
}

.markdown-content li::marker {
  color: rgba(255, 255, 255, 0.6);
}
