/* 
 * Studies Learning Premium - Devenir Formateur 
 * Isolated styles with .studies-p-df- prefix
 */

:root {
  --sp-df-primary: #0047ff;
  --sp-df-primary-container: #1e3a8a;
  --sp-df-secondary: #00d4aa;
  --sp-df-surface: #f0f4ff;
  --sp-df-on-surface: #0f172a;
  --sp-df-on-surface-variant: #64748b;
  --sp-df-accent: #0084ff; /* Adjusted to match the "Teach a course" blue */
  --sp-df-accent-light: #33a1ff;
  --sp-df-glass-bg: rgba(255, 255, 255, 0.7);
  --sp-df-glass-border: rgba(255, 255, 255, 0.4);
}

.page-template-page-devenir-formateur {
  background-image: none !important;
  background: #ffffff !important;
}

/* Global Spacing Reductions */
.studies-p-df-hero,
.studies-p-df-features-section,
.studies-p-df-instructors,
.studies-p-df-how-it-works,
.studies-p-df-faq,
.studies-p-df-cta {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

/* 1. Hero Section "Premium Card Mode" */
.studies-p-df-hero {
  background: transparent;
  padding: 120px 2rem 1rem !important; /* Adjusted for top nav */
}

.studies-p-df-hero-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 55%, #0047ff 100%);
  border-radius: 2.5rem;
  padding: 3rem;
  position: relative;
  max-width: 1200px;
  max-height: 400px;
  min-height: 300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  box-shadow: 0 25px 60px rgba(0, 71, 255, 0.2);
  overflow: hidden;
}

.studies-p-df-hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 850px;
}

.studies-p-df-hero-title {
  font-family: "Plus Jakarta Sans", "Outfit", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem); /* Substantially reduced */
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #fff;
  letter-spacing: -0.01em;
}

.studies-p-df-hero-title span {
  color: #00d4aa;
}

.studies-p-df-hero-subtitle {
  font-size: 0.95rem; /* Substantially reduced */
  color: rgba(255, 255, 255, 0.85);
  max-width: 550px;
  line-height: 1.5;
  margin: 0 auto 1.5rem;
}

/* Compact Hero Button */
.hero-banner-cta {
  margin-top: 1.5rem !important;
}

.studies-p-df-hero .studies-p-df-cta-btn {
  padding: 0.8rem 2rem;
  font-size: 1rem;
  border-radius: 10px;
}

/* 2. Features Section (Compact Bento) */
.studies-p-df-features-section {
  padding: 2rem 2rem 4rem !important;
}

.studies-p-df-features-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  max-height: 450px; /* Constraint */
  margin: 0 auto;
}

