/* =========================================
   COSMIC HERO BANNER CSS (DARK ESPRESSO)
   ========================================= */

.hero-cosmic {
  position: relative;
  width: 100%;
  min-height: 100vh;
  /* Deep, luxurious espresso brown gradient */
  background: radial-gradient(ellipse at center, #2c1e1a 0%, #0f0a08 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px;
}

/* --- Animated Canvas Background --- */
#constellation-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* --- Content Container --- */
.hero-container {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 1400px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

/* --- Left: Text Content --- */
.hero-content {
  max-width: 600px;
  animation: fadeInUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.hero-title {
  font-family: var(--font-heading, "Cinzel", serif);
  font-size: 3.5rem;
  line-height: 1.2;
  color: #fdfbf6; /* Creamy Beige */
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.text-gradient {
  /* Rich Gold and Copper Gradient */
  background: linear-gradient(to right, #d4af37, #c78d6a, #f9f1d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.5));
}

.hero-description {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 1.1rem;
  color: #c2b4ae; /* Soft, light taupe/grey */
  line-height: 1.7;
  margin-bottom: 3rem;
  max-width: 90%;
}

/* --- Custom Premium Buttons --- */
.hero-buttons {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 16px 36px;
  border-radius: 4px; /* Slight rounding for a premium feel */
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  text-decoration: none;
}

/* Primary Button: Solid Gold/Copper */
.hero-btn-primary {
  background: linear-gradient(135deg, #c78d6a, #aa4e35);
  color: #0f0a08; /* Darkest brown text */
  border: 1px solid #c78d6a;
  box-shadow: 0 4px 15px rgba(199, 141, 106, 0.2);
}

.hero-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(199, 141, 106, 0.4);
  background: linear-gradient(135deg, #d59b78, #b85b42);
}

/* Secondary Button: Outlined Cream */
.hero-btn-secondary {
  background-color: transparent;
  color: #fdfbf6; /* Cream text */
  border: 1px solid rgba(253, 251, 246, 0.6);
}

.hero-btn-secondary:hover {
  background-color: #fdfbf6;
  color: #0f0a08; /* Inverts to dark text */
  border-color: #fdfbf6;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(253, 251, 246, 0.15);
}

/* --- Right: Rotating Visual --- */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInRight 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.visual-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 650px;
  height: 650px;
  /* Soft golden glow behind the wheel */
  background: radial-gradient(
    circle,
    rgba(199, 141, 106, 0.15) 0%,
    transparent 65%
  );
  z-index: 1;
  pointer-events: none;
}

.rotating-zodiac {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 550px;
  height: auto;
  object-fit: contain;
  animation: spinSlowly 60s linear infinite;
  /* Adds a subtle drop shadow to make the image pop off the dark bg */
  filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5));
}

.rotating-zodiac[src]:not([src="YOUR-IMAGE-URL.png"]) + .visual-fallback {
  display: none;
}

.visual-fallback {
  position: absolute;
  z-index: 1;
  font-family: var(--font-body);
  color: #c78d6a;
  border: 1px dashed #c78d6a;
  padding: 4rem;
  border-radius: 50%;
  opacity: 0.5;
}

/* --- Animations --- */
@keyframes spinSlowly {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.8rem;
  }
  .hero-container {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-cosmic {
    min-height: auto;
    padding: 120px 0 4rem 0;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 4rem;
  }

  .hero-content {
    margin: 0 auto;
  }
  .hero-description {
    margin: 0 auto 2.5rem auto;
  }
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .visual-glow {
    width: 400px;
    height: 400px;
  }
}

/* =========================================
   PREMIUM BRAND TRUST STRIP
   ========================================= */

.brand-trust-strip {
  background-color: var(--color-bg-base, #FDFBF6);
  border-bottom: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15));
  padding: 1.2rem 0;
  overflow: hidden; /* Hides the scrolling elements outside the viewport */
  display: flex;
  white-space: nowrap;
}

.marquee-track {
  display: flex;
  width: fit-content;
  /* Adjust '30s' to make the scroll faster or slower */
  animation: marqueeScroll 30s linear infinite;
}

/* Pause the scrolling if the user hovers over the bar */
.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 3rem; /* Space between the text and the star divider */
  padding-right: 3rem; /* Essential for making the loop seamless */
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.marquee-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--color-accent, #C78D6A);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.marquee-text {
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-primary, #2B1D19);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.marquee-divider {
  color: rgba(135, 56, 35, 0.3);
  font-size: 0.8rem;
}

/* The Infinite Loop Magic */
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  /* Moving it exactly 50% shifts Group 1 entirely out, replacing it with Group 2 seamlessly */
  100% { transform: translateX(-50%); } 
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
  .brand-trust-strip {
    padding: 1rem 0;
  }
  
  .marquee-text {
    font-size: 0.75rem;
    letter-spacing: 1px;
  }
  
  .marquee-icon {
    width: 16px;
    height: 16px;
  }
  
  .marquee-group {
    gap: 2rem;
    padding-right: 2rem;
  }
}

