/*
 * Portfolio page, project pages, design style pages and the Galleries page.
 * Values measured on live (Convex content wrapper + Elementor templates 11578 and the projects' own layouts).
 * Breakpoints as live: ≤1439 / ≤1279 (Convex wrapper), ≤1280 / ≤1024 / ≤767 (Elementor), ≤1023 (galleries).
 */

/* ---------- Page frame: Convex .content_wrap (1440 ≥1680, 1290, 1100 ≤1439, full −40 ≤1279). ---------- */
.sg-pf-wrap { width: 1290px; max-width: calc(100% - 40px); margin-inline: auto; }
@media (min-width: 1680px) { .sg-pf-wrap { width: 1440px; } }
@media (max-width: 1439px) { .sg-pf-wrap { width: 1100px; } }
@media (max-width: 1279px) { .sg-pf-wrap { width: auto; max-width: none; margin-inline: 20px; } }
/* Single projects sit in Elementor's 15px column padding above 1024px. */
@media (min-width: 1025px) { .sg-pf-wrap--inset { padding-inline: 15px; } }

/* Archive-style pages: Convex page padding. */
.sg-pf--archive { padding-block: 120.7px; }
@media (max-width: 1439px) { .sg-pf--archive { padding-block: 100px; } }
@media (max-width: 1279px) { .sg-pf--archive { padding-block: 90px; } }
@media (max-width: 1023px) { .sg-pf--archive { padding-block: 80px; } }
@media (max-width: 767px)  { .sg-pf--archive { padding-block: 60px; } }
@media (max-width: 479px)  { .sg-pf--archive { padding-block: 50px; } }

/* ---------- Intro (background word, heading, text). ---------- */
.sg-pf-intro { padding: 0 15px 97px; }
@media (max-width: 1024px) { .sg-pf-intro { padding: 220px 15px 50px; } }
@media (max-width: 767px)  { .sg-pf-intro { padding: 120px 10px 50px; } }

.sg-pf-intro__word { position: relative; padding: 0 20px; margin-bottom: -90px; }
.sg-pf-intro__word img { width: auto; max-width: 100%; }
/* ≤1280 the word sits in a half-width column with 30px right padding. */
@media (max-width: 1280px) {
	.sg-pf-intro__word { margin-bottom: -40px; }
	.sg-pf-intro__word img { max-width: calc(50% - 30px); }
}
@media (max-width: 1024px) { .sg-pf-intro__word { margin-bottom: -30px; } }
@media (max-width: 767px)  {
	.sg-pf-intro__word { margin-bottom: -20px; }
	.sg-pf-intro__word img { width: 260px; max-width: 100%; }
}

.sg-pf-intro__row { display: flow-root; position: relative; z-index: 1; max-width: 1090px; margin-inline: auto; padding: 0 20px; }
.sg-pf-intro__row--head { margin-bottom: 36px; }
.sg-pf-intro__title {
	width: 50%; padding-right: 30px;
	font-size: 50px; font-weight: 500; line-height: 1.2; color: var(--c-white);
	text-wrap: balance; /* "High-End / Interior Design", not "High-End Interior / Design" (Emily's edits PDF, Oct 2026). */
}
.sg-pf-intro__text { width: 50%; padding: 5px 50px 0 0; color: var(--c-white); font-size: 16px; }
.sg-pf-intro__text p { line-height: 36px; }
.sg-pf-intro__text--wide { width: auto; padding-right: 0; }
.sg-pf-intro__text--wide p + p { margin-top: 1em; }
@media (max-width: 1280px) {
	.sg-pf-intro__title { font-size: 40px; }
	.sg-pf-intro__text { padding-right: 30px; }
}
@media (max-width: 1024px) {
	.sg-pf-intro__title { font-size: 35px; }
	.sg-pf-intro__text { font-size: 14px; }
	.sg-pf-intro__text p { line-height: 31.5px; }
}
@media (max-width: 767px) {
	.sg-pf-intro__row--head { margin-bottom: 10px; }
	.sg-pf-intro__title { width: auto; padding: 0; margin-bottom: 16px; font-size: 36px; }
	.sg-pf-intro__text { width: auto; padding-right: 0; }
	.sg-pf-intro__text p { line-height: 36px; }
}
/* Galleries page without a background word: the heading takes the word's place. */
.sg-pf-intro--noword .sg-pf-intro__row--head { padding-top: 20px; }

