/* Global Styles */
body {
  margin: 0;
  padding: 0;
  font-family: "Montserrat", sans-serif;
  background: #1a1a1a;
  color: #e0e0e0;
}

/* Newsletter Section */
.newsletter {
  background-color: transparent;
  padding: 20px;
}

.newsletter-content {
  max-width: 100%;
}

.newsletter h2 {
  margin-bottom: 15px;
  font-size: 1.2rem;
}

/* Newsletter Form Layout */
.signup-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 0 20px; /* Add padding to the form */
}

.form-group {
  position: relative;
  flex-grow: 1;
  max-width: 350px; /* Slightly reduced to make room for button */
  margin: 0;
}

.signup-form input {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: #333;
  color: #fff;
  height: 35px;
  box-sizing: border-box;
}

.signup-form input::placeholder {
  color: #888;
}

.signup-form button {
  padding: 8px 20px;
  background-color: #d4af37;
  color: #1a1a1a;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
  height: 35px;
  flex-shrink: 0;
  margin-left: 10px; /* Added margin to move button right */
}

.signup-form button:hover {
  background-color: #c4a030;
}

.signup-form button:disabled {
  background-color: #888;
  cursor: not-allowed;
}

.error-message {
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-top: 10px;
  padding: 8px;
  border-radius: 4px;
  text-align: center;
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
}

.error-message.success {
  color: #2ecc71;
  background-color: rgba(46, 204, 113, 0.1);
}

.error-message.warning {
  color: #f1c40f;
  background-color: rgba(241, 196, 15, 0.1);
}

.error-message.error {
  color: #ff6b6b;
  background-color: rgba(255, 107, 107, 0.1);
}

/* Hero Banner - Adjusted size and spacing */
.hero-banner {
  text-align: center;
  padding: 80px 20px 60px;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("/images/fancepantskick.jpg") center 1% / cover no-repeat;
  position: relative;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-position: center 1%;
  overflow: hidden;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 1.5rem; /* Reduced padding */
  z-index: 2;
  width: 90%;
  max-width: 800px;
  margin-top: 20px; /* Reduced margin */
}

.hero-content h1 {
  font-family: "Pirata One", cursive;
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: #c4a030;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content h2 {
  font-family: "Pirata One", cursive;
  color: #c4a030;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-top: 10px;
  font-size: 2rem;
  text-align: center;
}

.creator-credit {
  font-style: italic;
  margin-bottom: 10px;
  color: #888;
}

.tagline {
  font-weight: bold;
  color: #d4af37;
  margin-bottom: 30px;
}

.reveal-button {
  padding: 10px 25px; /* Reduced padding */
  background-color: #d4af37;
  color: #1a1a1a;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem; /* Slightly smaller font */
  transition: background-color 0.3s;
  font-weight: bold;
  margin: 0 auto; /* Center horizontally */
  display: block; /* Allows margin auto to work */
}

.reveal-button:hover {
  background-color: #c4a030;
}

/* Content Section - New layout improvements */
.content-wrapper {
  max-width: 1200px;
  margin: -40px auto 0; /* Negative margin to overlap with banner */
  padding: 0 20px 40px;
  position: relative;
  z-index: 10;
}

.episode-container {
  background-color: rgba(28, 28, 28, 0.95);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.episode {
  background-color: #2a2a2a;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid #d4af37;
  position: relative;
  transition: transform 0.3s ease;
}

.episode:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(212, 175, 55, 0.2);
}

.episode::before {
  content: "⚓";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.2rem;
  opacity: 0.5;
}

.episode h2 {
  color: #d4af37;
  margin-bottom: 15px;
  font-family: "Pirata One", cursive;
  font-size: 1.8rem;
}

.episode-meta {
  display: flex;
  justify-content: space-between;
  color: #888;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.audio-player {
  width: 100%;
}

audio {
  width: 100%;
  filter: invert(100%);
}

/* Loading and Error States */
.loading-spinner {
  text-align: center;
  padding: 20px;
  font-style: italic;
  display: none;
  color: #888;
}

