* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, sans-serif;
}


body {
  background-color: #fff;
  color: #1f2937;
}


/* ===================== */
/* MAIN PAGE */
/* ===================== */

.page {
  max-width: 1400px;
  margin: auto;
  padding: 64px 32px 96px;
}

.page-title {
  text-align: center;
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 48px;
}

/* FEATURED CARDS — CENTER ALIGNED */
.featured-grid {
  display: grid;

  /* fixed-width cards like Meter */
  grid-template-columns: repeat(auto-fit, 260px);

  gap: 28px;

  /* THIS centers the cards */
  justify-content: center;

  margin: 0 auto 56px;
}


.featured-card {
  background: white;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 340px;
  width: 260px;
}

.featured-card h3 {
  font-size: 17px;
  margin-bottom: 12px;
}

.featured-card p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.7;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-top: 16px;
}

.read {
  color: #2563eb;
  text-decoration: none;
}

/* CATEGORY BAR */
.category-bar {
  display: flex;
  gap: 20px;
  justify-content: center;
  border-bottom: 1px solid #d1d5db;
  padding-bottom: 14px;
  margin-bottom: 40px;
  font-size: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #eef0f4; /* same as page background */
  padding-top: 12px;
  margin-top: -12px;
}

.category {
  cursor: pointer;
  color: #6b7280;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.category.active {
  color: #1e40af; /* darker blue */
  background: rgba(30, 64, 175, 0.12);
  font-weight: 500;
}


.category b {
  margin-left: 4px;
  font-weight: 500;
}


/* BLOG LIST */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: auto;
}

.blog-row {
  display: grid;
  grid-template-columns: 120px 1fr 180px;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e5e7eb;
}

.blog-date {
  font-size: 14px;
  color: #6b7280;
}

.blog-row h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.blog-row p {
  font-size: 14px;
  color: #6b7280;
}

.blog-meta {
  text-align: right;
  font-size: 14px;
}

/* ===================== */
/* DETAIL PAGE */
/* ===================== */

.detail-page {
  max-width: 900px;
  margin: auto;
  padding: 48px 24px 96px;
}

.back-link {
  color: #2563eb;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 32px;
}

.detail-title {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 12px;
}

.detail-date {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
}

.author-row {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.author {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.author-name {
  font-size: 14px;
  font-weight: 500;
}

.author-role {
  font-size: 12px;
  color: #6b7280;
}

/* CONTENT CARD */
.detail-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.detail-card p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 18px;
}

/* MOBILE */
@media (max-width: 900px) {
  .featured-grid {
    grid-template-columns: repeat(2, 260px);
    justify-content: center;
  }

  .blog-row {
    grid-template-columns: 1fr;
  }

  .blog-meta {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    width: 100%;
  }
}


/*hover and click*/
.blog-title-link {
  color: #111;            
  text-decoration: none; 
}

.blog-title-link:hover {
  color: #2563eb;        
  cursor: pointer;
}

.author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-size: 14px;
  font-weight: 600;
}

.author-role {
  font-size: 13px;
  color: #6b7280;
}


.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination button {
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  color: #374151;
}

.pagination button.active {
  background: #e3e6f8;
  color: #3747d4;
  font-weight: 600;
}

.pagination button:hover {
  background: #f3f4f6;
}



/* ===================== */
/* BLOG DETAIL SCROLL INDICATOR */
/* ===================== */

.detail-page .scroll-track {
  position: fixed;
  left: 24px;
  top: 160px;
  width: 1.5px;
  height: 40vh;
  background: #d1d5db;
  border-radius: 2px;
  z-index: 10;
  opacity: 0.7;
}

.detail-page .scroll-progress {
  width: 100%;
  height: 0%;
  background: #ffffff;
  border-radius: 2px;
  transition: height 0.12s linear;
}

/* Hide on small screens */
@media (max-width: 900px) {
  .detail-page .scroll-track {
    display: none;
  }
}

.category-bar {
  top: 12px; /* instead of 0 */
}



/* ===================== */
/* HERO HEADER (CENTERED) */
/* ===================== */

.hero-header {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 40px; /* was 64px */

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}


.hero-title {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1f2937;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 18px;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: 16px; /* was 28px */
}


/* BUTTON ROW */
.press-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

/* EMAIL PILL BUTTON */
.press-button {
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);

  color: #3747d4;
  font-size: 14px;
  font-weight: 500;

  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}

