/* ==========================================================================
   DEAR MUSÉ — PORTFOLIO MAGAZINE CSS
   Classic Editorial Flat Open Magazine Spreads (ELLE & Dior style)
   ========================================================================== */

/* Hero Section Editorial Update */
.portfolio-hero {
  height: 60vh;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--ink);
  color: var(--vanilla-cream);
  position: relative;
  overflow: hidden;
  padding-top: 180px;
}

.portfolio-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(26, 25, 22, 0.1) 0%, rgba(26, 25, 22, 0.7) 100%),
    linear-gradient(to bottom, rgba(26, 25, 22, 0.2) 0%, rgba(26, 25, 22, 0.8) 100%);
  z-index: 1;
  pointer-events: none;
}

.portfolio-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
}

.portfolio-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(0.8);
  transform: scale(1.02);
}

.portfolio-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 24px;
}

.portfolio-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 110px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--vanilla-cream);
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.portfolio-hero-content p {
  font-size: 16px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--avocado-cream);
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.portfolio-hero-content p::before,
.portfolio-hero-content p::after {
  content: '';
  width: 24px;
  height: 0.5px;
  background: currentColor;
  opacity: 0.7;
}

/* Luxury Filters styling */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 80px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 19px;
  /* Increased from 13px */
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--smoke);
  text-decoration: none;
  padding: 14px 32px;
  /* Increased padding from 10px 24px */
  border-radius: 40px;
  border: 1px solid rgba(107, 104, 96, 0.2);
  background: transparent;
  transition: all 0.4s var(--ease-silk);
}

.filter-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
  background: rgba(26, 25, 22, 0.02);
}

.filter-btn.active {
  color: var(--ink) !important;
  background: var(--avocado-cream) !important;
  border-color: var(--avocado-cream) !important;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(212, 219, 116, 0.25);
}

/* Magazine Layout Container */
.magazine-container {
  max-width: 100% !important;
  width: 98% !important;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Magazine Issue Block representing 2x2 layout per section */
.magazine-issue {
  width: 100%;
}

/* Open Book Wrapper: Joined grid with outer borders and page fold shadows */
.magazine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  /* Joins left and right pages together */
  background: #fdfcf9;
  border-radius: 6px;
  box-shadow: 0 25px 65px rgba(26, 25, 22, 0.12), 0 8px 20px rgba(26, 25, 22, 0.05);
  border: 1px solid rgba(26, 25, 22, 0.07);
  overflow: hidden;
  position: relative;
}

/* Automatic Spine Folds on the center crease */
.magazine-grid> :nth-child(odd)::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 35px;
  background: linear-gradient(to left, rgba(26, 25, 22, 0.12) 0%, rgba(26, 25, 22, 0.05) 20%, rgba(26, 25, 22, 0) 100%);
  pointer-events: none;
  z-index: 10;
}

.magazine-grid> :nth-child(even)::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 35px;
  background: linear-gradient(to right, rgba(26, 25, 22, 0.12) 0%, rgba(26, 25, 22, 0.05) 20%, rgba(26, 25, 22, 0) 100%);
  pointer-events: none;
  z-index: 10;
}

/* Joint binding line divider in the middle */
.magazine-grid> :nth-child(odd) {
  border-right: 1px solid rgba(26, 25, 22, 0.12);
}

/* Magazine Page cell styling */
.magazine-page {
  position: relative;
  padding: 45px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 730px;
  justify-content: space-between;
  opacity: 0;
  /* Animated when issues enter scroll */
  transition: transform 0.8s var(--ease-out-expo), opacity 0.8s var(--ease-out-expo);
}

