/**
 * =================== EDUCATION & CERTIFICATION ===================
 *
 * @format
 */

/* ===================== GENERAL ===================== */

.edu-exp-section {
  padding: 75px 0;
  font-family: "Lexend", sans-serif;
}

/* ===================== GRID ===================== */

.edu-exp-grid {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0; /* remove gap */
}

/* ===================== CARDS ===================== */

.timeline-card {
  flex: 1 1 360px;
  width: 420px;
  max-width: 100%;
  padding: 26px 30px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);

  background: radial-gradient(
    circle at top left,
    rgba(26, 42, 74, 0.6),
    rgba(10, 15, 30, 0.7)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.6),
    0 0 0 rgba(0, 0, 0, 0);

  transition:
    transform 0.5s ease,
    filter 0.4s ease,
    opacity 0.4s ease,
    box-shadow 0.4s ease;
}

/* Glow blobs */
.timeline-card::before {
  content: "";
  position: absolute;
  top: -80px;
  left: -40px;
  width: 240px;
  height: 180px;
  background: radial-gradient(
    circle,
    var(--deep-saffron-base),
    transparent 70%
  );
  opacity: 0.35;
  pointer-events: none;
}

.timeline-card.certificates::before {
  left: auto;
  right: -40px;
  background: radial-gradient(circle, var(--trust-blue-base), transparent 70%);
}

/* Card Hover */
.timeline-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.95),
    0 0 30px rgba(0, 150, 255, 0.2);
}

/* ===================== STACKING & BLUR ===================== */

/* Education card (front by default) */
.timeline-card.education {
  transform: translateX(40px) scale(1.05);
  z-index: 2;
  filter: blur(0);
  opacity: 1;
}

/* Hover: bring front */
.timeline-card.education:hover {
  z-index: 3;
  transform: translateX(0) scale(1.08);
  filter: blur(0);
  opacity: 1;
}

/* Certificates card (behind by default) */
.timeline-card.certificates {
  max-height: 400px;
  display: flex;
  flex-direction: column;
  transform: translateX(-40px) scale(0.95);
  z-index: 1;
  filter: blur(3px);
  opacity: 0.8;
}

/* Hover certificates to front */
.timeline-card.certificates:hover {
  z-index: 3;
  transform: translateX(0) scale(1.08);
  filter: blur(0);
  opacity: 1;
}

/* Adjust stacking & blur when hovering other card */
.timeline-card.education:hover ~ .certificates {
  transform: translateX(-60px) scale(0.9);
  z-index: 1;
}

.edu-exp-grid:hover .timeline-card.education:not(:hover) {
  transform: translateX(60px) scale(0.92);
  filter: blur(4px);
  opacity: 0.7;
}

/* ===================== TIMELINE ===================== */

.timeline {
  position: relative;
  padding-left: 32px;
}

/* Vertical line */
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--trust-blue-light), transparent);
  box-shadow: 0 0 12px var(--trust-blue-base);
}

/* Circle dot */
.circle-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--trust-blue-light);
  background: var(--deep-navy-base);
  box-shadow: 0 0 8px var(--trust-blue-base);
  transition: 0.3s ease;
}

/* Timeline item */
.timeline-item {
  position: relative;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 10px;

  opacity: 0;
  transform: translateY(18px);
  transition: all 0.4s ease;
}

/* Divider */
.timeline-item:not(:last-child)::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 14px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
}

/* Visible animation */
.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}

/* Item hover */
.timeline-item:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(6px);
}
.timeline-item:hover .circle-dot {
  transform: scale(1.3);
  box-shadow: 0 0 18px var(--trust-blue-light);
}
.timeline-item:hover .timeline-title.main {
  color: var(--trust-blue-light);
}

/* ===================== TITLES ===================== */

.timeline-title.main {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--off-white-light);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.timeline-title.sub {
  font-size: 0.9rem;
  color: var(--soft-gray-base);
  opacity: 0.85;
}

.timeline-title.date {
  font-size: 0.82rem;
  color: var(--soft-gray-dark);
  opacity: 0.7;
}

