/* ========================================================
   MODERN UI OVERHAUL (MOBILE & PC RESPONSIVE) - FIXED BOUNDARIES
   ======================================================== */

/* 1. Global Variables */
:root {
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(0, 0, 0, 0.08); /* Darker border for visible boundaries */
  --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

body {
  overflow-x: hidden;
  background: #f4f7f6; /* slightly darker background so white cards pop out */
}

/* 2. Glassmorphism & Structured Elements */
.app-header {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
}

/* Ensure Form Cards have strict boundaries */
.form-card {
  background: #ffffff !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
  border-radius: 12px !important;
  margin: 0 auto;
  max-width: 100%;
}

.ad-card {
  background: #ffffff !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
  border-radius: 12px !important;
}

/* 3. Micro-animations */
.btn {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease !important;
}
.btn:active {
  transform: scale(0.96) !important;
}

.card-hover {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease !important;
}
.card-hover:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 24px rgba(0,0,0,0.1) !important;
}

/* 4. Navigation (Mobile & PC) */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.3s ease;
}
.mobile-menu-toggle:hover {
  background: rgba(138, 12, 37, 0.05);
}

@media (min-width: 993px) {
  /* Ensure horizontal layout on PC */
  .nav-menu {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    gap: 8px !important;
  }
  .mobile-menu-toggle {
    display: none !important;
  }
  /* Constrain the main container */
  .container {
    max-width: 1280px !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 992px) {
  /* Header specific adjustments */
  .header-container {
    justify-content: space-between !important;
    padding: 10px 0 !important;
    align-items: center !important;
  }
  
  .logo-area {
    flex: 1;
  }

  .brand-text h1 {
    font-size: 1.25rem !important;
  }
  
  .brand-subtitle, .brand-affil, .header-badge {
    display: none !important; /* Hide extra info on mobile to save space */
  }

  /* Hamburger Menu Toggle */
  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  /* The actual navigation menu */
  .nav-menu {
    position: fixed !important;
    top: 68px !important;
    left: -100% !important;
    width: 280px !important;
    height: calc(100vh - 68px) !important;
    background: #ffffff !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 24px !important;
    gap: 12px !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15) !important;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 999 !important;
    overflow-y: auto !important;
    margin: 0 !important;
    border-right: 1px solid var(--glass-border);
  }

  .nav-menu.active {
    left: 0 !important;
  }

  .nav-item {
    width: 100% !important;
    justify-content: flex-start !important;
    padding: 14px 20px !important;
    font-size: 1.05rem !important;
    border-radius: 8px !important;
    background: #f8fafc;
    border: 1px solid var(--glass-border);
  }
  
  .nav-item:active {
    transform: scale(0.98);
  }

  .nav-item.active {
    background: var(--crimson-light) !important;
    color: var(--crimson-color) !important;
    border-color: rgba(138, 12, 37, 0.2) !important;
  }

  /* Forms & Grid Layouts */
  .form-group.span-4, 
  .form-group.span-3, 
  .form-group.span-8, 
  .form-group {
    grid-column: span 12 !important; /* Stack forms vertically on mobile */
  }

  .stepper {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 24px !important;
    border: 1px solid var(--glass-border) !important;
  }
  
  .step-line {
    display: none !important; /* Hide lines on vertical stepper */
  }
  
  .step {
    width: 100% !important;
    justify-content: flex-start !important;
  }
  
  /* Course Grid */
  .course-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Sliders and Cards */
  .ad-slider-container {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 24px !important;
    gap: 16px !important;
  }
  
  .ad-card {
    min-width: 85vw !important;
    scroll-snap-align: center;
    margin-right: 0 !important;
  }

  /* Slider arrows hide on mobile, use swipe */
  .slider-arrow {
    display: none !important;
  }

  /* Highlight cards */
  .india-highlights-section > div {
    grid-template-columns: 1fr 1fr !important;
  }
  
  /* Stream Cards */
  .stream-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 600px) {
  .india-highlights-section > div {
    grid-template-columns: 1fr !important;
  }
  
  .stream-grid {
    grid-template-columns: 1fr !important;
  }
  
  .hero-slide-content h2 {
    font-size: 1.6rem !important;
  }
  
  .hero-slide-content p {
    font-size: 0.95rem !important;
  }
  
  .dashboard-layout {
    flex-direction: column !important;
  }
}

/* Modern Input Styling Enhancements */
input:not([type="radio"]):not([type="checkbox"]), select, textarea {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  transition: all 0.25s ease !important;
  padding: 14px 16px !important; 
  border-radius: 8px !important;
  font-size: 1rem !important; 
  color: #333 !important;
}
input:not([type="radio"]):not([type="checkbox"])::placeholder, select::placeholder, textarea::placeholder {
  color: #888 !important;
}
input:focus, select:focus, textarea:focus {
  background: #fff !important;
  border-color: var(--gold-color) !important;
  box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.15) !important;
  transform: translateY(-2px);
  outline: none !important;
}

/* Promo Banner / Call to Action Cards Fixes */
.promo-banner {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 20px !important;
}
.promo-card {
  padding: 24px !important; 
  text-align: left !important;
  background: #ffffff !important; 
  color: var(--text-dark) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
  border-radius: 12px !important;
  min-height: auto !important;
  justify-content: flex-start !important;
  gap: 12px !important;
}
.promo-card::before, .promo-card-2::before {
  display: none !important; 
}
.promo-title {
  text-align: left !important;
  font-size: 1.25rem !important;
  color: var(--crimson-color) !important;
  margin-bottom: 6px !important;
}
.promo-desc {
  text-align: left !important;
  color: var(--text-muted) !important;
  margin-bottom: 16px !important;
  line-height: 1.4 !important;
}
.promo-btn {
  margin-top: auto !important;
  align-self: flex-start !important;
}
