/* ====================================== */
/* 🧱 Press Park – Layout & Glassmorphism */
/* ====================================== */

body {
  background: radial-gradient(at top left, #0b0f1a, #05080f) fixed;
  color: #f1f1f1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Tahoma, sans-serif;
  background-image: 
    url('/images/noise.png'), /* optional subtle noise texture */
    radial-gradient(at 20% 20%, #101928, #050a14);
  background-blend-mode: overlay;
  background-size: cover;
}

body.light-mode {
  background: linear-gradient(to bottom right, #f3f5f8, #e9edf2);
  color: #111;
  background-image: 
    url('/images/noise.png'), 
    radial-gradient(at top right, #ffffff, #f2f6fa);
  background-blend-mode: soft-light;
  background-size: cover;
}

/* === 🔘 Share Button Wrapper === */
.share-dropdown-wrapper {
  position: relative;
  z-index: 10;
}

/* === 📥 Dropdown Menu === */
.share-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 190px;
  padding: 0.4rem 0;
  z-index: 20;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Show dropdown when visible */
.share-dropdown.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* === 📌 Arrow Pointer === */
.share-dropdown::before {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 1.2rem;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  z-index: -1;
  box-shadow: -1px -1px 2px rgba(0,0,0,0.05);
}

/* === 🔗 Dropdown Items === */
.share-dropdown a,
.share-dropdown button {
  all: unset;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #222;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.share-dropdown a:hover,
.share-dropdown button:hover {
  background: #f4f6f8;
  color: #000;
  text-decoration: none;
}

/* 🌙 Dark mode dropdown base */
body:not(.light-mode) .share-dropdown {
  background: #1f1f1f;
  color: #eee;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* 🌙 Dropdown items in dark mode */
body:not(.light-mode) .share-dropdown a,
body:not(.light-mode) .share-dropdown button {
  color: #eee;
}

/* 🌙 Hover state for items */
body:not(.light-mode) .share-dropdown a:hover,
body:not(.light-mode) .share-dropdown button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* 🌙 Optional: style the emoji/inline icon if needed */
body:not(.light-mode) .share-dropdown a::before,
body:not(.light-mode) .share-dropdown button::before {
  filter: brightness(1.2);
}



/* 🧊 Frosted Content Wrapper */
.content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.5rem;
  margin: 1rem auto;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 100%;
  width: 95%;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.archive-banner {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  margin: -0.5rem auto 1rem;
  max-width: 960px;
  border-radius: 12px;
  font-size: 0.95rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.archive-clear {
  font-weight: bold;
  color: #4dd8ff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.archive-clear:hover {
  color: #66e0ff;
}

body.light-mode .archive-banner {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  border: 1px solid rgba(0,0,0,0.05);
}

body.light-mode .archive-clear {
  color: #0077cc;
}

body.light-mode .archive-clear:hover {
  color: #005fa8;
}


/* 📰 Blog Posts Grid */
.blog-posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0;
}

/* Expand grid on medium and up */
@media (min-width: 600px) {
  .blog-posts {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    padding: 2rem;
  }
}

/* 📚 Archive List Styles */
.archive-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}

.archive-list li a {
  color: inherit;
  text-decoration: none;
  display: block;
  padding: 0.4rem 0;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.archive-list li a:hover {
  color: #4dd8ff;
}

body.light-mode .archive-list li a:hover {
  color: #0077cc;
}

/* 📦 Archive Dropdown – Styled for Both Themes */
.archive-dropdown {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  border-radius: 8px;
  margin: 0.5rem 0 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #f0f0f0;
  backdrop-filter: blur(5px);
  transition: all 0.2s ease;
  appearance: none;
  color-scheme: dark light;
}

.archive-dropdown:hover {
  border-color: #4dd8ff;
}

/* ⬛️ Dark Mode Option Styling */
body:not(.light-mode) .archive-dropdown option {
  background-color: #1c1c1c;
  color: #f0f0f0;
}

/* 🌞 Light Mode Styling */
body.light-mode .archive-dropdown {
  background: rgba(0, 0, 0, 0.03);
  color: #222;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .archive-dropdown:hover {
  border-color: #0077cc;
}

body.light-mode .archive-dropdown option {
  background-color: #fff;
  color: #000;
}

/* 🍎 Glassmorphic Apple-Style Search Bar */
.search-form {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 620px;
  margin: 2.5rem auto 2rem;
  padding: 0 1rem;
  gap: 0.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.search-input {
  flex: 1;
  padding: 0.75rem 1.1rem;
  font-size: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.03)
  );
  color: #fff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
}

.search-input:focus {
  outline: none;
  border-color: #4dd8ff;
  box-shadow: 0 0 0 2px rgba(77, 216, 255, 0.3);
}

.search-button {
  padding: 0.75rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 14px;
  background: linear-gradient(to right, #4dd8ff, #00cfff);
  color: #000;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, transform 0.2s ease;
}

.search-button:hover {
  background: linear-gradient(to right, #66e0ff, #00e4ff);
  transform: translateY(-1px);
}

body.light-mode .search-input {
  background: rgba(255, 255, 255, 0.75);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.light-mode .search-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

body.light-mode .search-button {
  color: #000;
}


/* 🌞 Light mode override */
body.light-mode .search-input {
  background: rgba(0, 0, 0, 0.05);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .search-input::placeholder {
  color: #555;
}


/* ✍️ Post Preview Card */
.post-preview {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.post-preview:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 255, 170, 0.25);
}

/* 🖼️ Image Styling */
.image-wrapper {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.post-image {
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.3s ease;
}

.post-preview:hover .post-image {
  transform: scale(1.03);
}

/* 📝 Text Content */
.post-title {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.4rem;
  font-weight: 600;
  line-height: 1.3;
}

.post-date {
  color: #aaa;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.post-excerpt {
  color: #ddd;
  font-size: 1rem;
  line-height: 1.6;
}

.load-more-wrapper {
  text-align: center;
  margin: 2rem 0;
}

#loadMoreBtn {
  background: #4dd8ff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
  color: #000;
}

#loadMoreBtn:hover {
  background: #66e0ff;
}


/* 🧭 Sidebar */
.sidebar {
  flex: 1 1 100%;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  align-self: flex-start;
}

@media (min-width: 900px) {
  .content {
    flex-direction: row;
    justify-content: space-between;
    padding: 2rem;
    max-width: 1200px;
  }

  .sidebar {
    flex: 1 1 300px;
    min-width: 260px;
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0;
    padding-left: 2rem;
  }

  body.light-mode .sidebar {
    border-left: 1px solid rgba(0, 0, 0, 0.05);
  }
}

/* 🙈 Empty State */
.no-posts {
  font-style: italic;
  text-align: center;
  font-size: 1.1rem;
  color: #aaa;
  padding: 4rem 1rem;
  opacity: 0.8;
}

/* 🌤 Light Mode Enhancements */
body.light-mode .content {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-mode .post-preview {
  background: rgba(255, 255, 255, 0.8);
  color: #222;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

body.light-mode .post-title {
  color: #111;
}

body.light-mode .post-date {
  color: #555;
}

body.light-mode .post-excerpt {
  color: #333;
}

body.light-mode .no-posts {
  color: #777;
}
