*, *::before, *::after {
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f0f2f5;
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

/* The main iPhone body */
.iphone-x {
  position: relative;
  width: 100%;
  max-width: 375px;
  height: 85vh;
  background-color: #111;
  border-radius: 60px; /* Rounded corners */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 
              inset 0 -6px 10px rgba(255, 255, 255, 0.1);
  border: 12px solid #000;
  overflow: hidden;
}


/* The Dynamic Island at the top */
.iphone-x::before {
  content: '';
  position: absolute;
  top: 12px; /* Position from the top of the border */
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 30px;
  background-color: #000;
  border-radius: 20px;
  z-index: 2;
}

/* The screen area */
.screen {
  width: 100%;
  height: 100%;
  background-color: #fff;
  border-radius: 48px; /* Inner radius must be less than outer */
  position: relative;
  z-index: 1;
  display: flex; /* Make it a flex container */
  flex-direction: column; /* Stack children vertically */
}

/* Styling for the content inside the screen */
.screen iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Side buttons using pseudo-elements */
.iphone-x::after {
  content: '';
  position: absolute;
  top: 120px;
  right: -4px; /* Position outside the main body */
  width: 4px;
  height: 100px;
  background-color: #111;
  border-radius: 0 4px 4px 0;
}

header {
  background-color: #343a40;
  color: white;
  padding: 20px 0;
  flex-shrink: 0; /* Prevent header from shrinking */
}

.logo {
  width: 100px;
  height: 100px;
}

.essay {
  margin-top: 20px;
  margin-bottom: 20px;
}

.card {
  margin-bottom: 20px;
  transition: all 0.3s ease; /* Add transition for smooth effect */
  cursor: pointer; /* Indicate it's clickable */
  width: 100%; /* Take full width of parent (which is now a flex item) */
  max-width: 300px; /* Limit the maximum width of the card */
  margin-left: auto; /* Center the card */
  margin-right: auto; /* Center the card */
  height: 150px; /* Set a fixed height for all cards */
  display: flex; /* Use flexbox for content inside the card */
  flex-direction: column; /* Stack content vertically */
  justify-content: center; /* Center content vertically */
  align-items: center; /* Center content horizontally */
}

.card:hover {
  transform: translateY(-5px); /* Lift effect */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Add shadow */
}

@media (max-width: 768px) {
  .iphone-x {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
    max-height: none;
  }

  .iphone-x::before,
  .iphone-x::after {
    display: none;
  }

  .screen {
    border-radius: 0;
  }

  .content-wrapper {
    padding: 10px;
  }
}

h1, h2, h5 {
  text-align: center;
}

p {
  text-align: left;
}

.card-text {
  text-align: center;
}

.logo {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.essay, .row {
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch; /* Make items in the row stretch to equal height */
}

.scrollable-content {
  flex-grow: 1; /* Allow content to grow and fill remaining space */
  overflow-y: auto; /* Make this div scrollable */
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%; /* Make it take full height of the card */
  width: 100%; /* Make it take full width of the card */
  text-align: center; /* Center text within the card body */
}