/* 
  Custom styles for KMF Global Education 
  Professional Education System Aesthetic
*/

:root {
  /* Core Colors */
  --primary: #0f172a; /* Slate 900 */
  --primary-light: #1e293b; /* Slate 800 */
  --accent: #3b82f6; /* Blue 500 */
  --accent-secondary: #10b981; /* Emerald 500 */
  --bg-light: #f8fafc; /* Slate 50 */
  --text-light: #0f172a;
  --bg-dark: #020617;
  --text-dark: #f8fafc;

  /* Spacing System */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

.dark {
  --primary: #f8fafc;
  --primary-light: #e2e8f0;
  --bg-light: #020617;
  --text-light: #f1f5f9;

  /* Dark mode shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

body {
  font-family: "Inter", sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
  transition:
    background-color var(--transition-base),
    color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100vw;
}

.dark body {
  background-color: #020617;
  color: #f8fafc;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  overflow-x: hidden;
  max-width: 100vw;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Ensure primary action buttons inside course cards remain readable */
.course-item .btn-primary,
.course-card a.btn-primary {
  color: #ffffff !important;
  background: linear-gradient(90deg, #2563eb 0%, #10b981 100%);
  border: none;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18);
}

.dark .course-item .btn-primary,
.dark .course-card a.btn-primary {
  color: #ffffff !important;
}

.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-weight: 600;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}
.btn-secondary:hover {
  background-color: #f8fafc;
}

/* Smooth animated gradient CTA (used for primary blue actions) */
.btn-gradient-smooth {
  color: #ffffff;
  background-image: linear-gradient(90deg, #3b82f6 0%, #10b981 50%, #3b82f6 100%);
  background-size: 200% 100%;
  background-position: 0 0;
  font-weight: 500;
  transition:
    background-position 700ms ease-out,
    transform 300ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-gradient-smooth:hover {
  background-position: 100% 0;
}

.nav-link {
  color: #475569;
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
}
.nav-link:hover {
  color: #2563eb;
}
.dark .nav-link {
  color: #cbd5e1;
}
.dark .nav-link:hover {
  color: #60a5fa;
}

/* Dropdown Styles */
.dropdown-menu {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 27px;
  width: 18rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: none;
  border-radius: 1.25rem;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 0.75rem 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px) scale(0.9) rotateX(-5deg);
  transform-origin: top center;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
  backdrop-filter: blur(12px);
}

/* Bridge the gap between trigger and menu to maintain hover state */
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -27px;
  left: 0;
  width: 100%;
  height: 27px;
  display: block;
}

.dark .dropdown-menu {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: none;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dropdown:hover svg {
  transform: rotate(180deg);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1) rotateX(0deg);
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-10px);
  opacity: 0;
  text-decoration: none;
  position: relative;
  border-radius: 0.5rem;
  margin: 0.125rem 0.5rem;
}

.dropdown-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  border-radius: 0 2px 2px 0;
  transform: scaleY(0);
  transition: transform 0.3s ease;
  transform-origin: center;
}

.dropdown-item:hover {
  color: #1f2937;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.08),
    rgba(16, 185, 129, 0.08)
  );
  transform: translateX(4px) scale(1.02);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.dropdown-item:hover::before {
  transform: scaleY(1);
}

.dropdown-item svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  color: #6b7280;
  transition: all 0.3s ease;
}

.dropdown-item:hover svg {
  color: #3b82f6;
  transform: scale(1.1);
}

.dropdown:hover .dropdown-item {
  transform: translateX(0);
  opacity: 1;
}

.dropdown:hover .dropdown-item:nth-child(1) {
  transition-delay: 0.1s;
}
.dropdown:hover .dropdown-item:nth-child(2) {
  transition-delay: 0.15s;
}
.dropdown:hover .dropdown-item:nth-child(3) {
  transition-delay: 0.2s;
}
.dropdown:hover .dropdown-item:nth-child(4) {
  transition-delay: 0.25s;
}
.dropdown:hover .dropdown-item:nth-child(5) {
  transition-delay: 0.3s;
}
.dropdown:hover .dropdown-item:nth-child(6) {
  transition-delay: 0.35s;
}
.dropdown:hover .dropdown-item:nth-child(7) {
  transition-delay: 0.4s;
}

