/* freepoems.css */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  margin: 0;
  padding: 0;
  min-height: 100vh;

  background-image: url('/images/wallpapers/cursive-writing.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  backdrop-filter: blur(8px);
}

img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

header {
  background-color: #2e6118;
  color: white;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 4px solid #bf9000;
}

.branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.branding img.logo {
  height: 120px;
  width: auto;
  margin-bottom: 0.1rem;
  border-radius: 6px;
}

@media (max-width: 600px) {
  .branding img.logo {
    height: 90px;
  }
}

.title-group h1 {
  font-family: 'Cambria', serif;
  margin: 0;
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
}

.title-group .tagline {
  font-family: 'Segoe Script', cursive;
  margin-top: 0.5rem;
  font-size: 1.2rem;
  color: #f3f6f4;
}

nav {
  display: flex;
  gap: 1rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-buttons a {
  background-color: #9fc5e8;
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-buttons a:hover {
  background-color: #2869a4;
  color: #fff;
}

.nav-buttons a.active {
  background-color: #2869a4;
  color: #fff;
}

main {
    padding: 2rem;
}

.copyright-disclaimer {
  text-align: center;
  background-color: #fff7db;
  border: 2px dashed #facc15;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
  font-size: 1rem;
  color: #4b5563;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.copyright-disclaimer h3 {
  font-weight: bold;
  margin-bottom: 0.75rem;
  color: #b45309;
  letter-spacing: 1px;
}

.copyright-disclaimer p {
  font-style: italic;
  margin: 0 auto;
  max-width: 800px;
  line-height: 1.6;
}

.poem-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  flex-direction: column;
  gap: 1.5rem;
}

.poem-card {
  display: flex;
  align-items: flex-start;
  background-color: #fefefe;
  border: 1px solid #ccc;
  border-radius: 1rem;
  padding: 1rem;
  gap: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.poem-thumb {
  width: 140px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.poem-info {
  flex: 1;
}

.poem-info h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #1e3a8a;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-weight: bold;
}

.poem-info p {
  margin: 0.25rem 0;
  font-size: 1rem;
  color: #333;
}

.read-poem-btn {
  margin-top: 0.75rem;
  background-color: #d4a017;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.read-poem-btn:hover {
  background-color: #b07c00;
}

.poem-content {
  margin-top: 0.75rem;
  background-color: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.poem-content.show {
  max-height: 500px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* New scroll-style container inside modal */
.modal-content {
  background: linear-gradient(to bottom, #FFD700, #FFF8DC);
  border: 5px double #B8860B;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(218, 165, 32, 0.6);
  padding: 40px;
  font-family: 'Cinzel', serif;
  text-align: center;
  animation: scrollOpen 1s ease-out forwards;
  transform-origin: center center;
  max-height: 90vh;
  overflow-y: auto;
}

/* Scroll animation */
@keyframes scrollOpen {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Text alignment inside */
.modal-title,
.modal-poem {
  text-align: center;
}

#close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal.hidden {
  display: none;
}

#modal-text {
  font-family: 'Segoe Print', cursive;
  font-size: 1.1rem;
  white-space: pre-line;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 1rem;
}

#modal-overlay-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 60%;
  opacity: 0.08; /* Adjust for visibility */
  pointer-events: none; /* So it doesn’t interfere with clicks */
  z-index: 2;
}

@media screen and (max-width: 768px) {
  #poem-modal {
    padding: 1rem;
    align-items: flex-start;
  }

  #modal-text {
    max-height: 60vh;       /* Slightly smaller for smaller screens */
    font-size: 0.95rem;     /* Optional: slightly smaller text for readability */
    padding-right: 0.5rem;  /* Adjust for narrower layout */
  }

  #modal-title {
    font-size: 1.2rem;      /* Make sure title scales well */
    margin-bottom: 0.5rem;
  }

  .modal-content {
    width: 100%;
    max-width: 90vw;
    margin: auto;
  }

  #close-modal {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }
}
  
footer {
  text-align: center;
  padding: 1rem;
  background-color: #333;
  color: white;
}