/* ---------- Filters (live: Elementor tabs, right-aligned; #ccc = current). ---------- */
.sg-pf-list { padding-bottom: 97px; }
@media (max-width: 1024px) { .sg-pf-list { padding: 220px 0 50px; } }
@media (max-width: 767px)  { .sg-pf-list { padding-top: 120px; } }

.sg-pf-filter { display: flex; flex-wrap: wrap; justify-content: flex-end; }
/* Galleries page: more filters than the Portfolio page, so they centre and sit a little tighter. */
.sg-pf-filter--drop { justify-content: center; }
.sg-pf-filter--drop .sg-pf-filter__btn { padding-inline: 18px; }
.sg-pf-filter__btn {
	padding: 20px 25px;
	font-size: 17px; font-weight: 400; line-height: 1;
	color: var(--c-white); white-space: nowrap;
	transition: color var(--t);
}
.sg-pf-filter__btn:hover, .sg-pf-filter__btn[aria-pressed="true"] { color: var(--c-grey); }
.sg-pf-filter__btn:focus-visible { outline-offset: -6px; }
/* Narrow screens: one scrolling row (live overflows off-screen at 768 and stacks an accordion on phones). */
@media (max-width: 1024px) {
	.sg-pf-filter, .sg-pf-filter--drop { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.sg-pf-filter::-webkit-scrollbar { display: none; }
	.sg-pf-filter__btn { font-size: 16px; }
	.sg-pf-filter__btn:first-child { margin-left: auto; }
}
@media (max-width: 767px) { .sg-pf-filter__btn { padding: 14px 12px; } }

/* Galleries page: filters drop in one after the other (live's gallery filters: fadeInDown .6s, .3s apart). */
.js .sg-pf-filter--drop .sg-pf-filter__btn { opacity: 0; animation: sgFilterDrop .6s ease-in-out forwards; }
.sg-pf-filter--drop .sg-pf-filter__btn:nth-child(2)  { animation-delay: .3s; }
.sg-pf-filter--drop .sg-pf-filter__btn:nth-child(3)  { animation-delay: .6s; }
.sg-pf-filter--drop .sg-pf-filter__btn:nth-child(4)  { animation-delay: .9s; }
.sg-pf-filter--drop .sg-pf-filter__btn:nth-child(5)  { animation-delay: 1.2s; }
.sg-pf-filter--drop .sg-pf-filter__btn:nth-child(6)  { animation-delay: 1.5s; }
.sg-pf-filter--drop .sg-pf-filter__btn:nth-child(7)  { animation-delay: 1.8s; }
.sg-pf-filter--drop .sg-pf-filter__btn:nth-child(8)  { animation-delay: 2.1s; }
.sg-pf-filter--drop .sg-pf-filter__btn:nth-child(9)  { animation-delay: 2.4s; }
.sg-pf-filter--drop .sg-pf-filter__btn:nth-child(n+10) { animation-delay: 2.7s; }
@keyframes sgFilterDrop { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Project cards (live: EA dynamic gallery, 5 / 2 / 1 columns, 200px tall). ---------- */
.sg-pf-list__body { padding: 20px 35px; }
@media (max-width: 767px) { .sg-pf-list__body { padding: 10px 20px; } }
.sg-pf-list__body--photos { padding: 20px 20px 0; }
@media (max-width: 1024px) { .sg-pf-list__body--photos { padding: 20px 0 0; } }
.sg-pf-list__body--photos .sg-gallery--project { margin-inline: 0; }

.sg-pcards { --cols: 5; display: grid; grid-template-columns: repeat(60, minmax(0, 1fr)); }
.sg-pcard { grid-column-end: span 12; padding: 0 10px 20px; }
@media (max-width: 1024px) { .sg-pcards { --cols: 2; } .sg-pcard { grid-column-end: span 30; } }
@media (max-width: 767px)  { .sg-pcards { --cols: 1; } .sg-pcard { grid-column-end: span 60; } }
.sg-pcard[hidden] { display: none !important; }
.sg-pcard.is-entering { animation: sgFadeIn .5s ease both; }

.sg-pcard__link { position: relative; display: block; height: 200px; overflow: hidden; }
.sg-pcard__img { width: 100%; height: 100%; object-fit: cover; }
.sg-pcard__caption {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	background: rgba(0, 0, 0, .7);
	opacity: 0; transition: opacity .3s;
}
.sg-pcard__link:hover .sg-pcard__caption,
.sg-pcard__link:focus-visible .sg-pcard__caption { opacity: 1; }
.sg-pcard__link:focus-visible { outline-offset: -3px; }
.sg-pcard__inner { width: 100%; padding: 15px 15px 0; text-align: left; }
.sg-pcard__title { margin-bottom: 10px; font-size: 20px; font-weight: 600; line-height: 20.42px; color: var(--c-white); }
@media (max-width: 1023px) { .sg-pcard__title { line-height: 35px; } }
@media (max-width: 767px)  { .sg-pcard__title { line-height: 26px; } }

/* ---------- Project / style hero. ---------- */
.sg-phero { position: relative; z-index: 0; padding: 100px 0 91px; }
@media (max-width: 1024px) { .sg-phero { padding-bottom: 50px; } }
@media (max-width: 767px)  { .sg-phero { padding: 60px 0 50px; } }

.sg-phero__word { position: relative; z-index: -1; margin-bottom: -42px; }
.sg-phero__word img { width: auto; max-width: 100%; }
@media (max-width: 1280px) { .sg-phero__word { width: 50%; padding-right: 30px; } }
@media (max-width: 1024px) { .sg-phero__word { margin-bottom: -20px; } }
@media (max-width: 767px)  {
	.sg-phero__word { width: 260px; padding-right: 0; margin-bottom: -10px; }
	.sg-phero__word img { width: 82%; }
}

.sg-phero__row { position: relative; z-index: 1; display: flex; margin-bottom: 34px; }
.sg-phero__text { position: relative; width: 50%; padding: 0 3.5% 0 12.75%; } /* live: 7% / 25.5% of the column */
.sg-phero__title { margin-bottom: 3px; font-size: 50px; font-weight: 500; line-height: 1.2; color: var(--c-white); }
.sg-phero__intro { padding: 37px 0 64px; color: var(--c-white); font-size: 16px; }
.sg-phero__intro p { line-height: 36px; }
.sg-phero__intro p + p { margin-top: 1em; }
.sg-phero__intro--empty { padding-bottom: 50px; }
.sg-phero__back { position: absolute; bottom: 0; }
.sg-phero__btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 242px; padding: 16px 34px;
	border: 1px solid var(--c-white); background: transparent; color: var(--c-white);
	font-size: 16px; line-height: 16px;
	transition: background-color .3s, color .3s;
}
.sg-phero__btn:hover, .sg-phero__btn:focus-visible { background: var(--c-white); color: #000; }
.sg-phero__media { display: flex; align-items: flex-end; width: 50%; }
.sg-phero__image { flex: 1 1 auto; min-width: 0; margin: 4px -15px 0 51px; }
.sg-phero__image img { width: 100%; }

@media (max-width: 1280px) {
	.sg-phero__text { padding: 0 30px 0 0; }
	.sg-phero__title { font-size: 40px; }
}
@media (max-width: 1024px) {
	.sg-phero__title { font-size: 35px; }
	.sg-phero__intro { font-size: 14px; }
	.sg-phero__intro p { line-height: 31.5px; }
	.sg-phero__image { margin: 0 0 0 30px; }
}
@media (max-width: 767px) {
	.sg-phero__row { flex-direction: column; margin-bottom: 10px; }
	.sg-phero__text, .sg-phero__media { width: 100%; padding: 0; }
	.sg-phero__title { margin-bottom: 16px; font-size: 36px; }
	.sg-phero__intro p { line-height: 36px; }
	.sg-phero__image { margin: 50px 0 0; }
	.sg-phero__btn { padding: 13px 52px; font-size: 14px; line-height: 14px; }
}
@media (max-width: 600px) { .sg-phero__back { position: relative; margin-top: 30px; } }

/* ---------- Photos under the hero. ---------- */
.sg-pf-photos { padding-bottom: 174px; } /* live: 34px row margin + 140px section padding */
@media (max-width: 767px) { .sg-pf-photos { padding-bottom: 60px; } }

/* "Let's discuss" block (shell component): on live's Portfolio page it sits in an Elementor column with 15px
   side padding (10px on phones), so below 1025px its text runs a little narrower than on project pages. */
@media (max-width: 1024px) { .sg-pf--archive .sg-discuss { padding-inline: 15px; } }
@media (max-width: 767px)  { .sg-pf--archive .sg-discuss { padding-inline: 30px; } }
