/* ===== AFFILIATION SECTION ===== */
.affiliation-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 3rem 4rem;
  max-width: 1320px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.affiliation-text {
  flex: 1 1 320px;
  max-width: 570px;
}

.affiliation-text h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #111;
  padding-bottom: 0 !important;
  line-height: 1.3;
  background: transparent !important;
}

.affiliation-text h3 span {
  font-size: 2rem;
  font-weight: 400;
  color: #222;
  display: block;
  margin-bottom: 1rem;
}

.affiliation-text p {
  font-size: 0.97rem;
  color: #444;
  line-height: 1.7;
}

.affiliation-logos {
  display: flex;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1 1 320px;
}

.logo-badge {
  width: 120px;
  height: 120px;
  animation: floatBadge 3s ease-in-out infinite;
}

.logo-badge:nth-child(2) {
  animation-delay: 0.4s;
}
.logo-badge:nth-child(3) {
  animation-delay: 0.8s;
}

@keyframes floatBadge {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* SVG gear badge styles */
.gear-outer {
  fill: #2b2d7e;
}
.gear-inner {
  fill: #a8dde9;
}
.map-fill {
  fill: #2b2d7e;
}
.ring-text {
  fill: #fff;
  font-size: 6px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* ===== COURSE CONTENT WRAPPER (2 COLUMN LAYOUT) ===== */
.course-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 20px;
  align-items: start;
}

.course-main {
  min-width: 0;
}

.course-section {
  padding: 0px 0 40px;
  border-bottom: 1px solid #e5e7eb;
}

.course-section:last-child {
  border-bottom: none;
}

.course-sidebar {
  position: relative;
}

.sticky-card {
  position: sticky;
  top: 90px;
  background: #fff;
}

/* ===== STICKY TABS ===== */
.course-tabs-sticky {
  position: sticky;
  top: 72px;
  z-index: 100;
  background: #fff;
  border-bottom: 2px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.course-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.course-tabs::-webkit-scrollbar {
  height: 4px;
}
.course-tabs::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}
.course-tabs::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

.tab-link {
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.tab-link:hover,
.tab-link.active {
  color: #053d7a;
  border-bottom-color: #053d7a;
}

.open-all-btn {
  margin-left: auto;
  padding: 6px 14px;
  border: 1px solid #053d7a;
  border-radius: 6px;
  color: #053d7a;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.open-all-btn:hover {
  background: #053d7a;
  color: #fff;
}

/* ===== LOGO GRID & CARDS ===== */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.logo-card {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #e8edf5;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 18px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  animation: cardReveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  box-shadow:
    0 8px 32px rgba(37, 99, 235, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06);
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo-card:nth-child(1) {
  animation-delay: 0.05s;
}
.logo-card:nth-child(2) {
  animation-delay: 0.1s;
}
.logo-card:nth-child(3) {
  animation-delay: 0.15s;
}
.logo-card:nth-child(4) {
  animation-delay: 0.2s;
}
.logo-card:nth-child(5) {
  animation-delay: 0.25s;
}
.logo-card:nth-child(6) {
  animation-delay: 0.3s;
}
.logo-card:nth-child(7) {
  animation-delay: 0.35s;
}
.logo-card:nth-child(8) {
  animation-delay: 0.4s;
}
.logo-card:nth-child(9) {
  animation-delay: 0.45s;
}
.logo-card:nth-child(10) {
  animation-delay: 0.5s;
}

@keyframes cardReveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.06) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.logo-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2.5px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  border-radius: 0 0 4px 4px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo-card:hover {
  box-shadow:
    0 8px 32px rgba(37, 99, 235, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06);
  border-color: #bfcfe8;
  transform: translateY(-4px) scale(1.025);
}

.logo-card:hover::before {
  opacity: 1;
}
.logo-card:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.logo-card img {
  max-width: 100%;
  max-height: 62px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(20%);
  transition:
    filter 0.3s ease,
    transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.logo-card:hover img {
  filter: grayscale(0%);
  transform: scale(1.06);
}

/* ===== PLACEMENT GRID ===== */
.placement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.placement-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  border: 1px solid #053d7a;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transition:
    box-shadow 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.placement-item:nth-child(1) {
  animation-delay: 0.05s;
}
.placement-item:nth-child(2) {
  animation-delay: 0.12s;
}
.placement-item:nth-child(3) {
  animation-delay: 0.19s;
}
.placement-item:nth-child(4) {
  animation-delay: 0.26s;
}
.placement-item:nth-child(5) {
  animation-delay: 0.33s;
}
.placement-item:nth-child(6) {
  animation-delay: 0.4s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.placement-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.placement-item:hover img {
  transform: scale(1.06);
}

.glass-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    0 12px 40px rgba(30, 60, 120, 0.18);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.glass-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 40%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.28) 0%,
    transparent 70%
  );
  border-radius: 18px 0 0 0;
  pointer-events: none;
}

.placement-item:hover .glass-overlay {
  opacity: 1;
}
section#faqs details P {
  text-align: justify;
}
.placement-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 48px rgba(30, 60, 140, 0.18);
}

