/* UAE Startup Story Videos hub
   (/videos/, page 867) - the "video" post type's YouTube
   stories, 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. The featured video plays
   inline in a large 16:9 player; the rest are video cards
   using their YouTube thumbnails with a play overlay, because
   the video posts have no featured images. Scoped to
   .uss-videos-page, so other pages are untouched. Uses the
   design-system tokens. */

.uss-videos-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-videos .site.grid-container {
  max-width: 100%;
}

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

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

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

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

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

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

/* ------------------------------------------------------------------
   Featured video: a large 16:9 YouTube player across the full
   container width, with the title, excerpt, and Watch button
   below it. A video hub leads with the player, not a still
   image.
   ------------------------------------------------------------------ */

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

.uss-videos-featured-inner {
  display: block;
}

.uss-videos-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--uss-ink);
  margin-bottom: 1.5rem;
}

.uss-videos-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.uss-videos-featured-media {
  display: block;
  overflow: hidden;
  background: var(--uss-paper-soft);
  margin-bottom: 1.5rem;
}

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

.uss-videos-featured-text {
  max-width: 48rem;
}

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

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

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

.uss-videos-watch {
  margin-top: var(--uss-space-2);
}

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

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

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

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

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

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

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

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

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

/* Play overlay on each video card thumbnail: a white circle
   with an ink triangle, centred. It is a plain CSS shape, not
   an image, so it stays crisp at any size. */
.uss-videos-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3rem;
  height: 3rem;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
}

.uss-videos-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-38%, -50%);
  border-style: solid;
  border-width: 0.625rem 0 0.625rem 1rem;
  border-color: transparent transparent transparent var(--uss-ink);
}

.uss-videos-card-media:hover .uss-videos-play {
  background: var(--uss-paper);
}

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

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

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

.uss-videos-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-videos-newsletter {
  background: var(--uss-ink);
  color: var(--uss-paper);
  padding: 3rem 0;
}

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

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

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

.uss-videos-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-videos-newsletter-form .elementor-form .elementor-form-fields-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

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

.uss-videos-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-videos .uss-videos-page .uss-videos-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-videos .uss-videos-page .uss-videos-newsletter-form .elementor-form .elementor-button:hover {
  background: var(--uss-paper-soft);
  border-color: var(--uss-paper-soft);
  color: var(--uss-ink);
}

.uss-videos-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-videos-pagination {
  padding: 2.5rem 0 3rem;
}

.uss-videos-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-videos-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-videos-pagination .nav-links a.page-numbers:hover {
  background: var(--uss-ink);
  color: var(--uss-paper);
}

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

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

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

@media (max-width: 64rem) {
  .uss-videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

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

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