/* --- Refined Editorial Layout for Beyond Weddings --- */

.ideas-beyond-page .project-showcase {
  padding: 10rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  /* Text fills the space, Image stays tight */
  gap: 3.5rem;
  /* Tighter gap for better connection */
  align-items: start;
  max-width: 960px;
  /* Bringing the whole container in slightly */
  margin: 0 auto;
}

.ideas-beyond-page .project-header {
  margin: 0;
}

.ideas-beyond-page .project-header h2 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.85;
  margin: 0 0 2rem 0;
  letter-spacing: -0.02em;
}

.ideas-beyond-page .reading-layout {
  max-width: 100%;
  /* Let the text fill the flexible column */
}

.ideas-beyond-page .reading-layout p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink);
  opacity: 0.9;
}

.project-featured {
  display: flex !important;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.featured-frame {
  position: relative !important;
  width: 220px !important;
  height: 293px !important;
  /* Fixed 3:4 ratio */
  overflow: hidden;
  border-radius: 2px;
  background: #1b1714;
  box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.featured-frame img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-frame:hover img {
  transform: scale(1.1);
}

.frame-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 14, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.featured-frame:hover .frame-overlay {
  opacity: 1;
}

.view-label {
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Redesigning the Button */
.ideas-beyond-page .button-outline {
  display: inline-block !important;
  background: none;
  border: none;
  border-bottom: 1px solid var(--ink);
  padding: 0 0 0.4rem 0;
  border-radius: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.ideas-beyond-page .button-outline:hover {
  opacity: 0.6;
}

/* Floating Project Label - Photo Chapters Only */
.ideas-beyond-page .project-showcase .work-label {
  position: absolute;
  left: -4.5rem;
  top: 0.5rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Video Section Labels - Simple & Horizontal */
.ideas-beyond-page .video-collection .work-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Gallery Modal */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #12100e;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.gallery-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  padding: 10rem 4rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.modal-gallery-grid {
  columns: 2;
  column-gap: 3rem;
}

.modal-gallery-item {
  margin-bottom: 3rem;
  break-inside: avoid;
}

.modal-gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.modal-close {
  position: fixed;
  top: 3rem;
  right: 4rem;
  background: none;
  border: none;
  color: white;
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
}

@media (max-width: 768px) {
  .beyond-hero {
    height: auto;
    /* Allow height to grow with content on mobile */
    min-height: 80vh;
    padding: 8rem 0 4rem !important;
  }

  .beyond-hero-content {
    padding: 0 1.5rem;
    /* Tighter padding for mobile screens */
    text-align: center;
    /* Center alignment often feels more balanced on mobile */
  }

  .beyond-hero-content h1 {
    font-size: 3.5rem !important;
    /* Scaled down for mobile */
    margin-bottom: 1.5rem !important;
    max-width: 100%;
  }

  .beyond-hero-content .hero-intro {
    font-size: 1.1rem !important;
    max-width: 100%;
    margin: 0 auto !important;
  }

  /* Stack the grids to 1-column on mobile */
  .video-grid,
  .feed-grid {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
    padding: 0 1.5rem !important;
  }

  .ideas-beyond-page .project-showcase {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 4rem 1.5rem;
  }

  .ideas-beyond-page .project-showcase .work-label {
    position: static;
    writing-mode: horizontal-tb;
    transform: none;
    margin-bottom: 1rem;
    display: block;
  }
}

/* --- Unified Video Grid Styles --- */

.video-grid,
.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
  margin-top: 4rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.video-embed-container {
  position: relative;
  width: 100%;
  padding-bottom: 125%;
  /* Consistent 4:5 ratio for all Instagram embeds */
  height: 0;
  overflow: hidden;
  border-radius: 4px;
  background: #000;
}

.video-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  margin-top: 1.5rem;
}

.video-info h3 {
  font-size: 1.4rem;
  margin: 0.5rem 0;
}

.video-info p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 900px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* --- Cinematic Hero Styles --- */

.beyond-hero {
  position: relative;
  height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 8rem;
  padding: 0 !important;
  max-width: 100% !important;
  background: #000;
}

.hero-image-wrapper {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover !important;
  filter: brightness(0.85) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(27, 23, 20, 0.2), rgba(27, 23, 20, 0.6));
  z-index: 2;
}

.beyond-hero-content {
  position: relative;
  z-index: 3;
  color: white;
  text-align: left;
  /* Shifted to Left Alignment */
  padding: 0 4rem;
  /* Increased padding for better breathing room */
  max-width: 1200px;
  width: 100%;
}

.beyond-hero-content h1 {
  font-size: clamp(3.5rem, 10vw, 7.5rem) !important;
  color: white !important;
  margin: 1rem 0 2rem !important;
  line-height: 0.9 !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
  max-width: 800px;
}

.beyond-hero-content .chapter-number {
  color: var(--accent) !important;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.beyond-hero-content .hero-intro {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 1.2rem !important;
  line-height: 1.6;
  max-width: 540px;
  /* Tighter column for better readability */
  margin: 0 !important;
  /* Reset margin to align left */
}

.beyond-hero-content em {
  color: white;
  font-style: italic;
  font-family: var(--font-serif);
}

@media (max-width: 768px) {
  .beyond-hero {
    height: 80svh !important;
    /* Taller on mobile for better framing */
    aspect-ratio: auto !important;
  }

  .beyond-hero-content {
    padding: 2rem !important;
    justify-content: flex-end !important;
    /* Move text to bottom on mobile */
    padding-bottom: 4rem !important;
  }

  .beyond-hero-content h1 {
    font-size: 3rem !important;
    line-height: 1 !important;
    margin-bottom: 1.5rem !important;
  }

  .beyond-hero-content .hero-intro {
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
  }
}

/* --- Page Specific Overrides --- */

.building-from-scratch-page .beyond-hero {
  margin-top: 2rem;
  /* Give space after the header */
}

.building-from-scratch-page .site-header {
  position: relative !important;
  left: 0 !important;
  transform: none !important;
  padding: 2rem 0 !important;
  margin: 0 auto !important;
}

.building-from-scratch-page .site-header .brand-text,
.building-from-scratch-page .site-header .site-nav a,
.building-from-scratch-page .site-header .brand {
  color: var(--ink) !important;
  transition: opacity 0.3s ease;
}

.building-from-scratch-page .site-header .site-nav a:hover {
  opacity: 0.5;
  /* The "graying out" effect */
}

.building-from-scratch-page .site-header .brand-mark {
  background: var(--ink) !important;
  color: white !important;
}

.building-from-scratch-page .site-header .menu-toggle span {
  background: var(--ink) !important;
}

/* Restoring the "Boxed" layout to match Beyond */
.building-from-scratch-page .page-shell {
  width: min(calc(100% - 2rem), var(--max-width)) !important;
  margin: 0 auto !important;
}

.building-from-scratch-page .beyond-hero {
  aspect-ratio: 16 / 10;
  /* Matching the visual weight of the Beyond photo */
  height: auto !important;
  margin-top: 1rem;
}

/* --- Chapter II: CineLove Overrides --- */

.cinelove-chapter-page .page-shell {
  width: min(calc(100% - 2rem), var(--max-width)) !important;
  margin: 0 auto !important;
}

.cinelove-chapter-page .site-header {
  position: relative !important;
  left: 0 !important;
  transform: none !important;
  padding: 2rem 0 !important;
  margin: 0 auto !important;
}

.cinelove-chapter-page .site-header .brand-text,
.cinelove-chapter-page .site-header .site-nav a,
.cinelove-chapter-page .site-header .brand {
  color: var(--ink) !important;
}

.cinelove-chapter-page .site-header .brand-mark {
  background: var(--ink) !important;
  color: white !important;
}

.cinelove-chapter-page .site-header .menu-toggle span {
  background: var(--ink) !important;
}

.cinelove-chapter-page .beyond-hero {
  margin-top: 1rem;
  aspect-ratio: 16 / 10;
  height: auto !important;
}