/* * ==========================================
 * 1. DYNAMIC TEXT & SCROLL ANIMATIONS
 * ==========================================
 */
.dynamic-text {
  white-space: nowrap;
  display: inline-block;
  margin-left: 5px;
  vertical-align: bottom;
}

.dynamic-text::after {
  content: '';
  border-right: 2px solid #e06c75;
  padding-right: 5px; 
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  0%, 49% { border-color: #e06c75; }
  50%, 100% { border-color: transparent; }
}

@media (max-width: 767.98px) {
  .dynamic-text {
    white-space: normal; 
    display: inline;
  }

  h1.scroll-text {
    min-height: 10rem; 
    display: flex;
    align-items: center;
    justify-content: center;
  }

  h1.scroll-text .dynamic-text {
    display: inline-block;
    width: 100%; 
  }
}

/* * ==========================================
 * 2. FEATURE & PROCESS SECTIONS
 * ==========================================
 */

.feature-item {
  background: #fdfdfd;
  border: 1px solid #eee;
  border-radius: 8px;
  height: 100%;
  transition: all 0.3s ease-in-out;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.feature-item i {
  /* CHANGED: Set a specific color here instead of relying on text-success in HTML */
  color: var(--primary-color); /* Example: Bootstrap Primary Blue. Replace with your preferred hex code */
  /* REMOVED: opacity: 0.7; */
  /* REMOVED: transition: opacity 0.3s ease-in-out; */
  font-size: 2.5rem; /* Ensure consistent size if removing display-4 class */
  margin-bottom: 1rem;
  display: inline-block;
}

.process-section .process-item {
  position: relative;
  background: #fdfdfd;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  height: 100%;
}

.process-section .process-item .step-number {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-color);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #fff;
}

.process-section .process-item i {
  color: var(--accent-color);
}

@media (min-width: 992px) {
  .process-section .process-item {
    position: relative;
  }
  .process-section .col-lg-4:not(:last-child) .process-item::after {
    content: "\f061";
    font-family: "bootstrap-icons";
    position: absolute;
    top: 50%;
    right: -25px;
    transform: translateY(-50%);
    font-size: 24px;
    color: #ddd;
    z-index: 1;
  }
}

@media (max-width: 991.98px) {
  .process-section .process-item {
    margin-bottom: 20px;
  }
}

/* * ==========================================
 * 3. STIPEND TRACKER BUTTON (Shimmer Effect)
 * ==========================================
 */
.stipend-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #6A11CB, #2575FC);
  color: #fff !important;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-out;
  display: inline-flex; /* Ensures content centers correctly */
  align-items: center;
  justify-content: center;
}

.stipend-btn:active {
  transform: scale(0.98);
}

.stipend-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 20px;
  height: 200%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  animation: shimmer-slide 3s infinite;
  animation-delay: 1s;
}

@keyframes shimmer-slide {
  0% { left: -50%; }
  100% { left: 120%; }
}

/* * ==========================================
 * 4. HERO SECTION BACKGROUND & DATA TOOLS
 * ==========================================
 */
.hero {
  background: url("../img/hero-bg.png") right center no-repeat, linear-gradient(to right, #f7f7f7, #ffffff);
  background-size: auto, cover;
  padding-top: 60px;
  padding-bottom: 60px; 
  min-height: 500px; 
  display: flex; 
  align-items: center; 
}

.hero .hero-content-container {
  position: static;
  z-index: auto;
}

.data-tools-row-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 20px 30px;
}

.data-tools-row-content .icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #eef7f3;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.data-tools-row-content h4 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.data-tools-row-content p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 0;
}

.data-tools-row-img {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.data-tools-row-img img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

@media (min-width: 992px) {
  .data-tools-row-content {
    align-items: flex-start;
    text-align: left;
  }
}

/* * ==========================================
 * 5. NEW HERO TYPOGRAPHY & LAYOUT
 * ==========================================
 */
.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.3;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

.hero-title .h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 10px;
  display: block;
}

.highlight-text {
  color: #198754; /* RankerCentral Green */
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #555;
  line-height: 1.6;
  max-width: 95%;
}