/* Staggered page reveal animations */
.magazine-issue.reveal.visible .m-page-cover {
  animation: pageOpenLeft 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.magazine-issue.reveal.visible .m-page-content-1 {
  animation: pageOpenRight 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.magazine-issue.reveal.visible .m-page-content-2 {
  animation: pageOpenLeft 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.magazine-issue.reveal.visible .m-page-content-2-elle {
  animation: pageOpenRight 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.magazine-issue.reveal.visible .m-page-content-3-elle {
  animation: pageOpenLeft 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

.magazine-issue.reveal.visible .m-page-content-4-elle {
  animation: pageOpenRight 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.magazine-issue.reveal.visible .m-page-credits-new {
  animation: pageOpenLeft 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

.magazine-issue.reveal.visible .m-page-ad {
  animation: pageOpenRight 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes pageOpenLeft {
  0% {
    opacity: 0;
    transform: translateX(25px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes pageOpenRight {
  0% {
    opacity: 0;
    transform: translateX(-25px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ==========================================
   PAGE 1: COVER PAGE (FULL-BLEED REDESIGN)
   ========================================== */
.m-page-cover {
  padding: 0 !important;
  overflow: hidden;
  position: relative;
  background: var(--bone);
  border: none;
}

.cover-full-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cover-full-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out-expo);
}

.m-page-cover:hover .cover-full-bg img {
  transform: scale(1.03);
}

.cover-overlay-content {
  position: relative;
  z-index: 2;
  padding: 50px;
  box-sizing: border-box;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--ink);
  background: transparent;
}

.cover-header {
  text-align: center;
  border-bottom: 1.5px solid rgba(26, 25, 22, 0.15);
  padding-bottom: 16px;
}

.cover-subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.4em;
  color: #000000 !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.cover-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #000000;
  margin-left: 0.18em;
  line-height: 1;
}

.cover-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #000000;
  font-weight: 700;
  margin-top: 8px;
  padding: 0 4px;
}

.cover-body {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  align-items: center;
  flex-grow: 1;
}

.cover-teasers-left,
.cover-teasers-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.teaser-block {
  display: flex;
  flex-direction: column;
}

.teaser-tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--avocado-cream);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.teaser-link {
  display: block;
}

.teaser-img-wrap {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 2px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 247, 230, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.teaser-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.5);
  transition: all 0.6s var(--ease-silk);
}

.teaser-link:hover img {
  filter: grayscale(0);
  transform: scale(1.05);
}

.teaser-link h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--vanilla-cream);
  margin-bottom: 2px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.teaser-link p {
  font-size: 14px;
  color: rgba(255, 247, 230, 0.7);
  line-height: 1.3;
}

.cover-center-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.sunken-title-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sunken-bg-text {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(52px, 6vw, 84px);
  font-weight: 700;
  color: rgba(255, 247, 230, 0.08);
  letter-spacing: 0em;
  opacity: 0;
  text-align: center;
  text-transform: uppercase;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  width: 100%;
  line-height: 1;
}

.magazine-issue.reveal.visible .sunken-bg-text {
  animation: trackingExpand 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes trackingExpand {
  0% {
    opacity: 0;
    letter-spacing: -0.05em;
  }

  100% {
    opacity: 1;
    letter-spacing: 0.15em;
  }
}

.cover-footer {
  text-align: center;
}

.concept-label {
  font-size: 13px;
  letter-spacing: 0.3em;
  color: #000000 !important;
  text-transform: uppercase;
  display: block;
  font-weight: 900 !important;
}

.concept-name {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 40px);
  font-style: italic;
  font-weight: 900 !important;
  color: #000000 !important;
  margin-top: 4px;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.7);
}

/* ==========================================
   PAGE 2 & 3: EDITORIAL INSIDE PAGES
   ========================================== */
.editorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(26, 25, 22, 0.08);
  padding-bottom: 10px;
  margin-bottom: 30px;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--smoke);
}

.page-num {
  font-weight: 600;
  color: var(--ink);
}

.editorial-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.editorial-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-bottom: 30px;
  color: var(--ink);
  border-left: 3px solid var(--logo-mocha);
  padding-left: 16px;
}

.editorial-title span {
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  color: var(--logo-mocha);
  display: block;
}

.editorial-row {
  display: grid;
  grid-template-columns: 1.3fr 1.7fr;
  gap: 30px;
  flex-grow: 1;
  align-items: flex-start;
}

.editorial-col-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.editorial-paragraph {
  font-size: 17px;
  line-height: 1.75;
  color: var(--smoke);
  text-align: justify;
}

.drop-cap {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 400;
  font-style: italic;
  color: var(--logo-mocha);
  float: left;
  line-height: 0.8;
  margin-top: 4px;
  margin-right: 12px;
}

.editorial-quote {
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
  color: var(--logo-mocha);
  border-left: 2px solid var(--logo-mocha);
  padding-left: 16px;
  margin: 16px 0;
  line-height: 1.5;
}

.editorial-col-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  width: 100%;
}

.main-portrait-wrap {
  width: 100%;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 25, 22, 0.06);
  border-radius: 2px;
}

.main-portrait-wrap img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.6s var(--ease-silk);
}

.main-portrait-wrap:hover img {
  transform: scale(1.02);
}