/* ===== CONSOLIDATED MEDIA QUERIES ===== */
@media (max-width: 1023px) {
  .course-content-wrapper {
    grid-template-columns: 1fr 300px;
    gap: 24px;
    padding: 30px 20px;
  }
  .sticky-card {
    top: 80px;
  }
  .course-tabs-sticky {
    top: 60px;
  }
  .tab-link {
    padding: 10px 16px;
    font-size: 14px;
  }
}

@media (max-width: 991px) {
  .course-content-wrapper {
    grid-template-columns: 1fr;
  }
  .course-sidebar {
    order: 2;
  }
  .sticky-card {
    position: static;
    transform: none !important;
  }
}

@media (max-width: 900px) {
  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .affiliation-section {
    flex-direction: column;
    padding: 1.5rem;
    align-items: flex-start;
    gap: 0;
  }
  .affiliation-logos {
    justify-content: center;
    gap: 2rem;
    width: 100%;
    flex: 1 1 130px;
  }
  .logo-badge {
    width: 100px;
    height: 100px;
  }
  .affiliation-text h3 span {
    font-size: 1.4rem;
  }

  .affiliation-text p {
    font-size: 0.87rem;
  }
  .affiliation-text {
    text-align: center;
    width: 100%;
    flex: 1 1 200px;
  }

  .course-content-wrapper {
    padding: 20px 16px;
  }
  .course-section {
    padding: 30px 0;
  }

  .course-tabs-sticky {
    top: 56px;
  }
  .course-tabs {
    padding: 0 12px;
  }
  .tab-link {
    padding: 6px 15px;
    font-size: 16px;
    max-width: 120px;
    width: 100%;
    text-align: center;
  }
  .open-all-btn {
    display: none;
  }

  section.course-content-wrapper h2 span {
    font-size: 18px !important;
  }
  section.course-content-wrapper h2 {
    padding: 10px;
  }
  section.course-content-wrapper h3 {
    font-size: 15px !important;
    line-height: 22px;
  }
  section.course-content-wrapper h4 {
    font-size: 15px !important;
    line-height: 22px;
  }
  section.course-content-wrapper p {
    font-size: 12px;
    line-height: 20px;
  }

  table td {
    padding: 10px !important;
  }
}

@media (max-width: 700px) {
  .placement-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .affiliation-text h3 {
    font-size: 1.4rem !important;
  }
  .logo-badge {
    width: 85px;
    height: 85px;
  }
  .course-content-wrapper {
    padding: 16px 12px;
  }
  .course-section {
    padding: 24px 0;
  }
  .tab-link {
    padding: 6px 15px;
    font-size: 16px;
  }
  .open-all-btn {
    padding: 4px 8px;
    font-size: 10px;
  }
  .course-tabs {
    padding: 0 8px;
  }
}

@media (max-width: 460px) {
  .placement-grid {
    grid-template-columns: 1fr;
  }
}