/* --- Hero Visual Wrapper (Gradient Box) --- */
.hero-visual-wrapper {
  background: linear-gradient(140deg, #E0B3FF 0%, #FFC5A0 100%);
  padding: 2rem;
  border-radius: 24px;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.hero-visual-wrapper:hover {
  transform: translateY(-5px);
}

/* --- Dashboard Screenshot Styling --- */
.dashboard-img {
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

/* --- Zoom Overlay --- */
.hero-visual-wrapper a {
  position: relative;
  display: block;
}

.zoom-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.3);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.hero-visual-wrapper a:hover .zoom-overlay {
  opacity: 1;
}

/* --- Dark Buttons (NEET UG/PG) --- */
.btn-dark-custom {
  background-color: #1a1a1a;
  color: #fff;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  border: 2px solid #1a1a1a;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-dark-custom:hover {
  background-color: #333;
  border-color: #333;
  color: #fff;
  transform: translateY(-2px);
}

/* * ==========================================
 * 6. STATS SECTION (Trust Bar)
 * ==========================================
 */
#stats {
  padding-top: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid #f0f0f0;
}

/* * ==========================================
 * 7. OFFER BADGE STYLING
 * ==========================================
 */
.offer-badge {
  text-decoration: none;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  padding: 6px 12px 6px 6px;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  max-width: fit-content;
}

.offer-badge .badge {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding-top: 6px;
}

.offer-badge .small-text {
  font-size: 0.9rem;
  color: #555;
}

.offer-badge:hover {
  background-color: #fcfcfc;
  border-color: #d1d1d1;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.offer-badge:hover .bi-arrow-right {
  transform: translateX(3px);
  transition: transform 0.2s ease;
}

/* * ==========================================
 * 8. MOBILE RESPONSIVENESS (Refined)
 * ==========================================
 */
@media (max-width: 991px) {
  .hero-title {
    font-size: 2.5rem;
    margin-top: 1rem;
  }
  .hero-title .h2 { font-size: 1.5rem; }
  .hero-visual-wrapper {
    margin-top: 2rem;
    padding: 0.75rem;
  }
  .offer-badge {
    margin: 0 auto 1rem auto;
  }
}

@media (max-width: 767px) {
  /* 1. Fix the Offer Badge Wrapping */
  .offer-badge {
    display: inline-flex !important;
    align-items: center; 
    flex-wrap: nowrap;
    width: auto;
    max-width: 95%;
    margin: 0 auto 1.5rem auto;
    padding: 6px 10px;
    text-align: left;
  }

  /* Prevent the Red Badge from shrinking */
  .offer-badge .badge {
    flex-shrink: 0; 
    margin-right: 8px !important;
  }

  /* Adjust text size so it fits on one line mostly */
  .offer-badge .small-text {
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 2. Scale Down the Title */
  .hero-title {
    font-size: 2.3rem;
    line-height: 1.2 !important;
    padding: 0 10px;
  }

  .hero-title .h2 {
    font-size: 1.2rem;
    margin-top: 8px;
    display: block;
  }
  
  /* 3. Button tweaks */
  .hero-content-container .d-flex.gap-3 {
    gap: 0.5rem !important; 
    flex-direction: column; /* Stack buttons vertically on mobile */
    width: 100%;
  }

  .btn-dark-custom, 
  .stipend-btn {
    width: 100%; /* Full width buttons are easier to tap */
    margin-bottom: 0.5rem;
  }
  
  .hero-subtitle {
     margin-bottom: 1.5rem !important;
  }
}

/* Extra tweak for VERY small phones */
@media (max-width: 370px) {
  .offer-badge .small-text {
    white-space: normal;
    font-size: 0.75rem;
  }
}

/* --- Data Tool Visual Wrapper (Clean version) --- */
.tool-visual-wrapper {
  background: transparent; /* Removed gradient */
  padding: 0;              /* Removed padding/border thickness */
  border-radius: 12px;
  position: relative;      /* Essential for the overlay */
  z-index: 1;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* Keeps the "card" depth */
  transition: transform 0.3s ease;
  overflow: hidden;        /* Ensures the overlay doesn't spill out */
}

.tool-visual-wrapper:hover {
  transform: translateY(-5px); /* Keeps the lift effect */
}

.tool-visual-wrapper a {
  display: block;
  position: relative;
}

/* --- Image Styling --- */
.tool-visual-wrapper img {
  border-radius: 12px; /* Match the wrapper corners */
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

/* --- Ensure the Zoom Overlay appears on hover --- */
/* This reuses your existing .zoom-overlay styles but ensures the trigger works here */
.tool-visual-wrapper a:hover .zoom-overlay {
  opacity: 1;
}

/* Sparkle/Shine Animation for Badges */
.sparkle-badge {
  position: relative;
  overflow: hidden; /* Keeps the shine strictly inside the rounded pill */
}

/* The "Beam" of light */
.sparkle-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  animation: shine-sweep 3s infinite; /* Runs every 3 seconds */
}

@keyframes shine-sweep {
  0% { left: -150%; }
  30% { left: 150%; } /* Fast sweep across */
  100% { left: 150%; } /* Pause before next sweep */
}

/* Custom Blue for Stats Section Icons */
.stats-blue {
  color: #6f42c1 !important; /* Vivid Royal Blue */
  /* color: #4361ee !important; */ /* Alternative: Electric Blue (Try this if the first one is too dark) */
}

/* Optimized Mobile Grid for Stats Strip */
@media (max-width: 767px) {
  
  /* 1. Scale down the Icon */
  #stats i.display-4 {
    font-size: 2.5rem !important; /* Was ~3.5rem default */
    margin-bottom: 0.25rem !important;
  }

  /* 2. Scale down the Big Numbers */
  #stats .display-6 {
    font-size: 1.5rem; /* Was ~2.5rem default */
    line-height: 1.2;
  }

  /* 3. Scale down the Label Text */
  #stats p.text-muted {
    font-size: 0.85rem;
    margin-top: 0.25rem !important; /* Bring label closer to number */
    line-height: 1.2;
  }
  
  /* 4. Ensure the columns don't touch edges */
  #stats .col-6 {
    padding-left: 5px;
    padding-right: 5px;
  }
}

@media (max-width: 767.98px) {
  
  /* 1. Override the 'w-25' class that is locking the width in HTML */
  .comparison-table .w-25 {
    width: auto !important;
  }

  /* 2. Shrink the First Column (Feature) */
  .comparison-table th:first-child,
  .comparison-table td:first-child {
    width: 18% !important;       /* Force it very narrow */
    font-size: 0.85rem;          /* Slightly smaller text */
    padding-left: 2px !important; /* Reduce padding to save space */
    padding-right: 2px !important;
    white-space: normal;         /* Allow text to wrap if needed */
  }

  /* 3. Expand the other two columns to share remaining space */
  .comparison-table th:nth-child(2),
  .comparison-table td:nth-child(2),
  .comparison-table th:nth-child(3),
  .comparison-table td:nth-child(3) {
    width: 41% !important;       /* (100% - 18%) / 2 ≈ 41% */
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}