/* Custom Gallery Layout */

/* 1. Mobile Default Spacing (Adds the gap below logo/hamburger) */
section.gallery {
  margin-top: -25px; 
}

section.galleries {
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 columns on mobile */
}

/* 2. Desktop Override (Resets to original height for screens 1024px and up) */
@media (min-width: 1024px) {
  section.gallery {
    margin-top: -40px; 
  }
  section.galleries {
    grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4 columns on desktop */
  }
}

/* Gallery Hover Effects */
.gallery-item {
  position: relative;
  overflow: hidden;
}

.gallery-item .gallery-item-title {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
  padding: 1rem;
}

.gallery-item:hover .gallery-item-title {
  opacity: 1;
}

.gallery-item img {
  transition: filter 0.3s ease;
}

.gallery-item:hover img {
  filter: blur(4px);
}

.gallery-item-title span {
  font-weight: 600;
  font-size: 1.25rem;
}

/* Newsletter Form */
.newsletter-form {
  text-align: center;
  margin-bottom: 2rem;
}

.newsletter-form h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.newsletter-form form {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.newsletter-form input[type="email"] {
  padding: 0.75rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background-color: var(--surface-1);
  color: var(--text-1);
  width: 300px;
}

footer .newsletter-form button[type="submit"] {
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid #aaaaaa;
  background-color: transparent;
  color: #ffffff; 
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

footer .newsletter-form button[type="submit"]:hover {
  background-color: #cbfc3d;
  color: #000000;
  border-color: #cbfc3d;
}

/* Footer link hover color */
footer section:last-of-type a:hover {
  color: #cbfc3d;
}

/* Article link hover color */
.prose ul a:hover {
  color: #cbfc3d;
}

/* About page link hover color */
body.about .prose a:hover {
  color: #cbfc3c !important;
}

.about .prose {
  margin-top: 50px;
}

/* Add space at the top of the page & set ecosystem background */
body {
  padding-top: 5px;
  background-color: #121212 !important;
}

/* Center-aligned figures in articles */
figure.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
}

/* Logo */
.logo {
  height: 3rem; /* Adjust as needed */
  width: auto;
}


/* ---------------------------------------------------
   1. Article & Content Typography Styles (.prose fix)
--------------------------------------------------- */

/* 1. Body Text (Full Step Lighter) */
.prose p, 
.prose li {
    font-family: 'Lora', serif;
    font-weight: 400;              
    font-size: 1.25rem !important; 
    line-height: 1.5;   
    color: #bbbbbb !important;     
    margin-bottom: 1.75rem; 
}

/* 2. Standard Links (Two Steps Lighter to match emphasis) */
.prose a {
    color: #cccccc !important;     
    text-decoration: underline;
    transition: color 0.1s ease;   /* Makes the color change smooth */
}

/* Link Hover State (Brightens to pure white) */
.prose a:hover {
    color: #ffffff !important;
}

/* 3. Inline Bold Text (Two Steps Lighter) */
.prose strong,
.prose b {
    font-family: 'Lora', serif !important;
    color: #cccccc !important;     
    font-weight: 700 !important; 
}

/* 4. Actual HTML Headings (San Francisco, White, Explicit Sizes) */
.prose h1, 
.prose h2, 
.prose h3, 
.prose h4 {
    font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: #ffffff !important;     
    font-weight: 600 !important; 
}

/* Explicitly set the hierarchy and spacing so the theme cannot override it */
.prose h1 { 
    font-size: 2.25rem !important; 
    margin-top: 3rem; 
    margin-bottom: 1.5rem; 
}

.prose h2 { 
    font-size: 1.75rem !important; 
    margin-top: 2.5rem; 
    margin-bottom: 1rem; 
}

.prose h3 { 
    font-size: 1.5rem !important; 
    margin-top: 2rem; 
    margin-bottom: 1rem; 
}

.prose h4 { 
    font-size: 1.25rem !important; 
    margin-top: 1.5rem; 
    margin-bottom: 0.5rem; 
}

/* 5. Article Signature (Semantic HTML styling) */
.prose .signature {
    font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: #ffffff !important;     
    font-weight: 600 !important; 
    font-size: 1.25rem;
    margin-top: 3rem; /* Gives nice breathing room from the last paragraph */
    margin-bottom: 0;
}

/* ---------------------------------------------------
   2. Markdown Element Styles (Quotes & Inline Code)
--------------------------------------------------- */

/* Blockquotes (Neon Yellow Callouts) */
.prose blockquote {
    border-left: 4px solid #CBFC3C !important;
    padding-left: 24px !important;
    margin-left: 0 !important;
    font-size: 1.6rem !important;
    font-style: italic !important;
    color: #ffffff !important;
}

/* Inline Code Tokens (Pure White on Dark Grey) */
.prose code {
    color: #ffffff !important;
    background-color: #1e1e1e !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-family: monospace !important;
}

/* ---------------------------------------------------
   3. Audio Player Button Styling
--------------------------------------------------- */

.custom-button {
  background-color: transparent; 
  color: #ffffff; 
  border: 1px solid #aaaaaa; 
  padding: 10px 24px;
  border-radius: 9999px; 
  font-size: 1rem;    
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease; 
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  width: fit-content; /* Keeps the button wrapping tightly around the text */
}

.custom-button:hover {
  background-color: #cbfc3c; 
  color: #000000;            
  border-color: #cbfc3c;     
}

.custom-button:active {
  transform: scale(0.98);
}

/* The Active "Playing" State */
.custom-button.is-playing {
  border-color: #cbfc3c;
  color: #cbfc3c;
  background-color: transparent; 
}

/* ---------------------------------------------------
   4. Utility Classes (SEO & Accessibility)
--------------------------------------------------- */

/* Visually hides elements for SEO while keeping them screen-reader accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}