:root {
  --cm-primary: #6366f1; /* Slightly brighter indigo for dark mode */
  --cm-primary-hover: #4f46e5;
  --cm-secondary: #f472b6; /* Brighter pink */
  --cm-bg: #020617; /* Very dark slate/navy */
  --cm-surface: #1e293b; /* Slate 800 */
  --cm-text: #f8fafc; /* Slate 50 */
  --cm-text-muted: #94a3b8; /* Slate 400 */
  --cm-border: #334155; /* Slate 700 */
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  color: var(--cm-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Header */
header {
  padding: 1.5rem 0;
  /* Black to Dark Grey gradient */
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.95), rgba(30, 41, 59, 0.9));
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--cm-border);
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.3);
}

.nav-content {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding-left: 0px;
  padding-right: 0px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-img {
  height: 80px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.brand:hover .brand-logo-img {
  transform: scale(1.05) rotate(-2deg);
}

/* Header Search */
.header-search {
  display: none; /* Hidden by default (mobile) */
  position: relative;
  width: 300px;
}

.header-search .search-box.small {
  padding: 0.25rem;
  box-shadow: none;
  background: rgba(30, 41, 59, 0.8);
}

.header-search .search-input {
  font-size: 0.95rem;
  padding: 0.5rem 0;
}

.header-search .search-icon svg {
  width: 18px;
  height: 18px;
}

/* Hero Section */
.hero {
  padding: 60px 0 0.5rem;
  text-align: center;
  position: relative;
}

.hero-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -5;
  pointer-events: none;
  background-color: var(--cm-bg);
}

/* Animated Mesh Gradient Background */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(at 50% 50%, rgba(79, 70, 229, 0.15) 0px, transparent 50%),
              radial-gradient(at 0% 0%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
              radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.15) 0px, transparent 50%);
  background-size: 120% 120%;
  animation: aurora 15s ease-in-out infinite alternate;
  z-index: -2;
  filter: blur(60px);
}

@keyframes aurora {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-2%, 2%) rotate(2deg); }
  100% { transform: translate(2%, -2%) rotate(-2deg); }
}

/* Pulsing Orb */
.hero-bg::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(42, 209, 209, 0.4) 0%, rgba(95, 246, 224, 0.2) 40%, transparent 70%);
  filter: blur(80px);
  border-radius: 50%;
  z-index: -1;
  animation: pulseOrb 8s ease-in-out infinite alternate;
}

