/* FDM Video Embed - Local shortcode styles */

/* ==========================================================================
   Grid layout (thumbnail cards)
   ========================================================================== */

.fdm-ve-grid {
  display: grid;
  gap: 24px;
  background: transparent;
}

.fdm-ve-cols-1 { grid-template-columns: 1fr; }
.fdm-ve-cols-2 { grid-template-columns: repeat(2, 1fr); }
.fdm-ve-cols-3 { grid-template-columns: repeat(3, 1fr); }
.fdm-ve-cols-4 { grid-template-columns: repeat(4, 1fr); }

.fdm-ve-card {
  overflow: hidden;
}

.fdm-ve-thumb-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

.fdm-ve-thumb-wrap a {
  display: block;
  width: 100%;
  height: 100%;
}

img.fdm-ve-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.fdm-ve-card:hover img.fdm-ve-thumb {
  transform: scale(1.05);
}

.fdm-ve-play {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 64px !important;
  height: 64px !important;
  pointer-events: none;
  transition: transform 0.3s ease;
  border-radius: 0 !important;
}

.fdm-ve-card:hover .fdm-ve-play {
  transform: translate(-50%, -50%) scale(1.15) !important;
}

.fdm-ve-info {
  padding: 16px 0 0;
}

.fdm-ve-title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: inherit;
  line-height: 1.3;
}

.fdm-ve-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

/* Grid responsive */
@media (max-width: 900px) {
  .fdm-ve-cols-3,
  .fdm-ve-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .fdm-ve-cols-2,
  .fdm-ve-cols-3,
  .fdm-ve-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Hero layout - shared by shortcode (fdm-ve-hero) and pasted single divs (fdm-hero)
   Matches Divi section styling on solving.org
   ========================================================================== */

.fdm-ve-hero,
.fdm-hero {
  position: relative;
  width: 100%;
  min-height: 550px;
  overflow: hidden;
}

.fdm-ve-hero *,
.fdm-ve-hero *::before,
.fdm-ve-hero *::after,
.fdm-hero *,
.fdm-hero *::before,
.fdm-hero *::after {
  box-sizing: border-box;
}

/* Shortcode hero breaks out of container; pasted div is already full-width */
.fdm-ve-hero {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.fdm-ve-hero-bg,
.fdm-hero-bg {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
}

.fdm-ve-hero-overlay,
.fdm-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(249deg, rgba(10, 0, 0, 0.65) 0%, rgba(255, 255, 255, 0) 100%);
}

.fdm-ve-hero-inner,
.fdm-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 90%;
  max-width: 1080px;
  margin: 0 auto;
  min-height: 550px;
  padding: 60px 0;
}

.fdm-ve-hero-spacer,
.fdm-hero-spacer {
  flex: 1 1 50%;
}

.fdm-ve-hero-content,
.fdm-hero-content {
  flex: 1 1 50%;
  border-left: 3px solid #a38c5f;
  padding-left: 40px;
}

.fdm-ve-hero-title,
.fdm-hero-title {
  font-family: 'Raleway', Helvetica, Arial, Lucida, sans-serif !important;
  font-size: clamp(2.2rem, 4vw, 3.5rem) !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  line-height: 1.15 !important;
  margin: 0 0 24px 0 !important;
  padding: 0 !important;
  text-transform: none;
  letter-spacing: -0.01em;
}

.fdm-ve-hero-desc,
.fdm-hero-desc {
  font-family: 'Raleway', Helvetica, Arial, Lucida, sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.85) !important;
  line-height: 1.7em !important;
  margin: 0 0 32px 0 !important;
  padding: 0 !important;
  max-width: 520px;
}

.fdm-ve-hero-desc strong,
.fdm-hero-desc strong {
  font-weight: 700;
  color: #ffffff;
}

.fdm-ve-hero-btn,
.fdm-hero-btn {
  display: inline-block !important;
  padding: 18px 56px !important;
  background-color: #a38c5f !important;
  color: #ffffff !important;
  font-family: 'Raleway', Helvetica, Arial, Lucida, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border: 0 !important;
  border-radius: 100px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1.7em !important;
  letter-spacing: 0;
}

.fdm-ve-hero-btn:hover,
.fdm-hero-btn:hover {
  background-color: #8a7750 !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

.fdm-ve-hero-coming-soon {
  cursor: default;
  opacity: 0.85;
}

.fdm-ve-hero-coming-soon:hover {
  background-color: #a38c5f !important;
}

/* Alternate hero orientation — content on the left, image on the right */
.fdm-ve-hero-alt .fdm-ve-hero-inner,
.fdm-hero-alt .fdm-hero-inner {
  flex-direction: row-reverse;
}

.fdm-ve-hero-alt .fdm-ve-hero-content,
.fdm-hero-alt .fdm-hero-content {
  border-left: 0;
  border-right: 3px solid #a38c5f;
  padding-left: 0;
  padding-right: 40px;
}

/* Hero responsive */
@media (max-width: 980px) {
  .fdm-ve-hero,
  .fdm-hero {
    min-height: 400px;
  }

  .fdm-ve-hero-inner,
  .fdm-hero-inner {
    min-height: 400px;
    flex-direction: column;
    justify-content: center;
    padding: 48px 0;
  }

  .fdm-ve-hero-spacer,
  .fdm-hero-spacer {
    display: none;
  }

  .fdm-ve-hero-content,
  .fdm-hero-content {
    flex: 1 1 auto;
    max-width: 100%;
  }

  /* Reset alt border/padding to left in stacked layout */
  .fdm-ve-hero-alt .fdm-ve-hero-content,
  .fdm-hero-alt .fdm-hero-content {
    border-right: 0;
    padding-right: 0;
    border-left: 3px solid #a38c5f;
    padding-left: 40px;
  }

  .fdm-ve-hero-title,
  .fdm-hero-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem) !important;
  }
}