.timeline-title.date i {
  margin-right: 6px;
  color: var(--royal-yellow-base);
}

/* Text */
.timeline-text {
  margin-top: 6px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--soft-gray-base);
}

/* Links */
.timeline-text a {
  position: relative;
  font-weight: 600;
  text-decoration: none;
}

.timeline-text a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--trust-blue-light);
  transition: 0.3s;
}

.timeline-text a:hover::after {
  width: 100%;
}

/* ===================== SCROLL ===================== */

.timeline-card.certificates .timeline {
  overflow-y: auto;
  padding-right: 10px;
  scroll-behavior: smooth;
}

/* Scrollbar */
.timeline-card.certificates .timeline::-webkit-scrollbar {
  width: 6px;
}

.timeline-card.certificates .timeline::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    var(--trust-blue-base),
    var(--deep-saffron-base)
  );
  border-radius: 10px;
}

/* Sticky heading */
.timeline-card.certificates .timeline-heading {
  position: sticky;
  top: 0;
  padding-bottom: 10px;
  z-index: 5;
}

/* ===================== BUTTONS ===================== */

.timeline-toggle-btn {
  margin-top: 10px;
  padding: 8px 14px;
  font-size: 0.85rem;
  border-bottom-right-radius: 40px;
  border-top-left-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 2px solid transparent;
  color: var(--off-white-light);
  background: linear-gradient(
    135deg,
    var(--trust-blue-base),
    var(--deep-navy-light)
  );
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.timeline-toggle-btn:hover {
  transform: translateY(-4px);
  background: linear-gradient(
    135deg,
    var(--royal-yellow-base),
    var(--deep-saffron-base)
  );
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.timeline-toggle-btn:active {
  transform: translateY(1px);
}

/* ===================== HEADINGS ===================== */

.timeline-heading {
  color: var(--royal-yellow-base);
  font-size: 1.6rem;
  margin-bottom: 18px;
  letter-spacing: 0.06em;
}

/* ===================== EDUCATION & CERTIFICATION RESPONSIVE ===================== */

/* Large Tablets & smaller desktops (up to 992px) */
@media (max-width: 992px) {
  .edu-exp-grid {
    flex-direction: column;
    gap: 2rem; /* spacing between cards */
  }

  /* Cards adjustments */
  .timeline-card {
    transform: none !important;
    filter: blur(0) !important;
    opacity: 1 !important;
    z-index: auto !important;
    width: 100%; /* full width for smaller screens */
    max-width: 100%;
    padding: 22px 24px;
  }

  /* Headings & text inside cards */
  .timeline-heading {
    font-size: 1.4rem;
  }
  .timeline-title.main {
    font-size: 1rem;
  }
  .timeline-title.sub {
    font-size: 0.85rem;
  }
  .timeline-title.date {
    font-size: 0.75rem;
  }
  .timeline-text {
    font-size: 0.85rem;
  }

  /* Buttons */
  .timeline-toggle-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

/* Tablets / iPads (up to 768px) */
@media (max-width: 768px) {
  .edu-exp-grid {
    gap: 1.5rem;
  }

  .timeline-card {
    padding: 18px 20px;
  }

  .timeline-heading {
    font-size: 1.3rem;
  }
  .timeline-title.main {
    font-size: 0.95rem;
  }
  .timeline-title.sub {
    font-size: 0.8rem;
  }
  .timeline-title.date {
    font-size: 0.72rem;
  }
  .timeline-text {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .timeline-toggle-btn {
    font-size: 0.75rem;
    padding: 5px 10px;
  }
}

/* Mobile phones (up to 480px) */
@media (max-width: 480px) {
  .edu-exp-section {
    padding: 50px 15px;
  }

  .edu-exp-grid {
    gap: 1rem;
  }

  .timeline-card {
    padding: 14px 16px;
  }

  .timeline-heading {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }
  .timeline-title.main {
    font-size: 0.9rem;
  }
  .timeline-title.sub {
    font-size: 0.75rem;
  }
  .timeline-title.date {
    font-size: 0.7rem;
  }
  .timeline-text {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .timeline-toggle-btn {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
}