@keyframes pulseOrb {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.hero .container {
  position: relative;
}

.hero-content {
  position: relative;
  z-index: 20;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeUp 0.8s ease-out;
}

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

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-top: 0.1rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.hero h1 span {
  background: linear-gradient(135deg, #818cf8 0%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  white-space: nowrap;
  display: inline-block;
}

.hero h1 span::after {
  content: '';
  position: absolute;
  bottom: 0.1em;
  left: 0;
  width: 100%;
  height: 0.15em;
  background: linear-gradient(90deg, var(--cm-primary), var(--cm-secondary));
  opacity: 0.8;
  z-index: -1;
  border-radius: 10px;
  animation: expandLine 1s ease-out forwards 0.5s;
  width: 0; /* Start hidden */
}

@keyframes expandLine {
  to { width: 100%; }
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--cm-text-muted);
  max-width: 60ch;
  margin: 0 auto 2rem;
}

.powered-by {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.75rem;
  line-height: 1.2;
  padding-right: 20px;
}

.powered-label {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.hoozir-text {
  font-family: 'Jockey One', cursive;
  font-size: 2.2em;
  color: #ffffff;
  font-weight: 400;
}

.promo-banner-desktop {
  display: none; /* Hidden by default, shown on desktop */
}

.promo-banner-desktop .promo-text {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
  animation: pulse 2s infinite;
}


@media (min-width: 769px) {
  .promo-banner-desktop {
    display: block; /* Show desktop banner centered in header */
  }
  .promo-banner-mobile {
    display: none !important; /* Hide mobile banner on desktop */
  }
}

.promo-text {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Mobile Logo Styles */
.mobile-logo-container {
  display: none;
  justify-content: center;
  margin-bottom: 2rem;
  width: 100%; /* Ensure container spans full width */
}

.mobile-logo {
  height: auto;
  width: 70vw;
  display: block;
  margin: 0 auto; /* Explicit auto margins for centering */
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

/* Search Component */
.search-container {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 30;
}

/* Hero Search specific */
.hero-search {
  display: block; /* Visible by default (mobile) */
}

.search-box {
  position: relative;
  background: var(--cm-surface);
  border-radius: var(--radius-xl);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  background-clip: padding-box;
  /* Neon Glow Effect */
  box-shadow: 
    0 0 0 2px rgba(99, 102, 241, 0.5), /* Inner ring */
    0 0 15px rgba(99, 102, 241, 0.3),   /* Primary glow */
    0 0 30px rgba(244, 114, 182, 0.2);  /* Secondary outer glow */
}

/* Gradient border trick using pseudo-element logic alternative or box-shadows */
.search-box::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-xl) + 2px);
  padding: 2px;
  background: linear-gradient(45deg, var(--cm-primary), var(--cm-secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.search-box:focus-within {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 
    0 0 0 2px rgba(99, 102, 241, 0.8),
    0 0 20px rgba(99, 102, 241, 0.6),
    0 0 40px rgba(244, 114, 182, 0.4);
}

.search-icon {
  padding: 0 1rem;
  color: var(--cm-text-muted);
}

.search-input {
  flex: 1;
  border: none;
  font-size: 1.1rem;
  padding: 0.5rem 0;
  outline: none;
  background: transparent;
  font-family: var(--font-main);
  color: var(--cm-text);
  min-width: 0;
}

.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}


.search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  color: var(--cm-text-muted);
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.2s ease;
}

.search-clear:hover {
  color: var(--cm-text);
}

.search-clear.visible {
  display: flex;
}

.search-input::placeholder {
  color: #a5b4fc; /* Light purple */
}

/* Year select placeholder styling */
#class-year {
  color: #94a3b8 !important; /* Greyish for placeholder */
}

.search-results {
  position: absolute;
  top: calc(100% + 1rem);
  left: 0;
  right: 0;
  background: var(--cm-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--cm-border);
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 100;
}

.search-results.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.result-item {
  padding: 1rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left; /* Justify text results to the left */
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--cm-border);
}

.result-item:last-child {
  border-bottom: none;
}

.result-item:hover {
  background: #334155;
}

.school-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.school-name {
  font-weight: 700;
  color: var(--cm-text);
}

.school-location {
  font-size: 0.875rem;
  color: var(--cm-text-muted);
}

.school-vanity {
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(99, 102, 241, 0.2); /* Transparent primary */
  color: #a5b4fc; /* Lighter primary for text */
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* No results state */
.no-results {
  padding: 2rem;
  text-align: center;
  color: var(--cm-text-muted);
}

/* Year Selection */
.year-selection-container {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Desktop layout: university search and year selection on same line */
@media (min-width: 768px) {
  .search-and-year-wrapper {
    display: flex !important;
    gap: 2rem !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 900px !important;
    margin: 0 auto !important;
  }

  .search-and-year-wrapper .hero-search {
    flex: 1 !important;
  }

  .search-and-year-wrapper .year-selection-container {
    flex: 0 0 auto !important;
    margin-top: 0 !important;
  }
}

.year-select {
  flex: 0 0 auto;
  min-width: 120px;
  max-width: 150px;
  padding: 1rem 1.25rem;
  background: var(--cm-surface);
  border: 2px solid var(--cm-border);
  border-radius: var(--radius-xl);
  color: var(--cm-text);
  font-size: 1.1rem;
  font-family: var(--font-main);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

.year-select:focus {
  outline: none;
  border-color: var(--cm-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.year-select:hover {
  border-color: rgba(99, 102, 241, 0.5);
}

.go-button {
  padding: 1rem 2rem;
  background: var(--cm-border);
  border: 2px solid var(--cm-border);
  border-radius: var(--radius-xl);
  color: var(--cm-text-muted);
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: not-allowed;
  transition: all 0.2s ease;
  min-width: 80px;
}

.go-button.enabled {
  background: var(--cm-primary);
  border-color: var(--cm-primary);
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.go-button.enabled:hover {
  background: var(--cm-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.go-button:disabled {
  opacity: 0.6;
}

/* Features Grid */
.features {
  padding: 0.5rem 0 2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 0;
}

.feature-card {
  position: relative;
  background: var(--cm-surface);
  padding: 2rem;
  margin-top: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--cm-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  /* Fallback gradient if images fail */
  background: linear-gradient(145deg, var(--cm-surface), #151f2e);
}

/* Background Images for Feature Cards */
#card-chat {
  background-image: 
    linear-gradient(to bottom, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.85)),
    url('images/bg-classroom.png');
  background-size: cover;
  background-position: center;
}

#card-events {
  background-image: 
    linear-gradient(to bottom, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.85)),
    url('images/bg-campus.png');
  background-size: cover;
  background-position: center;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--cm-primary);
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
}

/* Make images slightly more visible on hover */
.feature-card:hover#card-chat,
.feature-card:hover#card-events {
  background-image: 
    linear-gradient(to bottom, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.7)),
    url('images/bg-classroom.png'); /* Re-declare URL for cascade */
}
.feature-card:hover#card-events {
  background-image: 
    linear-gradient(to bottom, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.7)),
    url('images/bg-campus.png');
}