.error-container {
  color: #ff6b6b;
  text-align: center;
  padding: 20px;
  display: none;
}

/* Keep your existing media queries at the bottom */

.banner-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  padding: 0 20px;
}

.creator-credit {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 5px;
}

.tagline {
  font-size: 0.9rem;
  color: #d4af37;
  font-style: italic;
}

.pagination {
  margin: 20px 0;
  text-align: center;
}

.pagination button {
  padding: 8px 16px;
  margin: 0 5px;
  background-color: #c4a030;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.pagination button:hover {
  background-color: #a38528;
}

.pagination span {
  margin: 0 10px;
}

.loading-container {
  text-align: center;
  padding: 20px;
  margin: 20px auto;
  max-width: 100%;
  position: relative;
  background-color: #2a2a2a;
  border-radius: 8px;
  border: 1px solid #d4af37;
}

.pirate-ship {
  animation: rockingBoat 3s ease-in-out infinite;
  transform-origin: center bottom;
  position: relative;
  max-width: 150px;
  margin: 0 auto;
}

.pirate-ship img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.loading-text {
  color: #d4af37;
  font-family: "Pirata One", cursive;
  font-size: 1.2rem;
  margin-top: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInOut 2s infinite;
}

.author-link {
  color: #007bff;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.author-link:hover {
  color: #0056b3;
}
pre[class*="language-"] {
  border-radius: 6px;
  margin: 1.5em 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.code-block-header {
  background: #2d2d2d;
  color: #fff;
  padding: 0.5em 1em;
  border-radius: 6px 6px 0 0;
  font-family: monospace;
  font-size: 0.9em;
}

.code-block-container {
  margin: 1.5em 0;
}

/* Optional: Add a copy button */
.copy-button {
  position: absolute;
  right: 0.5em;
  top: 0.5em;
  padding: 0.3em 0.6em;
  background: #444;
  border: none;
  color: white;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8em;
}

.copy-button:hover {
  background: #555;
}
/* Enhanced animations */
@keyframes rockingBoat {
  0% {
    transform: rotate(-8deg) translateY(0px);
  }
  25% {
    transform: rotate(0deg) translateY(-5px);
  }
  50% {
    transform: rotate(8deg) translateY(0px);
  }
  75% {
    transform: rotate(0deg) translateY(-5px);
  }
  100% {
    transform: rotate(-8deg) translateY(0px);
  }
}

@keyframes fadeInOut {
  0% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.7;
  }
}

@keyframes titleFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
  .hero-banner {
    padding-top: 80px;
    min-height: 35vh; /* Even smaller on mobile */
  }

  .hero-content h1 {
    font-size: 2.8rem;
  }

  .content-wrapper {
    margin-top: -30px;
  }

  .episode-container {
    padding: 25px;
  }

  .story-intro {
    bottom: 100px;
    width: 90%; /* Slightly wider on mobile */
    padding: 15px;
    font-size: 0.9rem; /* Smaller font size */
    line-height: 1.4; /* Tighter line height */
    margin: 0 auto 20px;
  }

  .banner-footer {
    bottom: 15px;
  }

  .creator-credit {
    font-size: 0.9rem; /* Slightly smaller on mobile */
  }

  .tagline {
    font-size: 0.8rem; /* Slightly smaller on mobile */
  }

  .pirate-ship img {
    width: 150px;
  }

  .loading-text {
    font-size: 1.2rem;
  }

  .hero-content {
    top: 40%; /* Adjusted for mobile */
    margin-top: 20px; /* Less margin on mobile */
  }
}

/* Navigation Styles */
.main-nav {
  background-color: rgba(26, 26, 26, 0.95);
  position: fixed;
  height: 70px;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 2px solid #d4af37;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #d4af37;
}

.nav-logo img {
  height: 40px;
  width: auto;
  margin-right: 10px;
}

