/* -------------------- CSS Reset -------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  background-color: #f5f7ff;
  color: #333;
}

img {
  max-width: 100%;
  display: block;
}

/* -------------------- Variables -------------------- */
:root {
  --accent: #7286d3;
  --accent-dark: #5c6bc0;
  --bg-light: #e6eaff;
  --text-dark: #0d1130;
}

/* -------------------- Reusable -------------------- */
.section {
  padding: 4rem 1rem;
}
.section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  margin-bottom: 2rem;
  color: var(--text-dark);
  text-align: center;
}
.btn-primary,
.btn-secondary {
  background-color: var(--accent);
  border: none;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}
.btn-primary:hover,
.btn-secondary:hover {
  background-color: var(--accent-dark);
}

/* -------------------- Hero -------------------- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: url('../poems/flower brain in the style of monument valley.jpg') center/cover no-repeat;
  color: #fff;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 48, 0.55);
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 0.5rem;
}
.hero-content p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

/* -------------------- Navbar -------------------- */
.navbar {
  width: 100%;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background: rgba(245, 247, 255, 0.05);
  backdrop-filter: blur(6px);
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

/* Burger */
#nav-toggle {
  display: none;
}
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}
.burger span,
.burger span::before,
.burger span::after {
  display: block;
  background: #fff;
  height: 3px;
  width: 24px;
  border-radius: 3px;
  transition: 0.3s;
}
.burger span::before,
.burger span::after {
  content: '';
  position: relative;
}
.burger span::before {
  top: -7px;
}
.burger span::after {
  top: 7px;
}

/* Menu */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-menu li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  position: relative;
}
.nav-menu li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.3s;
}
.nav-menu li a:hover::after {
  width: 100%;
}

/* -------------------- About -------------------- */
.about-wrapper {
  display: grid;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .about-wrapper {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}
.about-text p {
  font-size: 1.1rem;
}
.about-img {
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  width:75%;
}

/* -------------------- Writing Poetry -------------------- */
.learnvideo {
  margin: 1.5rem auto 2.5rem;
  width: fit-content;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Slider Box */
.slider-box {
  width: 90%;
  margin: 0 auto;
  padding: 1.5rem;
  background-color: var(--bg-light);
  border: 2px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  height: 400px; /* lock height */
  overflow-y: auto;
}
.slide {
  display: none;
  animation: fadein 0.8s;
}
.slide.active {
  display: block;
}
.slider-buttons {
  text-align: center;
  margin-top: 1rem;
}
.slider-buttons button {
  background-color: var(--accent);
  border: none;
  color: #fff;
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  margin: 0 0.5rem;
  transition: background-color 0.25s ease;
}
.slider-buttons button:hover {
  background-color: var(--accent-dark);
}
@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Slide content */
.points {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}
.content p {
  text-align: left;
}
@media (max-width: 600px) {
  .points {
    flex-direction: column;
  }
}

/* -------------------- Featured Poems -------------------- */
.featured {
  background: linear-gradient(180deg, var(--bg-light) 0%, #fff 100%);
}
.poem-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  max-width: 1100px;
  margin: 0 auto;
}
.poem-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s;
}
.poem-card:hover {
  transform: translateY(-6px);
}
.poem-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  padding: 0.75rem;
  color: var(--text-dark);
}

/* -------------------- Community Upload -------------------- */
.community {
  background: var(--bg-light);
  text-align: center;
}
.upload-box {
  background: #fff;
  padding: 2rem;
  margin: 2rem auto 0;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
.upload-box input[type='file'] {
  margin: 1rem 0;
}
.note {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.5rem;
}

/* -------------------- Testimonials -------------------- */
.testimonials {
  background: #fff;
  text-align: center;
}
.testimonials blockquote {
  font-style: italic;
  margin: 1.5rem auto;
  max-width: 700px;
  position: relative;
  padding: 1.5rem 1rem;
}
.testimonials blockquote::before {
  content: '\f10d';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: -10px;
  left: 10px;
  color: var(--accent);
  font-size: 1.5rem;
}
.testimonials cite {
  display: block;
  margin-top: 0.5rem;
  font-weight: 600;
}

/* -------------------- Newsletter -------------------- */
.newsletter {
  background: var(--accent);
  color: #fff;
  text-align: center;
}
.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.newsletter-form input[type='email'] {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 6px;
  flex: 1 1 250px;
  max-width: 350px;
}
.newsletter-form button {
  background: #fff;
  color: var(--accent);
}
.newsletter-form button:hover {
  background: #f0f0ff;
}

/* -------------------- Footer -------------------- */
.footer {
  background: #181a3d;
  color: #bbb;
  text-align: center;
  padding: 2rem 1rem 1rem;
}
.footer-links {
  margin-bottom: 1rem;
}
.footer-links a {
  color: #bbb;
  margin: 0 0.75rem;
  text-decoration: none;
  transition: color 0.25s;
}
.footer-links a:hover {
  color: #fff;
}

/* -------------------- Scroll To Top -------------------- */
#scrollTop {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
#scrollTop:hover {
  background: var(--accent-dark);
}

/* -------------------- Flower Animation (unchanged) -------------------- */
.flower {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: absolute;
  opacity: 0.6;
  top: -70px;
}
.flower img {
  width: 60px;
  border-radius: 50%;
  border: none;
  animation: flowers 7s linear infinite forwards;
}
@keyframes flowers {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    opacity: 0.6;
  }
  70% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(25vh) rotate(360deg);
    opacity: 0;
  }
}
.flower img:nth-child(1) {
  animation-delay: 2s;
  width: 75px;
}
.flower img:nth-child(2) {
  animation-delay: 1s;
  width: 80px;
}
.flower img:nth-child(3) {
  animation-delay: 3s;
  width: 65px;
}
.flower img:nth-child(4) {
  animation-delay: 4.5s;
  width: 75px;
}
.flower img:nth-child(5) {
  animation-delay: 2.4s;
  width: 55px;
}

/* -------------------- Responsive Nav -------------------- */
@media (max-width: 768px) {
  .burger {
    display: flex;
  }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(13, 17, 48, 0.95);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  #nav-toggle:checked ~ .nav-menu {
    max-height: 300px;
  }
  /* -------------------- Enhanced Mobile Styles -------------------- */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .section {
    padding: 2.5rem 1rem;
  }
  
  .section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
  
  .slider-box {
    height: auto;
    min-height: 350px;
    padding: 1rem;
  }
  
  .points {
    gap: 1rem;
  }
  
  .points img {
    width: 150px;
    height: auto;
  }
  
  .poem-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .newsletter-form {
    flex-direction: column;
    gap: 1rem;
  }
  
  .newsletter-form input[type='email'] {
    max-width: 100%;
  }
  
  .about-wrapper {
    gap: 1.5rem;
  }
  
  .upload-box {
    padding: 1.5rem;
    margin: 1.5rem auto 0;
  }
}

/* -------------------- Loading States -------------------- */
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading {
  position: relative;
  color: transparent;
}

.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* -------------------- Focus States for Accessibility -------------------- */
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-menu a:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* -------------------- Enhanced Modal -------------------- */
.image-modal {
  backdrop-filter: blur(8px);
}

.image-modal .close-btn {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.image-modal .close-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}
  .nav-menu li {
    padding: 1rem 0;
    text-align: center;
  }
}
.more-poems-btn {
  text-align: center;
  margin-top: 2rem;
}
.more-poems-btn .btn-primary {
  font-size: 1rem;
  padding: 0.65rem 1.5rem;
}
/* Modal Viewer Styles */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.image-modal .close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}
