/* ==========================================================================
   ARTICLE PAGE STYLES
   ========================================================================== */

/* Page container */
.article-page-container {
  background: #F6F7FE;
  min-height: 100vh;
}

/* ==========================================================================
   HERO CARD SECTION - Title/Meta Left, Image Right
   ========================================================================== */

.article-hero-card {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 80px;
  margin-top: 24px;
  gap: 40px; /* Gap between hero-left and hero-right (image) */
}

.article-hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  flex: 1;
  min-height: 320px; /* Match image height for alignment (16:9 at 568px width) */
}

.article-hero-title {
  font-family: 'Manrope', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 56px;
  line-height: 120%;
  color: #051327;
  margin: 0;
}

/* Bottom section of hero-left containing meta and tags */
.article-hero-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto; /* Push to bottom to align with image */
  width: 100%;
  position: relative; /* For absolute positioning of read time */
}

.article-hero-meta-row {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
}

.article-meta-author-date {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

/* Author name - clickable with underline on hover */
.article-meta-author {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 25px;
  color: #051327;
  text-decoration: none;
}

a.article-meta-author:hover,
.article-meta-author-link:hover {
  text-decoration: underline;
  cursor: pointer;
}

.article-meta-dash {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 25px;
  color: #051327;
  margin: 0 4px;
}

.article-meta-date {
  font-family: 'Manrope', sans-serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 25px;
  color: #051327;
}

/* Read time - positioned at right edge, close to image */
.article-meta-read-time {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  position: absolute;
  right: 0; /* Align to right edge of hero-bottom */
  top: 0; /* Same line as author-date */
}

.article-meta-read-time svg {
  width: 24px;
  height: 24px;
}

.article-meta-read-text {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 120%;
  color: #051327;
}

/* Tags Row - at bottom, aligns with image lower border */
.article-hero-tags {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap; /* Allow wrapping... */
  max-height: 26px; /* ...but hide anything beyond the first line */
  overflow: hidden;
}

.article-tag {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 25px;
  color: #F50002;
  text-decoration: none;
}

.article-tag:hover {
  text-decoration: underline;
}

/* Hero Image Right Side */
.article-hero-right {
  width: 568px;
  flex-shrink: 0;
}

.article-hero-image {
  width: 100%;
  height: 320px; /* 16:9 aspect ratio with 568px width */
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   FULL-WIDTH DIVIDER - 60px below hero section
   ========================================================================== */

.article-divider {
  width: calc(100% - 160px);
  margin: 60px 80px 52px 80px;
  height: 0;
  border: none;
  border-top: 1px solid #051327;
}

/* ==========================================================================
   SINGLE COLUMN ARTICLE BODY
   ========================================================================== */

.article-body-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 80px;
}

.article-body-single {
  max-width: 640px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.article-body-single p,
.article-body-single .block-paragraph {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
  color: #051327;
  margin: 0;
}

/* First block (paragraph) - larger and bolder for first ~3 lines effect */
.article-body-single .first-block p,
.article-body-single .first-block .block-paragraph,
.article-body-single .first-block > p:first-child {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 140%;
  color: #051327;
  margin: 0 0 24px 0;
}

.article-body-single h2 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 130%;
  color: #051327;
  margin: 24px 0 0 0;
}

.article-body-single h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 130%;
  color: #051327;
  margin: 20px 0 0 0;
}

.article-body-single blockquote {
  border-left: 4px solid #F50002;
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
}

.article-body-single img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px 0;
}

/* Tags at end of article */
.article-end-tags {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center; /* Center the tags */
  flex-wrap: wrap; /* Allow wrapping */
  padding: 60px 0 0;
  gap: 16px;
  width: 100%; /* Ensure full width of container */
}

/* ==========================================================================
   ARTICLE AD BANNER (Different class from homepage)
   ========================================================================== */

.article-ad-banner {
  width: 100%;
  height: 243px;
  background: #EAEAEA;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 60px 0 0 0;
}

.article-ad-banner-text {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: 64px;
  line-height: 120%;
  color: #051327;
}

/* ==========================================================================
   MORE GRID SECTION - Single Row for Article Page
   Copies positioning from homepage frame-more-grid
   ========================================================================== */

.article-more-section {
  padding: 0 80px;
  margin-top: 80px;
  margin-bottom: 80px;
}

/* Override for single row in article page */
.article-more-single-row {
  grid-template-rows: 131px !important; /* Only 1 row, 131px like homepage */
}

.article-more-single-row .f-more-col-icon {
  grid-row: 1 / 2 !important; /* Span only 1 row */
}

/* More icon positioning - uses more-arrow.svg like homepage */
.article-more-single-row .more-icon-large {
  width: 203px;
  height: 147px;
  background: url('/static/home/more-arrow.svg') no-repeat center/contain;
  position: absolute;
  top: -39px;
  left: 13px;
  z-index: 10;
}

/* Remove bottom border from items in single row (already has container border) */
.article-more-single-row .f-more-item {
  border-bottom: none !important;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 1200px) {
  .article-hero-card {
    flex-direction: column;
    padding: 0 40px;
    gap: 24px;
  }
  
  .article-hero-left {
    max-width: 100%;
    min-height: auto;
  }
  
  .article-hero-right {
    width: 100%;
  }
  
  .article-hero-image {
    height: auto;
    max-height: 400px;
  }
  
  .article-hero-title {
    font-size: 42px;
  }
  
  .article-divider {
    width: calc(100% - 80px);
    margin: 40px 40px;
  }
  
  .article-body-wrapper {
    padding: 0 40px;
  }
  
  .article-more-section {
    padding: 0 40px;
  }
}