.studies-p-df-feature-card {
  background: #ffffff;
  border-radius: 2rem;
  padding: 2.5rem;
  text-align: left;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Bento Block 1: The Tall Image Block */
.studies-p-df-feature-card:nth-child(1) {
  grid-row: span 2;
  background: linear-gradient(145deg, #1e3a8a, #0047ff);
  color: white;
  padding: 0; /* Let image fill */
  position: relative;
}

.studies-p-df-feature-image {
  height: 55%; /* Top part is image */
  overflow: hidden;
}

.studies-p-df-feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.studies-p-df-feature-card:nth-child(1) .studies-p-df-feature-content {
  padding: 2rem 2.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.studies-p-df-feature-card:nth-child(1) .studies-p-df-feature-icon {
  font-size: 2.22rem;
  color: #00d4aa;
  margin-bottom: 1rem;
}

.studies-p-df-feature-card:nth-child(1) h3 {
  color: #fff;
  font-size: 1.6rem;
}

.studies-p-df-feature-card:nth-child(1) p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

/* Icon styles box-2/3 */
.studies-p-df-feature-icon {
  font-size: 2.5rem;
  color: var(--sp-df-primary);
  margin-bottom: 1rem;
  display: inline-block;
}

.studies-p-df-section-header h2 {
  font-size: 2.2rem; /* Reduced globally */
  font-weight: 800;
  color: var(--sp-df-on-surface);
  margin-bottom: 0.5rem;
}

.studies-p-df-section-header p {
  font-size: 0.95rem;
  color: var(--sp-df-on-surface-variant);
}

/* 3. Instructors Section Compact (Max 350px) */
.studies-p-df-instructors {
  padding: 1.5rem 2rem !important; /* Extremely tight padding */
  max-width: 1200px;
  margin: 0 auto;
  max-height: 395px; /* STRICT LIMIT */
  overflow: visible; /* To allow arrows if needed, but we keep them inside */
}

.studies-p-df-section-header {
  text-align: left; /* Aligned left like the screenshot */
  margin-bottom: 1.2rem;
}

.studies-p-df-section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--sp-df-primary); /* Blue title like the screenshot */
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.studies-p-df-section-header p {
  font-size: 0.95rem;
  color: var(--sp-df-on-surface-variant);
  margin-bottom: 0;
}

/* Carousel Layout */
.studies-p-df-instructors-carousel-wrapper {
  position: relative;
  width: 100%;
}

.studies-p-df-instructors-swiper {
  width: 100%;
  padding: 0.5rem 0;
  /* Card height constraint */
  height: 220px;
}

.studies-p-df-instructor-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.studies-p-df-instructor-image {
  flex-grow: 1;
  height: 65%; /* Image takes most of the card */
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
}

.studies-p-df-instructor-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studies-p-df-instructor-info {
  height: 35%;
  padding: 0.8rem 1rem;
  text-align: left;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.studies-p-df-instructor-info h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--sp-df-primary); /* Blue name */
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studies-p-df-instructor-info p {
  color: var(--sp-df-on-surface-variant);
  font-size: 0.8rem;
  margin-bottom: 0;
}

/* Discrete Navigation */
.studies-p-df-swiper-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #0f172a;
  transition: all 0.2s;
}

.studies-p-df-swiper-nav:hover {
  background: var(--sp-df-primary);
  color: #fff;
}

.studies-p-df-swiper-nav.prev {
  left: -16px;
}
.studies-p-df-swiper-nav.next {
  right: -16px;
}
.swiper-button-disabled {
  opacity: 0.3 !important;
  cursor: auto !important;
  pointer-events: none;
}

/* 4. How It Works - Premium Grid */
.studies-p-df-how-it-works {
  padding: 3rem 2rem !important;
  background: #fff;
}

.studies-p-df-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

.studies-p-df-step-card {
  background: var(--sp-df-surface);
  padding: 1.5rem;
  border-radius: 2rem;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.studies-p-df-step-card:hover {
  background: #fff;
  border-color: var(--sp-df-primary);
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 71, 255, 0.08);
}

.studies-p-df-step-number {
  position: absolute;
  top: 1.5rem;
  left: 2rem;
  font-size: 4rem;
  font-weight: 900;
  color: var(--sp-df-primary);
  opacity: 0.08;
  line-height: 1;
}

.studies-p-df-step-icon {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.8rem;
  color: var(--sp-df-primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.studies-p-df-step-card:hover .studies-p-df-step-icon {
  background: var(--sp-df-primary);
  color: #fff;
  transform: rotate(10deg);
}

.studies-p-df-step-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  color: var(--sp-df-on-surface);
}

.studies-p-df-step-card p {
  font-size: 0.9rem;
  color: var(--sp-df-on-surface-variant);
  line-height: 1.5;
}

/* 5. FAQ Section Refined */
.studies-p-df-faq {
  padding: 3rem 2rem !important;
}

.studies-p-df-faq-list {
  max-width: 800px;
  margin: 2rem auto 0;
}

.studies-p-df-faq-item {
  background: white;
  border-radius: 1.2rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(0, 71, 255, 0.06);
  overflow: hidden;
  transition: all 0.3s ease;
}

.studies-p-df-faq-question {
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 800;
  color: var(--sp-df-on-surface);
  font-size: 1rem;
}

.studies-p-df-faq-answer {
  padding: 0 2rem 1.5rem;
  display: none;
  color: var(--sp-df-on-surface-variant);
  line-height: 1.6;
  font-size: 0.95rem;
}

.studies-p-df-faq-item.is-active .studies-p-df-faq-answer {
  display: block;
}

/* 6. CTA Section Premium Card */
.studies-p-df-cta {
  padding: 2rem 2rem 6rem;
}

.studies-p-df-cta-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
  border-radius: 3rem;
  padding: 4rem 3rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 71, 255, 0.25);
}

.studies-p-df-cta-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 70% 30%,
    rgba(0, 212, 170, 0.15) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.studies-p-df-cta-card h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.studies-p-df-cta-card p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.studies-p-df-button-group {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.studies-p-df-cta-btn {
  background: var(--sp-df-accent);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 25px rgba(0, 132, 255, 0.3);
  display: inline-block;
}

.studies-p-df-cta-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 20px 45px rgba(255, 69, 0, 0.5);
  color: #fff;
}

.studies-p-df-cta-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.studies-p-df-cta-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Floating Spheres within sections */
.studies-p-df-features-section .floating-sphere {
  z-index: -1;
  opacity: 0.5;
}

/* Mobile Responsive Refinements */
@media (max-width: 1200px) {
  .studies-p-df-hero-banner {
    margin: 120px 2rem 2rem;
  }
  .studies-p-df-instructors,
  .studies-p-df-how-it-works,
  .studies-p-df-faq,
  .studies-p-df-cta {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (max-width: 992px) {
  .studies-p-df-hero-banner {
    flex-direction: column;
    text-align: center;
    padding: 4rem 3rem;
  }
  .studies-p-df-hero-robot {
    width: 350px;
  }
  .studies-p-df-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .studies-p-df-steps-grid {
    grid-template-columns: 1fr;
  }
  .studies-p-df-cta-card {
    padding: 5rem 2rem;
  }
  .studies-p-df-button-group {
    flex-direction: column;
    gap: 1rem;
  }
}
