/* UAE Startup Story Articles archive
   (/articles/, page 826) - the "Article" category's practical
   guides, in the same family as the Startup Stories and Success
   Stories archives: a cream hero, the site's ink and red accent,
   short headings, thin rules, no shadows, no gradients, no
   rounded cards. Scoped to .uss-articles-page, so other pages
   are untouched. Uses the design-system tokens. */

.uss-articles-page {
  width: 100%;
  background: var(--uss-paper);
  color: var(--uss-ink);
  /* Titles and body text a touch smaller than the site default,
     scoped to this page only. */
  --uss-display: clamp(2rem, 4vw, 3rem);
  --uss-h2: clamp(1.25rem, 2.5vw, 1.75rem);
  font-size: 0.875rem;
}

/* Full width: the category archive renders inside GeneratePress's
   1200px grid-container, so the page reads narrower than the
   header and the grey body background shows at the sides.
   Break the grid-container out to the full viewport width;
   the inner .uss-container still holds the content to the
   1250px site width, aligned with the header. Same pattern as
   the News page. */
.page-template-template-articles .site.grid-container {
  max-width: 100%;
}

.page-template-template-articles .site-content {
  display: block;
  padding: 0;
}

/* ------------------------------------------------------------------
   Hero: warm cream, big serif title, description, live story count.
   ------------------------------------------------------------------ */

.uss-articles-hero {
  background: var(--uss-paper-soft);
  border-bottom: 1px solid var(--uss-line);
  padding: 3.5rem 0 3rem;
}

.uss-articles-hero h1 {
  font-size: var(--uss-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 var(--uss-space-4);
}

.uss-articles-intro {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--uss-muted);
  max-width: 45rem;
  margin: 0 0 var(--uss-space-4);
}

.uss-articles-count {
  font-size: var(--uss-small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--uss-muted);
  margin: 0;
}

.uss-articles-count-num {
  font-family: var(--uss-font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--uss-accent);
  letter-spacing: 0;
  text-transform: none;
}

/* ------------------------------------------------------------------
   Featured story (page 1 only): large, image left, text right.
   ------------------------------------------------------------------ */

.uss-articles-featured {
  padding: 3rem 0;
  border-bottom: 1px solid var(--uss-line);
}

.uss-articles-featured-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.uss-articles-featured-media {
  display: block;
  overflow: hidden;
  background: var(--uss-paper-soft);
}

.uss-articles-featured-media img {
  display: block;
  width: 100%;
  height: auto;
}

.uss-articles-featured-text {
  padding-top: 0.25rem;
}

.uss-articles-featured-text h2 {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  line-height: 1.2;
  margin: 0 0 var(--uss-space-3);
}

.uss-articles-featured-text h2 a:hover { color: var(--uss-accent); }

.uss-articles-excerpt {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--uss-muted);
  margin: 0 0 var(--uss-space-3);
}

.uss-articles-byline {
  font-size: var(--uss-small);
  color: var(--uss-muted);
  margin: 0 0 var(--uss-space-4);
}

.uss-articles-read {
  margin-top: var(--uss-space-2);
}

/* ------------------------------------------------------------------
   Latest stories: section head + 3-column card grid.
   ------------------------------------------------------------------ */

.uss-articles-latest {
  padding: 3rem 0;
}

.uss-articles-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.uss-articles-head h2 {
  font-size: var(--uss-h2);
  margin: 0;
  white-space: nowrap;
}

.uss-articles-head-rule {
  flex: 1;
  height: 2px;
  background: var(--uss-line-strong);
}

.uss-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.uss-articles-card {
  margin: 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--uss-line);
}

.uss-articles-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--uss-paper-soft);
  margin-bottom: var(--uss-space-3);
}

.uss-articles-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.uss-articles-card h3 {
  font-size: 1rem;
  line-height: 1.3;
  margin: 0 0 var(--uss-space-2);
}

.uss-articles-card h3 a:hover { color: var(--uss-accent); }

.uss-articles-card .uss-articles-excerpt {
  font-size: 0.75rem;
  margin: 0 0 var(--uss-space-2);
}

.uss-articles-meta {
  font-size: var(--uss-small);
  color: var(--uss-muted);
  margin: 0;
}