.dark .dropdown-item {
  color: #cbd5e1;
}

.dark .dropdown-item:hover {
  color: #e2e8f0;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15),
    rgba(16, 185, 129, 0.15)
  );
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.dark .dropdown-item svg {
  color: #64748b;
}

.dark .dropdown-item:hover svg {
  color: #60a5fa;
}

/* Course Card Styles (inspired by reference, consistent with site theme) */
.course-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(248, 250, 252, 0.98)
  );
  border: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.35s;
  position: relative;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(2, 6, 23, 0.12);
}

.course-card .sm\:w-44,
.course-card .lg\:w-48 {
  border-radius: 0.75rem;
  overflow: hidden;
}

.course-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.course-card .relative > img {
  transform-origin: center;
}

.course-card .group:hover img {
  transform: scale(1.12) rotate(1deg);
}

.course-card .level-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
}

/* Apply button refinement (select by attribute to avoid Tailwind utility escape issues) */
.course-card a[href*="course-details.php"] {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.course-card a[href*="course-details.php"] div {
  background: rgba(59, 130, 246, 0.06);
  border-radius: 9999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.25s,
    color 0.25s,
    transform 0.25s;
}

.course-card a[href*="course-details.php"]:hover div {
  background: linear-gradient(90deg, #3b82f6, #10b981);
  color: #fff;
  transform: translateX(4px);
}

.course-card .apply-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: #10b981;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Dark mode adjustments */
.dark .course-card {
  background: linear-gradient(
    180deg,
    rgba(7, 10, 23, 0.6),
    rgba(7, 10, 23, 0.45)
  );
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.dark .course-card .apply-tag {
  color: #34d399;
}

/* Course meta chips */
.course-card .chips span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  background: rgba(15, 23, 42, 0.02);
  color: #475569;
}

.dark .course-card .chips span {
  background: rgba(255, 255, 255, 0.02);
  color: #cbd5e1;
}

.course-card .chips .fee {
  background: linear-gradient(
    90deg,
    rgba(59, 130, 246, 0.06),
    rgba(16, 185, 129, 0.04)
  );
  border: 1px solid rgba(59, 130, 246, 0.06);
  font-weight: 600;
}

.course-card .chips .rating svg {
  width: 14px;
  height: 14px;
}

/* List-style horizontal card layout for search results (image left, content right) */
.course-item {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Keep image at top of card on all breakpoints (stacked layout) */
.course-item {
  display: flex;
  flex-direction: column;
}

.course-item .relative.h-48 {
  width: 100%;
  min-width: 0;
  height: 220px;
  flex: 0 0 auto;
  border-radius: 0.75rem 0.75rem 0 0;
  overflow: hidden;
}

.course-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-item .p-6 {
  padding: 1rem;
}

/* Buttons used in the cards */
.btn-ghost {
  display: inline-block;
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: inherit;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition:
    background 0.18s,
    transform 0.12s;
}

/* Services sidebar tweaks */
.services-sidebar-card,
.services-sidebar-nav {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 0.6rem;
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.04);
}
.dark .services-sidebar-card,
.dark .services-sidebar-nav {
  background: rgba(15, 23, 42, 0.08);
  box-shadow: none;
}

/* Students slider */
.students-slider {
  position: relative;
  height: 220px;
}
.students-slider .student-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(8px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
  padding: 0.5rem;
}
.students-slider .student-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
  display: block;
}
.students-slider .student-slide.active {
  opacity: 1;
  transform: translateX(0);
}

/* Overlay layering: make sure overlay text sits above image */
.students-slider .student-slide .absolute {
  z-index: 3;
}
.students-slider .student-slide .relative > img {
  z-index: 1;
}

.students-prev,
.students-next {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border-radius: 9999px;
  padding: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.dark .students-prev,
.dark .students-next {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Make CTA buttons and form controls consistent inside sidebar */
.services-sidebar form input[type="text"],
.services-sidebar form input[type="email"],
.services-sidebar form select,
.services-sidebar form textarea {
  width: 100%;
  box-sizing: border-box;
}
.services-sidebar form input,
.services-sidebar form select,
.services-sidebar form textarea {
  height: 44px;
}
.services-sidebar form textarea {
  height: 84px;
}

.btn-ghost:hover {
  background: rgba(59, 130, 246, 0.06);
  transform: translateY(-2px);
}

.course-item .chips span {
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
}

.course-item .rating svg {
  width: 12px;
  height: 12px;
}

/* Tighten the card actions on small screens */
@media (max-width: 640px) {
  .course-item .actions {
    display: flex;
    gap: 0.5rem;
  }
  .course-item .actions a {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .course-card {
    flex-direction: column;
  }
  .course-card .sm\:w-44 {
    width: 100%;
    height: 220px;
  }
}

/* Mobile Accordion Styles */
.mobile-dropdown-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-out;
  overflow: hidden;
}

.mobile-dropdown-content.is-open {
  grid-template-rows: 1fr;
}

.mobile-dropdown-inner {
  min-height: 0;
  visibility: hidden;
  opacity: 0;
  transition:
    visibility 0.3s,
    opacity 0.3s;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-dropdown-content.is-open .mobile-dropdown-inner {
  visibility: visible;
  opacity: 1;
}

.mobile-dropdown-btn svg {
  transition: transform 0.3s ease;
}

.mobile-dropdown-btn.active svg {
  transform: rotate(180deg);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* reveal-on-scroll animations */
.reveal-on-scroll {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.slide-up {
  transform: translateY(40px);
}

.reveal-on-scroll.slide-left {
  transform: translateX(-50px);
}

.reveal-on-scroll.slide-right {
  transform: translateX(50px);
}

.reveal-on-scroll.scale-up {
  transform: scale(0.9);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger animation delays for groups */
.reveal-on-scroll:nth-child(1) {
  transition-delay: 0ms;
}
.reveal-on-scroll:nth-child(2) {
  transition-delay: 100ms;
}
.reveal-on-scroll:nth-child(3) {
  transition-delay: 200ms;
}
.reveal-on-scroll:nth-child(4) {
  transition-delay: 300ms;
}
.reveal-on-scroll:nth-child(5) {
  transition-delay: 400ms;
}
.reveal-on-scroll:nth-child(6) {
  transition-delay: 500ms;
}

/* Respect user preferences */
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Destinations slider wrapper height fix */
.destinations-slider .swiper-wrapper,
.success-stories-slider .swiper-wrapper,
.partner-stories-slider .swiper-wrapper {
  height: auto !important;
}

/* Swiper Pagination Style */
.swiper-pagination-bullet {
  background: var(--brand-blue) !important;
  opacity: 0.3 !important;
}

.swiper-pagination-bullet-active {
  opacity: 1 !important;
  width: 24px !important;
  border-radius: 4px !important;
  transition: all 0.3s ease;
}

/* Marquee Animation */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.marquee-content {
  display: inline-flex;
  animation: marquee 30s linear infinite;
  gap: 4rem;
}

.marquee-content:hover {
  animation-play-state: paused;
}

/* Parallax Effect */
#events-parallax-bg img {
  transform: translateY(0);
  transition: transform 0.1s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (max-width: 1024px) {
  #events-parallax-bg img {
    height: 100% !important;
    transform: none !important;
  }
}

/* FAQ Accordion Styles */
.faq-item {
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.dark .faq-item {
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

.faq-btn {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: transparent;
  border: none;
  font-weight: 600;
  color: inherit;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
  color: #64748b; /* Slate 500 */
}

.dark .faq-content {
  color: #94a3b8; /* Slate 400 */
}

.faq-item.active .faq-content {
  max-height: 1000px;
  transition: max-height 1s ease-in-out;
  padding-bottom: 1.5rem;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Testimonials & Success Stories Slider */
.testimonial-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Loading Spinner */
@keyframes spin-loader {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(59, 130, 246, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin-loader 0.8s linear infinite;
}

.dark .loading-spinner {
  border-color: rgba(59, 130, 246, 0.3);
  border-top-color: #60a5fa;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
}

.dark .loading-overlay {
  background: rgba(15, 23, 42, 0.9);
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Firing Border Animation (Robust Version) */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.firing-border-container {
  position: relative;
  border-radius: 1.5rem;
  padding: 3px;
  background: rgba(226, 232, 240, 0.5);
  overflow: hidden;
  display: flex;
  contain: paint;
}

.dark .firing-border-container {
  background: rgba(30, 41, 59, 0.5);
}

.firing-border-container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    transparent,
    transparent,
    transparent,
    var(--brand-blue),
    var(--brand-emerald),
    var(--brand-blue)
  );
  animation: spin 3s linear infinite;
  z-index: 1;
}

.firing-border-container .relative {
  z-index: 2;
  background: white;
  border-radius: 1.4rem;
  width: 100%;
  height: 100%;
}

.dark .firing-border-container .relative {
  background: var(--brand-navy);
}

/* Feedback Marquee Fixes */
.feedback-marquee-content {
  display: inline-flex;
  animation: marquee 50s linear infinite;
  gap: 2rem;
  align-items: stretch; /* Ensure all items have same height */
}

.feedback-card-marquee {
  width: 500px;
  flex-shrink: 0;
  white-space: normal; /* Force text to wrap inside the marquee cards */
}

.feedback-card-marquee .testimonial-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Floating Book Counselling Button */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Force mobile menu overlay to the very top layer across devices */
#mobile-menu {
  position: fixed !important;
  z-index: 2147483647 !important; /* max practical */
}

@keyframes glow-pulse {
  0%,
  100% {
    box-shadow:
      0 10px 30px rgba(59, 130, 246, 0.4),
      0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow:
      0 15px 40px rgba(59, 130, 246, 0.6),
      0 0 20px 5px rgba(59, 130, 246, 0.3);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.floating-counselling-btn {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 999;
  animation: float 3s ease-in-out infinite;
}

.floating-counselling-btn button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background-image: linear-gradient(
    90deg,
    #3b82f6 0%,
    #10b981 50%,
    #3b82f6 100%
  );
  background-size: 200% 100%;
  background-position: 0 0;
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition:
    background-position 700ms ease-out,
    transform 300ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1),
    width 300ms ease,
    padding 300ms ease;
  position: relative;
  overflow: visible;
  width: auto;
  min-width: 56px;
  animation: glow-pulse 2s ease-in-out infinite;
}

.floating-counselling-btn button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;
  padding: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  background-size: 200% 100%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: shimmer 3s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

.floating-counselling-btn button:hover::before {
  opacity: 1;
}

.floating-counselling-btn button:hover {
  background-position: 100% 0;
  width: auto;
  padding: 0.5rem 1.25rem;
  transform: scale(1.05);
  animation: glow-pulse 1.5s ease-in-out infinite;
}

.floating-counselling-btn button.expanded {
  width: auto;
  padding: 1rem 1.5rem;
}

.floating-counselling-btn img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid white;
  flex-shrink: 0;
  object-fit: cover;
}

.floating-counselling-btn span {
  white-space: nowrap;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.floating-counselling-btn button:hover span,
.floating-counselling-btn button.expanded span {
  opacity: 1;
  width: auto;
  margin-left: 0.5rem;
}

/* Modal Styles */
.counselling-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.counselling-modal.active {
  display: flex;
}

.counselling-modal-content {
  background: white;
  border-radius: 2rem;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.dark .counselling-modal-content {
  background: #0f172a;
  border: 1px solid #1e293b;
}

.counselling-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 100;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.dark .counselling-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.counselling-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg) scale(1.1);
}

.dark .counselling-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* V2 Footer Global Presence - Compact Animated Gorgeous */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-4px) rotate(5deg); }
  66% { transform: translateY(-8px) rotate(-5deg); }
}

@keyframes float-med {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-6px) rotate(3deg); }
  66% { transform: translateY(-12px) rotate(-3deg); }
}

@keyframes float-fast {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(8deg); }
}

@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes spin-fast { to { transform: rotate(360deg); } }
@keyframes pulse-slow { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes bounce-slow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes bounce-med { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes glow-wave { 0%, 100% { box-shadow: 0 0 10px rgba(59,130,246,0.5); } 50% { box-shadow: 0 0 25px rgba(16,185,129,0.8), 0 0 35px rgba(59,130,246,0.6); } }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes wave { 0%, 100% { transform: translateX(0) rotate(0deg); } 25% { transform: translateX(4px) rotate(2deg); } 75% { transform: translateX(-2px) rotate(-1deg); } }

.perspective-1000 { perspective: 1000px; }
.transform-style-preserve-3d { transform-style: preserve-3d; }
.shadow-glow-lg { box-shadow: 0 25px 60px rgba(59,130,246,0.3), 0 0 40px rgba(16,185,129,0.2); }
.shadow-glow-md { box-shadow: 0 20px 50px rgba(16,185,129,0.25), 0 0 30px rgba(59,130,246,0.15); }
.shadow-brand-glow { box-shadow: 0 5px 20px rgba(59,130,246,0.4); }
.firing-border-sm { --border-w: 2px; }
.firing-border-sm::before { animation-duration: 2s; }

.floating-particle { animation: float-slow linear infinite; }
.delay-500 { animation-delay: 0.5s; }
.delay-1000 { animation-delay: 1s; }
.delay-2000 { animation-delay: 2s; }
.animate-wave { animation: wave 2s ease-in-out infinite; }
.animate-glow-wave { animation: glow-wave 2.5s ease-in-out infinite; }
.animate-bounce-slow { animation: bounce-slow 2s ease-in-out infinite; }
.animate-bounce-med { animation: bounce-med 1.5s ease-in-out infinite; }
.animate-spin-slow { animation: spin-slow 20s linear infinite; }
.animate-spin-fast { animation: spin-fast 4s linear infinite; }
.animate-pulse-slow { animation: pulse-slow 3s ease-in-out infinite; }
.animate-shimmer { background-size: 200% 100%; animation: shimmer 1.5s infinite; }

.group:hover .perspective-1000 > div { transform: rotateY(2deg) rotateX(1deg); }
.group:hover .office-item { transform: translateX(6px) scale(1.02); }

footer [class*="hover:bg-gradient"] { transition: all 0.3s cubic-bezier(0.4,0,0.2,1); }
footer a[href^="tel:"] svg { transition: transform 0.4s ease; }
footer a[href^="tel:"]:hover svg { transform: scale(1.1) rotate(5deg); }

.dark footer .bg-gradient-to-br { background: linear-gradient(to bottom right, rgba(30,41,59,0.9), rgba(15,23,42,0.8)); }
footer .text-slate-700 { color: #475569; }


/* Smooth scrollbar for modal */
.counselling-modal-content::-webkit-scrollbar {
  width: 8px;
}

.counselling-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.counselling-modal-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.dark .counselling-modal-content::-webkit-scrollbar-thumb {
  background: #475569;
}

.counselling-modal-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .floating-counselling-btn {
    bottom: 1rem;
    left: 1rem;
  }

  .floating-counselling-btn button {
    padding: 0.5rem;
    font-size: 0.875rem;
    min-width: 52px;
  }

  .floating-counselling-btn button:hover,
  .floating-counselling-btn button.expanded {
    width: auto;
    padding: 0.5rem 1rem;
  }

  .floating-counselling-btn img {
    width: 36px;
    height: 36px;
  }

  .counselling-modal-content {
    border-radius: 1.5rem;
    max-height: 95vh;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Focus Visible Styles for Accessibility */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip to main content link for screen readers */
.skip-to-main {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1rem 1.5rem;
  background-color: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
}

.skip-to-main:focus {
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
}

/* Improved Image Loading */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

img[loading="lazy"] {
  opacity: 0;
  transition: opacity var(--transition-base);
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Selection Styling */
::selection {
  background-color: rgba(59, 130, 246, 0.3);
  color: inherit;
}

::-moz-selection {
  background-color: rgba(59, 130, 246, 0.3);
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-full);
  border: 3px solid var(--bg-light);
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.dark ::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

.dark ::-webkit-scrollbar-thumb {
  background: #475569;
  border-color: var(--bg-dark);
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ============================================
   ENHANCED INTERACTIVE ELEMENTS
   ============================================ */

/* Ripple Effect for Buttons */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Pulse Animation for Important Elements */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.pulse-ring {
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Morphism Effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
  background: rgba(15, 23, 42, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   ENHANCED COURSE CARD INTERACTIONS
   ============================================ */

.course-card {
  position: relative;
  transition: all var(--transition-slow);
}

.course-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.course-card:hover::before {
  background: linear-gradient(135deg, #3b82f6, #10b981);
  opacity: 1;
}

/* Improved Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.badge-primary {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.dark .badge-primary {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.dark .badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.dark .badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* GPU Acceleration for Animations */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

/* Contain Layout Shifts */
.contain-layout {
  contain: layout;
}

.contain-paint {
  contain: paint;
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */

.text-responsive-xl {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
}

.text-responsive-lg {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.2;
}

.text-responsive-md {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  line-height: 1.4;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  img {
    page-break-inside: avoid;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

/* ============================================
   COUNTRY PAGE FILTERS
   ============================================ */

/* Filter and Sort Dropdowns */
.filter-dropdown,
.sort-dropdown {
  position: relative;
}

.filter-dropdown button,
.sort-dropdown button {
  white-space: nowrap;
}

#degree-filter-menu,
#duration-sort-menu {
  animation: slideDown 0.2s ease-out;
  transform-origin: top;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-option,
.sort-option {
  position: relative;
  transition: all var(--transition-fast);
}

.filter-option::before,
.sort-option::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform var(--transition-fast);
}

.filter-option:hover::before,
.sort-option:hover::before,
.filter-option.text-brand-blue::before,
.sort-option.text-brand-blue::before {
  transform: scaleY(1);
}

/* Loading State for Courses */
#courses-loading {
  min-height: 200px;
}

#courses-grid {
  transition: opacity var(--transition-base);
}

/* No Results Message */
#no-results-message {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile Responsive Filters */
@media (max-width: 768px) {
  .filter-dropdown,
  .sort-dropdown {
    width: 100%;
  }

  .filter-dropdown button,
  .sort-dropdown button {
    width: 100%;
    justify-content: space-between;
  }

  #degree-filter-menu,
  #duration-sort-menu {
    left: 0;
    right: 0;
    width: 100%;
  }
}

/* Course Card Animations */
.course-card {
  animation-fill-mode: both;
}

.course-card.is-visible {
  animation: courseCardAppear 0.5s ease-out;
}

@keyframes courseCardAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card Dealing Animation */
.course-card-animate {
  opacity: 0;
  transform: translateY(30px) rotateX(20deg) scale(0.9);
}

.course-card-animate.card-deal-active {
  animation: cardDeal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes cardDeal {
  0% {
    opacity: 0;
    transform: translateY(50px) rotateX(30deg) scale(0.8);
  }
  60% {
    transform: translateY(-5px) rotateX(-5deg) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

/* ============================================
   SERVICES SIDEBAR - COUNTRY CODE SELECT
   ============================================ */

/* Country Code Select Enhancement */
.country-code-select {
  position: relative;
  min-width: 120px;
  max-width: 140px;
  flex-shrink: 0;
}

.country-code-select select {
  font-size: 0.875rem;
  font-weight: 500;
  padding-right: 2rem;
  background-image: none;
  width: 100%;
}

.country-code-select select:hover {
  border-color: var(--accent);
}

.country-code-select select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Country Code Options Styling */
.country-code-select option {
  padding: 0.5rem;
  font-size: 0.875rem;
  background: white;
  color: #0f172a;
}

.dark .country-code-select option {
  background: #0f172a;
  color: #f8fafc;
}

/* Enhanced Select Arrow */
.country-code-select svg {
  transition: transform var(--transition-fast);
}

.country-code-select select:focus + div svg {
  transform: translateY(-50%) rotate(180deg);
}

/* Form Input Consistency */
.services-sidebar-card input[type="text"],
.services-sidebar-card input[type="email"],
.services-sidebar-card input[type="tel"],
.services-sidebar-card textarea,
.services-sidebar-card select {
  transition: all var(--transition-base);
}

.services-sidebar-card input:focus,
.services-sidebar-card textarea:focus,
.services-sidebar-card select:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Submit Button Enhancement */
.services-sidebar-card button[type="submit"] {
  position: relative;
  overflow: hidden;
}

.services-sidebar-card button[type="submit"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.services-sidebar-card button[type="submit"]:hover::before {
  left: 100%;
}

/* Phone Number Field Group */
.services-sidebar-card .flex.gap-2 {
  align-items: stretch;
}

/* Helper Text Styling */
.services-sidebar-card p.text-xs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Flag Emoji Enhancement */
.country-code-select option::before {
  content: attr(data-flag);
  margin-right: 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .country-code-select {
    min-width: 110px;
    max-width: 120px;
  }

  .country-code-select select {
    font-size: 0.8125rem;
    padding-left: 0.5rem;
    padding-right: 1.5rem;
  }
}

/* Ensure phone input takes remaining space */
.services-sidebar-card input[name="phone"] {
  flex: 1;
  min-width: 0; /* Important for flex items */
}

/* Focus Ring for Accessibility */
.services-sidebar-card input:focus-visible,
.services-sidebar-card textarea:focus-visible,
.services-sidebar-card select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Placeholder Styling */
.services-sidebar-card input::placeholder,
.services-sidebar-card textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.dark .services-sidebar-card input::placeholder,
.dark .services-sidebar-card textarea::placeholder {
  color: #64748b;
}

/* Label Enhancement */
.services-sidebar-card label.text-xs {
  font-weight: 600;
  letter-spacing: 0.025em;
}

/* Form Field Animation on Focus */
@keyframes fieldFocus {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.01);
  }
  100% {
    transform: scale(1);
  }
}

.services-sidebar-card input:focus,
.services-sidebar-card textarea:focus,
.services-sidebar-card select:focus {
  animation: fieldFocus 0.3s ease-out;
}

/* Success State (can be added via JavaScript) */
.services-sidebar-card input.success,
.services-sidebar-card textarea.success {
  border-color: #10b981;
}

.services-sidebar-card input.success:focus,
.services-sidebar-card textarea.success:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Error State (can be added via JavaScript) */
.services-sidebar-card input.error,
.services-sidebar-card textarea.error {
  border-color: #ef4444;
}

.services-sidebar-card input.error:focus,
.services-sidebar-card textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ============================================
   CONTACT PAGE ENHANCEMENTS
   ============================================ */

/* Country Code Select for Contact Page */
.country-code-select-contact {
  position: relative;
  min-width: 150px;
}

.country-code-select-contact select {
  font-size: 0.875rem;
  font-weight: 500;
  padding-right: 2.5rem;
}

.country-code-select-contact select:hover {
  border-color: var(--accent);
}

.country-code-select-contact select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Contact Info Links */
.contact-info a {
  transition: all var(--transition-base);
}

.contact-info a:hover {
  transform: translateX(4px);
}

/* Social Media Icons */
.social-icon {
  transition: all var(--transition-base);
}

.social-icon:hover {
  transform: translateY(-4px) scale(1.1);
}

/* Phone Number Links with Flags */
a[href^="tel:"] {
  text-decoration: none;
  position: relative;
}

a[href^="tel:"]:hover {
  text-decoration: none;
}

a[href^="tel:"]::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

a[href^="tel:"]:hover::after {
  width: 100%;
}

/* Email Links */
a[href^="mailto:"] {
  text-decoration: none;
  position: relative;
}

a[href^="mailto:"]::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-secondary);
  transition: width var(--transition-base);
}

a[href^="mailto:"]:hover::after {
  width: 100%;
}

/* Office Hours Styling */
.office-hours p {
  position: relative;
  padding-left: 1rem;
}

.office-hours p::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* Map Container Enhancement */
.map-container {
  position: relative;
  overflow: hidden;
}

.map-container::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 8px solid white;
  border-radius: 2.5rem;
  pointer-events: none;
  z-index: 1;
}

.dark .map-container::before {
  border-color: #1e293b;
}

/* Contact Form Enhancements */
#expertAdvisorForm input:focus,
#expertAdvisorForm select:focus,
#expertAdvisorForm textarea:focus {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

#expertAdvisorForm button[type="submit"] {
  position: relative;
  overflow: hidden;
}

#expertAdvisorForm button[type="submit"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

#expertAdvisorForm button[type="submit"]:hover::before {
  left: 100%;
}

/* Responsive Adjustments for Contact Page */
@media (max-width: 1024px) {
  .country-code-select-contact {
    min-width: 140px;
  }
}

@media (max-width: 768px) {
  .country-code-select-contact {
    min-width: 120px;
    flex-shrink: 0;
  }

  .country-code-select-contact select {
    font-size: 0.8125rem;
    padding-left: 0.5rem;
    padding-right: 1.75rem;
  }

  /* Fix phone number field overflow on mobile */
  #expertAdvisorForm .flex.gap-3 {
    display: flex;
    gap: 0.5rem;
    width: 100%;
  }

  #expertAdvisorForm input[name="con_phone"] {
    min-width: 0;
    flex: 1;
    width: auto;
  }
}

@media (max-width: 640px) {
  .country-code-select-contact {
    min-width: 110px;
  }

  .country-code-select-contact select {
    font-size: 0.75rem;
    padding-left: 0.5rem;
    padding-right: 1.5rem;
  }

  /* Stack phone fields on very small screens if needed */
  #expertAdvisorForm .flex.gap-3 {
    gap: 0.5rem;
  }

  #expertAdvisorForm input[name="con_phone"] {
    font-size: 0.875rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* ============================================
   CONTACT FORM MOBILE FIX
   ============================================ */

/* Ensure form fields don't overflow on mobile */
#expertAdvisorForm {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

#expertAdvisorForm input,
#expertAdvisorForm select,
#expertAdvisorForm textarea {
  max-width: 100%;
  box-sizing: border-box;
}

/* Phone number field container */
#expertAdvisorForm .space-y-3 .flex.gap-3 {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}

/* Country code select - prevent overflow */
.country-code-select-contact {
  flex-shrink: 0;
  max-width: 150px;
}

/* Phone input - allow to shrink */
#expertAdvisorForm input[type="tel"] {
  flex: 1;
  min-width: 0;
  width: 100%;
}

/* Mobile specific fixes */
@media (max-width: 480px) {
  .country-code-select-contact {
    min-width: 100px;
    max-width: 110px;
  }

  .country-code-select-contact select {
    font-size: 0.7rem;
    padding: 0.75rem 1.25rem 0.75rem 0.5rem;
  }

  #expertAdvisorForm input[type="tel"] {
    font-size: 0.875rem;
    padding: 0.75rem;
  }

  /* Reduce gap on very small screens */
  #expertAdvisorForm .flex.gap-3 {
    gap: 0.375rem;
  }
}

/* Extra small screens */
@media (max-width: 375px) {
  .country-code-select-contact {
    min-width: 95px;
    max-width: 100px;
  }

  .country-code-select-contact select {
    font-size: 0.65rem;
    padding: 0.75rem 1rem 0.75rem 0.375rem;
  }

  #expertAdvisorForm input[type="tel"] {
    font-size: 0.8125rem;
    padding: 0.75rem 0.5rem;
  }
}



/* ============================================
   BLOG DETAIL - PROSE STYLES
   ============================================ */

.prose h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: inherit;
}

.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: inherit;
}

.prose ul {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.prose li {
  margin-bottom: 0.5rem;
  color: inherit;
}

.dark .prose {
  color: #cbd5e1;
}

.dark .prose h2 {
  color: #f1f5f9;
}