.img-caption {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-top: 6px;
  display: block;
  text-align: right;
}

.sub-portrait-wrap {
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: fit-content;
  max-width: 50%;
  max-height: 180px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(26, 25, 22, 0.12);
  border: 6px solid #fdfcf9;
  border-radius: 2px;
  z-index: 4;
  transition: transform 0.6s var(--ease-silk);
}

.sub-portrait-wrap:hover {
  transform: scale(1.05) translate(-5px, 5px);
}

.sub-portrait-wrap img {
  display: block;
  max-width: 100%;
  max-height: 168px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.typo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--parchment);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  box-sizing: border-box;
}

.typo-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(16px, 2vw, 22px);
  color: var(--logo-mocha);
  text-align: center;
  line-height: 1.5;
}

/* Page 3 Credits and Letter details */
.flex-layout {
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 30px;
  flex-grow: 1;
}

.credits-column {
  border-right: 1px solid rgba(26, 25, 22, 0.1);
  padding-right: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.editorial-subheading {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
}

.credits-table {
  width: 100%;
  border-collapse: collapse;
}

.credits-table tr {
  border-bottom: 1px solid rgba(26, 25, 22, 0.06);
}

.credits-table tr:last-child {
  border-bottom: none;
}

.credits-table td {
  padding: 10px 0;
  font-size: 15px;
  vertical-align: top;
}

.credits-table td:first-child {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--smoke);
  font-weight: 500;
  width: 55%;
}

.credits-table td:last-child {
  color: var(--ink);
  font-weight: 500;
  text-align: right;
}

.magazine-info-box {
  background: var(--bone);
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--smoke);
  margin-top: 30px;
}

.magazine-info-box p {
  margin-bottom: 4px;
}

.magazine-info-box p:last-child {
  margin-bottom: 0;
}

.letter-column {
  display: flex;
  flex-direction: column;
}

.letter-title {
  font-family: var(--font-display);
  font-size: 33px;
  font-style: italic;
  font-weight: 400;
  color: var(--logo-mocha);
  margin-bottom: 12px;
}

.letter-recipient {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  display: block;
}

.letter-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--smoke);
  text-align: justify;
  margin-bottom: 20px;
}

.letter-photo-wrap {
  width: fit-content;
  max-width: 100%;
  max-height: 320px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
  border-radius: 2px;
  margin: auto auto 0 auto;
}

.letter-photo-wrap img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.6s var(--ease-silk);
}

.letter-photo-wrap:hover img {
  transform: scale(1.03);
}

.signature-block {
  text-align: right;
  padding: 20px;
  background: var(--parchment);
  border-radius: 2px;
  margin-top: auto;
}

.signature-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--logo-mocha);
}

.signature-date {
  font-size: 14px;
  color: var(--smoke);
  margin-top: 4px;
}

/* ==========================================
   PAGE 4: BRAND ADVERTISEMENT (DIOR STYLE)
   ========================================== */
.m-page-ad {
  padding: 0 !important;
  overflow: hidden;
  justify-content: center;
  align-items: center;
  background: var(--bone);
  border: none;
}

.ad-full-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ad-full-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s var(--ease-out-expo);
}

.m-page-ad:hover .ad-full-bg img {
  transform: scale(1.04);
}

.ad-overlay-content.ad-minimal {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--ink);
  padding: 50px;
  background: transparent;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.ad-brand-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: 0.22em;
  color: #000000;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 12px;
  margin-left: 0.22em;
  /* center align correction */
}

.ad-brand-subtitle {
  font-size: 14px;
  font-weight: 900 !important;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--logo-mocha, #8B7355) !important;
  margin-left: 0.4em;
  /* center align correction */
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE STACKING)
   ========================================================================== */