@media (max-width: 768px) {
  .article-hero-card {
    padding: 0 20px;
  }
  
  .article-hero-title {
    font-size: 32px;
  }
  
  .article-hero-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .article-divider {
    width: calc(100% - 40px);
    margin: 30px 20px;
  }
  
  .article-body-wrapper {
    padding: 0 20px;
  }
  
  .article-body-single p,
  .article-body-single .block-paragraph {
    font-size: 18px;
  }
  
  .article-lead-text {
    font-size: 22px;
  }
  
  .article-ad-banner {
    height: 150px;
  }
  
  .article-ad-banner-text {
    font-size: 36px;
  }
  
  .article-more-section {
    padding: 0 20px;
    margin-top: 40px;
    margin-bottom: 40px;
  }
}

/* ==========================================================================
   PAYWALL OVERLAY STYLES
   ========================================================================== */

/* Container when paywall is active */
.article-body-wrapper.paywall-active {
  position: relative;
  /* No overflow hidden - overlay flows naturally after visible content */
}

/* Hidden blocks - kept in DOM for SEO but hidden via JS for humans */
.paywall-hidden-block {
  opacity: 1; /* Visible by default for SEO crawlers */
  /* JavaScript will hide these for human users */
}

/* Paywall overlay container */
.paywall-overlay {
  position: relative;
  z-index: 100;
  margin-top: -100px;
  pointer-events: auto;
  width: 100%;
}

/* Gradient fade effect */
.paywall-gradient {
  height: 150px;
  background: linear-gradient(
    to bottom,
    rgba(246, 247, 254, 0) 0%,
    rgba(246, 247, 254, 0.8) 40%,
    rgba(246, 247, 254, 1) 100%
  );
}

/* Content area of paywall */
.paywall-content {
  background: #F6F7FE;
  padding: 0 0 60px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* CTA Box */
.paywall-cta-box {
  max-width: 620px; /* Matched to pricing container width */
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  gap: 24px;
  margin: 0 auto;
}

/* Subscribe banner at top - non-clickable */
.paywall-subscribe-banner {
  display: block; /* Changed from flex to preserve whitespace */
  justify-content: center;
  align-items: center;
  padding: 16px 40px;
  width: 100%;
  max-width: 573px;
  box-sizing: border-box;
  background: #EAEDFF;
  border: 1px solid var(--color-text-main);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: 0.06em; /* Reduced to 60% of previous 0.1em */
  text-transform: uppercase;
  color: var(--color-dark-blue);
  cursor: default;
  user-select: none;
}

/* SUBSCRIBE text in red */
.banner-subscribe-text {
  color: var(--color-red);
}

/* Main title */
.paywall-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 32px;
  line-height: 100%;
  text-align: center;
  letter-spacing: -0.05em;
  color: #051327;
  margin: 0;
}

/* Description text */
.paywall-description {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 120%;
  text-align: center;
  color: #051327;
  margin: 0;
  max-width: 547px;
}

/* Pricing options container - side by side with no gaps */
.paywall-pricing {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  max-width: 620px; /* Narrower to keep 10px gap between text and flag */
  gap: 0; /* No gaps between boxes */
  margin: 0 auto;
}

/* Individual price option - uses flexbox row layout */
.paywall-price-option {
  flex: 1 1 0; /* Equal width */
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 10px;
  gap: 8px;
  box-sizing: border-box;
  border: 1px solid var(--color-separator-blue);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

/* Remove double borders between adjacent boxes */
.paywall-price-option + .paywall-price-option {
  border-left: none;
}

.paywall-price-option.selected {
  border-color: var(--color-dark-blue);
}

.paywall-price-option:hover {
  border-color: var(--color-dark-blue);
}

/* Radio button circle - positioned at top left */
.price-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #9BABC1;
  box-sizing: border-box;
  flex-shrink: 0;
  margin-top: 2px;
}

.paywall-price-option.selected .price-radio {
  border-color: #003F84;
  background: #003F84;
}

.paywall-price-option.selected .price-radio::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  margin: 4px;
}

/* Content column - contains all text elements stacked vertically */
.price-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

/* Plan label (Free Plan, Weekly Plan, Monthly Plan) */
.price-label {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: var(--color-text-main);
}

/* Main price amount */
.price-amount {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: var(--color-blue);
}

/* Billing text */
.price-billing {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  color: #7F8B9C;
}

/* BEST VALUE badge - flag style with concave left edge */
.price-badge {
  position: absolute;
  top: 6px;
  right: -1px; /* Align with right edge of border */
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 10px;
  line-height: 1.2;
  color: var(--color-white);
  background: var(--color-red);
  padding: 4px 8px 4px 10px;
  text-align: center;
  /* Simple chevron shape > on left edge */
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%);
}

.paywall-price-option.selected .price-billing {
  color: #7F8B9C;
}

/* Subscribe button */
.paywall-subscribe-btn {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 16px 42px;
  width: 100%;
  max-width: 581px; /* Align with text width */
  background: #F50002;
  border-radius: 100px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 25px;
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.paywall-subscribe-btn:hover {
  background: #d40002;
  transform: translateY(-1px);
}

/* Login prompt */
.paywall-login-prompt {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: #666;
  margin: 0;
}

.paywall-login-prompt a {
  color: #F50002;
  text-decoration: underline;
}

/* Responsive paywall */
@media (max-width: 768px) {
  .article-body-wrapper.paywall-active {
    max-height: 600px;
  }
  
  .paywall-title {
    font-size: 24px;
  }
  
  .paywall-pricing {
    flex-direction: column;
  }
  
  .paywall-cta-box {
    gap: 16px;
  }
}