.press-button:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.press-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(55, 71, 212, 0.25);
}

/* SOCIAL ICON BUTTONS */
.press-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);

  color: #3747d4;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;

  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}

.press-icon:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.press-icon:focus-visible {
  box-shadow: 0 0 0 3px rgba(55, 71, 212, 0.25);
}

/* MOBILE */
@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }
}

/* ===================== */
/* NEWSLETTER CARD LINKS */
/* ===================== */

/* 1. Make the link look like a normal title (Dark Gray) */
.newsletter-title-link {
  text-decoration: none;
  color: #1f2937; /* Matches your default text color */
  cursor: pointer;
  transition: color 0.2s ease; /* Smooth transition */
}

/* 2. Turn Blue on Hover */
.newsletter-title-link:hover {
  color: #2563eb; /* Your blue brand color */
}

/* Back Button Styling */
.back-link {
  display: inline-block;
  text-decoration: none;
  color: #6b7280;         /* Default Gray */
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 32px;    /* Space between button and title */
  transition: color 0.2s ease;
  cursor: pointer;
}

/* Hover Effect (Turns Blue) */
.back-link:hover {
  color: #2563eb;         /* The blue brand color */
}


/* ============================= */
/* FORCE SMALL SQUARE NEWSLETTER CARDS */
/* ============================= */

#newsletter .featured-grid {
  grid-template-columns: repeat(auto-fit, 220px) !important;
  gap: 20px !important;
  justify-content: center !important;
}

#newsletter .featured-card {
  width: 220px !important;
  height: 220px !important;     /* SQUARE */
  min-height: unset !important;
  max-height: unset !important;

  padding: 16px !important;
  border-radius: 14px !important;

  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

.featured-card h3 {
  font-size: 14px !important;
  line-height: 1.35 !important;
  margin-bottom: 6px !important;

  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.featured-card p {
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  color: #6b7280 !important;

  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.card-footer {
  margin-top: auto !important;
  font-size: 12.5px !important;
}

/* NEWSLETTER FOOTER FIX */

#newsletter .card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* stop pushing to edges */
  gap: 6px;
  margin-top: auto; /* keeps footer pinned but inline */
}

#newsletter .read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap; /* prevents arrow drop */
}

/* ===================== */
/* NEWSLETTER MODAL */
/* ===================== */

.newsletter-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.4); /* Lighter, more airy */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(12px); /* Stronger blur for focus */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.newsletter-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.newsletter-modal-content {
  background: #ffffff;
  padding: 48px;
  border-radius: 24px; /* Softer corners */
  width: 90%;
  max-width: 480px;
  position: relative;
  
  /* Soft, deep shadow like a floating layer */
  box-shadow: 
    0 20px 40px -10px rgba(0, 0, 0, 0.1), 
    0 0 0 1px rgba(0, 0, 0, 0.04);
    
  transform: scale(0.94) translateY(10px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
}

.newsletter-modal-overlay.open .newsletter-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.close-modal-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0,0,0,0.04);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-modal-btn:hover {
  background: rgba(0,0,0,0.08);
  color: #111;
  transform: rotate(90deg);
}

.modal-header {
  text-align: center;
  margin-bottom: 32px;
}

.modal-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #111;
  letter-spacing: -0.02em;
}

.modal-header p {
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.newsletter-form .input-group {
  display: flex;
  flex-direction: column;
}

.newsletter-form input[type="email"] {
  padding: 16px 20px;
  border: 2px solid transparent;
  background-color: #f3f4f6; /* Light gray background */
  border-radius: 14px;
  font-size: 16px;
  outline: none;
  color: #111;
  transition: all 0.2s ease;
}

.newsletter-form input[type="email"]::placeholder {
  color: #9ca3af;
}

.newsletter-form input[type="email"]:focus {
  background-color: #fff;
  border-color: #e5e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.subscribe-btn {
  padding: 16px;
  background-color: #111;
  color: #fff;
  border: none;
  border-radius: 14px; /* Match input radius */
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.subscribe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.25);
  background-color: #000;
}

.subscribe-btn:active {
  transform: translateY(0);
}

.subscribe-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.newsletter-message {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  min-height: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.newsletter-message.success,
.newsletter-message.error {
  opacity: 1;
  transform: translateY(0);
}

.newsletter-message.success {
  color: #059669; /* Emerald 600 */
}

.newsletter-message.error {
  color: #dc2626; /* Red 600 */
}