@media (max-width: 1024px) {
  .portfolio-hero {
    height: 50vh;
    padding-top: 130px;
  }

  .magazine-container {
    gap: 80px;
  }

  .magazine-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    box-shadow: none;
    border: none;
    background: transparent;
  }

  .magazine-grid> :nth-child(odd) {
    border-right: none;
  }

  .magazine-grid> :nth-child(odd)::after,
  .magazine-grid> :nth-child(even)::after {
    display: none;
  }

  .magazine-page {
    min-height: auto;
    padding: 32px;
    opacity: 1;
    /* Disable scroll animations on mobile */
    box-shadow: 0 8px 24px rgba(26, 25, 22, 0.05);
    border: 1px solid rgba(26, 25, 22, 0.04);
    border-radius: 4px;
    background: #fdfcf9;
  }

  .magazine-issue.reveal.visible .m-page-cover,
  .magazine-issue.reveal.visible .m-page-content-1,
  .magazine-issue.reveal.visible .m-page-content-2,
  .magazine-issue.reveal.visible .m-page-ad {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .cover-overlay-content {
    padding: 32px;
    background: linear-gradient(to bottom, rgba(26, 25, 22, 0.85) 0%, rgba(26, 25, 22, 0.3) 50%, rgba(26, 25, 22, 0.85) 100%);
  }

  .cover-body {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cover-teasers-left,
  .cover-teasers-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .sunken-bg-text {
    font-size: clamp(60px, 12vw, 100px);
    opacity: 0.06;
    letter-spacing: 0.12em;
  }

  .editorial-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sub-portrait-wrap {
    position: static;
    width: 100%;
    aspect-ratio: 4/5;
    margin-top: 16px;
    border: none;
    box-shadow: 0 8px 24px rgba(26, 25, 22, 0.06);
  }

  .flex-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .credits-column {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid rgba(26, 25, 22, 0.08);
    padding-bottom: 30px;
  }

  .ad-overlay-content.ad-minimal {
    padding: 32px;
    min-height: 450px;
  }

  .magazine-row-1,
  .magazine-row-2 {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .cover-grid,
  .content-grid,
  .content-grid-3,
  .ad-grid {
    grid-template-columns: 1fr !important;
  }

  .editorial-layout-elle,
  .editorial-2-layout-elle {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .editorial-side-col,
  .editorial-2-side-col {
    border-left: none;
    padding-left: 0;
  }

  .credits-layout-elle {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .credits-column-new {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid rgba(26, 25, 22, 0.08);
    padding-bottom: 20px;
  }
}

@media (max-width: 600px) {
  .portfolio-filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 10px 22px;
    /* Increased from 8px 16px */
    font-size: 16px;
    /* Increased from 11px */
  }

  .cover-teasers-left,
  .cover-teasers-right {
    grid-template-columns: 1fr;
  }

  .ad-brand-title {
    font-size: 40px;
  }
}

/* ==========================================
   NEW ELLE MULTI-COLUMN DESIGN (SPREADS SIZING)
   ========================================== */
/* We now use .cover-grid, .content-grid, and .ad-grid definitions */

/* Page 2 (Editorial 1 Layout) */
.editorial-layout-elle {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 30px;
  align-items: flex-start;
  margin-top: 15px;
}

.editorial-main-col {
  display: flex;
  flex-direction: column;
}

.editorial-sub-banner {
  background: var(--logo-mocha);
  color: #fff;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 20px;
}

.editorial-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.editorial-side-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-left: 1px solid rgba(26, 25, 22, 0.15);
  padding-left: 20px;
}

.side-text-block {
  font-size: 14px;
  line-height: 1.6;
  color: var(--smoke);
  text-align: justify;
}

.sub-portrait-wrap-inline {
  width: 100%;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(26, 25, 22, 0.06);
  border-radius: 2px;
  border: 1px solid rgba(26, 25, 22, 0.06);
}

.sub-portrait-wrap-inline img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Page 3 (Credits & Letter Layout) */
.credits-layout-elle {
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.85fr;
  gap: 24px;
  align-items: flex-start;
  margin-top: 15px;
}

.credits-column-new {
  border-right: 1px solid rgba(26, 25, 22, 0.12);
  padding-right: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.credits-logo-text {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--logo-mocha);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.credits-section-group {
  margin-bottom: 8px;
}

.credits-association {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
  line-height: 1.4;
}

.credits-president {
  font-size: 13px;
  font-weight: 600;
  color: var(--logo-mocha);
  line-height: 1.4;
}

.credits-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.credits-sec-title {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid rgba(26, 25, 22, 0.1);
  padding-bottom: 2px;
  margin-bottom: 2px;
}

.credits-sec-desc {
  font-size: 12px;
  line-height: 1.4;
  color: var(--smoke);
}

.credits-sec-desc strong {
  color: var(--ink);
}

.credits-bottom-section {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(26, 25, 22, 0.1);
  padding-top: 18px;
}

.credits-bottom-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 400px;
  margin: 0 auto;
}

.bottom-img-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(26, 25, 22, 0.04);
}

.bottom-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-silk);
}

.bottom-img-wrap:hover img {
  transform: scale(1.03);
}