@media (max-width: 540px) {
  .fdm-ve-hero,
  .fdm-hero {
    min-height: 350px;
  }

  .fdm-ve-hero-inner,
  .fdm-hero-inner {
    min-height: 350px;
    width: 92%;
    padding: 36px 0;
  }

  .fdm-ve-hero-content,
  .fdm-hero-content {
    padding-left: 24px;
  }

  .fdm-ve-hero-alt .fdm-ve-hero-content,
  .fdm-hero-alt .fdm-hero-content {
    padding-left: 24px;
  }

  .fdm-ve-hero-btn,
  .fdm-hero-btn {
    padding: 14px 40px !important;
    font-size: 14px !important;
  }
}

/* ==========================================================================
   FDM Slider — fully self-contained (no Divi JS/CSS dependency)
   ========================================================================== */

.fdm-slider {
  position: relative;
  overflow: hidden;
}

.fdm-slider *,
.fdm-slider *::before,
.fdm-slider *::after {
  box-sizing: border-box;
}

.fdm-slides {
  position: relative;
}

.fdm-slide {
  background-color: #000000;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 80vh;
  display: flex;
  align-items: flex-end;
  padding: 60px 0 80px;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  z-index: 1;
}

.fdm-slide.fdm-slide-active {
  opacity: 1;
  visibility: visible;
  position: relative;
  z-index: 2;
}

.fdm-slide-inner {
  width: 90%;
  max-width: 1080px;
  margin: 0 auto 0 5%;
  padding-left: 75px;
}

.fdm-slide-desc {
  text-align: left;
  max-width: 65%;
}

.fdm-slide-badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-family: 'Raleway', Helvetica, Arial, Lucida, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.fdm-slide-title {
  font-family: 'PT Serif', Georgia, 'Times New Roman', serif !important;
  font-weight: 300 !important;
  font-size: 72px !important;
  line-height: 1.2 !important;
  color: #ffffff !important;
  text-align: left !important;
  margin: 0 0 20px 0 !important;
  padding: 0 !important;
}

.fdm-slide-title a {
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 300 !important;
  font-family: 'PT Serif', Georgia, 'Times New Roman', serif !important;
}

.fdm-slide-separator {
  width: 60px;
  height: 3px;
  background: #ffffff;
  margin: 0 0 40px 0;
}

.fdm-slide-content {
  font-family: 'Raleway', Helvetica, Arial, Lucida, sans-serif !important;
  text-align: left !important;
  font-size: 25px !important;
  line-height: 1.8em !important;
  color: #ffffff !important;
}

.fdm-slide-content p {
  font-size: 25px !important;
  line-height: 1.8em !important;
  margin: 0 0 32px 0;
}

.fdm-slide-btn-wrap {
  text-align: left;
}

.fdm-slide-btn {
  display: inline-block !important;
  padding: 18px 56px !important;
  background-color: #a38c5f !important;
  color: #ffffff !important;
  font-family: 'Raleway', Helvetica, Arial, Lucida, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border: 0 !important;
  border-radius: 100px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1.7em !important;
}

.fdm-slide-btn:hover {
  background-color: #8a7750 !important;
  color: #ffffff !important;
}

.fdm-slide-coming-soon {
  cursor: default;
  opacity: 0.85;
  pointer-events: none;
}

/* Arrows */
.fdm-slider-prev,
.fdm-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #ffffff;
  text-decoration: none !important;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  font-weight: 300;
}

.fdm-slider-prev:hover,
.fdm-slider-next:hover {
  opacity: 1;
  color: #ffffff;
}

.fdm-slider-prev {
  left: 20px;
}

.fdm-slider-next {
  right: 20px;
}

/* Dot controllers */
.fdm-slider-dots {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  z-index: 10;
  text-align: center;
}

.fdm-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s ease;
  text-decoration: none !important;
}

.fdm-dot.fdm-dot-active {
  background: #ffffff;
}

/* Responsive */
@media (max-width: 980px) {
  .fdm-slide-desc {
    max-width: 80%;
  }

  .fdm-slide-title {
    font-size: 46px !important;
  }

  .fdm-slide-content,
  .fdm-slide-content p {
    font-size: 20px !important;
  }
}

@media (max-width: 540px) {
  .fdm-slide {
    min-height: 70vh;
    padding: 40px 0 70px;
  }

  .fdm-slide-desc {
    max-width: 100%;
  }

  .fdm-slide-title {
    font-size: 36px !important;
  }

  .fdm-slide-content,
  .fdm-slide-content p {
    font-size: 18px !important;
  }

  .fdm-slide-btn {
    padding: 14px 40px !important;
    font-size: 14px !important;
  }
}
