/* File: custom-elements/cgm-pathway-cards/cgm-pathway-cards.css */

.cgm-pathways-section {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 100px 0;
  position: relative;
  overflow: hidden; /* Safety clip */
  z-index: 1;

  /* --- THE FIX: Direct Background Gradient --- */
  /* Center: Rich Purple (#6271A3) -> Edge: White (#ffffff) */
  background: radial-gradient(
    ellipse 76% 43% at 50% 50%,
    rgba(98, 113, 163, 0.8) 0%,
    /* Center: Stronger Purple */ rgba(98, 113, 163, 0.2) 60%,
    /* Mid: Soft Fade */ #ffffff 80% /* Edge: Pure White */
  );
}

/* --- HEADER --- */
.cgm-pathways-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.cgm-path-eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffad4d;
  display: block;
  margin-bottom: 15px;
}

.cgm-path-title {
  font-family: "Playfair Display", serif;
  font-size: 2.5rem;
  color: #2e2e2e;
  margin-bottom: 20px;
  line-height: 1.2;
  margin-top: 0;
}

.cgm-path-desc {
  font-family: "Open Sans", sans-serif;
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
}

/* --- THE FAN WRAPPER --- */
.cgm-card-fan-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 80px 0;
  position: relative;
  z-index: 2;
}

.cgm-card-fan {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 580px; /* Increased from 500px to fit taller cards */
  width: 100%;
  max-width: 1100px; /* Increased from 1000px to fit wider cards */
}

/* --- THE TAROT CARD --- */
.cgm-tarot-card {
  position: relative;
  width: 340px; 
  height: 510px; 
  
  /* THE FIX: Zoom the image in by 4% to hide the white edges */
  background-size: 104% 104%; 
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--cgm-card-bg, #ffffff);

  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: bottom center;
  overflow: hidden;
  margin: 0 -20px;
}

.cgm-tarot-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 1;
  transition: all 0.3s ease;
}

/* Fan Rotation Logic */
.cgm-tarot-card:nth-child(1) {
  transform: rotate(-6deg) translateY(30px);
  z-index: 1;
}
.cgm-tarot-card:nth-child(2) {
  transform: rotate(0deg) translateY(0px) scale(1.05);
  z-index: 2;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
.cgm-tarot-card:nth-child(3) {
  transform: rotate(6deg) translateY(30px);
  z-index: 1;
}

/* Hover Effect */
.cgm-tarot-card:hover {
  transform: rotate(0deg) translateY(-30px) scale(1.1) !important;
  z-index: 10 !important;
  box-shadow: 0 30px 60px rgba(255, 173, 77, 0.5);
  border-color: #ffad4d;
}
.cgm-tarot-card:hover .cgm-tarot-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

/* --- CARD CONTENT --- */
.cgm-tarot-inner {
  position: relative;
  z-index: 2;
  padding: 40px 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
  box-sizing: border-box;
}

.cgm-card-title {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 15px;
  line-height: 1.2;
  margin-top: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cgm-card-text {
  font-family: "Open Sans", sans-serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 20px;
}

.cgm-read-more {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffad4d;
  text-transform: uppercase;
  margin-top: 0px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.cgm-tarot-card:hover .cgm-read-more {
  opacity: 1;
  transform: translateY(0);
}

/* --- MAIN CTA --- */
.cgm-path-cta {
  text-align: center;
  margin-top: 40px;
  position: relative;
  z-index: 2;
}

.cgm-pre-cta-text {
  font-family: "Open Sans", sans-serif;
  font-size: 1.1rem;
  color: #555;
  margin-top: 0;
  margin-bottom: 20px; /* Gives nice breathing room before the button */
}

.cgm-main-btn {
  display: inline-block;
  padding: 15px 40px;
  background: #2e2e2e;
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}
.cgm-main-btn:hover {
  background: var(--btn-h-bg, #ffad4d) !important;
  color: var(--btn-h-text, #2e2e2e) !important;
  transform: translateY(-3px);
}

/* --- MOBILE --- */
@media (max-width: 900px) {
  .cgm-pathways-section {
    padding: 60px 0;
    /* Adjust gradient for mobile */
    background: radial-gradient(
      circle at 50% 50%,
      rgba(98, 113, 163, 0.6) 0%,
      #ffffff 80%
    );
  }

  .cgm-card-fan-wrapper {
    padding: 40px 20px 80px 20px;
  }

  .cgm-card-fan {
    flex-direction: column;
    height: auto;
    align-items: center;
  }

  .cgm-tarot-card {
    width: 100%;
    max-width: 350px;
    height: 450px;
    margin: 0 0 20px 0;
    transform: none !important;
  }

  .cgm-read-more {
    opacity: 1;
    transform: none;
  }
}