/* Newsletter Pages Styling */
/* Consistent with ND Infotronics brand colors and existing design */

#newslettersSection,
#newsletterDetail,
#unsubscribePage {
  width: 100%;
  min-height: 100vh;
  padding: 100px 0 50px 0;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Section Heading */
.sectionHeading {
  text-align: center;
  font-size: 4rem;
  font-weight: bold;
  color: #253898;
  margin-bottom: 2rem;
}

.section-intro {
  text-align: center;
  font-size: 1.8rem;
  color: #666;
  margin-bottom: 4rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Subscribe Section */
.subscribe-section {
  margin-bottom: 5rem;
}

.subscribe-card {
  background: linear-gradient(135deg, #253898, #5737d6);
  color: white;
  padding: 4rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(37, 56, 152, 0.3);
}

.subscribe-card h2 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: white;
}

.subscribe-card p {
  font-size: 1.6rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

/* Subscribe Form */
.subscribe-form,
.sidebar-subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.email-input {
  flex: 1;
  min-width: 250px;
  padding: 1.5rem;
  font-size: 1.6rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s;
}

.email-input:focus {
  border-color: #253898;
}

.subscribe-button {
  padding: 1.5rem 3rem;
  font-size: 1.6rem;
  font-weight: bold;
  background: white;
  color: #253898;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.subscribe-card .subscribe-button {
  background: white;
  color: #253898;
}

.subscribe-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.privacy-note {
  font-size: 1.3rem;
  opacity: 0.8;
  text-align: center;
}

.privacy-note a {
  color: inherit;
  text-decoration: underline;
}

/* Newsletters Grid */
.newslettersGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}

.newsletter-card {
  background: white;
  border-radius: 12px;
  padding: 3rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.newsletter-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.newsletter-header {
  margin-bottom: 2rem;
}

.newsletter-header i {
  color: #253898;
  margin-bottom: 1.5rem;
}

.newsletter-header h2 {
  font-size: 2.2rem;
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.newsletter-date {
  display: block;
  font-size: 1.4rem;
  color: #999;
  margin-top: 0.5rem;
}

.newsletter-body {
  flex: 1;
  margin-bottom: 2rem;
}

.newsletter-synopsis {
  font-size: 1.6rem;
  line-height: 1.6;
  color: #555;
}

.newsletter-footer {
  margin-top: auto;
}

.read-more-link {
  display: inline-block;
  padding: 1.2rem 2.5rem;
  background: linear-gradient(135deg, #253898, #5737d6);
  color: white !important;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1.5rem;
  transition: opacity 0.3s;
}

.read-more-link:hover {
  opacity: 0.9;
}

/* No Newsletters Message */
.no-newsletters-message {
  text-align: center;
  padding: 6rem 2rem;
  color: #999;
}

.no-newsletters-message i {
  color: #ddd;
  margin-bottom: 2rem;
}

.no-newsletters-message p {
  font-size: 1.8rem;
  color: #666;
}

/* Newsletter Detail Page */
.newsletter-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 4rem;
  margin-top: 3rem;
}

.newsletter-main {
  min-width: 0; /* Prevent overflow */
}

.newsletter-article-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #eee;
}

.newsletter-article-header h1 {
  font-size: 3.5rem;
  color: #253898;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.newsletter-meta {
  display: flex;
  gap: 2rem;
  font-size: 1.5rem;
  color: #777;
}

.newsletter-meta i {
  margin-right: 0.5rem;
}

.newsletter-article .newsletter-synopsis {
  background: #f8f8f8;
  padding: 2rem;
  border-left: 4px solid #253898;
  margin-bottom: 3rem;
  font-size: 1.8rem;
  font-style: italic;
  color: #555;
}

.newsletter-content {
  font-size: 1.7rem;
  line-height: 1.8;
  color: #333;
}

.newsletter-content h2,
.newsletter-content h3 {
  color: #253898;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

.newsletter-content p {
  margin-bottom: 1.5rem;
}

.newsletter-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
}

.newsletter-content ul,
.newsletter-content ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.newsletter-content li {
  margin-bottom: 0.8rem;
}

.newsletter-article .newsletter-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.6rem;
  color: #253898;
  text-decoration: none;
  transition: gap 0.3s;
}

.back-link:hover {
  gap: 1rem;
}

/* Sidebar */
.newsletter-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-card {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.sidebar-card h2,
.sidebar-card h3 {
  font-size: 2rem;
  color: #253898;
  margin-bottom: 1.5rem;
}

.sidebar-card p {
  font-size: 1.5rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.subscribe-widget {
  background: linear-gradient(135deg, #253898, #5737d6);
  color: white;
}

.subscribe-widget h2 {
  color: white;
}

.subscribe-widget p {
  color: white;
  opacity: 0.9;
}

.sidebar-subscribe-form .email-input {
  width: 100%;
  margin-bottom: 1rem;
}

.sidebar-subscribe-form .subscribe-button {
  width: 100%;
}

.recent-list {
  list-style: none;
  padding: 0;
}

.recent-list li {
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.recent-list li:last-child {
  border-bottom: none;
}

.recent-list a {
  display: block;
  font-size: 1.5rem;
  color: #333;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.recent-list a:hover {
  color: #253898;
}

.recent-list small {
  font-size: 1.2rem;
  color: #999;
}

/* Share Widget */
.share-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-btn {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white !important;
  text-decoration: none;
  transition: transform 0.3s, opacity 0.3s;
}

.share-btn:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.share-btn.facebook {
  background: #1877f2;
}

.share-btn.twitter {
  background: #1da1f2;
}

.share-btn.linkedin {
  background: #0077b5;
}

.share-btn.email {
  background: #666;
}

/* Unsubscribe Page */
.unsubscribe-card {
  max-width: 600px;
  margin: 5rem auto;
  text-align: center;
  background: white;
  padding: 5rem;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.unsubscribe-card h1 {
  font-size: 3rem;
  color: #333;
  margin: 2rem 0;
}

.unsubscribe-card p {
  font-size: 1.6rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.unsubscribe-options {
  margin: 3rem 0;
  padding: 2rem;
  background: #f8f8f8;
  border-radius: 10px;
}

.unsubscribe-options h3 {
  font-size: 2rem;
  color: #253898;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: 1.2rem 3rem;
  margin: 0.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
  transition: transform 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #253898, #5737d6);
  color: white !important;
}

.btn-secondary {
  background: #6c757d;
  color: white !important;
}

.feedback-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.feedback-section h3 {
  font-size: 1.8rem;
  color: #253898;
  margin-bottom: 1rem;
}

.feedback-section ul {
  list-style: none;
  padding: 0;
  font-size: 1.4rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.feedback-section li {
  padding: 0.5rem 0;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  margin: 4rem 0 2rem 0;
}

/* Screen Reader Only */
.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;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
  .newsletter-layout {
    grid-template-columns: 1fr 300px;
    gap: 3rem;
  }
}

@media screen and (max-width: 768px) {
  .sectionHeading {
    font-size: 3.2rem;
  }

  .section-intro {
    font-size: 1.6rem;
  }

  .subscribe-card {
    padding: 3rem 2rem;
  }

  .subscribe-card h2 {
    font-size: 2.4rem;
  }

  .newslettersGrid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .newsletter-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .newsletter-sidebar {
    position: static;
  }

  .newsletter-article-header h1 {
    font-size: 2.8rem;
  }
}

@media screen and (max-width: 426px) {
  #newslettersSection,
  #newsletterDetail {
    padding: 80px 0 30px 0;
  }

  .sectionHeading {
    font-size: 2.6rem;
  }

  .subscribe-card {
    padding: 2.5rem 1.5rem;
  }

  .form-group {
    flex-direction: column;
  }

  .email-input,
  .subscribe-button {
    width: 100%;
  }

  .newsletter-card {
    padding: 2rem;
  }

  .newsletter-header h2 {
    font-size: 1.9rem;
  }

  .newsletter-synopsis {
    font-size: 1.5rem;
  }

  .newsletter-article-header h1 {
    font-size: 2.4rem;
  }

  .newsletter-content {
    font-size: 1.6rem;
  }

  .sidebar-card {
    padding: 2rem;
  }

  .unsubscribe-card {
    padding: 3rem 2rem;
  }
}

/* Admin Filter Buttons */
.filter-btn {
  display: inline-block;
  padding: 8px 16px;
  background: white;
  color: #253898;
  border: 2px solid #253898;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
  background: #253898;
  color: white;
}
