/* === Fixed menu bar: thin dark semitransparent line, expands on hover === */

.pm-menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 10px;
    background: rgba(0, 0, 0, 0.55);
    overflow: hidden;
    transition: height 0.35s ease, background 0.35s ease;
}

.pm-menu-bar:hover {
    height: 48px;
    background: rgba(0, 0, 0, 0.55);
}

.pm-menu-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 3%;
    opacity: 0;
    transition: opacity 0.3s ease 0.05s;
}

.pm-menu-bar:hover .pm-menu-inner {
    opacity: 1;
}

/* Left: logo */
.pm-menu-logo img {
    height: 28px;
    width: auto;
    display: block;
    opacity: 0.85;
}

.pm-menu-logo:hover img {
    opacity: 1;
}

/* Right: nav items */
.pm-menu-right {
    display: flex;
    align-items: center;
    gap: 1.8em;
}

.pm-menu-item {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.pm-menu-item:hover {
    color: #fff;
}

.pm-menu-icon {
    font-size: 22px;
    font-weight: normal;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
}

.pm-menu-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* Hamburger button — hidden on desktop */
.pm-menu-toggle {
    display: none;
}

/* === Page/post hero: full-width featured image with darkening overlay === */

.pm-page-hero {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 450px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #121212;
    margin: 0;
}

.pm-page-hero--no-img {
    height: 35vh;
    min-height: 200px;
    background: #121212;
}

/* Tag page hero — fixed height from AE Template */
.pm-page-hero.pm-tag-hero {
    height: 480px;
    min-height: 480px;
}

.pm-page-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.30);
}

/* Remove stray leading br/empty paragraphs in page content */
.wp-block-post-content > br:first-child,
.wp-block-post-content > p:first-child:empty {
    display: none;
}

/* Hero title block: centred on the hero image */
.pm-hero-title-block {
    position: absolute;
    bottom: 50%;
    left: 0;
    right: 0;
    transform: translateY(50%);
    z-index: 2;
    text-align: center;
    padding: 0 5%;
}

/* On category/tag pages, title sits higher to leave room for grid overlap */
.category .pm-hero-title-block,
.tag .pm-hero-title-block {
    bottom: 60%;
}

.pm-hero-post-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 57px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.15em;
    line-height: 1.2;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.pm-hero-post-date {
    font-family: 'Open Sans', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-bottom: 0.5em;
}

.pm-hero-dots {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease, transform 0.3s ease;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pm-hero-dots.pm-dots-open {
    transform: rotate(180deg);
}

.pm-hero-dots:hover {
    color: #fff;
}

/* Tag cloud inside the paper, toggled by dots — oval shape */
/* Tessellated tag cloud — JS places tags within an ellipse */
.pm-cloud-canvas {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0 auto 1em;
}
.pm-cloud-inner {
    position: relative;
    visibility: hidden;
    transform-origin: top left;
}
.pm-cloud-tag {
    position: absolute;
    white-space: nowrap;
    color: rgba(0,0,0,0.71);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-decoration: none;
    line-height: 1.3;
    padding: 2px 6px;
    border-radius: 12px;
    background: rgba(232,221,167,0.85);
    transition: background 0.2s;
}
.pm-cloud-tag:hover {
    background: rgba(232,221,167,0.5);
    color: rgba(0,0,0,0.71);
}

/* Legacy cloud rules (kept for backward compat) */
.pm-post-tagcloud {
    text-align: center;
    width: var(--cloud-w, 400px);
    height: var(--cloud-h, 240px);
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 1.5em !important;
    padding: 0;
    border-bottom: 1px solid #eee;
    overflow: hidden;
}

.pm-cloud-float {
    height: var(--cloud-h, 240px);
    width: 50%;
}

.pm-cloud-float-left {
    float: left;
    shape-outside: polygon(
        100% 0,
        85% 5%, 62% 15%, 40% 25%, 22% 35%, 10% 50%,
        22% 65%, 40% 75%, 62% 85%, 85% 95%,
        100% 100%, 0 100%, 0 0
    );
}

.pm-cloud-float-right {
    float: right;
    shape-outside: polygon(
        0 0,
        15% 5%, 38% 15%, 60% 25%, 78% 35%, 90% 50%,
        78% 65%, 60% 75%, 38% 85%, 15% 95%,
        0 100%, 100% 100%, 100% 0
    );
}

/* Close chevron below tag cloud */
.pm-cloud-close {
    display: block;
    clear: both;
    margin: 1em auto 0;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.55);
    padding: 0;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
    align-items: center;
    justify-content: center;
}

.pm-cloud-close svg {
    display: block;
    margin: auto;
}

