/*
Theme Name: PSE Clone
Theme URI: http://localhost:8080/
Author: Generated for local development
Description: A self-contained WordPress theme reproducing the pse.agency layout and design system. Renders WPBakery/Impreza-structured markup using scraped stylesheets, with no dependency on the commercial Impreza theme or the WPBakery plugin.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: Private / development use
Text Domain: pse-clone
*/

/* -------------------------------------------------------------------------
   Everything visual comes from assets/css/*. This file holds only the small
   corrections needed because the clone runs without the Impreza runtime.
   ---------------------------------------------------------------------- */

/* Impreza hides the fixed header until its JS boots; without that boot step
   the header would stay invisible, so force it visible. */
.l-header.pos_fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 111;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* No canvas offset: on the original the fixed header deliberately overlaps the
   first section, which carries its own top spacing. Adding padding here pushed
   every page down by the full header height. Verified with tools/measure.js -
   .l-main must sit at the same offset as the original. */

body.admin-bar .l-header.pos_fixed {
  top: 32px;
}

/* Lazyload placeholders are stripped at scrape time; guard against stragglers. */
img[src^="data:image/svg+xml"][data-lazy-src] {
  visibility: hidden;
}

/* Carousel stages are far wider than the viewport and Owl sets its stage-outer
   to overflow:visible so the side arrows can sit outside the track. On the
   original that never reaches the document because of how its stage is
   positioned; here it was letting the page scroll sideways by ~1900px.
   `clip` contains it without creating a scroll container, so sticky/fixed
   positioning inside still behaves. */
.l-canvas {
  overflow-x: clip;
}

/* Safety net: a carousel that fails to initialise must never push the page into
   horizontal overflow. Owl replaces this with its own stage once it boots. */
.w-grid-list.owl-carousel:not(.owl-loaded) {
  display: flex;
  gap: 1.5rem;
  max-width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.w-grid-list.owl-carousel:not(.owl-loaded) > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* The original set alignment with inline style="text-align:..."; converting to
   core blocks turns that into these classes. wp-block-library normally supplies
   them, but the clone must not depend on that being enqueued. */
.wpb_text_column .has-text-align-center {
  text-align: center;
}

.wpb_text_column .has-text-align-left {
  text-align: left;
}

.wpb_text_column .has-text-align-right {
  text-align: right;
}

/* Editor/admin niceties for the cloned content. */
.pse-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}

.pse-archive-card {
  border: 1px solid var(--color-content-border, #dff3fb);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-content-bg, #fff);
  display: flex;
  flex-direction: column;
}

.pse-archive-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.pse-archive-card-body {
  padding: 1.25rem 1.5rem 1.75rem;
}

.pse-archive-card h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.pse-archive-card h2 a {
  text-decoration: none;
}

.pse-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
