/* ============================================
   Aviation Study Guides — BEACON-matched theme
   ============================================ */

:root {
  --navy:       #1a2340;
  --navy-light: #243056;
  --gold:       #c9a84c;
  --gold-light: #e0c97a;
  --white:      #ffffff;
  --gray-50:    #f8f9fa;
  --gray-100:   #f0f1f3;
  --gray-200:   #e2e4e8;
  --gray-400:   #9ca3af;
  --gray-600:   #6b7280;
  --gray-800:   #1f2937;
  --card-border:#d5d8de;
  --radius:     12px;
  --radius-sm:  8px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ---- Header (nav bar) ---- */
.header {
  background: var(--navy);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-logo {
  height: 36px;
  width: auto;
  border-radius: 8px;
}

.header-title {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ---- Auth Buttons ---- */
.auth-buttons { display: flex; gap: 1rem; align-items: center; }
.user-menu { display: none; align-items: center; gap: 1rem; }
.user-menu.active { display: flex; }
.hidden { display: none !important; }

.btn { display: inline-block; padding: 8px 20px; border-radius: 6px; font-size: 0.85rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: all 0.2s; }
.btn-outline { border: 1.5px solid var(--gold); color: var(--gold); background: transparent; }
.btn-outline:hover { background: var(--gold); color: var(--navy); }
.btn-primary { border: 1.5px solid var(--gold); background: var(--gold); color: var(--navy); font-weight: 700; }
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); }

.btn-sign-in {
  display: inline-block;
  padding: 6px 18px;
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-sign-in:hover { background: var(--gold); color: var(--navy); }

.btn-get-started {
  display: inline-block;
  padding: 8px 22px;
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-get-started:hover { background: var(--gold-light); border-color: var(--gold-light); }

.btn-sign-out {
  display: inline-block;
  padding: 6px 18px;
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-sign-out:hover { background: var(--gold); color: var(--navy); }

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ---- Hero Section ---- */
.hero {
  background: linear-gradient(170deg, var(--navy) 0%, var(--navy-light) 100%);
  text-align: center;
  padding: 3.5rem 2rem 3rem;
}

.hero-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  background: var(--white);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  margin-bottom: 1.25rem;
}

.hero h1 {
  color: var(--white);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 400;
}

/* ---- Applications Grid ---- */
.dashboard {
  max-width: 1200px;
  margin: 2.5rem auto 3rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ---- Cards ---- */
.card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: block;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(26, 35, 64, 0.1);
}

.card-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon-wrap svg {
  width: 36px;
  height: 36px;
}

.card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.5;
  max-width: 280px;
  margin: 0 auto;
}

.card-price {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.25);
  padding: 3px 12px;
  border-radius: 20px;
}

.card-price-free {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(26,35,64,0.06);
  border: 1px solid rgba(26,35,64,0.12);
  color: var(--navy);
  padding: 3px 12px;
  border-radius: 20px;
}

/* ---- Premium Banner ---- */
.premium-banner {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
}

.premium-banner-inner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.premium-banner h3 {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.premium-banner .premium-desc {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
}

.premium-btn-primary {
  display: inline-block;
  padding: 10px 24px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}
.premium-btn-primary:hover { background: var(--gold-light); }

.premium-btn-outline {
  display: inline-block;
  padding: 10px 24px;
  background: transparent;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
}
.premium-btn-outline:hover { background: var(--gold); color: var(--navy); }

/* ---- Footer ---- */
.footer {
  margin-top: auto;
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: 0.8rem;
}

.footer a {
  color: var(--gold);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-divider {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 0.6rem auto;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .btn-get-started { display: none !important; }
  .header-title { font-size: 0.95rem; }
  .header { padding: 0 1rem; }
  .premium-banner-inner {
    flex-direction: column;
    text-align: center;
  }
}
