/*
 * Student-1st Website Theme v2.0
 * EXACT MATCH to Student1stTheme_v2_Optimized.xaml from WPF app
 * Professional Dark Theme - COLORBLIND COMPLIANT
 */

/* ============================================================
   CORE COLORS - Direct mapping from app XAML theme
   ============================================================ */
:root {
  /* Base Surfaces (from XAML) */
  --theme-bg: #0F172A;           /* ThemeBgColor - main background dark navy */
  --theme-card: #1E293B;         /* ThemeCardColor - card/elevated surfaces */
  
  /* Text Colors (from XAML) */
  --theme-text-main: #F1F5F9;    /* ThemeTextMainColor - primary text off-white */
  --theme-text-dim: #94A3B8;     /* ThemeTextDimColor - secondary text gray */
  
  /* Primary Accent (Cyan - from XAML) */
  --theme-primary: #38BDF8;      /* ThemePrimaryColor - main interactive */
  --theme-primary-dim: #0EA5E9;  /* ThemePrimaryDimColor - hover */
  --theme-primary-dark: #0284C7; /* ThemePrimaryDarkColor - pressed */
  
  /* Semantic Accents (from XAML) */
  --theme-accent-green: #10B981;  /* ThemeAccentGreenColor - success/present/positive */
  --theme-accent-amber: #F59E0B;  /* ThemeAccentAmberColor - warning/attention */
  --theme-accent-red: #E11D48;    /* ThemeAccentRedColor - error/absent/critical */
  --theme-accent-purple: #A78BFA; /* Alternative actions */
  --theme-accent-pink: #EC4899;   /* Special highlights */
  
  /* Glass/Overlay Effects */
  --theme-overlay-10: rgba(255, 255, 255, 0.1);  /* 10% white - subtle glass */
  --theme-overlay-20: rgba(255, 255, 255, 0.2);  /* 20% white - borders */
  --theme-overlay-40: rgba(0, 0, 0, 0.4);        /* 40% black - backdrops */
  
  /* Border Colors */
  --theme-border: rgba(255, 255, 255, 0.15);     /* Soft white borders */
  --theme-border-hover: rgba(56, 189, 248, 0.5); /* Primary on hover */
  
  /* Typography - matching app FontSize resources */
  --font-size-xxlarge: 24px;  /* Page titles, major headings */
  --font-size-xlarge: 20px;   /* Section titles */
  --font-size-large: 18px;    /* Card headers */
  --font-size-medium: 16px;   /* Emphasized text */
  --font-size-normal: 14px;   /* Body text, buttons */
  --font-size-small: 12px;    /* Pills, badges */
  --font-size-tiny: 11px;     /* Helper text */
  --font-size-micro: 10px;    /* Timestamps */
  
  /* Spacing - consistent with app */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  
  /* Border Radius - matching app rounded corners */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ============================================================
   GLOBAL STYLES
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--theme-text-main);
  background: var(--theme-bg);
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
header {
  background: var(--theme-card);
  border-bottom: 1px solid var(--theme-border);
  padding: var(--spacing-lg) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--theme-overlay-40);
  backdrop-filter: blur(10px);
  min-height: 80px; /* Reserve space for navigation - prevents CLS jump */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading skeleton for navigation (shows before JS injects nav) */