.pm-cloud-close:hover {
    color: rgba(0, 0, 0, 0.85);
    background: rgba(0, 0, 0, 0.12);
}

/* Remove WP block spacing above hero so it touches the top edge */
.wp-site-blocks > .wp-block-shortcode:has(.pm-page-hero),
.wp-site-blocks .wp-block-shortcode:has(.pm-page-hero) {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}

/* Remove top margin on main after the hero (not on category/tag pages which overlap) */
.pm-page-hero + .wp-block-group:not(.pm-cat-page),
.wp-block-shortcode:has(.pm-page-hero) + .wp-block-group:not(.pm-cat-page) {
    margin-top: 0 !important;
}

/* === Post page: light gray background + white paper sheet === */

.pm-post-gray {
    background-color: #f1f1f1;
    padding: 0 0 120px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    min-height: 60vh;
}

/* Remove white gap between gray area and footer */
.single .wp-site-blocks {
    background-color: #f1f1f1;
}

.single .wp-site-blocks > *:last-child {
    margin-bottom: 0 !important;
}

/* Ensure all single post blocks stretch full width */
.single .wp-site-blocks,
.single .wp-site-blocks > * {
    max-width: none !important;
}

.single .wp-block-template-part,
.single .wp-block-template-part > * {
    max-width: none !important;
    width: 100%;
}

.pm-post-paper {
    background-color: #fff;
    max-width: 980px !important;
    width: 90%;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: -70px !important;
    position: relative;
    z-index: 2;
    padding: 50px 104px 104px !important;
    -webkit-box-shadow: 0 0 30px rgba(0, 0, 0, 0.25) !important;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.25) !important;
    margin-bottom: 0 !important;
    overflow: visible;
    font-family: 'Raleway', sans-serif;
    font-size: 18px;
}

/* Force all children inside the paper to use full width (no WP constrained max-width) */
.pm-post-paper > * {
    max-width: none !important;
}

