/* ==========================================================================
   ABLYWORKS NEWS & PRESS ROOM STYLES - MODERN SAAS AESTHETICS
   ========================================================================== */

:root {
  --ably-news-primary: #008740;
  --ably-news-primary-hover: #006b32;
  --ably-news-dark: #032d16;
  --ably-news-dark-card: #08381e;
  --ably-news-ink: #0f172a;
  --ably-news-slate: #334155;
  --ably-news-muted: #64748b;
  --ably-news-bg-light: #f8fafc;
  --ably-news-card-bg: #ffffff;
  --ably-news-border: #e2e8f0;
  --ably-news-accent-glow: rgba(0, 135, 64, 0.15);
  --ably-news-radius: 16px;
  --ably-news-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.04);
  --ably-news-shadow-md: 0 10px 30px rgba(0, 135, 64, 0.08);
  --ably-news-shadow-hover: 0 20px 40px rgba(0, 135, 64, 0.15);
}

/* Overall Wrapper */
.news-page-wrapper {
  color: var(--ably-news-ink);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--ably-news-bg-light);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.news-hero {
  position: relative;
  background: var(--ably-news-dark);
  padding: 80px 0 90px;
  color: #ffffff;
  overflow: hidden;
}

.news-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(0, 168, 82, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.18) 0%, transparent 50%);
  pointer-events: none;
}

.news-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.news-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: #ffffff;
}

.news-hero-desc {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   FEATURED ARTICLE CARD (HERO CARD)
   ========================================================================== */
.featured-news-card {
  background: var(--ably-news-card-bg);
  border-radius: var(--ably-news-radius);
  border: 1px solid var(--ably-news-border);
  box-shadow: var(--ably-news-shadow-md);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: -40px;
  position: relative;
  z-index: 10;
}

.featured-news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ably-news-shadow-hover);
  border-color: rgba(0, 135, 64, 0.3);
}

.featured-news-img-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  background-color: #ffffff;
  overflow: hidden;
}

.featured-news-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.featured-news-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #eaf8ef;
  color: var(--ably-news-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 6px;
}

.news-source-tag {
  color: var(--ably-news-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.featured-news-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 16px 0;
  color: var(--ably-news-ink);
  transition: color 0.2s;
}

.featured-news-card:hover .featured-news-title {
  color: var(--ably-news-primary);
}

.featured-news-excerpt {
  color: var(--ably-news-slate);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-read-article {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--ably-news-primary);
  color: #ffffff !important;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  width: fit-content;
}

.btn-read-article:hover {
  background-color: var(--ably-news-primary-hover);
  transform: translateX(4px);
}

/* ==========================================================================
   ARTICLES GRID
   ========================================================================== */
.news-grid-section {
  padding: 70px 0 90px;
}

.section-heading-sm {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ably-news-ink);
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 12px;
}

.section-heading-sm::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--ably-news-primary);
  border-radius: 2px;
}

.news-article-card {
  background: var(--ably-news-card-bg);
  border-radius: var(--ably-news-radius);
  border: 1px solid var(--ably-news-border);
  box-shadow: var(--ably-news-shadow-sm);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.news-article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--ably-news-shadow-hover);
  border-color: rgba(0, 135, 64, 0.25);
}

.news-card-img-wrap {
  position: relative;
  width: 100%;
  height: 210px;
  background-color: #0f172a;
  overflow: hidden;
}

.news-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  will-change: transform;
}

.news-article-card:hover .news-card-img-wrap img {
  transform: scale(1.04) translateZ(0);
}

.news-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 12px 0;
  color: var(--ably-news-ink);

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  color: var(--ably-news-slate);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-link {
  color: var(--ably-news-primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
  transition: gap 0.2s;
}

.news-card-link:hover {
  gap: 10px;
  color: var(--ably-news-primary-hover);
}

/* ==========================================================================
   ARTICLE DETAIL PAGE STYLES
   ========================================================================== */
.article-header-section {
  background: var(--ably-news-dark);
  color: #ffffff;
  padding: 70px 0 80px;
  position: relative;
}

.article-breadcrumbs {
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.article-breadcrumbs a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.article-breadcrumbs a:hover {
  color: #34d399;
}

.article-breadcrumbs span {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 8px;
}

.article-main-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  color: #ffffff;
}

.article-main-title a,
.article-main-title a:hover,
.article-main-title a:focus,
.article-main-title a:active {
  color: #ffffff;
  text-decoration: none;
}

.article-main-title a .link-icon {
  font-size: 0.65em;
  vertical-align: middle;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-block;
  color: #ffffff;
}

.article-main-title a:hover .link-icon {
  opacity: 1;
  transform: translate(3px, -3px);
}

.article-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
  max-width: 840px;
  margin-bottom: 30px;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.article-meta-item i {
  color: #34d399;
}

/* Content Container */
.article-content-body {
  background: #ffffff;
  padding: 50px 0 80px;
}

.article-hero-media {
  margin-bottom: 40px;
  border-radius: var(--ably-news-radius);
  overflow: hidden;
  box-shadow: var(--ably-news-shadow-md);
}

.article-hero-media img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.article-media-caption {
  background: #f1f5f9;
  padding: 12px 20px;
  font-size: 0.875rem;
  color: var(--ably-news-slate);
  border-left: 4px solid var(--ably-news-primary);
  margin-top: 0;
}

/* Social Share Sticky Bar */
.social-share-box {
  position: sticky;
  top: 100px;
  background: #ffffff;
  border: 1px solid var(--ably-news-border);
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: var(--ably-news-shadow-sm);
  text-align: center;
}

.share-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ably-news-muted);
  margin-bottom: 14px;
}

