/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap");
* {
  margin: 0;
  padding: 0;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
}


.stack-area {
  width: 100%;
  height: 300vh;
  position: relative;
  background: white;
  display: flex;
}

.left {
  height: 100vh;
  flex-basis: 50%;
  position: sticky;
  top: 0;
  left: 0;
}

.right {
  height: 100vh;
  flex-basis: 50%;
  position: sticky;
  top: 0;
}

/* Styling for the left elements content starts here... */
.left {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  align-items: center;
  flex-direction: column;
}

.title {
  width: 420px;
  font-size: 84px;
  font-family: poppins;
  font-weight: 700;
  line-height: 88px;
}

.sub-title {
  width: 420px;
  font-family: poppins;
  font-size: 15px;
  margin-top: 30px;
}

/* Styling for the left elements content ends here... */

.card {
  width: 350px;
  height: 350px;
  border-radius: 25px;
  margin-bottom: 10px;
  position: absolute;
  top: calc(50% - 175px);
  left: calc(50% - 175px);
  transition: 0.5s ease-in-out;
}

.card:nth-child(1) {
  background: rgb(64, 122, 255);
}

.card:nth-child(2) {
  background: rgb(221, 62, 88);
}

.card:nth-child(3) {
  background: rgb(186, 113, 245);
}

.card:nth-child(4) {
  background: rgb(247, 92, 208);
}

/* Styling for the card content starts here... */
.card {
  box-sizing: border-box;
  padding: 35px;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}

.sub {
  font-family: poppins;
  font-size: 20px;
  font-weight: 700;
}

.content {
  font-family: poppins;
  font-size: 40px;
  font-weight: 600;
  line-height: 54px;
}
/* Styling for the card content ends here... */

.away {
  transform-origin: bottom left;
}

/* Animation mobile optimisée */
@media (max-width: 1024px) {
  .stack-area {
    flex-direction: column;
    height: calc(
      100vh * var(--card-count, 4)
    ); /* Dynamique basé sur le nombre de cartes */
  }

  .left {
    height: 50vh; /* Moins de hauteur pour laisser place aux cartes */
    padding-top: 5vh;
  }

  .right {
    height: calc(50vh * var(--card-count, 4));
    padding-bottom: 20vh; /* Espace pour la dernière carte */
  }

  .card {
    width: 85vw;
    max-width: 400px;
    height: 60vh;
    max-height: 400px;
    left: 50%;
    top: auto;
    bottom: 10%;
    transform: translateX(-50%) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    opacity: 0.95;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }

  .card:not(.away) {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    z-index: 10;
  }

  .away {
    transform: translateX(-50%) translateY(-75vh) scale(0.8) !important;
    opacity: 0;
  }

  /* Ajustements pour très petits écrans */
  @media (max-height: 700px) {
    .card {
      height: 50vh;
      max-height: 350px;
    }
  }
}