.pm-post-paper > *:not(.pm-post-tagcloud) {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Post excerpt: bold, extra spacing after */
.pm-post-excerpt {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(0, 0, 0, 0.71);
    margin-bottom: 2.5em;
}

/* Post content inside the paper — match excerpt width */
.pm-post-paper .wp-block-post-content {
    font-family: 'Raleway', sans-serif;
    font-size: 18px;
    line-height: 1.8;
    max-width: none !important;
    padding: 0 !important;
}

.pm-post-paper .wp-block-post-content > *:not(.alignleft):not(.alignright) {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Constrain all content and images within the paper */
.pm-post-paper img {
    max-width: 100% !important;
    height: auto !important;
}

.pm-post-paper .wp-block-post-content > *,
.pm-post-paper .wp-block-post-content .is-layout-constrained > * {
    max-width: 100% !important;
}

.pm-post-paper .wp-block-image,
.pm-post-paper figure {
    max-width: 100% !important;
    overflow: hidden;
}

/* Margins between aligned images and surrounding text */
.pm-post-paper .wp-block-image.alignleft {
    margin-right: 1.5em !important;
    margin-bottom: 0.8em;
}

.pm-post-paper .wp-block-image.alignright {
    margin-left: 1.5em !important;
    margin-bottom: 0.8em;
}

/* === Global link style: bold only, no colour or underline === */

a {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}

a:hover {
    color: inherit;
    text-decoration: none;
}

/* Safety: hide any horizontal overflow on homepage */
html:has(.page-id-1341),
.page-id-1341 {
    overflow-x: hidden;
}

/* === Override ALL WordPress block layout rules on homepage === */

/* 1. Remove root padding / max-width / gap from containers */
.page-id-1341 .wp-site-blocks {
    gap: 0 !important;
}

.page-id-1341 .wp-site-blocks,
.page-id-1341 .wp-site-blocks > *,
.page-id-1341 .wp-block-post-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.page-id-1341 .wp-site-blocks > * {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 2. Remove has-global-padding on sections themselves */
.page-id-1341 .pm-section.has-global-padding {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 3. Override negative margins WP puts on alignfull inside has-global-padding */
.page-id-1341 .has-global-padding > .pm-section.alignfull {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 4. Remove is-layout-constrained max-width + auto margins from ALL homepage children */
.page-id-1341 .wp-block-post-content.is-layout-constrained > *,
.page-id-1341 .pm-section.is-layout-constrained > * {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 5. Remove all block margins/gaps inside post-content (between hero + sections + footer) */
.page-id-1341 .wp-block-post-content {
    gap: 0 !important;
}

.page-id-1341 .wp-block-post-content > * {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 6. Remove footer template part margins */
.page-id-1341 .wp-block-template-part {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* === Hero section: full viewport === */

.pm-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #121212;
}

.pm-hero-video {
    position: absolute;
    top: 50%; left: 50%;
    min-width: 100%; min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

.pm-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1;
}

.pm-hero-content {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

/* Logo row: sits below titles, aligned right */
.pm-hero-logo-row {
    display: flex;
    justify-content: flex-end;
}

.pm-hero-logo img {
    max-width: 180px;
    height: auto;
    opacity: 0.85;
}

.pm-hero-logo:hover img {
    opacity: 1;
}

/* Down arrow: bottom centre */
.pm-hero-arrow {
    position: absolute;
    bottom: 1.5em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 2.5em;
    color: #fff;
    text-decoration: none;
    animation: pm-bounce 2s infinite;
    opacity: 0.7;
}

.pm-hero-arrow:hover {
    opacity: 1;
    color: #fff;
}

@keyframes pm-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* === Hero title rows === */

.pm-hero-titles {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.pm-title-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: center;
    gap: 1em;
    padding: 0.15em 2%;
}

.pm-title-link {
    font-size: 2.3em;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-decoration: none;
    color: #fff;
    white-space: nowrap;
    text-transform: uppercase;
}

.pm-title-link:hover {
    color: var(--wp--preset--color--accent, #5bc3ef);
}

/* Film strip: hidden, dissolve-in on row hover. The strip CLIPS; the track
   inside it rolls continuously. Deliberately NOT paused on hover — the strip is
   only visible on hover, so pausing there would freeze the one moment you see. */
.pm-film-strip {
    display: block;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    overflow: hidden;
}

.pm-film-track {
    display: flex;
    gap: 1px;
    align-items: flex-start;
    width: max-content;
    animation-name: pm-film-roll;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}

/* The track holds --pm-copies identical sets, so translating by exactly one of
   them lands on an identical frame — the wrap is invisible. Duration and a
   negative (random) start delay are set per row in functions.php. */
@keyframes pm-film-roll {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-100% / var(--pm-copies, 3))); }
}

/* Enough frames to fill the strip? Roll. Not enough? Stand still and drop the
   duplicate sets — a loop that never wraps is just repetition. Set by
   pm-carousel.js, which is the only place the rendered width is known. */
.pm-film-strip.pm-film-static .pm-film-track {
    animation: none;
    transform: none;
}

.pm-film-strip.pm-film-static .pm-post-card[aria-hidden="true"] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .pm-film-track {
        animation: none;
        transform: none;
    }
    .pm-post-card[aria-hidden="true"] { display: none; }
}

@media (hover: hover) {
    .pm-title-row:hover .pm-film-strip {
        opacity: 1;
        pointer-events: auto;
    }
}

.pm-title-row.pm-film-active .pm-film-strip {
    opacity: 1;
    pointer-events: auto;
}

/* === Film-roll post cards (hero) === */

.pm-post-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 150px;
    flex-shrink: 0;
    background: #1a1a1a;
}

.pm-post-card:hover {
    transform: none;
}

.pm-film-holes {
    display: block;
    width: 100%;
    height: 6px;
    background: #1a1a1a;
    position: relative;
    overflow: hidden;
}

.pm-film-holes::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 4px;
    width: 5px;
    height: 4px;
    background: #444;
    border-radius: 1px;
    box-shadow:
        10px 0 0 #444, 20px 0 0 #444, 30px 0 0 #444,
        40px 0 0 #444, 50px 0 0 #444, 60px 0 0 #444,
        70px 0 0 #444, 80px 0 0 #444, 90px 0 0 #444,
        100px 0 0 #444, 110px 0 0 #444, 120px 0 0 #444,
        130px 0 0 #444, 140px 0 0 #444;
}

.pm-film-holes-top { border-radius: 3px 3px 0 0; }
.pm-film-holes-bottom { border-radius: 0 0 3px 3px; }

.pm-post-icon-wrap {
    display: block;
    /* Real 35mm still frame is 36 x 24 mm — 3:2 landscape, not square.
       Height held at the original 100px; the width grows to suit. */
    width: 150px;
    aspect-ratio: 3 / 2;
    height: auto;
    /* borders are part of the frame, not extra width — keeps it exactly 3:2
       and stops the frame overflowing its 150px card */
    box-sizing: border-box;
    overflow: hidden;
    background: #1a1a1a;
    border-left: 2px solid #1a1a1a;
    border-right: 2px solid #1a1a1a;
}

.pm-post-icon-wrap img.pm-post-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hide block-editor section titles and descriptions — PHP text blocks replace them */
.pm-section-title,
.pm-section-description {
    display: none;
}

/* === Content sections: full-width, full-viewport === */

.pm-section {
    width: 100%;
    min-height: 100vh;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Section gradient backgrounds — use id selectors matching HTML */
#arte {
    background: linear-gradient(180deg, #ededed 0%, rgba(219,205,10,0.35) 100%);
}

#vita {
    background: linear-gradient(180deg, rgba(119,119,119,0.1) 0%, rgba(123,247,162,0.43) 100%);
}

#tempo {
    background: linear-gradient(180deg, #ededed 0%, rgba(165,11,221,0.35) 100%);
}

/* === Text blocks within sections === */

.pm-text-block {
    padding: 2em 2.5em;
    z-index: 2;
    position: relative;
}

.pm-highlight {
    font-family: 'Poppins', sans-serif;
    font-size: 2.3em;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.71);
    display: block;
    margin-bottom: 0.2em;
}

.pm-desc {
    font-family: 'Patrick Hand', cursive;
    font-style: normal;
    font-weight: 400;
    font-size: 1.4em;
    line-height: 1.6;
    color: rgba(0,0,0,0.71);
    display: block;
}

.pm-text-link {
    text-decoration: none;
    color: inherit;
    font-weight: normal;
}

.pm-text-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Arte: text on left with white background */
#arte {
    display: flex;
    flex-direction: column;
}

#arte .pm-section-inner {
    display: flex;
    align-items: center;
    padding: 2em 5%;
}

