/* File: custom-elements/cgm-hero/cgm-hero.css */

:root {
  --cgm-charcoal: #2e2e2e;
  --cgm-font-head: "Playfair Display", serif;
  --cgm-font-body: "Open Sans", sans-serif;
}

body[data-header-resize="1"] .container-wrap,
body[data-header-resize="1"] .project-title {
  padding-top: 0px !important;
}

/* --- MAIN WRAPPER --- */
.cgm-hero-wrapper {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 100%;
  min-height: 600px;
  background-color: var(--cgm-bg-color, #e5eee8);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  padding-top: 100px;
  padding-bottom: 120px;
}

/* --- THE MIST TRANSITION --- */
.cgm-hero-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 250px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    #ffffff 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* --- PARALLAX WRAPPERS --- */
.cgm-blob-wrap {
  position: absolute;
  z-index: 1;
  will-change: transform;
}
.wrap-1 {
  top: -10%;
  left: -10%;
}
.wrap-2 {
  bottom: -10%;
  right: -5%;
}
.wrap-3 {
  top: 40%;
  left: 30%;
}

/* --- BLOBS --- */
.cgm-blob {
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.9;
}

.cgm-blob-1 {
  width: 45vw;
  height: 45vw;
  background-color: var(--cgm-blob-1, #e68492);
  animation: cgm-breathe 9s infinite ease-in-out alternate;
}

.cgm-blob-2 {
  width: 38vw;
  height: 38vw;
  background-color: var(--cgm-blob-2, #ffad4d);
  animation: cgm-breathe 7s infinite ease-in-out alternate;
}

.cgm-blob-3 {
  width: 32vw;
  height: 32vw;
  background-color: var(--cgm-blob-3, #ffffff);
  opacity: 0.6;
  animation: cgm-breathe 8s infinite ease-in-out alternate;
}

@keyframes cgm-breathe {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.25);
  }
}

/* --- CONTENT CARD --- */
.cgm-content-card {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 3rem 4rem;
  border-radius: 30px;
  max-width: 1900px;
  width: 92%;
  box-shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.1);
  transition: all 0.3s ease;
}

/* --- LAYOUTS --- */
.cgm-layout-center {
  text-align: center;
}

.cgm-layout-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 40px; /* Reduced gap slightly since image "whitespace" adds to it */
}

.cgm-col-text {
  flex: 1;
}

/* UPDATED: Align the image column to the RIGHT */
.cgm-col-img {
  flex: 1;
  display: flex;
  justify-content: flex-end !important; /* Force image to right side */
  align-items: center;
}

.cgm-col-img img {
  width: 75% !important;
}

/* --- UPDATED IMAGE --- */
.cgm-hero-img {
  width: 85% !important; /* Slightly larger to balance the text weight */
  margin: 0 0 0 auto !important; /* "0 auto" on left pushes it to the right */
  display: block !important;

  max-width: 650px;
  height: auto;
  border-radius: 20px;
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

/* --- MOBILE FIX --- */
/* We need to reset this logic for mobile so it centers again */
@media (max-width: 900px) {
  .cgm-col-img {
    justify-content: center !important;
  }
  .cgm-hero-img {
    width: 90% !important;
    margin: 20px auto 0 auto !important; /* Center on mobile */
  }
}

/* Optional: Ensure the parent column forces centering too */
.cgm-col-img {
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
}

/* --- TYPOGRAPHY --- */
.cgm-eyebrow {
  font-family: var(--cgm-font-body);
  font-weight: 600;
  margin-bottom: 1rem;
  display: block;
  color: var(--cgm-charcoal);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.cgm-title {
  font-family: var(--cgm-font-head);
  color: var(--cgm-charcoal);
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-transform: none !important;
}

.cgm-subtitle {
  font-family: var(--cgm-font-body);
  color: var(--cgm-charcoal);
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  font-weight: 400;
  text-transform: none !important;
  letter-spacing: normal !important;
  max-width: 600px;
}

/* --- BUTTONS --- */
.cgm-btn-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.cgm-btns-center {
  justify-content: center;
}
.cgm-btns-left {
  justify-content: flex-start;
}
.cgm-btns-right {
  justify-content: flex-end;
}

.cgm-btn {
  display: inline-block;
  padding: 15px 40px;
  border-radius: 50px;
  font-family: var(--cgm-font-body);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Primary (Solid) */
.cgm-btn-primary {
  background-color: var(--cgm-charcoal);
  color: #fff !important;
  border: 2px solid var(--cgm-charcoal);
}
.cgm-btn-primary:hover {
  background-color: transparent;
  color: var(--cgm-charcoal) !important;
  transform: translateY(-3px);
}

/* Secondary (Outline) */
.cgm-btn-secondary {
  background-color: transparent;
  color: var(--cgm-charcoal) !important;
  border: 2px solid currentColor;
}
.cgm-btn-secondary:hover {
  background-color: #6271a3 !important;
  color: #ffffff !important;
  border: 2px solid #6271a3;
  transform: translateY(-3px);
}

/* --- MOBILE --- */
@media (max-width: 900px) {
  .cgm-hero-wrapper {
    height: auto !important;
    min-height: auto !important;
    padding-top: 120px;
    padding-bottom: 60px;
    display: block;
  }

  /* FIX: Center card */
  .cgm-content-card {
    margin: 0 auto !important;
  }

  .cgm-hero-wrapper::after {
    height: 150px;
  }

  .cgm-layout-split {
    flex-direction: column;
    text-align: center !important;
    /* FIX: Standard 25px padding */
    padding: 2rem 25px;
    gap: 40px;
  }

  .cgm-title {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }
  .cgm-subtitle {
    text-align: center !important;
    margin: 0 auto 30px auto;
  }
  .cgm-eyebrow {
    text-align: center !important;
  }

  /* UPDATED MOBILE IMAGE */
  .cgm-hero-img {
    margin-top: 20px;
    width: 80%; /* Keep 80% consistency on mobile */
    max-width: 100%;
  }

  .cgm-btn-group {
    justify-content: center;
  }
}