.credits-bottom-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--smoke);
  font-style: italic;
  text-align: center;
  padding: 0 20px;
}

.credits-photo-column {
  width: 100%;
  height: auto;
  align-self: center;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 25, 22, 0.06);
  border-radius: 2px;
}

.credits-photo-column img {
  display: block;
  width: 100%;
  height: auto;
}

.letter-column-new {
  display: flex;
  flex-direction: column;
  padding-left: 8px;
}

.letter-title-new {
  font-family: var(--font-display);
  font-size: 33px;
  font-style: italic;
  font-weight: 400;
  color: var(--logo-mocha);
  margin-bottom: 12px;
}

.letter-recipient-new {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  display: block;
}

.letter-text-new {
  font-size: 14px;
  line-height: 1.6;
  color: var(--smoke);
  text-align: justify;
}

/* ==========================================
   PORTFOLIO STANDALONE SPREADS LAYOUTS
   ========================================== */
.portfolio-container-wide {
  max-width: 100% !important;
  width: 98% !important;
  padding: 0 10px !important;
}

/* Row-1: Cover (1fr) + Editorial I (2fr) */
.magazine-row-1 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
}

/* Row-2: Editorial II (2fr) + Back Cover (1fr) */
.magazine-row-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  margin-bottom: 60px;
  width: 100%;
}

/* Rounded CTA Button */
.portfolio-cta-btn {
  border-radius: 40px !important;
}

.portfolio-cta-btn::before {
  border-radius: 40px !important;
}

/* Cover grid: override magazine-grid to be single column */
.cover-grid.magazine-grid {
  grid-template-columns: 1fr !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: 0 !important;
}

/* Content grid: two pages side by side */
.content-grid.magazine-grid {
  grid-template-columns: 1fr 1fr !important;
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: 0 !important;
}

/* Content grid 3: three pages side by side */
.content-grid-3.magazine-grid {
  grid-template-columns: 1fr 1fr 1fr !important;
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: 0 !important;
}

/* Ad grid: one page */
.ad-grid.magazine-grid {
  grid-template-columns: 1fr !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: 0 !important;
}

/* Ensure the cover page takes full width and height of its container */
.cover-grid .m-page-cover {
  width: 100% !important;
  flex-grow: 1 !important;
}

.ad-grid .m-page-ad {
  width: 100% !important;
  flex-grow: 1 !important;
}

/* Paired content pages should be equal height */
.magazine-grid .magazine-page {
  min-height: 730px !important;
}

/* Page 2 (Editorial 1 Layout) - Side Decor Box */
.side-decor-box {
  margin-top: 20px;
  border-top: 1px solid rgba(26, 25, 22, 0.12);
  padding-top: 15px;
}

.side-decor-title {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--logo-mocha);
  display: block;
  margin-bottom: 4px;
}

.side-decor-quote {
  font-size: 14px;
  font-style: italic;
  color: var(--smoke);
}

/* Page 3 (Editorial 2 Layout - ELLE Page 45) */
.editorial-2-layout-elle {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 30px;
  align-items: flex-start;
  margin-top: 15px;
}

.editorial-2-main-col {
  display: flex;
  flex-direction: column;
}

.editorial-2-sub-banner {
  background: var(--logo-mocha);
  color: #fff;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 20px;
}

.editorial-2-portrait-wrap {
  width: 100%;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 25, 22, 0.06);
  border-radius: 2px;
  margin-bottom: 24px;
}

.editorial-2-portrait-wrap img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.editorial-2-paragraph {
  font-size: 14px;
  line-height: 1.6;
  color: var(--smoke);
  text-align: justify;
}

.drop-cap-large {
  font-family: var(--font-display);
  font-size: 78px;
  float: left;
  line-height: 0.8;
  margin-right: 10px;
  font-weight: 400;
  font-style: italic;
  color: var(--logo-mocha);
}

.editorial-2-side-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-left: 1px solid rgba(26, 25, 22, 0.15);
  padding-left: 20px;
}

.editorial-2-side-banner {
  background: var(--logo-mocha);
  color: #fff;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: inline-block;
  align-self: flex-start;
}

.editorial-2-side-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--smoke);
  text-align: justify;
}

.side-brand-quote {
  margin-top: 15px;
  border-top: 1px solid rgba(26, 25, 22, 0.1);
  padding-top: 15px;
}

.brand-quote-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--logo-mocha);
  margin-bottom: 4px;
}

.brand-quote-text {
  font-size: 14px;
  font-style: italic;
  color: var(--smoke);
}