.pm-text-arte {
    width: 22vw;
    min-width: 200px;
    max-width: 320px;
    flex-shrink: 0;
    text-align: center;
    padding: 1em;
}

.pm-highlight-arte {
    font-family: 'Poppins', sans-serif;
    font-size: 4.5em;
    font-weight: 300;
    letter-spacing: 0.06em;
    text-transform: none;
    color: rgba(0,0,0,0.71);
    display: block;
    margin-bottom: 0.4em;
    line-height: 1.1;
}

.pm-desc-coda {
    display: inline-block;
    margin-top: 0.4em;
}

.pm-desc-box {
    display: block;
    background: rgba(255,255,255,0.92);
    border-radius: 8px;
    padding: 1.5em 1.8em;
    box-shadow: 2px 3px 12px rgba(0,0,0,0.2);
}

.pm-text-arte .pm-desc {
    font-size: 1.7em;
}

/* Vita: text on right, no background */
#vita {
    display: flex;
    flex-direction: column;
}

#vita .pm-section-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2em 5%;
}

.pm-text-vita {
    background: none;
    width: 22%;
    min-width: 180px;
    flex-shrink: 0;
    text-align: right;
    padding: 1em 2em;
}

.pm-text-vita .pm-highlight {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.4em;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

/* Tempo: text in round white element at ~30% from left */
#tempo {
    display: flex;
    flex-direction: column;
    position: relative;
}

.pm-text-tempo {
    position: absolute;
    left: 30%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    width: 300px;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2em;
    z-index: 3;
    box-shadow: 3px 4px 16px rgba(0,0,0,0.25);
}

.pm-text-tempo .pm-highlight {
    font-family: 'Patrick Hand', cursive;
    font-size: 2.1em;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    margin-bottom: 0;
}

.pm-text-tempo .pm-desc {
    font-size: 2.1em;
    font-weight: 400;
}

/* === Auto-scrolling post strip === */

.pm-section-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pm-scroll-track {
    overflow: hidden;
    width: 100%;
    padding: 1em 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 80px, black calc(100% - 80px), transparent);
    mask-image: linear-gradient(to right, transparent, black 80px, black calc(100% - 80px), transparent);
}

.pm-scroll-inner {
    display: flex;
    align-items: center;
    gap: 1.5em;
    width: max-content;
}

/* Post cards in the scroll strip */
.pm-scroll-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(0,0,0,0.71);
    font-weight: normal;
    flex-shrink: 0;
    width: 200px;
    transition: transform 0.3s ease;
}

.pm-scroll-card:hover {
    transform: scale(1.05);
}

.pm-scroll-img {
    display: block;
    width: 200px;
    overflow: hidden;
    border-radius: 3px;
}

.pm-scroll-img img {
    width: 100%;
    height: auto;
    display: block;
}

.pm-scroll-caption {
    display: flex;
    flex-direction: column;
    margin-top: 1em;
    text-align: center;
    max-width: 200px;
}

.pm-scroll-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    color: rgba(0,0,0,0.71);
    letter-spacing: 0.04em;
    margin-bottom: 0.3em;
    white-space: normal;
    line-height: 1.3;
}