.icon-box {
  width: 48px;
  height: 48px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
  backdrop-filter: blur(4px);
}

.feature-card h3 {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
  position: relative;
  z-index: 1;
}

.feature-card p {
  color: var(--cm-text-muted);
  position: relative;
  z-index: 1;
}

/* Footer */
.footer-powered {
  margin-top: auto;
  padding: 1.5rem 0;
  text-align: center;
  background: transparent;
  border-top: none;
}

.powered-container {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.powered-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hoozir-logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.hoozir-logo-group:hover {
  opacity: 1;
}

.hoozir-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Invert the Hoozir text logo for dark mode since it was likely dark text */
.hoozir-text {
  height: 48px;
  width: auto;
  object-fit: contain;
  opacity: 0.8;
}

/* FAQ & Accordion */
.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 1.5rem;
  text-align: center;
}

.faq {
  width: 100%;
  margin: 18px auto 16px;
  padding: 0;
}

.faq .container {
  width: 90vw;
  max-width: 800px;
  padding: 0;
  margin: 0 auto;
}

.accordion {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 0 auto;
}

.faq-group {
  display: grid;
  gap: 10px;
}

.faq-group + .faq-group {
  margin-top: 14px;
}

.faq-group-title {
  margin: 4px 6px 2px;
  color: var(--cm-text);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.accordion details {
  background: var(--cm-surface);
  border: 1px solid var(--cm-border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.accordion details[open] {
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 24px 14px 16px;
  font-weight: 900;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accordion summary::-webkit-details-marker { display: none; }

.accordion summary::after {
  content: "›";
  font-size: 20px;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 160ms ease;
  opacity: 0.8;
}

.accordion details[open] summary::after {
  transform: rotate(-90deg);
}

.accordion .answer {
  padding: 0 16px 16px;
  color: var(--cm-text-muted);
  font-weight: 600;
}

.accordion .answer a {
  color: var(--cm-primary);
  text-decoration: none;
}

.accordion .answer a:hover {
  text-decoration: underline;
}

/* Hide scrollbars completely */
::-webkit-scrollbar {
  width: 0;
  display: none;
}

* {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

@media (min-width: 768px) {
  .header-search {
    display: block;
  }
  .hero-search {
    display: block;
  }
}

@media (max-width: 768px) {
  /* Show header on mobile but adjust layout */
  header {
    position: absolute;
    top: 0;
    right: -0.5rem;
    padding: 1rem 1.5rem 1rem 1rem;
    z-index: 100;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
  }

  .nav-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  .brand {
    display: none; /* Hide logo on mobile header */
  }

  .promo-banner-desktop {
    display: none; /* Hide trial banner on mobile */
  }

  /* Show mobile logo */
  .mobile-logo-container {
    display: flex;
  }

  /* Show promo banner in hero section on mobile */
  .promo-banner-mobile {
    display: block;
    margin: 1rem 0;
    text-align: center;
  }

  .promo-text-mobile {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
  }

  .hero-images {
    display: none; /* Hide floating images on mobile */
  }
  
  /* Adjust hero padding since header is gone */
  .hero {
    padding: 60px 0 0.5rem;
  }
}