.nav-logo span {
  font-family: "Pirata One", cursive;
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-link {
  color: #e0e0e0;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #d4af37;
  background-color: rgba(212, 175, 55, 0.1);
}

.nav-link.active {
  color: #d4af37;
  border-bottom: 2px solid #d4af37;
}

/* Footer Styles */
.site-footer {
  background-color: #2c1810;
  color: #e0e0e0;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-section h3 {
  color: #d4af37;
  font-family: "Pirata One", cursive;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: #e0e0e0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #d4af37;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  padding: 8px 16px;
  background-color: rgba(212, 175, 55, 0.1);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: #d4af37;
  color: #1a1a1a !important;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .footer-section ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .footer-section ul li {
    margin-bottom: 0; /* Remove default margin since we're using gap */
  }

  .social-links {
    justify-content: center;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
  position: relative;
  background-color: #2c1810;
  margin: 15% auto;
  padding: 40px;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  border: 2px solid #d4af37;
  animation: slideIn 0.3s ease-in-out;
}

.newsletter-content {
  text-align: center;
}

.newsletter-content h2 {
  color: #d4af37;
  font-size: 1.8rem;
  margin-bottom: 15px;
  font-family: "Pirata One", cursive;
}

.newsletter-content p {
  color: #fff;
  margin-bottom: 25px;
  font-size: 1rem;
}

.signup-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  max-width: 450px;
}

.form-group {
  position: relative;
  flex-grow: 1;
  margin: 0;
}

.signup-form input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: rgba(0, 0, 0, 0.2);
  color: #fff;
  height: 40px;
  box-sizing: border-box;
}

.signup-form input:focus {
  outline: none;
  border-color: #d4af37;
}

.signup-form button {
  padding: 0 20px;
  height: 40px;
  background-color: #d4af37;
  color: #1a1a1a;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
}

.signup-form button:hover {
  background-color: #c4a030;
}

.error-message {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -30px;
  font-size: 0.9rem;
  text-align: left;
  padding: 5px 0;
}

.close-modal {
  position: absolute;
  right: 15px;
  top: 15px;
  color: #d4af37;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-modal:hover {
  color: #fff;
  background-color: rgba(212, 175, 55, 0.1);
}

/* Mobile Adjustments */
@media screen and (max-width: 600px) {
  .modal-content {
    margin: 10% auto;
    padding: 30px 20px;
  }

  .signup-form {
    flex-direction: column;
    gap: 15px;
  }

  .signup-form button {
    width: 100%;
  }

  .error-message {
    position: static;
    margin-top: 10px;
    text-align: center;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Add to your existing footer styles */
.footer-section a[href^="mailto"] {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.footer-section a[href^="mailto"]:hover {
  color: #d4af37;
  transform: translateX(5px);
}

.footer-section a[href^="mailto"]::after {
  content: "✉️";
  font-size: 0.9em;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer-section a[href^="mailto"]:hover::after {
  opacity: 1;
}

/* New featured episode styling */
.episode.featured {
  background: linear-gradient(45deg, #2a2a2a, #3a3a3a);
  border: 2px solid #d4af37;
  padding: 30px;
  margin: -20px -20px 30px;
  border-radius: 10px;
}

.featured-label {
  background-color: #d4af37;
  color: #1a1a1a;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 10px;
}
.subscribe-cta {
  margin-top: 30px;
  padding: 15px 30px;
  font-size: 1.2rem;
  background-color: #d4af37;
  color: #1a1a1a;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-family: "Pirata One", cursive;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
  animation: pulse 2s infinite;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.subscribe-cta:hover {
  transform: scale(1.05);
  animation: none;
  background-color: #c4a030;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
  .subscribe-cta {
    font-size: 1rem;
    padding: 12px 25px;
    margin-top: 20px;
  }
}

.whats-this-container {
  padding-top: 120px; /* Increased from 90px to 120px for more clearance */
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
  position: relative;
  z-index: 1;
}

@media screen and (max-width: 768px) {
  .whats-this-container {
    padding-top: 90px; /* Increased from 70px to 90px for mobile */
  }
}

.whats-this-container .nav-link.active {
  color: #d4af37;
  border-bottom: 2px solid #d4af37;
  background-color: rgba(212, 175, 55, 0.1);
}

.whats-this-container .nav-link:hover {
  color: #d4af37;
  background-color: rgba(212, 175, 55, 0.1);
}