.pm-scroll-card-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(0,0,0,0.55);
    white-space: normal;
}

.pm-scroll-card-more {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    font-weight: 400;
    color: rgba(0,0,0,0.4);
    text-transform: lowercase;
    margin-top: 0.4em;
    font-style: italic;
}

/* Polaroid frame for arte and vita */
#arte .pm-scroll-img,
#vita .pm-scroll-img {
    border: 6px solid #fff;
    border-bottom-width: 24px;
    box-shadow: 2px 3px 12px rgba(0,0,0,0.3);
}

/* No frame in tempo — larger images, no gap */
#tempo .pm-scroll-img {
    border: none;
    box-shadow: none;
    border-radius: 0;
    width: 300px;
}

#tempo .pm-scroll-card {
    width: 300px;
}

#tempo .pm-scroll-inner {
    gap: 0;
}

/* Scroll wrapper with arrows */
.pm-scroll-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.pm-scroll-wrapper .pm-scroll-track {
    flex: 1;
    min-width: 0;
}

.pm-scroll-arrow {
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.15);
    color: rgba(0,0,0,0.5);
    font-size: 1.4em;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 4;
    transition: all 0.2s ease;
}

.pm-scroll-arrow:hover {
    background: rgba(255,255,255,1);
    color: rgba(0,0,0,0.8);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* === Section-specific scroll layouts === */

/* Arte: text left, scroll right — arrange side by side */
.pm-layout-arte {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 0 2%;
}

.pm-layout-arte .pm-scroll-wrapper {
    flex: 1;
    min-width: 0;
}

.pm-layout-arte .pm-scroll-inner {
    gap: 50px;
}

/* Vita: scroll left, text right — arrange side by side */
.pm-layout-vita {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 0 2%;
}

.pm-layout-vita .pm-scroll-wrapper {
    flex: 1;
    min-width: 0;
}

.pm-layout-vita .pm-scroll-inner {
    gap: 50px;
}

/* Tempo: scroll fills width, text overlay floats above */
.pm-layout-tempo {
    padding: 0 2%;
}

.pm-layout-tempo .pm-scroll-track {
    width: 100%;
}

/* === Section navigation: prev / top / next === */

.pm-section-nav {
    display: flex;
    justify-content: center;
    gap: 1.5em;
    padding: 1em 0 1.5em;
}

.pm-nav-btn {
    background: none;
    border: 1px solid rgba(100,100,100,0.4);
    color: #555;
    font-size: 1.2em;
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pm-nav-btn:hover {
    background: var(--wp--preset--color--accent, #5bc3ef);
    border-color: var(--wp--preset--color--accent, #5bc3ef);
    color: #fff;
}

/* === Tag cloud styles (cloud/oval shape) === */

.my_tag_link {
    color: rgba(0,0,0,0.71);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 2em;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border: 1px solid transparent;
    padding: 0 10px;
    margin: 3px;
    border-radius: 18px;
    background-color: rgba(232,221,167,0.91);
    display: inline-block;
    text-decoration: none;
}

.my_tag_link:hover {
    color: rgba(0,0,0,0.71);
    background-color: rgba(232,221,167,0.67);
}

div#tagcloud,
.pm-tag-cloud {
    margin-bottom: 50px;
    width: 90%;
    max-width: 700px;
    height: 400px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(232,221,167,0.25) 0%, rgba(232,221,167,0.08) 60%, transparent 75%);
    padding: 0;
    overflow: hidden;
}

div#tagcloud .pm-cloud-float,
.pm-tag-cloud .pm-cloud-float {
    height: 400px;
}

a.tag-cloud-link {
    white-space: nowrap;
    color: rgba(0,0,0,0.71);
    font-family: 'Poppins', sans-serif;
    line-height: 1.0em;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border: 1px solid transparent;
    padding: 2px 8px;
    margin: 2px;
    border-radius: 18px;
    background-color: rgba(232,221,167,0.91);
    display: inline-block;
    text-decoration: none;
}

a.tag-cloud-link:hover {
    color: rgba(0,0,0,0.71);
    background-color: rgba(232,221,167,0.67);
}

/* === Category page === */

.pm-cat-page {
    background: linear-gradient(to bottom, transparent 140px, #f1f1f1 140px);
    padding: 0.1px 5% 80px !important;
    margin-top: -140px !important;
    position: relative;
    z-index: 1;
}

/* Category tag cloud wrapper — positioned like the old outer div */
.pm-cat-page .pm-cloud-wrap {
    margin: 170px auto 2em !important;
}

/* Category tag cloud — same oval as post cloud */
.pm-cat-tagcloud {
    text-align: center;
    width: var(--cloud-w, 400px);
    height: var(--cloud-h, 240px);
    margin: 0 auto !important;
    padding: 0;
    overflow: hidden;
}

/* Category post grid */
/* Masonry-style column layout — items sized individually */
.pm-cat-grid {
    columns: 3;
    column-gap: 1.8em;
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 6%;
}

.pm-cat-card {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    font-weight: normal;
    /* Equal padding on all sides — percentage is relative to card width */
    padding: 17.5%;
    margin-bottom: 1.8em;
    break-inside: avoid;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pm-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.pm-cat-card-img {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 24px;
}

.pm-cat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Inner overlay — centred on image, equal spacing in all directions */
.pm-cat-card-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 60px;
    padding: 1.4em 1.2em;
    text-align: center;
    pointer-events: none;
    -webkit-box-shadow: 0 0 28px rgba(0, 0, 0, 0.50);
    box-shadow: 0 0 28px rgba(0, 0, 0, 0.50);
}

.pm-cat-card-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: rgba(0, 0, 0, 0.71);
    display: block;
    margin-bottom: 0.4em;
}

.pm-cat-card-excerpt {
    font-family: 'Raleway', sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.71);
    display: block;
}

/* Full width blocks on category and tag pages */
.category .wp-site-blocks,
.tag .wp-site-blocks {
    max-width: none !important;
    background-color: #f1f1f1;
}

.category .wp-site-blocks > *,
.tag .wp-site-blocks > * {
    max-width: none !important;
}

.category .wp-site-blocks > *:last-child,
.tag .wp-site-blocks > *:last-child {
    margin-bottom: 0 !important;
}

.category .wp-block-template-part,
.category .wp-block-template-part > * {
    max-width: none !important;
    width: 100%;
}

/* === 404 page === */

.error404 .wp-site-blocks {
    max-width: none !important;
    background-color: #121212;
    gap: 0 !important;
}

.error404 .wp-site-blocks > * {
    max-width: none !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.error404 .wp-block-template-part,
.error404 .wp-block-template-part > * {
    max-width: none !important;
    width: 100%;
}

.pm-404-wrap {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #121212;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-404-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(#2b2b2b, #a51588);
    opacity: 0.19;
}

.pm-404-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 970px;
    padding: 40px 5%;
}

.pm-404-title {
    font-family: 'Poppins', sans-serif;
    font-size: 39px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 39px;
    letter-spacing: 2px;
    color: #c42929;
    margin: 0;
    padding: 30px 0;
}

.pm-404-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 39px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 39px;
    letter-spacing: 2px;
    color: #c42929;
    margin: 0;
    padding: 0 0 23px;
}

.pm-404-text {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    color: #35ffbf;
    line-height: 1.8em;
    letter-spacing: 1.2px;
    margin: 0 0 0.5em;
}

.pm-404-link {
    margin-top: 1em;
}

.pm-404-link a {
    font-family: 'Raleway', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #d3ffee;
    text-decoration: none;
}

.pm-404-link a:hover {
    text-decoration: underline;
}

/* === Search overlay === */

.pm-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.88);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pm-search-overlay.pm-search-open {
    display: flex;
}