/* ------------------------------------------------------------------
   Newsletter band: full-width black, white heading, and the
   site's newsletter signup form (Elementor "Hero Home" form,
   rendered from library template 3076). The form's behaviour
   is Elementor's; only its appearance is restyled here so it
   reads on the black band: white email field, white button
   with black text.
   ------------------------------------------------------------------ */

.uss-articles-newsletter {
  background: var(--uss-ink);
  color: var(--uss-paper);
  padding: 3rem 0;
}

.uss-articles-newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.uss-articles-newsletter-text h2 {
  color: var(--uss-paper);
  font-size: var(--uss-h2);
  margin: 0 0 var(--uss-space-2);
}

.uss-articles-newsletter-text p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

.uss-articles-newsletter-form {
  flex-shrink: 0;
  width: min(100%, 26rem);
}

/* The form is a single email field plus a button. Elementor lays
   them out side by side (email 66%, button 33%), which squeezes
   the button so "Get Updates" wraps onto two lines. Stack them
   vertically instead, each full width, so the button has room
   and the label stays on one line. The widget's own button
   colour comes from an Elementor global, which outranks a plain
   rule, so the button rules below use the long page-template
   selector to win (same pattern as the press-release form
   button). */
.uss-articles-newsletter-form .elementor-form .elementor-form-fields-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.uss-articles-newsletter-form .elementor-form .elementor-form-fields-wrapper .elementor-field-group {
  width: 100%;
}

.uss-articles-newsletter-form .elementor-form .elementor-field-group {
  margin-bottom: 0;
}

.uss-articles-newsletter-form .elementor-form .elementor-field {
  font-family: var(--uss-font-body);
  font-size: 0.9375rem;
  color: var(--uss-ink);
  background: var(--uss-paper);
  border: 1px solid var(--uss-paper);
  border-radius: 0;
  padding: 0.75rem 0.875rem;
}

body.page-template-template-articles .uss-articles-page .uss-articles-newsletter-form .elementor-form .elementor-button {
  font-family: var(--uss-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--uss-ink);
  background: var(--uss-paper);
  border: 1px solid var(--uss-paper);
  border-radius: 0;
  padding: 0.875rem 2rem;
  white-space: nowrap;
  cursor: pointer;
}

body.page-template-template-articles .uss-articles-page .uss-articles-newsletter-form .elementor-form .elementor-button:hover {
  background: var(--uss-paper-soft);
  border-color: var(--uss-paper-soft);
  color: var(--uss-ink);
}

.uss-articles-newsletter-form .elementor-form .elementor-message {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--uss-paper);
}

/* ------------------------------------------------------------------
   Pagination: numbered, editorial, black current page.
   ------------------------------------------------------------------ */

.uss-articles-pagination {
  padding: 2.5rem 0 3rem;
}

.uss-articles-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* GeneratePress styles pagination children with
   `.paging-navigation .nav-links>*{padding:0 5px}` (specificity
   0,2,0), which ties with a plain `.page-numbers` rule and can
   win on source order. These selectors add `.nav-links`, making
   them 0,3,0, so this theme's padding and centring always win.
   Centring uses grid place-items, which centres the digit both
   ways regardless of the glyph's side bearings. */
.uss-articles-pagination .nav-links .page-numbers {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 2.5rem;
  text-align: center;
  font-family: var(--uss-font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--uss-line-strong);
  color: var(--uss-ink);
}

.uss-articles-pagination .nav-links a.page-numbers:hover {
  background: var(--uss-ink);
  color: var(--uss-paper);
}

.uss-articles-pagination .nav-links .page-numbers.current {
  background: var(--uss-ink);
  border-color: var(--uss-ink);
  color: var(--uss-paper);
}

.uss-articles-pagination .nav-links .page-numbers.dots {
  border-color: transparent;
  color: var(--uss-muted);
}

/* ------------------------------------------------------------------
   Responsive.
   ------------------------------------------------------------------ */

@media (max-width: 64rem) {
  .uss-articles-featured-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .uss-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .uss-articles-newsletter-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

@media (max-width: 48rem) {
  .uss-articles-hero {
    padding: 2.25rem 0 2rem;
  }

  .uss-articles-featured,
  .uss-articles-latest {
    padding: 2rem 0;
  }

  .uss-articles-grid {
    grid-template-columns: 1fr;
  }

  .uss-articles-head h2 {
    white-space: normal;
  }

  .uss-articles-newsletter {
    padding: 2rem 0;
  }
}