/* Exemple d'image css */
:root {
  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: hsl(82, 60%, 28%);
  --title-color: hsl(0, 0%, 15%);
  --text-color: hsl(0, 0%, 35%);
  --body-color: hsl(0, 0%, 95%);
  --container-color: hsl(0, 0%, 100%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Poppins", sans-serif;
  --h2-font-size: 1.25rem;
  --small-font-size: 0.813rem;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1120px) {
  :root {
    --h2-font-size: 1.5rem;
    --small-font-size: 0.875rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

.imgt {
  font-family: var(--body-font);
  background-color: var(--body-color);
  color: var(--text-color);
}

.imgt h1 {
  text-align: center;
  padding-top: 18rem;
  font-size: 60px;
  font-family: poppins;
  font-weight: 700;
  line-height: 88px;
  color: black;
}

.imgt p {
  text-align: center;
  padding-top: 40px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*=============== CARD ===============*/
.container3 {
  display: grid;
  place-items: center;
  margin-inline: 1.5rem;
  padding-block: 5rem;
}

.card__container {
  display: grid;
  row-gap: 3.5rem;
  display: flex;
}

.card__article {
  position: relative;
  overflow: hidden;
}

.card__img {
  width: 328px;
  border-radius: 1.5rem;
}

.card__data {
  width: 280px;
  background-color: var(--container-color);
  padding: 1.5rem 2rem;
  box-shadow: 0 8px 24px hsla(0, 0%, 0%, 0.15);
  border-radius: 1rem;
  position: absolute;
  bottom: -9rem;
  left: 0;
  right: 0;
  margin-inline: auto;
  opacity: 0;
  transition: opacity 1s 1s;
}

.card__description {
  display: block;
  font-size: var(--small-font-size);
  margin-bottom: 0.25rem;
}

.card__title {
  font-size: var(--h2-font-size);
  font-weight: 500;
  color: var(--title-color);
  margin-bottom: 0.75rem;
}

.card__button {
  text-decoration: none;
  font-size: var(--small-font-size);
  font-weight: 500;
  color: var(--first-color);
}

.card__button:hover {
  text-decoration: underline;
}

/* Naming animations in hover */
.card__article:hover .card__data {
  animation: show-data 1s forwards;
  opacity: 1;
  transition: opacity 0.3s;
}

.card__article:hover {
  animation: remove-overflow 2s forwards;
}

.card__article:not(:hover) {
  animation: show-overflow 2s forwards;
}

.card__article:not(:hover) .card__data {
  animation: remove-data 1s forwards;
}

/* Card animation */
@keyframes show-data {
  50% {
    transform: translateY(-10rem);
  }
  100% {
    transform: translateY(-7rem);
  }
}

@keyframes remove-overflow {
  to {
    overflow: initial;
  }
}

@keyframes remove-data {
  0% {
    transform: translateY(-7rem);
  }
  50% {
    transform: translateY(-10rem);
  }
  100% {
    transform: translateY(0.5rem);
  }
}

@keyframes show-overflow {
  0% {
    overflow: initial;
    pointer-events: none;
  }
  50% {
    overflow: hidden;
  }
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 340px) {
  .container3 {
    margin-inline: 1rem;
  }

  .card__data {
    width: 250px;
    padding: 1rem;
  }
}

/* For medium devices */
@media screen and (min-width: 768px) {
  .card__container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.5rem;
  }
}

/* For large devices */
@media screen and (min-width: 1120px) {
  .container3 {
    height: 100vh;
  }

  .card__container {
    grid-template-columns: repeat(3, 1fr);
  }
  .card__img {
    width: 348px;
  }
  .card__data {
    width: 316px;
    padding-inline: 2.5rem;
  }
}

/* ------ SECTION CORRIGÉE : ANIMATION DE FIN DE PAGE ------ */

.lol {
  color: hsl(0 0% 10%);
  font-family: "Libre Baskerville", "SF Pro Text", "SF Pro Icons",
    "AOS Icons", "Helvetica Neue", Helvetica, Arial, sans-serif, system-ui;
}

.lol::before {
  --size: 60px;
  --line: hsl(0 0% 10% / 0.5);
  content: "";
  height: 100vh;
  width: 100vw;
  position: fixed;
  background: linear-gradient(
        90deg,
        var(--line) 1px,
        transparent 1px var(--size)
      )
      50% 50% / var(--size) var(--size),
    linear-gradient(var(--line) 1px, transparent 1px var(--size)) 50% 50% /
      var(--size) var(--size);
  mask: linear-gradient(-15deg, transparent 50%, white);
  top: 0;
  transform-style: flat;
  pointer-events: none;
  z-index: -1;
}

.lol h1 {
  position: relative;
  font-size: clamp(2rem, 3vw + 1rem, 8rem);
}

.lol h2,
.lol p {
  margin: 0;
}

hr {
  height: 2px;
  width: 100%;
  margin: 1rem 0;
}

.lol header {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 2rem;
}

.lol h1 span {
  font-size: 0.5em;
  display: block;
  text-align: center;
  font-variant: small-caps;
}

.lol h1::after {
  content: "™";
  position: absolute;
  top: 0;
  left: 100%;
  font-size: 0.75em;
}

/* --- Mise en page par défaut (Fallback) pour les navigateurs non compatibles --- */

.lol main {
  padding: 0 2rem 4rem 2rem;
}

.content2 {
  display: block; /* Affichage simple en bloc */
}

.tiles {
  display: none; /* On cache les 'tiles' qui ne servent que pour l'animation */
}

.section--one {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: auto;
}

.lol article {
  position: relative; /* On s'assure que la position n'est pas absolue */
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 8px;
  color: hsl(0 0% 20%);
}

.title-wrap, .content-wrap {
  line-height: 1.5;
}

/* On cache les sections vides qui ne servent qu'à l'animation */
.section--two, .section--three, .section--four {
  display: none;
}


/* --- Styles pour l'animation (uniquement si 'animation-timeline' est supporté) --- */
@supports (animation-timeline: scroll()) {
  /* On restaure les styles nécessaires à l'animation */
  .lol {
    display: grid;
    place-items: center;
    min-height: 100vh;
    timeline-scope: --section-one, --section-two, --section-three, --section-four;
  }

  .lol header {
    height: 50vh;
    display: grid;
    place-items: end;
    padding: 0;
  }
  
  main {
    padding: 0;
    view-timeline-name: --main;
    width: 100%;
  }

  .content2 {
    min-height: 100vh;
    display: grid;
    grid-template: 1fr 1fr / 1fr;
    place-items: center;
    gap: 4rem;
    position: sticky;
    top: 0;
    margin-bottom: 50vh;
    padding: 2rem;
  }
  
  .tiles {
      display: flex; /* On ré-affiche les tiles */
      flex-direction: column-reverse;
      justify-self: center;
      width: clamp(150px, 40vmin, 290px);
      --gap: clamp(11.25px, 3vmin, 21.75px);
      translate: 0 calc(50% + (var(--gap)));
  }
  
  .tile {
      height: var(--gap);
      position: relative;
  }
  
  .tile::after, .tile::before {
      content: "";
      background-image: url(https://assets.codepen.io/605876/translucent-panel.png);
      position: absolute;
      width: 100%;
      aspect-ratio: 1160 / 521;
      background-size: cover;
      top: 50%;
      left: 50%;
      translate: -50% -50%;
  }

  .tile::after {
      opacity: 0;
      background-image: url(https://assets.codepen.io/605876/color-panel.png);
      filter: hue-rotate(var(--r, 0deg));
  }

  .tile:nth-of-type(1)::after {
      background-image: url(https://assets.codepen.io/605876/bottom-panel.png);
      filter: hue-rotate(var(--r, 0deg)) brightness(2);
  }

  .tile:nth-of-type(4)::after {
      opacity: 1;
  }

  .section--one {
    display: block; /* On annule la grille du fallback */
    view-timeline-name: --section-one;
    height: 100%;
    position: relative;
    width: 100%;
    max-width: 40ch;
  }
  
  /* On réactive les sections pour le défilement */
  .section--two, .section--three, .section--four {
      display: block;
      height: 80vh;
      position: relative;
  }
  .section--two { view-timeline-name: --section-two; }
  .section--three { view-timeline-name: --section-three; }
  .section--four { view-timeline-name: --section-four; }
  

  .lol article {
    display: grid;
    position: absolute; /* On remet la position absolue */
    height: 100%;
    grid-template-rows: auto auto 1fr;
    top: 0;
    left: 0;
    font-weight: 300;
    padding: 0;
    background: transparent;
    border: none;
    backdrop-filter: none;
  }

  :is(.title-wrap, .content-wrap) {
      mask: linear-gradient(transparent, white 10px calc(100% - 10px), transparent);
  }

  @media (min-width: 768px) {
      .content2 {
          grid-template: 1fr / 1fr 1fr;
      }
      .lol article {
          grid-template-rows: 1fr auto 1fr;
      }
      .section--one {
          justify-self: start;
      }
      .tiles {
          justify-self: end;
      }
  }
  
  /* --- Keyframes et logique d'animation originale --- */
  .tiles {
    --orig: 0;
    --dest: calc(-100% + var(--gap));
    animation: translate both linear;
    animation-timeline: --main;
    animation-range: entry 150vh exit -100vh;
  }

  @media (max-width: 768px) {
    .tiles {
      --orig: 200%;
      --dest: 0%;
      align-self: center;
    }
  }

  .lol article :is(h2, p),
  .tile,
  .tile::before,
  .tile::after {
    animation: journey both linear;
  }

  .lol article :is(h2, p),
  .tile,
  .tile::after,
  .tile::before {
    animation-range: entry 20% entry 120%;
  }
  .lol article:nth-of-type(1) :is(h2, p),
  .tile:nth-of-type(4)::after,
  .tile:nth-of-type(4)::before {
    animation-range: entry -80% entry 20%;
  }
  .tile::after,
  .tile::before {
    --start: 0;
    --end: 0;
    --origin: -50% -50%;
    --destination: -50% -50%;
    --via: -50% -50%;
  }
  .tile::before {
    --start: 1;
    --mid: 1;
    --end: 0.5;
  }
  .tile:nth-of-type(4)::after {
    --start: 1;
  }
  .tile:nth-of-type(4) {
    --origin: 0 -150%;
  }
  .tile:nth-of-type(1)::after {
    --start: 0;
    --mid: 1;
    --end: 1;
  }
  article :is(h2, p) {
    --origin: 0 100%;
    --via: 0 0;
    --destination: 0 -100%;
    --start: 0;
    --mid: 1;
    --end: 0;
  }
  article:nth-of-type(4) :is(h2, p) {
    --destination: 0 0;
    --end: 1;
  }
  article:nth-of-type(1) :is(h2, p) {
    --origin: 0 0;
    --via: 0 0;
    --destination: 0 -100%;
    --start: 1;
    --end: 0;
  }
  .tile {
    --origin: 0 0;
    --via: 0 -150%;
    --destination: 0 -150%;
  }
  .tile:nth-of-type(3),
  .tile:nth-of-type(3)::after,
  .tile:nth-of-type(4),
  .tile:nth-of-type(4)::after,
  article:nth-of-type(1) :is(h2, p),
  article:nth-of-type(2) :is(h2, p) {
    animation-timeline: --section-two;
  }
  .tile:nth-of-type(2),
  .tile:nth-of-type(2)::after,
  article:nth-of-type(3) :is(h2, p) {
    animation-timeline: --section-three;
  }
  .tile:nth-of-type(1),
  .tile:nth-of-type(1)::after,
  article:nth-of-type(4) :is(h2, p) {
    animation-timeline: --section-four;
  }
  @keyframes translate {
    from {
      transform: translateY(var(--orig));
    }
    to {
      transform: translateY(var(--dest));
    }
  }
  @keyframes journey {
    0% {
      translate: var(--origin, 0 0);
      opacity: var(--start, 1);
    }
    15%,
    85% {
      translate: var(--via, 0 0);
      opacity: var(--mid, 1);
    }
    100% {
      translate: var(--destination, 0 0);
      opacity: var(--end, 1);
    }
  }
}

/* ------ FIN DE LA SECTION CORRIGÉE ------ */


/* Social */
.bear-link {
  color: canvasText;
  position: fixed;
  top: 2rem;
  right: 2rem;
  width: 48px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  opacity: 0.8;
}

:where(.x-link, .bear-link):is(:hover, :focus-visible) {
  opacity: 1;
}
.bear-link svg {
  width: 75%;
}

/* Navbar */
.navbar {
  z-index: 1;
  background: #fff;
  position: fixed;
  width: 100%;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Animation de rétrécissement de la navbar */

.navbar.scrolled {
  height: 60px;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .logo_d {
  width: 25%;
  transition: all 0.3s ease;
}

/* Amélioration du hover */

.navbar nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  transition: width 0.3s ease;
}

.navbar nav ul li a:hover::after,
.navbar nav ul li a.active::after {
  width: 100%;
}

/* Animation du menu hamburger */
.hamburger {
  transition: all 0.3s ease;
}

.hamburger.active div:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active div:nth-child(2) {
  opacity: 0;
}

.hamburger.active div:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.hamburger div {
  transition: all 0.3s ease;
}

/* Animation du menu mobile */
.navbar nav {
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.navbar nav.active {
  left: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.logo_d {
  width: 30%;
}

.navbar .logo {
  font-size: 30px;
  text-transform: uppercase;
}

.navbar nav ul {
  display: flex;
}
.navbar nav ul li a {
  display: inline-block;
  color: #000;
  padding: 5px 0;
  margin: 0 10px;
  border: 3px solid transparent;
  text-transform: uppercase;
  transition: 0.2s;
}
.navbar nav ul li a:hover,
.navbar nav ul li a.active {
  border-bottom-color: dodgerblue;
}
.hamburger {
  cursor: pointer;
  display: none;
}
.hamburger div {
  width: 30px;
  height: 3px;
  margin: 5px 0;
  background: #000;
}
@media only screen and (max-width: 900px) {
  .navbar {
    padding: 0 30px;
  }
}
@media only screen and (max-width: 700px) {
  .hamburger {
    display: block;
  }
  .navbar nav {
    position: absolute;
    width: 100%;
    left: -100%;
    top: 70px;
    width: 100%;
    background: #fff;
    padding: 30px;
    transition: 0.3s;
  }
  .navbar #nav_check:checked ~ nav {
    left: 0;
  }
  .navbar nav ul {
    display: block;
  }
  .navbar nav ul li a {
    margin: 5px 0;
  }
}

/* Footer */

footer {
  display: flex;
  min-height: 100vh;
  justify-content: flex-end;
  align-items: flex-end;
  position: relative;
  width: 100%;
  background: #3586ff;
  min-height: 100px;
  padding: 20px 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

footer .social_icon,
footer .menu {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 10px 0;
  flex-wrap: wrap;
}

footer .social_icon li,
footer .menu li {
  list-style: none;
}

footer .social_icon li a {
  font-size: 2em;
  color: #fff;
  margin: 0 10px;
  display: inline-block;
  transition: 0.5s;
}

footer .social_icon li a:hover {
  transform: translateY(-10px);
}

footer .menu li a {
  font-size: 1.2em;
  color: #fff;
  margin: 0 10px;
  display: inline-block;
  text-decoration: none;
  opacity: 0.75;
}
footer .menu li a:hover {
  opacity: 1;
}

footer p {
  color: #fff;
  text-align: center;
  margin-top: 15px;
  margin-bottom: 10px;
  font-size: 1.1em;
}

footer .wave {
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  height: 100px;
  background: url(media/wave.png);
  background-size: 1000px 100px;
}

footer .wave#wave1 {
  z-index: 1000;
  opacity: 1;
  bottom: 0;
  animation: animateWave 4s linear infinite;
}

footer .wave#wave2 {
  z-index: 999;
  opacity: 0.5;
  bottom: 10px;
  animation: animateWave_02 4s linear infinite;
}

footer .wave#wave3 {
  z-index: 1000;
  opacity: 0.2;
  bottom: 0;
  animation: animateWave 3s linear infinite;
}

footer .wave#wave4 {
  z-index: 999;
  opacity: 0.7;
  bottom: 1 0px;
  animation: animateWave_02 3s linear infinite;
}

@keyframes animateWave {
  0% {
    background-position-x: 1000px;
  }
  100% {
    background-position-x: 0px;
  }
}

@keyframes animateWave_02 {
  0% {
    background-position-x: 0px;
  }
  100% {
    background-position-x: 1000px;
  }
}

/* button */
.btn-17,
.btn-17 *,
.btn-17 :after,
.btn-17 :before,
.btn-17:after,
.btn-17:before {
  border: 0 solid;
  box-sizing: border-box;
}

.btn-17 {
  -webkit-tap-highlight-color: transparent;
  background-color: #000;
  background-image: none;
  color: #fff;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif,
    Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
  font-size: 100%;
  font-weight: 900;
  line-height: 1.5;
  margin-top: 30px;
  margin-right: 25%;
  text-transform: uppercase;
}

.btn-17:disabled {
  cursor: default;
}

.btn-17:-moz-focusring {
  outline: auto;
}

.btn-17 svg {
  display: block;
}

.btn-17 [hidden] {
  display: none;
}

.btn-17 {
  border-radius: 99rem;
  border-width: 2px;
  padding: 0.8rem 3rem;
  z-index: 0;
}

.btn-17,
.btn-17 .text-container {
  overflow: hidden;
  position: relative;
}

.btn-17 .text-container {
  display: block;
  mix-blend-mode: difference;
}

.btn-17 .text {
  display: block;
  position: relative;
}

.btn-17:hover .text {
  -webkit-animation: move-up-alternate 0.3s forwards;
  animation: move-up-alternate 0.3s forwards;
}

@-webkit-keyframes move-up-alternate {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(80%);
  }

  51% {
    transform: translateY(-80%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes move-up-alternate {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(80%);
  }

  51% {
    transform: translateY(-80%);
  }

  to {
    transform: translateY(0);
  }
}

.btn-17:after,
.btn-17:before {
  --skew: 0.2;
  background: #fff;
  content: "";
  display: block;
  height: 102%;
  left: calc(-50% - 50% * var(--skew));
  pointer-events: none;
  position: absolute;
  top: -104%;
  transform: skew(calc(150deg * var(--skew))) translateY(var(--progress, 0));
  transition: transform 0.2s ease;
  width: 100%;
}

.btn-17:after {
  --progress: 0%;
  left: calc(50% + 50% * var(--skew));
  top: 102%;
  z-index: -1;
}

.btn-17:hover:before {
  --progress: 100%;
}

.btn-17:hover:after {
  --progress: -102%;
}

/* iPhone Specific Adjustments */
@media only screen and (max-width: 767px) {
  /* Stack area adjustments */
  .stack-area {
    height: auto;
    flex-direction: column;
  }

  .left,
  .right {
    position: relative;
    height: auto;
    padding: 30px 20px;
  }

  .title {
    width: 100%;
    font-size: 42px;
    line-height: 48px;
    text-align: center;
  }

  .sub-title {
    width: 100%;
    font-size: 16px;
    text-align: center;
  }

  /* Cards adjustments */
  .card {
    position: relative;
    width: 90%;
    height: 250px;
    margin: 20px auto;
    left: auto;
    top: auto;
    transform: none !important;
  }

  /* Image section */
  .imgt h1 {
    padding-top: 5rem;
    font-size: 32px;
    line-height: 40px;
  }

  .imgt p {
    padding: 20px;
  }

  .card__container {
    flex-direction: column;
    align-items: center;
  }

  .card__article {
    margin-bottom: 100px;
  }

  /* Details section */
  .lol {
    min-height: auto;
    padding: 30px 20px;
  }

  .lol h1 {
    font-size: 32px;
    text-align: center;
  }

  .content2 {
    grid-template: 1fr / 1fr;
    padding: 0;
  }

  /* Footer adjustments */
  footer {
    padding: 50px 20px;
  }

  footer .wave {
    height: 50px;
    background-size: 500px 50px;
  }

  /* Button adjustments */
  .btn-17 {
    margin-right: 0;
    width: 100%;
    padding: 0.8rem 1rem;
  }

  /* Navbar fixes */
  .navbar {
    padding: 0 15px;
    height: 60px;
  }

  .logo_d {
    width: 50%;
  }

  .navbar nav {
    top: 60px;
  }
}

/* iPhone X/XS/11 Pro landscape */
@media only screen and (max-width: 767px) and (orientation: landscape) {
  .stack-area {
    height: auto;
  }

  .left,
  .right {
    height: auto;
  }

  .card {
    height: 200px;
  }

  .imgt h1 {
    padding-top: 3rem;
  }
}

/* iPhone 12/13 mini specific */
@media only screen and (max-width: 375px) and (max-height: 812px) {
  .title {
    font-size: 36px;
  }

  .card {
    height: 220px;
  }

  .card__content {
    font-size: 30px;
    line-height: 40px;
  }
}

/* Fix for Safari viewport units */
@supports (-webkit-touch-callout: none) {
  .stack-area,
  .left,
  .right {
    height: auto;
    min-height: 100vh;
  }
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Tap highlight color */
a,
button {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}