.pm-search-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 8px;
    margin-bottom: 18px;
    transition: color 0.2s;
}

.pm-search-close:hover {
    color: #fff;
}

.pm-search-form {
    width: 90%;
    max-width: 600px;
    text-align: center;
    margin-top: -52px;
}

.pm-search-input {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-align: center;
    padding: 8px 0;
    caret-color: rgba(255, 255, 255, 0.6);
}

.pm-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-size: 20px;
    letter-spacing: 0.2em;
}

.pm-search-line {
    width: 100%;
    height: 1px;
    margin: 6px auto 0;
    background: rgba(255, 255, 255, 0.25);
}

/* Animated dots in placeholder — achieved via JS cycling */

/* === Search results page === */

.search .wp-site-blocks {
    max-width: none !important;
    background-color: #f1f1f1;
    gap: 0 !important;
}

.search .wp-site-blocks > * {
    max-width: none !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

.search .wp-block-template-part,
.search .wp-block-template-part > * {
    max-width: none !important;
    width: 100%;
}

/* Search hero — grey gradient */
.pm-search-hero {
    background: linear-gradient(180deg, #3a3a3a 0%, #6b6b6b 50%, #9a9a9a 100%);
    padding: 80px 5% 40px;
    text-align: center;
}

.pm-search-hero-inner {
    max-width: 600px;
    margin: 0 auto;
}

/* Search form in hero */
.pm-search-hero-form {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
}

.pm-search-hero-input {
    flex: 1;
    background: #fff;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333;
    padding: 12px 18px;
    letter-spacing: 0.05em;
}

.pm-search-hero-btn {
    background: #444;
    color: #fff;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 12px 28px;
    cursor: pointer;
    transition: background 0.2s;
}

.pm-search-hero-btn:hover {
    background: #222;
}

/* Chevron in search hero */
.pm-search-hero .pm-hero-dots {
    display: block;
    margin: 0 auto;
}

/* No topics message */
.pm-search-no-topics {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin: 8px 0 0;
}

/* Search tag cloud — same oval as other clouds */
.pm-search-tagcloud {
    text-align: center;
    width: var(--cloud-w, 400px);
    height: var(--cloud-h, 240px);
    margin: 0 auto !important;
    padding: 0;
    overflow: hidden;
}

/* Tag cloud inside search hero */
.pm-search-hero .pm-cloud-wrap {
    margin: 20px auto 0 !important;
}

/* Search page main area */
.pm-search-page {
    background: #f1f1f1;
    padding: 40px 5% 80px !important;
}

/* Search results listing */
.pm-search-listing {
    max-width: 850px;
    margin: 0 auto;
}

.pm-search-empty {
    font-family: 'Raleway', sans-serif;
    font-size: 18px;
    color: #666;
    text-align: center;
    padding: 60px 0;
}

.pm-search-item {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    padding: 28px 0;
    border-bottom: 1px solid #fff;
}

.pm-search-item:last-child {
    border-bottom: none;
}

/* Image: white frame + dark shadow */
.pm-search-item-img {
    flex-shrink: 0;
    width: 220px;
    display: block;
    background: #fff;
    padding: 8px;
    box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.35);
}

.pm-search-item-img img {
    display: block;
    width: 100%;
    height: auto;
}

/* Text side */
.pm-search-item-text {
    flex: 1;
    min-width: 0;
}

.pm-search-item-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.6em;
}

