/* ==============================================
   THEME SYSTEM – Shared Components
   Toggle button + smooth transitions
   
   Theme files loaded separately:
   • dark-theme.css  → dark mode overrides
   • light-theme.css → light mode overrides
   ============================================== */


/* ---- Smooth Transitions between themes ---- */
body,
.header .reva-navbar,
.how_to_apply_main,
.study_at_reva_main_section,
.study_reva_sub_two,
.ranked_one,
.programme_at_reva_section,
.recruter_main_section,
.life_at_reva_main2,
.reva_edge,
.reva_edge_content,
.study_right_content,
.floating-apply-btn,
.floating-apply-btn-mobile,
.video-wrapper,
.admission-card-form,
.section_course_two .accordion-item,
.section_course_two .accordion-button,
.courselist-menu {
  transition: background-color 0.4s ease,
              color 0.4s ease,
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}


/* ==================================================
   THEME TOGGLE BUTTON
   Fixed at bottom-left corner
   ================================================== */
.theme-toggle-btn {
  position: fixed;
  bottom: 30px;
  left: 20px;
  z-index: 9999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(194, 57, 52, 0.4);
  background: rgba(21, 33, 51, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  outline: none;
  padding: 0;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
              0 0 0 4px rgba(194, 57, 52, 0.2);
  border-color: rgba(194, 57, 52, 0.7);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

/* Icon container */
.theme-toggle-icon {
  width: 26px;
  height: 26px;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-toggle-btn:hover .theme-toggle-icon {
  transform: rotate(15deg);
}

/* Sun & Moon SVGs */
.theme-icon-sun,
.theme-icon-moon {
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  transition: opacity 0.4s ease,
              transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Dark theme (default): show moon, hide sun */
.theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Light theme: show sun, hide moon */
[data-theme="light"] .theme-toggle-btn {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(194, 57, 52, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .theme-toggle-btn:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12),
              0 0 0 4px rgba(194, 57, 52, 0.10);
}

[data-theme="light"] .theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* Tooltip on hover */
.theme-toggle-btn::after {
  content: 'Light Mode';
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  background: rgba(21, 33, 51, 0.92);
  color: #fff;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.theme-toggle-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

[data-theme="light"] .theme-toggle-btn::after {
  content: 'Dark Mode';
  background: rgba(30, 30, 47, 0.92);
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .theme-toggle-btn {
    bottom: 90px;
    left: 16px;
    width: 46px;
    height: 46px;
  }

  .theme-toggle-icon {
    width: 22px;
    height: 22px;
  }

  .theme-icon-sun,
  .theme-icon-moon {
    width: 22px;
    height: 22px;
  }

  .theme-toggle-btn::after {
    display: none;
  }
}

/* Pulse animation on first load */
@keyframes themeTogglePulse {
  0% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(194, 57, 52, 0.4);
  }
  70% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 0 12px rgba(194, 57, 52, 0);
  }
  100% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(194, 57, 52, 0);
  }
}

.theme-toggle-btn.pulse {
  animation: themeTogglePulse 2s ease-in-out 3;
}