header:empty::before {
  content: '';
  display: block;
  width: 90%;
  max-width: 1200px;
  height: 50px;
  margin: 0 auto;
  background: linear-gradient(
    90deg,
    var(--theme-card) 0%,
    var(--theme-overlay-10) 50%,
    var(--theme-card) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
  opacity: 0.3; /* More subtle */
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  font-size: var(--font-size-xxlarge);
  font-weight: 700;
  color: var(--theme-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.logo:hover {
  color: var(--theme-primary-dim);
}

.logo-icon {
  width: 60px !important;
  height: 60px !important;
  max-width: 60px !important;
  max-height: 60px !important;
  object-fit: contain;
  aspect-ratio: 1 / 1; /* Force perfect square/circle */
  vertical-align: middle;
  margin-right: 12px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

nav ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-xl);
  margin-left: var(--spacing-xl); /* Add space between logo and nav items */
}

nav a {
  text-decoration: none;
  color: var(--theme-text-dim);
  font-weight: 500;
  font-size: var(--font-size-normal);
  transition: color var(--transition-fast);
}

nav a:hover {
  color: var(--theme-primary);
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  background: rgba(30, 41, 59, 0.5);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--theme-border);
  font-size: var(--font-size-small);
}

.breadcrumb a {
  color: var(--theme-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--theme-primary-dim);
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--theme-text-dim);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-bottom: 2px solid var(--theme-primary);
  color: var(--theme-text-main);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, var(--theme-overlay-10) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  margin-bottom: var(--spacing-lg);
  line-height: 1.2;
  background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Symmetric Brand Lockup (Logo - Text - Logo) */
.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.hero-logo-left,
.hero-logo-right {
  width: 80px;
  height: 80px;
  object-fit: contain;
  aspect-ratio: 1 / 1; /* Force perfect square/circle */
  filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.4));
  animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%, 100% {
    filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.4));
  }
  50% {
    filter: drop-shadow(0 6px 20px rgba(56, 189, 248, 0.6));
  }
}

/* Mobile optimization for brand lockup */
@media (max-width: 768px) {
  .brand-lockup {
    gap: var(--spacing-md);
  }

  .hero-logo-left,
  .hero-logo-right {
    width: 60px;
    height: 60px;
  }

  .brand-lockup h1 {
    font-size: clamp(28px, 6vw, 36px);
  }
}

@media (max-width: 480px) {
  .brand-lockup {
    gap: var(--spacing-sm);
  }

  .hero-logo-left,
  .hero-logo-right {
    width: 50px;
    height: 50px;
  }
}

/* About Page Hero Logo (Above Founder's Vision) - 40% LARGER for maximum impact */
.about-hero-logo {
  width: 170px;
  height: 170px;
  margin: 0 auto var(--spacing-md); /* Reduced from var(--spacing-xl) for tighter visual link */
  display: block;
  object-fit: contain;
  aspect-ratio: 1 / 1; /* Force perfect square/circle */
  filter: drop-shadow(0 6px 20px rgba(56, 189, 248, 0.5));
  animation: logo-glow 4s ease-in-out infinite;
}

@keyframes logo-glow {
  0%, 100% {
    filter: drop-shadow(0 6px 20px rgba(56, 189, 248, 0.5));
  }
  50% {
    filter: drop-shadow(0 10px 40px rgba(56, 189, 248, 0.9)); /* Stronger glow for larger logo */
  }
}

/* Mobile optimization for about logo */
@media (max-width: 768px) {
  .about-hero-logo {
    width: 140px;
    height: 140px;
    margin-bottom: var(--spacing-lg);
  }
}

@media (max-width: 480px) {
  .about-hero-logo {
    width: 110px;
    height: 110px;
  }
}



.hero .tagline {
  font-size: clamp(20px, 3vw, 28px);
  margin-bottom: var(--spacing-md);
  color: var(--theme-text-dim);
  font-weight: 600;
}

.hero p {
  font-size: clamp(16px, 2vw, 20px);
  margin-bottom: var(--spacing-xl);
  color: var(--theme-text-dim);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-normal);
  font-size: var(--font-size-medium);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--theme-primary);
  color: var(--theme-bg);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
}

.btn-primary:hover {
  background: var(--theme-primary-dim);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--theme-primary);
  border: 2px solid var(--theme-primary);
}

.btn-secondary:hover {
  background: var(--theme-primary);
  color: var(--theme-bg);
}

.btn-danger {
  background: var(--theme-accent-red);
  color: var(--theme-text-main);
}

.btn-danger:hover {
  background: #BE123C;
  transform: translateY(-2px);
}

.hero-ctas {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}

/* ============================================================
   CARDS & SECTIONS
   ============================================================ */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: var(--font-size-xxlarge);
  font-weight: 700;
  margin-bottom: var(--spacing-xxl);
  color: var(--theme-text-main);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xxl);
}

.card {
  background: var(--theme-card);
  border: 2px solid var(--theme-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-xl);
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--theme-overlay-40);
  border-color: var(--theme-primary);
}

.card .icon {
  font-size: 48px;
  margin-bottom: var(--spacing-lg);
  display: block;
}

.card h3 {
  font-size: var(--font-size-large);
  margin-bottom: var(--spacing-md);
  color: var(--theme-text-main);
}