.pm-search-item-title a {
    color: #333;
    text-decoration: none;
}

.pm-search-item-title a:hover {
    color: #000;
}

.pm-search-item-excerpt {
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;
    color: #3f3f3f;
    margin: 0 0 0.8em;
}

.pm-search-item-more {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #555;
    text-decoration: none;
    text-transform: uppercase;
}

.pm-search-item-more:hover {
    color: #000;
}

/* === Responsive === */

@media (max-width: 1024px) {
    /* 35mm 3:2 — height held at 85px, width follows (85 * 1.5) */
    .pm-post-card { width: 127.5px; }
    .pm-post-icon-wrap { width: 127.5px; height: auto; }
    .pm-title-row { grid-template-columns: 160px 1fr; }
    .pm-title-link { font-size: 1.8em; }
    .pm-scroll-card, .pm-scroll-img { width: 170px; }
    .pm-text-arte, .pm-text-vita { min-width: 220px; max-width: 260px; }
    .pm-text-tempo { width: 180px; height: 180px; }
    .my_tag_link { padding: 0 5px; margin: 2px; font-size: 12px; }

    /* Hero title responsive */
    .pm-hero-post-title { font-size: 42px; }
    .pm-hero-post-date { font-size: 16px; }
    .pm-hero-dots { font-size: 32px; }

    /* Tag hero tablet */
    .pm-page-hero.pm-tag-hero {
        height: 312px;
        min-height: 312px;
    }

    /* Category grid: 2 columns on tablet */
    .pm-cat-grid {
        columns: 2;
    }
}

