/* ───────────────────────────────────────
   index-style.css
   Glass Header/Footer, Pill Nav, Sticky Layout
─────────────────────────────────────── */

/* 1) Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f6fc url('../assets/bk1.png') center/cover no-repeat;
  color: #333;
}
.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 2) Header */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  width: 100%;
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 16px 24px;
  flex-wrap: wrap;
}
.site-branding { display: flex; align-items: center; gap: 8px; }
.site-logo { width: 40px; height: 40px; object-fit: contain; }
.site-name { font-size: 1.5rem; font-weight: bold; color: #1f3c88; }

/* 3) Primary Nav (desktop) */
.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  margin-left: auto;
  gap: 10px;
  transition: max-height .25s ease;
  overflow: hidden; /* used on mobile for animation */
}
.header-nav a {
  display: inline-block;
  padding: .5rem 1rem;
  border: 1px solid #1f6feb;
  border-radius: 9999px;
  color: #1f6feb;
  text-decoration: none;
  transition: background-color .3s, color .3s;
}
.header-nav a:hover,
.header-nav a.active { background-color: rgba(31,111,235,.1); color: #0d3e90; }

/* 4) Optional pill buttons (if used anywhere) */
.header-auth { display: flex; gap: 10px; }
.btn.login, .btn.register {
  padding: .5rem 1rem; border-radius: 9999px; font-weight: 500;
  text-decoration: none; transition: background-color .3s;
}
.btn.login  { border: 1px solid #3498db; color: #3498db; background: transparent; }
.btn.login:hover { background: #2980b9; color: #fff; }
.btn.register { border: 1px solid #2ecc71; color: #2ecc71; background: transparent; }
.btn.register:hover { background: #27ae60; color: #fff; }

/* 5) Hamburger (hidden on desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
  cursor: pointer;
}
.hamburger span {
  width: 25px; height: 3px; background: #333; border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}

/* 6) Main Content */
.main-content {
  flex: 1;
  padding: 100px 20px 20px; /* offset fixed header */
  max-width: 900px;
  margin: 0 auto;
}
.main-content section { margin-bottom: 40px; }
.main-content h2, .main-content h3 { color: #1f3c88; margin-bottom: 12px; }
.cta-button {
  display: inline-block; margin-top: 15px; padding: 10px 20px;
  background: #1f6feb; color: #fff; border-radius: 6px;
  text-decoration: none; transition: background-color .3s ease;
}
.cta-button:hover { background: #0d3e90; }

/* 7) Footer */
footer {
  backdrop-filter: blur(10px);
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: .9rem;
  margin-top: auto;
  flex-shrink: 0;
}

/* 8) Quick Login Card (homepage) */
#quick-login { margin-top: 24px; }
.home-login-card {
  max-width: 520px; margin: 12px 0 20px; padding: 20px;
  background: rgba(255,255,255,.9); border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,.08);
}
.home-login-card h3 { margin-bottom: 12px; color: #1f3c88; }
.home-login-card form { display: flex; flex-direction: column; gap: 12px; }
.home-login-card input {
  padding: 10px; border: 1px solid #d1d9e6; border-radius: 6px; font-size: 15px;
}
.home-login-card input:focus { outline: none; border-color: #1f6feb; background: #f7fbff; }
.home-login-card button {
  padding: 10px; background: #1f6feb; color: #fff; border: none;
  border-radius: 6px; font-weight: 600; cursor: pointer; transition: background-color .25s ease;
}
.home-login-card button:hover { background: #0d3e90; }
.home-login-meta { display: flex; justify-content: space-between; margin-top: 10px; }
.home-login-meta a { color: #1f6feb; text-decoration: none; }
.home-login-meta a:hover { text-decoration: underline; }

/* 9) Hero split layout */
.hero { margin-top: 8px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr; /* left copy wider than login card */
  gap: 24px;
  align-items: center;
}
.hero-copy h1 { font-size: 2rem; color: #1f3c88; margin-bottom: 10px; }
.hero-copy p { color: #334; line-height: 1.6; }
.hero-ctas { display: flex; gap: 12px; margin-top: 16px; }
.cta-secondary {
  display: inline-block; padding: 10px 20px; border: 1px solid #1f6feb;
  border-radius: 6px; color: #1f6feb; text-decoration: none;
  transition: background-color .25s ease, color .25s ease;
}
.cta-secondary:hover { background: rgba(31,111,235,.08); color: #0d3e90; }
.hero-card { display: flex; justify-content: center; }

/* 10) Push content when mobile nav is open */
:root { --nav-drop-h: 0px; }
body.nav-open .main-content { padding-top: calc(100px + var(--nav-drop-h)); }

/* 11) Mobile */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { margin-top: 8px; }
}
@media (max-width: 768px) {
  /* collapse nav until opened */
  .header-nav {
    display: none;            /* hidden by default */
    flex-direction: column;   /* stacked when shown */
    align-items: flex-start;
    width: 100%;
    padding-left: 16px;
    margin-top: 8px;
    max-height: 0;            /* collapsed for transition */
  }
  .header-nav.show-nav {
    display: flex;            /* shown via JS toggle */
    max-height: none;         /* height is controlled by JS for push-down */
  }

  /* fixed hamburger at top-right */
  .hamburger {
    display: flex;
    position: fixed;
    top: 16px; right: 16px;
    z-index: 1100;
    background: rgba(255,255,255,.9);
    padding: 8px; border-radius: 8px;
  }
  /* animate to X */
  .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  /* extra spacing for small screens */
  .main-content { padding: 120px 16px 20px; }

  /* login card full width */
  .home-login-card { max-width: 100%; }
}
