/* Simple CSS for Poetry Project */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Open+Sans:wght@400;600&display=swap');

/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Add smooth scrolling behavior */
html {
  scroll-behavior: smooth;
}

/* Body Styling */
body {
  font-family: 'Open Sans', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #333333;
  background-color: #F5F1EA;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #3E5C76;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: 6px;
}

/* Headings */
h1, h2, h3 {
  font-family: 'Merriweather', serif;
  color: #3E5C76;
  margin-bottom: 20px;
}

h1 {
  font-size: 36px;
  text-align: center;
}

h2 {
  font-size: 28px;
  margin-top: 40px;
}

h3 {
  font-size: 22px;
  margin-top: 30px;
}

/* Hide screen reader headings */
.visually-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
}

nav a {
  color: #3E5C76;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 15px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

nav a:hover, nav a:focus {
  background-color: #88B799;
  color: white;
}

/* Poem Author */
.poet-name {
  text-align: center;
  font-style: italic;
  color: #A6785A;
  margin-bottom: 40px;
}

/* Poem Stanzas */
.stanza {
  margin-bottom: 40px;
  text-align: center;
}

.stanza p {
  margin-bottom: 10px;
  font-size: 20px;
}

/* Audio Section */
.audio-section {
  background-color: #88B79920;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  margin: 30px 0;
}

audio {
  width: 100%;
  max-width: 400px;
  margin-top: 15px;
}

/* About Sections */
.context, .interpretation, .author-background {
  margin-bottom: 30px;
  padding-left: 20px;
  border-left: 3px solid #88B799;
}

/* Contact Form */
form {
  background-color: #F5F1EA;
  padding: 30px;
  border-radius: 10px;
  border: 1px solid #88B799;
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #3E5C76;
}

input, textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #88B799;
  border-radius: 5px;
  font-family: 'Open Sans', sans-serif;
  transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
  outline: 2px solid #3E5C76;
  outline-offset: 2px;
  border-color: #3E5C76;
}

/* Form validation styles */
input:invalid {
  border-color: #e74c3c;
}

input:valid {
  border-color: #27ae60;
}

button {
  background-color: #3E5C76;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #88B799;
}

button:focus {
  outline: 2px solid #3E5C76;
  outline-offset: 2px;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #88B799;
  color: #666;
  font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }
  
  h1 {
    font-size: 28px;
  }
  
  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  /* Improve nav button touch targets */
  nav a {
    padding: 15px 20px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .stanza p {
    font-size: 18px;
  }
  
  /* Better mobile form styling */
  form {
    padding: 20px;
  }
  
  /* Improve button touch targets */
  button {
    padding: 15px 30px;
    min-height: 44px;
  }
  
  /* Stack audio section content better on mobile */
  .audio-section {
    padding: 20px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  h1 {
    font-size: 24px;
  }
  
  nav a {
    padding: 8px 12px;
    font-size: 16px;
  }
}

/* Large screens */
@media (min-width: 1200px) {
  body {
    max-width: 900px;
    padding: 40px;
  }
}

