/* Global Body Styles */
body {
  font-family: "Comic Sans MS", sans-serif;
  background-color: #f4f8ff;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Ensures the body takes up at least the full height of the viewport */
}

/* Story Card Styles */
.story-card {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  /* Control card height and width */
  max-width: 300px; /* Limit card width */
  width: 100%; /* Allow cards to stretch within available space */
  height: auto; /* Auto height based on content */
  margin: 2px auto; /* Center the card */
}

.story-card:hover {
  transform: scale(1.05);
}

.story-card img {
  width: 100%;
  height: 250px; /* Fixed height for the image */
  object-fit: cover; /* Preserve aspect ratio and cover the container */
  margin-bottom: 15px;
}

.story-card h3 {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 10px 0;
}

.story-card p {
  font-size: 1rem;
  color: #333;
  margin-bottom: 15px;
  flex-grow: 1;
}

.story-card .read-now-btn {
  padding: 10px 20px;
  font-size: 1rem;
  background: linear-gradient(to right, #f472b6, #fbbf24);
  color: white;
  border-radius: 25px;
  transition: background-color 0.3s;
}

.story-card .read-now-btn:hover {
  background: linear-gradient(to right, #ec4899, #f59e0b);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 800px;
  text-align: center;
  position: relative;
}

button.absolute {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1.5rem;
  background-color: transparent;
  border: none;
  color: #333;
  cursor: pointer;
}

.modal img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Story Card Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

/* Style for Read-Only active state */
.read-only {
  background-color: #d1d5db; /* Light gray background for read-only mode */
  cursor: not-allowed; /* Disable cursor when hovering over disabled buttons */
}

/* Optional: Add opacity or disable interaction with content */
.read-only .text-lg {
  pointer-events: none; /* Disable text selection or editing */
}

/* Footer Styling to Ensure it's Always at the Bottom */
footer {
  margin-top: auto; /* Push footer to the bottom */
  padding: 1rem;
  background-color: #333;
  color: white;
  text-align: center;
  width: 100%;
}
