.flip-card {
  background-color: transparent;
  perspective: 1000px;
  height: 420px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: left;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  pointer-events: auto; /* Let events pass to the card container */
}
.flip-card:focus-within .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card button {
  cursor: pointer;
}
.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 1.5rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  pointer-events: auto; /* Re-enable for content */
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* Prevent browser from getting stuck on hover states after click */
.flip-card:active .flip-card-inner {
  transform: rotateY(180deg);
}

/* Mobile Viewport & Box Model Fixes */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Simplified floating label logic */
input:focus ~ label,
input:not(:placeholder-shown) ~ label {
  transform: translateY(-22px) scale(0.85);
  color: #4f46e5;
  background: white;
  padding: 0 4px;
  left: 10px;
}

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap");

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
}

/* Container must be relative to position the label absolute */
.form-floating-group {
  position: relative;
  margin-bottom: 1.5rem;
}

/* Initial state: Label looks like a placeholder */
.form-label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background-color: white;
  padding: 0 0.4rem;
  color: #64748b;
  /* slate-500 */
  transition: all 0.2s ease;
  pointer-events: none;
  /* Allows clicking "through" the label to the input */
  font-size: 1rem;
}

/* When input is focused OR not empty: Move label up and shrink it */
input:focus + .form-label,
input:not(:placeholder-shown) + .form-label {
  top: 0;
  font-size: 0.75rem;
  color: #4f46e5;
  /* indigo-600 */
  font-weight: 600;
}
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}
html {
  -webkit-text-size-adjust: 100%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Ensure the input padding accounts for the label space */
input {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap");

body {
  font-family: "Plus Jakarta Sans", sans-serif;
}

.location-container {
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* Firefox */
}

.location-container::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.location-card {
  scroll-snap-align: start;
  flex: 0 0 100%;
}

.tab-active {
  background: #4f46e5;
  color: white;
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

.map-frame {
  transition: opacity 0.3s ease;
}

:root {
  /* Premium Palette */
  --primary: #4f46e5;
  /* Indigo 600 */
  --primary-dark: #3730a3;
  /* Indigo 800 */
  --secondary: #0ea5e9;
  /* Sky 500 */
  --accent: #f43f5e;
  /* Rose 500 */
  --success: #10b981;
  /* Emerald 500 */
  --warning: #f59e0b;
  /* Amber 500 */
  --dark: #0f172a;
  /* Slate 900 */
  --light: #f8fafc;
  /* Slate 50 */

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Base Styles */
body {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--dark);
  background-color: var(--light);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Outfit", sans-serif;
}

/* Utilities */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #d97706 0%, #fbbf24 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
@media screen and (width<=1275px) {
  .problemsImg {
    height: 0%;
  }
}
.soft-shadow {
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

.animate-pulse-soft {
  animation: pulse-soft 3s infinite;
}

/* Hero Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-active {
  opacity: 0;
}

.hero-slide.active .animate-on-active {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

/* Custom Components */
.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.6);
}

/* Hall of Fame Shine */
@keyframes shine {
  0% {
    background-position: 200% center;
  }

  100% {
    background-position: -200% center;
  }
}

.hover-shine:hover {
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: shine 1.5s infinite linear;
}

.nav-link {
  position: relative;
  font-weight: 500;
  color: #475569;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero Slider */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition:
    opacity 1s ease-in-out,
    transform 8s ease-out;
  transform: scale(1.05);
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-overlay {
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(15, 23, 42, 0.8) 50%,
    rgba(15, 23, 42, 0.4) 100%
  );
}

/* Forms */
.form-floating-group {
  position: relative;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  padding: 1rem;
  border-radius: 0.75rem;
  outline: none;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: #94a3b8;
  pointer-events: none;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
  top: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
}

/* Stream Cards */
.stream-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.stream-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Floating Buttons */
.floating-btn {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-btn:hover {
  transform: scale(1.1) translateY(-5px);
}
/* Fix "What's Your Situation" cards mobile layout */
@media (max-width: 500px) {
  /* Target all situation cards */
  #home .grid.grid-cols-2 > div {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  /* Image container full width on top */
  #home .grid.grid-cols-2 > div > div:last-child {
    width: 100% !important;
    height: 140px !important;
    order: -1; /* moves image to top */
  }

  /* Image fill properly */
  #home .grid.grid-cols-2 > div img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
/* Fix stream card extra whitespace on mobile */
/* ===== MOBILE STREAM CARD FIX (REAL SOLUTION) ===== */
@media (max-width: 768px) {
  /* Compact grid spacing */
  #nios-admission .grid {
    gap: 12px !important;
  }

  /* Fixed smaller height → no huge gap */
  .flip-card {
    height: 300px !important;
  }

  /* prevent overlap while flipping */
  .flip-card {
    position: relative;
    z-index: 1;
  }

  .flip-card.active {
    z-index: 10;
  }

  /* tap flip support */
  .flip-card.active .flip-card-inner {
    transform: rotateY(180deg);
  }
}