@media (max-width: 767px) {
    .pm-hero-content { width: 95%; }
    .pm-hero-logo img { max-width: 120px; }

    /* 35mm 3:2 — height held at 70px, width follows (70 * 1.5) */
    .pm-post-card { width: 105px; }
    .pm-post-icon-wrap { width: 105px; height: auto; }

    .pm-section { min-height: auto; }

    .pm-layout-arte,
    .pm-layout-vita,
    #arte .pm-section-inner,
    #vita .pm-section-inner {
        flex-direction: column;
    }

    .pm-text-block { padding: 1em 1em; }

    #arte .pm-section-inner,
    #vita .pm-section-inner { padding: 1em 3%; }

    .pm-text-arte, .pm-text-vita {
        min-width: auto;
        max-width: none;
        width: auto;
        text-align: center;
        margin: 0.5em auto;
        padding: 0.5em;
    }

    .pm-layout-vita .pm-text-vita { order: -1; }

    .pm-highlight { font-size: 1.6em; }
    .pm-highlight-arte { font-size: 2.8em; }
    .pm-text-arte .pm-desc { font-size: 1.2em; }
    .pm-desc { font-size: 1.1em; }
    .pm-desc-box { padding: 1em 1.2em; }

    .pm-text-tempo {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin: 0.5em auto;
        width: 160px;
        height: 160px;
        padding: 1em;
    }

    .pm-text-tempo .pm-highlight { font-size: 1.5em; }
    .pm-text-tempo .pm-desc { font-size: 1.4em; }

    .pm-scroll-card, .pm-scroll-img { width: 140px; }
    .pm-highlight { font-size: 1.3em; }

    .my_tag_link { font-size: 10px; line-height: 1.4em; padding: 0 3px; margin: 2px; }

    /* Mobile menu: always-visible bar with hamburger */
    .pm-menu-bar {
        height: 48px;
        overflow: visible;
        background: rgba(0, 0, 0, 0.85);
    }

    .pm-menu-bar:hover {
        height: 48px;
    }

    .pm-menu-inner {
        opacity: 1;
        position: relative;
    }

    .pm-menu-bar:hover .pm-menu-inner {
        opacity: 1;
    }

    .pm-menu-right {
        display: none;
        position: absolute;
        top: 48px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.92);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0;
    }

    .pm-menu-bar.pm-menu-open .pm-menu-right {
        display: flex;
    }

    .pm-menu-item {
        font-size: 14px;
        letter-spacing: 0.08em;
        padding: 12px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .pm-menu-item:last-child {
        border-bottom: none;
    }

    .pm-menu-icon {
        font-size: 18px;
        padding: 12px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .pm-menu-logo img { height: 22px; }

    /* Hamburger button */
    .pm-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        margin-left: auto;
    }

    .pm-menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: rgba(255, 255, 255, 0.85);
        border-radius: 1px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* Animate to X when open */
    .pm-menu-bar.pm-menu-open .pm-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .pm-menu-bar.pm-menu-open .pm-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .pm-menu-bar.pm-menu-open .pm-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Hero title responsive */
    .pm-hero-post-title { font-size: 28px; }
    .pm-hero-post-date { font-size: 14px; }
    .pm-hero-dots { font-size: 28px; }

    /* Post page: full width on mobile */
    .pm-page-hero {
        height: 50vh;
        min-height: 280px;
    }

    /* Tag hero mobile */
    .pm-page-hero.pm-tag-hero {
        height: 253px;
        min-height: 253px;
    }

    .pm-post-gray {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 0 60px !important;
    }

    .pm-post-paper {
        width: 100% !important;
        max-width: none !important;
        padding: 30px 20px 20px !important;
        margin-top: -40px !important;
        box-shadow: none !important;
        -webkit-box-shadow: none !important;
    }

    .pm-post-paper .wp-block-post-content {
        font-size: 16px;
    }

    .pm-post-excerpt {
        font-size: 16px;
    }

    .pm-post-tagcloud {
        width: 95% !important;
    }

    /* Footer full width */
    .wp-site-blocks > .wp-block-template-part:last-child,
    .wp-site-blocks > .wp-block-template-part:last-child > * {
        width: 100% !important;
        max-width: none !important;
    }

    /* Category grid responsive */
    .pm-cat-grid {
        columns: 1;
        padding: 0 2%;
    }

    .pm-cat-page {
        padding: 20px 3% 60px !important;
        margin-top: 0 !important;
        background: #f1f1f1 !important;
    }

    .pm-cat-tagcloud {
        width: 95% !important;
    }

    /* 404 responsive */
    .pm-404-title,
    .pm-404-subtitle {
        font-size: 35px;
    }

    .pm-404-text {
        font-size: 13px;
        line-height: 21px;
        letter-spacing: -0.2px;
    }

    .pm-404-wrap {
        background-attachment: scroll;
    }

    /* Search responsive */
    .pm-search-hero { padding: 70px 3% 30px; }
    .pm-search-item { flex-direction: column; gap: 16px; }
    .pm-search-item-img { width: 100%; max-width: 300px; }
    .pm-search-tagcloud { width: 95% !important; }
}

@media (max-width: 480px) {
    /* Hero: single column, large spaced titles, no film strips */
    .pm-hero-logo-row { display: none; }
    .pm-title-row { grid-template-columns: 1fr; }
    .pm-title-link { font-size: 2.2em; text-align: center; letter-spacing: 0.15em; }
    .pm-hero-titles { gap: 1.5em; }

    /* Single column here, so an always-laid-out strip would hang an invisible
       gap under every title. Keep it out of the layout until a tap opens it —
       it then appears BELOW its section title. */
    .pm-film-strip { display: none; }
    .pm-title-row.pm-film-active .pm-film-strip { display: block; }
}