/* =========================================
   PREMIUM CATEGORIES SLIDER (EARTHY THEME)
   ========================================= */

.categories-section {
  /* background-color: var(--color-bg-base, #FDFBF6); */
  padding: 2rem 0;
  overflow: hidden;
}

.categories-container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

/* --- Section Header --- */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-family: var(--font-heading, "Cinzel", serif);
  font-size: 2.2rem;
  color: var(--color-text-primary, #2b1d19);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1rem;
}

.section-divider {
  width: 60px;
  height: 2px;
  background: var(--color-primary, #873823);
  margin: 0 auto;
  position: relative;
}

.section-divider::after {
  content: "✦";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-primary, #873823);
  font-size: 0.8rem;
  background: var(--color-bg-base, #fdfbf6);
  padding: 0 10px;
}

/* --- Slider Layout Fixes --- */
.category-slider-wrapper {
  position: relative;
  /* Shrink-wraps the container so arrows hug the items perfectly */
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  /* Adds exactly 60px of space on the left and right for the arrows */
  /* padding: 0 60px;  */
}

.category-track {
  display: flex;
  gap: 2.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 1rem 0; /* 16px top padding */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.category-track::-webkit-scrollbar {
  display: none;
}

/* --- Individual Category Item --- */
.category-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  scroll-snap-align: center;
  width: 160px;
}

/* The Image Box & Celestial Ring */
.category-image-box {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 8px; /* Creates the gap between image and outer ring */
  background: transparent;
  margin-bottom: 1.2rem;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.celestial-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px dashed var(--color-primary, #873823);
  opacity: 0.6;
  transition: all 0.6s ease;
}

.category-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(43, 29, 25, 0.08);
  transition:
    transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 0.4s ease;
}

.category-name {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-primary, #2b1d19);
  text-align: center;
  text-transform: capitalize;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

/* --- Hover Animations --- */
.category-item:hover .category-image-box {
  transform: translateY(-5px);
}

.category-item:hover .celestial-ring {
  border-color: var(--color-accent, #c78d6a);
  opacity: 1;
  transform: rotate(45deg); /* The cosmic dial spin */
}

.category-item:hover .category-img {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(135, 56, 35, 0.2);
}

.category-item:hover .category-name {
  color: var(--color-primary, #873823);
}

/* --- Navigation Arrows (Perfect Circles & Alignment) --- */
.cat-arrow {
  position: absolute;
  /* PERFECT VERTICAL CENTER: 
     16px (track padding) + 70px (half of 140px image) = 86px */
  top: 86px;
  transform: translateY(-50%);
  background: var(--color-bg-surface, #ffffff);
  border: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15));

  /* Forces a rigid perfect circle */
  width: 45px;
  height: 45px;
  min-width: 45px;
  min-height: 45px;
  border-radius: 50%;
  padding: 0;
  box-sizing: border-box;

  /* Centers the SVG icon */
  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(43, 29, 25, 0.05);
  transition: all 0.3s ease;
}

.cat-arrow .icon {
  width: 20px;
  height: 20px;
  stroke: var(--color-primary, #873823);
  stroke-width: 1.5;
  fill: none;
  transition: stroke 0.3s ease;
  flex-shrink: 0; /* Prevents icon squishing */
}

/* Places arrows exactly in the 60px padding space we created */
.prev-cat {
  left: 0;
}
.next-cat {
  right: 0;
}

.cat-arrow:hover {
  background: var(--color-primary, #873823);
  border-color: var(--color-primary, #873823);
  box-shadow: 0 6px 15px rgba(135, 56, 35, 0.2);
}

.cat-arrow:hover .icon {
  stroke: var(--color-bg-base, #fdfbf6);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
  .category-track {
    gap: 1.5rem;
  }
  .category-item {
    width: 140px;
  }
  .category-image-box {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 768px) {
  .categories-section {
    padding: 1rem 0;
  }
  .section-title {
    font-size: 1.8rem;
  }

  /* Hide arrows on mobile, let users swipe natively */
  .cat-arrow {
    display: none;
  }

  /* .category-slider-wrapper { margin: 0 -5%; Let items bleed off screen } */
  .category-track {
    padding: 1rem 5%;
    gap: 1.2rem;
  }

  .category-item {
    width: 110px;
  }
  .category-image-box {
    width: 100px;
    height: 100px;
  }
  .category-name {
    font-size: 0.85rem;
  }
}

/* =========================================
   MASONRY CATEGORIES (EARTHY THEME)
   ========================================= */

.masonry-section {
  /* background-color: var(--color-bg-base, #FDFBF6); */
  padding: 5rem 0;
}

.masonry-container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  /* Creates a 2-column layout */
  grid-template-columns: 1fr 1fr;
  /* Creates 2 rows, each 300px tall */
  grid-template-rows: repeat(2, 320px);
  gap: 2rem;
}

/* --- Grid Positioning --- */
.card-featured {
  grid-column: 1 / 2;
  grid-row: 1 / 3; /* Spans both rows to make it tall */
}

.card-top {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

.card-bottom {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}

/* --- Card Base Styling --- */
.masonry-card {
  position: relative;
  border-radius: var(--radius-sm, 2px);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Pushes content to the bottom */
  box-shadow: 0 10px 30px rgba(43, 29, 25, 0.05);
}

/* --- Image & Overlay --- */
.masonry-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.masonry-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Deep espresso gradient mimicking the reference image */
  background: linear-gradient(
    to top,
    rgba(15, 10, 8, 0.95) 0%,
    rgba(15, 10, 8, 0.5) 40%,
    rgba(15, 10, 8, 0.1) 100%
  );
  z-index: 2;
  transition: background 0.5s ease;
}

/* --- Content Styling --- */
.masonry-content {
  position: relative;
  z-index: 3;
  padding: 2.5rem;
  color: var(--color-text-inverse, #fdfbf6); /* Cream text */
}

.masonry-title {
  font-family: var(
    --font-body,
    "Jost",
    sans-serif
  ); /* Using sans-serif to match your reference */
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text-inverse, #fdfbf6);
  margin-bottom: 0.8rem;
  line-height: 1.2;
  letter-spacing: 0px;
  text-transform: none; /* Removes uppercase to match reference */
}

.card-top .masonry-title,
.card-bottom .masonry-title {
  font-size: 1.7rem; /* Slightly smaller for the side cards */
}

.masonry-desc {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 1rem;
  color: rgba(253, 251, 246, 0.85); /* Slightly muted cream */
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 90%;
}

.masonry-link {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 1rem;
  font-weight: 500;
  display: inline-block;
  padding-bottom: 4px;
  position: relative;
}

/* The static underline */
.masonry-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: rgba(253, 251, 246, 0.5); /* Semi-transparent line */
  transition: all 0.3s ease;
}

/* --- Hover Animations --- */
.masonry-card:hover .masonry-img {
  transform: scale(1.05); /* Gentle zoom */
}

.masonry-card:hover .masonry-overlay {
  /* Darkens slightly on hover for text focus */
  background: linear-gradient(
    to top,
    rgba(15, 10, 8, 0.98) 0%,
    rgba(15, 10, 8, 0.6) 50%,
    rgba(15, 10, 8, 0.2) 100%
  );
}

.masonry-card:hover .masonry-link::after {
  background-color: var(
    --color-primary,
    #873823
  ); /* Changes to earthy primary color */
  height: 2px;
}

.masonry-card:hover .masonry-link {
  color: var(--color-text-inverse, #fdfbf6);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
  .masonry-container {
    gap: 1.5rem;
    grid-template-rows: repeat(2, 280px);
  }
  .masonry-content {
    padding: 2rem;
  }
  .masonry-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .masonry-section {
    padding: 3rem 0;
  }

  .masonry-container {
    /* Stacks all items in a single column on mobile */
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .card-featured,
  .card-top,
  .card-bottom {
    grid-column: 1 / -1;
    grid-row: auto;
    height: 350px; /* Fixed height for all cards on mobile */
  }

  .masonry-desc {
    max-width: 100%;
  }
}

/* =========================================
   ROYAL RITUAL ESSENTIALS (EARTHY THEME)
   ========================================= */

.ritual-essentials-section {
  /* background-color: var(--color-bg-glass, rgba(253, 251, 246, 0.5)); Very soft beige */
  padding: 6rem 0;
  border-top: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15));
}

.ritual-container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
}

/* --- Header Adjustments --- */
.text-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-subtitle {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 1.05rem;
  color: var(--color-text-secondary, #7a6962);
  margin-bottom: 1.5rem;
  max-width: 600px;
}

/* --- The 4-Column Grid --- */
.ritual-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

/* --- Individual Card Styling --- */
.ritual-card {
  background: var(--color-bg-surface, #ffffff);
  border: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15));
  border-radius: var(--radius-sm, 2px);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.ritual-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-depth, 0 10px 30px rgba(43, 29, 25, 0.08));
  border-color: var(--color-border-strong, rgba(135, 56, 35, 0.4));
}

/* --- Arched Image Window (Jharokha Style) --- */
.ritual-img-arch {
  width: 100%;
  aspect-ratio: 4 / 5;
  /* Massive top radius for the arch, flat bottom */
  border-radius: 150px 150px 0 0;
  overflow: hidden;
  position: relative;
  /* Adds a delicate inner border matching your theme */
  border: 4px solid var(--color-bg-base, #fdfbf6);
  box-shadow: 0 0 0 1px var(--color-border-subtle, rgba(135, 56, 35, 0.15));
  margin-bottom: 1.5rem;
}

.ritual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.ritual-card:hover .ritual-img {
  transform: scale(1.08);
}

/* --- Text & Button --- */
.ritual-info {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
}

.ritual-title {
  font-family: var(--font-heading, "Cinzel", serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary, #2b1d19);
  margin-bottom: 1.2rem;
  letter-spacing: 1px;
}

.btn-ritual-shop {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-text-primary, #2b1d19);
  background: transparent;
  border: 1px solid var(--color-border-strong, rgba(135, 56, 35, 0.4));
  padding: 10px 24px;
  border-radius: var(--radius-sm, 2px);
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: auto; /* Pushes button to bottom evenly */
}

.ritual-card:hover .btn-ritual-shop {
  background: var(--color-primary, #873823);
  color: var(--color-text-inverse, #fdfbf6);
  border-color: var(--color-primary, #873823);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
  .ritual-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .ritual-essentials-section {
    padding: 4rem 0;
  }

  /* On mobile, create a horizontal swiping track to save vertical space */
  .ritual-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    margin: 2rem -5% 0 -5%;
    padding: 1rem 5%;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .ritual-grid::-webkit-scrollbar {
    display: none;
  }

  .ritual-card {
    flex: 0 0 75%; /* Cards take up 75% of screen width */
    scroll-snap-align: center;
  }
}

/* =========================================
   INTERACTIVE OVERLAP BANNER (EARTHY THEME)
   ========================================= */

.overlap-section {
  position: relative;
  width: 100%;
  background-color: var(--color-bg-base, #fdfbf6); /* Fallback background */
  padding-bottom: 5rem; /* Space below the overlapping cards */
}

/* --- 1. The Dark Banner --- */
.ob-banner {
  position: relative;
  width: 100%;
  /* Extra tall padding to leave room for the text AND the overlapping cards below */
  padding: 8rem 5% 15rem 5%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  border-radius: var(--radius-sm, 2px);
}

.ob-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.ob-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Dark espresso gradient fading to transparent right */
  background: linear-gradient(
    90deg,
    rgba(26, 18, 16, 0.95) 0%,
    rgba(26, 18, 16, 0.6) 50%,
    transparent 100%
  );
  z-index: 2;
}

.ob-content {
  position: relative;
  z-index: 3;
  max-width: 600px;
  width: 100%;
  margin-left: 5%; /* Pushes text inward slightly */
}

.ob-pretitle {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-accent, #c78d6a);
  display: block;
  margin-bottom: 1.5rem;
}

.ob-title {
  font-family: var(--font-heading, "Cinzel", serif);
  font-size: 4.5rem;
  line-height: 1.1;
  color: var(--color-text-inverse, #fdfbf6);
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.ob-desc {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 1.1rem;
  color: #c2b4ae; /* Soft Taupe */
  line-height: 1.6;
  max-width: 450px;
}

/* --- 2. The Overlapping Cards --- */
.ob-cards-container {
  position: relative;
  z-index: 10;
  width: 90%;
  /* REDUCED FROM 1200px: This shrinks all 3 cards proportionally */
  max-width: 950px;
  margin: 0 auto;
  /* Slightly reduced the pull-up margin so it doesn't cover your text */
  margin-top: -9rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Perspective wrapper for the 3D Tilt effect */
.ob-card {
  display: block;
  text-decoration: none;
  perspective: 1000px;
}

.ob-card-inner {
  background: var(--color-bg-surface, #ffffff);
  /* Reduced padding to match the smaller card size */
  padding: 0.8rem;
  border-radius: var(--radius-sm, 4px);
  box-shadow: 0 15px 35px rgba(26, 18, 16, 0.15);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.1s ease,
    box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

/* Fallback hover if JS is disabled */
.ob-card:hover .ob-card-inner {
  box-shadow: 0 25px 50px rgba(26, 18, 16, 0.25);
}

.ob-card-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-sm, 2px);
  margin-bottom: 0.8rem;
  transform: translateZ(30px);
}

.ob-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.ob-card:hover .ob-card-img {
  transform: scale(1.05);
}

.ob-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0.5rem; /* Tighter padding for the footer */
  transform: translateZ(20px);
}

.ob-card-title {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 0.9rem; /* Slightly smaller text to fit the new size */
  font-weight: 600;
  color: var(--color-text-primary, #2b1d19);
}

.ob-card-link {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-secondary, #7a6962);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.arrow-icon {
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
}

.ob-card:hover .ob-card-link {
  color: var(--color-primary, #873823);
}

.ob-card:hover .arrow-icon {
  transform: translateX(3px) translateY(-3px);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
  .ob-title {
    font-size: 3.5rem;
  }
  .ob-cards-container {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .ob-banner {
    padding: 6rem 5% 10rem 5%;
    justify-content: center;
    text-align: center;
  }

  .ob-overlay {
    /* Change gradient to bottom-up on mobile */
    background: linear-gradient(
      0deg,
      rgba(26, 18, 16, 0.95) 0%,
      rgba(26, 18, 16, 0.4) 100%
    );
  }

  .ob-content {
    margin-left: 0;
  }
  .ob-desc {
    margin: 0 auto;
  }
  .ob-title {
    font-size: 2.8rem;
  }

  .ob-cards-container {
    /* Stack cards horizontally on mobile with native scrolling */
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding-bottom: 2rem;
    margin-top: -6rem; /* Less overlap needed on mobile */
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .ob-cards-container::-webkit-scrollbar {
    display: none;
  }

  .ob-card {
    flex: 0 0 85%; /* Cards take up 85% of mobile screen width */
    scroll-snap-align: center;
  }

  /* Disable 3D tilt on mobile for performance/UX */
  .ob-card-inner {
    transform: none !important;
  }
}

/* =========================================
   PREMIUM ABOUT US SECTION (EARTHY THEME)
   ========================================= */

.about-section {
  position: relative;
  /* background-color: var(--color-bg-base, #FDFBF6); */
  padding: 7rem 0;
  overflow: hidden;
}

.about-container {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 5rem;
}

/* --- Left Side: Visual & Rotating Badge --- */
.about-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image-wrapper {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm, 2px);
  overflow: hidden;
  border: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15));
  box-shadow: 0 20px 40px rgba(43, 29, 25, 0.08);
}

.about-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.about-visual:hover .about-img {
  transform: scale(1.04);
}

/* Floating Rotating Circular Badge */
.about-floating-badge {
  position: absolute;
  bottom: -30px;
  right: 20px;
  width: 110px;
  height: 110px;
  background: var(--color-bg-surface, #ffffff);
  border: 1px solid var(--color-border-strong, rgba(135, 56, 35, 0.3));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(43, 29, 25, 0.1);
  animation: cosmicSpin 20s linear infinite;
  z-index: 5;
}

.badge-text-svg {
  width: 90px;
  height: 90px;
  overflow: visible;
}

.badge-text-svg text {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 11.5px;
  font-weight: 600;
  fill: var(--color-primary, #873823);
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.badge-inner-star {
  position: absolute;
  font-size: 1.2rem;
  color: var(--color-accent, #c78d6a);
}

/* --- Right Side: Content & Typography --- */
.about-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.about-pretitle {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--color-primary, #873823);
  margin-bottom: 1.2rem;
}

.about-title {
  font-family: var(--font-heading, "Cinzel", serif);
  font-size: 2.6rem;
  line-height: 1.25;
  color: var(--color-text-primary, #2b1d19);
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.about-desc {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 1.05rem;
  color: var(--color-text-secondary, #7a6962);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-primary, #2b1d19);
}

.feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-primary, #873823);
  box-shadow: 0 0 8px var(--color-accent-glow, rgba(199, 141, 106, 0.4));
  flex-shrink: 0;
}

.about-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.about-link-text {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-primary, #2b1d19);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.about-link-text::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-primary, #873823);
  transition: width 0.3s ease;
}

.about-link-text:hover {
  color: var(--color-primary, #873823);
}

.about-link-text:hover::after {
  width: 100%;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
  .about-container {
    gap: 3rem;
  }
  .about-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .about-section {
    padding: 5rem 0;
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: 4rem;
    text-align: center;
  }

  .about-content {
    align-items: center;
  }

  .about-features {
    align-items: flex-start;
    text-align: left;
  }

  .about-actions {
    flex-direction: row;
    gap: 1.5rem;
    width: 100%;
  }

  .hero-btn-primary {
    width: 45%;
  }
  
  .hero-btn-secondary {
    width: 45%;
  }
  
  .hero-btn {
      padding: 10px 20px;
  }

  .about-floating-badge {
    bottom: -20px;
    right: 10px;
    width: 90px;
    height: 90px;
  }

  .badge-text-svg {
    width: 74px;
    height: 74px;
  }
}

/* =========================================
   WHY HOUSE OF ADHYATAM (LIGHT BENTO ETHOS)
   ========================================= */

.ethos-light-portal {
  /* background-color: var(--color-bg-base, #FDFBF6); */
  padding: 8rem 0;
  font-family: var(--font-body, 'Jost', sans-serif);
  position: relative;
  overflow: hidden;
}

.ethos-container {
  width: 95%;
  max-width: 1300px;
  margin: 0 auto;
}

/* --- The Bento Grid Layout --- */
.ethos-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  grid-auto-rows: minmax(280px, auto);
}

/* Base Box Styling */
.ethos-box {
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* --- 1. The Intro Block --- */
.ethos-intro {
  grid-column: span 2;
  background: transparent;
  padding: 2rem 3rem;
  justify-content: center;
  border: 1px solid transparent;
}

.ethos-kicker {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--color-accent, #C78D6A);
  margin-bottom: 1.5rem;
  display: block;
}

.ethos-title {
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: 4.5rem;
  line-height: 1.1;
  color: var(--color-text-primary, #2B1D19);
  position: relative;
  z-index: 2;
}

.ethos-accent-svg {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 180px;
  height: 180px;
  animation: cosmicSpin 30s linear infinite;
  opacity: 0.15;
  z-index: 1;
}

/* --- 2. The Pillar Cards --- */
.ethos-card {
  grid-column: span 1;
  background: var(--color-bg-surface, #FFFFFF);
  border: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15));
  padding: 3rem;
  box-shadow: 0 10px 40px rgba(43, 29, 25, 0.03);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  justify-content: flex-end; /* Pushes text to the bottom */
}

.ethos-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(43, 29, 25, 0.08);
  border-color: var(--color-primary, #873823);
}

.watermark-num {
  position: absolute;
  top: -15px;
  right: -5px;
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: 8rem;
  line-height: 1;
  color: rgba(135, 56, 35, 0.04);
  z-index: 1;
  transition: color 0.4s ease;
}

.ethos-card:hover .watermark-num {
  color: rgba(135, 56, 35, 0.08);
}

.ec-content {
  position: relative;
  z-index: 2;
}

.ec-title {
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: 1.4rem;
  color: var(--color-text-primary, #2B1D19);
  margin-bottom: 1rem;
}

.ec-desc {
  font-size: 0.95rem;
  color: var(--color-text-secondary, #7A6962);
  line-height: 1.6;
}

/* --- 3. The Outro/Conclusion Block --- */
.ethos-outro {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--color-primary, #873823) 0%, var(--color-text-primary, #2B1D19) 100%);
  padding: 4rem;
  justify-content: center;
  color: var(--color-text-inverse, #FDFBF6);
  box-shadow: 0 20px 50px rgba(43, 29, 25, 0.15);
}

.outro-content {
  position: relative;
  z-index: 2;
  max-width: 80%;
}

.outro-headline {
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: 2.8rem;
  color: var(--color-accent, #C78D6A);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.outro-subtext {
  font-size: 1.15rem;
  color: rgba(253, 251, 246, 0.9);
  line-height: 1.6;
}

.outro-bg-graphic {
  position: absolute;
  right: -20px;
  bottom: -40px;
  font-size: 15rem;
  color: rgba(253, 251, 246, 0.05);
  line-height: 1;
  z-index: 1;
  pointer-events: none;
}

/* --- Optional Scroll Reveal Classes (if you are using the JS observer from earlier) --- */
.reveal-up { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); }
.reveal-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */

@media (max-width: 1100px) {
  .ethos-bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Re-flow the grid for tablet */
  .ethos-intro { grid-column: span 2; }
  .ethos-card { grid-column: span 1; }
  .ethos-outro { grid-column: span 2; }
}

@media (max-width: 768px) {
  .ethos-light-portal {
    padding: 5rem 0;
  }

  .ethos-bento-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Everything becomes a single column */
  .ethos-intro { grid-column: span 1; padding: 1rem 0 2rem 0; }
  .ethos-card { grid-column: span 1; padding: 2.5rem 2rem; }
  .ethos-outro { grid-column: span 1; padding: 3rem 2rem; }
  
  .ethos-title { font-size: 3rem; }
  .ethos-accent-svg { display: none; } /* Hide SVG on mobile to save space */
  
  .outro-headline { font-size: 2rem; }
  .outro-content { max-width: 100%; }
}

/* --- S6: Epilogue CTA --- */
.about-epilogue {
  position: relative;
  padding: 12rem 0;
  text-align: center;
  /* The Background Image */
  background-image: url("../img/about/banner.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Creates the premium parallax scroll effect */
  overflow: hidden;
}

/* Dark gradient overlay for text readability */
.epilogue-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(43, 29, 25, 0.7),
    rgba(26, 18, 16, 0.95)
  );
  z-index: 1;
}

.epilogue-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

.epilogue-title {
  font-family: var(--font-heading, "Cinzel", serif);
  font-size: 3.5rem;
  color: var(--color-text-inverse, #fdfbf6); /* Changed to light */
  margin-bottom: 1rem;
  line-height: 1.1;
  text-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.epilogue-desc {
  font-size: 1.1rem;
  color: rgba(253, 251, 246, 0.8); /* Changed to light */
  margin-bottom: 3rem;
}

.btn-epilogue {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background: var(--color-primary, #873823);
  color: var(--color-text-inverse, #fdfbf6);
  border: 1px solid var(--color-primary, #873823);
  padding: 1.2rem 3.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.4s ease;
}

.btn-epilogue .arrow {
  transition: transform 0.4s ease;
}

.btn-epilogue:hover {
  background: var(--color-bg-base, #fdfbf6);
  color: var(--color-text-primary, #2b1d19);
  border-color: var(--color-bg-base, #fdfbf6);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.btn-epilogue:hover .arrow {
  transform: translateX(8px);
}