.share-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: #ffffff !important;
  font-size: 1.1rem;
  text-decoration: none !important;
  transition: transform 0.2s, opacity 0.2s;
  margin: 0 auto;
}

.share-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

.share-btn.linkedin { background-color: #0077b5; }
.share-btn.twitter { background-color: #000000; }
.share-btn.facebook { background-color: #1877f2; }
.share-btn.copy { background-color: #64748b; }
.share-btn.pdf { background-color: #e11d48; }

/* Article Typography & Text Formatting */
.article-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #1e293b;
}

.article-text p {
  margin-bottom: 24px;
}

.article-dateline {
  font-weight: 700;
  color: var(--ably-news-ink);
}

.article-quote-box {
  background: linear-gradient(135deg, #f4fbf6 0%, #eaf8ef 100%);
  border-left: 5px solid var(--ably-news-primary);
  border-radius: 0 16px 16px 0;
  padding: 30px 36px;
  margin: 36px 0;
  position: relative;
}

.article-quote-icon {
  font-size: 2rem;
  color: var(--ably-news-primary);
  opacity: 0.3;
  position: absolute;
  top: 15px;
  left: 20px;
}

.quote-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #064e26;
  line-height: 1.5;
  margin-bottom: 12px;
  font-style: italic;
}

.quote-author {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ably-news-ink);
}

.quote-author span {
  font-weight: 400;
  color: var(--ably-news-muted);
}

/* Press Release Verification Box */
.press-source-card {
  background: #f8fafc;
  border: 1px dashed var(--ably-news-border);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.press-source-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.press-source-info i {
  font-size: 1.5rem;
  color: var(--ably-news-primary);
}

.press-source-text h6 {
  font-weight: 700;
  margin: 0;
  font-size: 0.95rem;
  color: var(--ably-news-ink);
}

.press-source-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ably-news-muted);
}

.btn-verify-source {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ably-news-primary);
  background: #ffffff;
  border: 1px solid var(--ably-news-primary);
  padding: 8px 18px;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.2s;
}

.btn-verify-source:hover {
  background: var(--ably-news-primary);
  color: #ffffff !important;
}

/* About AblyWorks Box & Media Contact */
.media-contact-card {
  background: #ffffff;
  border: 1px solid var(--ably-news-border);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--ably-news-shadow-sm);
  margin-top: 50px;
}

.media-contact-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ably-news-ink);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ably-news-primary);
  display: inline-block;
}

.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-info-list li {
  margin-bottom: 10px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ably-news-slate);
}

.contact-info-list li i {
  color: var(--ably-news-primary);
  width: 18px;
}

.btn-press-contact,
.media-contact-card .btn-outline-success {
  border-color: #008740 !important;
  color: #008740 !important;
  background-color: transparent !important;
  transition: all 0.3s ease !important;
}

.btn-press-contact:hover,
.btn-press-contact:focus,
.btn-press-contact:active,
.media-contact-card .btn-outline-success:hover,
.media-contact-card .btn-outline-success:focus,
.media-contact-card .btn-outline-success:active {
  background-color: #008740 !important;
  border-color: #008740 !important;
  color: #ffffff !important;
}

/* Responsiveness */
@media (max-width: 991.98px) {
  .news-hero-title { font-size: 2.1rem; }
  .article-main-title { font-size: 1.85rem; }
  .featured-news-body { padding: 30px 24px; }
  .social-share-box {
    position: relative;
    top: 0;
    margin-bottom: 30px;
    padding: 14px;
  }
  .share-btn-group {
    flex-direction: row;
    justify-content: center;
  }
}
