/* Custom Gallery Layout */
section.gallery {
  margin-top: -40px;
}

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

@media (min-width: 1024px) {
  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 h3 {
  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 #cbfc3d;
  background-color: #cbfc3d;
  color: black;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

footer .newsletter-form button[type="submit"]:hover {
  background-color: transparent;
  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 */
body {
  padding-top: 5px;
}

/* 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. Load TeX Gyre Termes (Self-Hosted - Case Fix)
--------------------------------------------------- */

/* Regular */
@font-face {
    font-family: 'TeX Gyre Termes';
    src: url('/fonts/termes-regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Italic */
@font-face {
    font-family: 'TeX Gyre Termes';
    src: url('/fonts/termes-italic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* Bold */
@font-face {
    font-family: 'TeX Gyre Termes';
    src: url('/fonts/termes-bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* Bold Italic */
@font-face {
    font-family: 'TeX Gyre Termes';
    src: url('/fonts/termes-bolditalic.woff2') format('woff2');
    font-weight: bold;
    font-style: italic;
    font-display: swap;
}

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

/* Target the theme's specific markdown wrapper */
.prose p, 
.prose li {
    font-family: 'TeX Gyre Termes', 'Times New Roman', serif;
    font-size: 1.5rem !important; /* Forces the size to change */
    line-height: 1.45;   
    color: #ffffff !important;     /* Changes the text to pure white */
    margin-bottom: 1.75rem; 
}

/* Match headings inside the article to the new font */
.prose h1, 
.prose h2, 
.prose h3, 
.prose h4 {
    font-family: 'TeX Gyre Termes', 'Times New Roman', serif;
    color: #ffffff !important;     /* Ensures headings are also white */
}

/* Add breathing room around subheadings */
.prose h2, 
.prose h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}