.card p {
  color: var(--theme-text-dim);
  margin-bottom: var(--spacing-lg);
  line-height: 1.7;
}

.card a {
  color: var(--theme-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.card a:hover {
  color: var(--theme-primary-dim);
}

/* ============================================================
   COMPARISON BOXES
   ============================================================ */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
}

.comparison-box {
  padding: var(--spacing-xl);
  border-radius: var(--radius-md);
  border: 2px solid var(--theme-border);
  background: var(--theme-card);
}

.comparison-box.bad {
  background: rgba(225, 29, 72, 0.1);
  border-color: var(--theme-accent-red);
}

.comparison-box.good {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--theme-accent-green);
}

.comparison-box h4 {
  font-size: var(--font-size-large);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  color: var(--theme-text-main);
}

.comparison-box .icon {
  font-size: 32px;
}

.comparison-box p {
  color: var(--theme-text-dim);
  line-height: 1.7;
}

/* ============================================================
   TABLES
   ============================================================ */
.demo-table {
  width: 100%;
  background: var(--theme-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--theme-border);
  margin: var(--spacing-xl) 0;
}

.demo-table table {
  width: 100%;
  border-collapse: collapse;
}

.demo-table th {
  background: rgba(56, 189, 248, 0.1);
  color: var(--theme-primary);
  padding: var(--spacing-md);
  text-align: left;
  font-weight: 600;
  font-size: var(--font-size-normal);
}

.demo-table td {
  padding: var(--spacing-md);
  border-top: 1px solid var(--theme-border);
  color: var(--theme-text-main);
}

.demo-table tr:hover {
  background: var(--theme-overlay-10);
}

/* ============================================================
   SVG ICONS (replacing emoji)
   ============================================================ */
.icon-chart {
  display: inline-block;
  width: 48px;
  height: 48px;
  background: var(--theme-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E") center/contain no-repeat;
}

.icon-medical {
  display: inline-block;
  width: 48px;
  height: 48px;
  background: var(--theme-accent-red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5zm0 18c-4 0-7-3-7-7V8l7-3.5L19 8v5c0 4-3 7-7 7zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5zm0 18c-4 0-7-3-7-7V8l7-3.5L19 8v5c0 4-3 7-7 7zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.icon-dice {
  display: inline-block;
  width: 48px;
  height: 48px;
  background: var(--theme-accent-purple);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2' stroke='currentColor' stroke-width='2' fill='none'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.5'/%3E%3Ccircle cx='16.5' cy='7.5' r='1.5'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3Ccircle cx='7.5' cy='16.5' r='1.5'/%3E%3Ccircle cx='16.5' cy='16.5' r='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2' stroke='currentColor' stroke-width='2' fill='none'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.5'/%3E%3Ccircle cx='16.5' cy='7.5' r='1.5'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3Ccircle cx='7.5' cy='16.5' r='1.5'/%3E%3Ccircle cx='16.5' cy='16.5' r='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.icon-check {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: var(--theme-accent-green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}

.icon-x {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: var(--theme-accent-red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--theme-card);
  border-top: 2px solid var(--theme-border);
  color: var(--theme-text-dim);
  padding: var(--spacing-xxl) 0;
  text-align: center;
}

footer a {
  color: var(--theme-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

footer a:hover {
  color: var(--theme-primary-dim);
}

footer strong {
  color: var(--theme-text-main);
}

/* ============================================================
   TRUST BADGES
   ============================================================ */
.trust-badge {
  margin-top: var(--spacing-xl);
  font-size: var(--font-size-normal);
  color: var(--theme-text-dim);
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.trust-badge span {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  nav ul {
    gap: var(--spacing-md);
  }
  
  .hero {
    padding: 60px 0;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  
  section {
    padding: 60px 0;
  }
}
/* ============================================================
   FEATURE GRID STYLES
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--theme-card);
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  padding: 32px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--theme-border-hover);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-card h3 {
  color: var(--theme-text-main);
  font-size: 24px;
  margin-bottom: 8px;
}

.feature-subtitle {
  color: var(--theme-text-dim);
  font-size: 14px;
  margin-bottom: 16px;
}

.feature-link {
  color: var(--theme-primary);
  font-size: 14px;
  font-weight: 600;
}