/* Page 5 (Ad Page - Dior Mock Barcode & Price Tag) */
.ad-barcode-sticker {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: #fff;
  padding: 6px 8px;
  border: 1px solid rgba(26, 25, 22, 0.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-radius: 1px;
  z-index: 10;
}

.mock-barcode-lines {
  width: 70px;
  height: 24px;
  background: repeating-linear-gradient(90deg,
      #1a1916,
      #1a1916 2px,
      transparent 2px,
      transparent 5px,
      #1a1916 5px,
      #1a1916 6px,
      transparent 6px,
      transparent 9px);
}

.mock-price-text {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: #1a1916;
  letter-spacing: 0.05em;
}

/* Mobile responsive fixes */
@media (max-width: 1024px) {
  .cover-grid {
    max-width: 100% !important;
  }
}

/* Legibility updates for small texts */
.editorial-paragraph,
.editorial-2-paragraph,
.editorial-2-side-text,
.editorial-side-col p,
.letter-text-new,
.side-text-block p,
.side-decor-quote {
  font-weight: 500 !important;
  color: #2a2824 !important;
  font-size: 16px !important;
  line-height: 1.7 !important;
}

.credits-sec-desc {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #2a2824 !important;
}

.side-decor-title,
.credits-sec-title {
  font-weight: 700 !important;
  color: #1a1916 !important;
}

/* ==========================================
   MOBILE RESPONSIVE FIXES (OVERRIDING DESKTOP RULES)
   ========================================== */
@media (max-width: 1024px) {
  .magazine-row-1,
  .magazine-row-2 {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .content-grid.magazine-grid,
  .content-grid-3.magazine-grid {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
  }

  .magazine-grid .magazine-page {
    min-height: auto !important;
    height: auto !important;
    padding: 24px !important;
  }

  .editorial-layout-elle,
  .editorial-2-layout-elle {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .editorial-two-cols {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .editorial-side-col,
  .editorial-2-side-col {
    border-left: none !important;
    padding-left: 0 !important;
    margin-top: 20px !important;
  }

  .credits-layout-elle {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
  }

  .credits-column-new {
    border-right: none !important;
    padding-right: 0 !important;
    border-bottom: 1px solid rgba(26, 25, 22, 0.08) !important;
    padding-bottom: 20px !important;
  }
}

/* Mobile cover styling fixes for image clarity and text contrast */
@media (max-width: 1024px) {
  .magazine-grid .magazine-page.m-page-cover,
  .magazine-grid .magazine-page.m-page-ad {
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  .cover-overlay-content {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.75) 100%) !important;
    padding: 32px !important;
    height: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Force white text with high contrast shadow on mobile cover elements */
  .cover-subtitle,
  .cover-meta,
  .cover-meta span,
  .concept-label {
    color: #FFFFFF !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85) !important;
  }

  .cover-title {
    color: #FFFFFF !important;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9) !important;
  }
}

/* Mobile portrait layout optimization for full bleed images and spacious text */
@media (max-width: 767px) {
  .portfolio-container-wide {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .magazine-container {
    width: 100% !important;
    max-width: 100% !important;
    gap: 30px !important;
    margin: 0 !important;
  }

  .magazine-issue {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .magazine-row-1,
  .magazine-row-2 {
    gap: 20px !important;
    margin-bottom: 40px !important;
    width: 100% !important;
  }

  /* Make magazine grids span edge-to-edge on phone screens */
  .magazine-grid {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .magazine-page {
    padding: 24px 16px !important;
    border-radius: 0 !important;
  }

  /* Full bleed cover image on phone screens */
  .magazine-grid .magazine-page.m-page-cover,
  .magazine-grid .magazine-page.m-page-ad {
    padding: 0 !important;
    border-radius: 0 !important;
    min-height: 520px !important;
  }

  .cover-overlay-content {
    padding: 24px 16px !important;
    height: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cover-subtitle {
    font-size: 13px !important;
    letter-spacing: 0.25em !important;
  }

  .cover-title {
    font-size: clamp(38px, 11vw, 56px) !important;
    letter-spacing: 0.12em !important;
  }

  .cover-meta {
    font-size: 11px !important;
    letter-spacing: 0.1em !important;
  }

  .concept-label {
    font-size: 11px !important;
    letter-spacing: 0.2em !important;
  }

  .concept-name {
    font-size: clamp(24px, 8vw, 32px) !important;
  }
}