/* ===============================
   DESIGN TOKENS
================================ */
:root {
  --bg-main: #1a1a1a;
  --bg-section: #ffffff;
  --border-soft: #e1e1e1;

  --text-main: #212529;
  --text-muted: #555555;

  --accent-primary: #6F42C1;
  --accent-secondary: #FFC107;

  --btn-bg: var(--accent-primary);
  --btn-text: #ffffff;
  --btn-hover-bg: #5836a3;

  --nav-bg: rgba(111,66,193,0.95);
  --nav-text: #FFC107;
  --nav-hover: #fff1b8;
}

/* ===============================
   RESET & BASE
================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* ===============================
   HEADER & NAV
================================ */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: var(--bg-section);
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-soft);
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container img {
  height: 100%;
  max-height: 80px;
  width: auto;
  display: block;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
}

/* ===============================
   HAMBURGER
================================ */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1100;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active div:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active div:nth-child(2) {
  opacity: 0;
}

.hamburger.active div:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===============================
   MOBILE NAV
================================ */
.mobile-nav {
  position: fixed;
  inset: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;

  background: var(--nav-bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;

  z-index: 2000;
}

.mobile-nav.show {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav a {
  color: var(--nav-text);
  font-size: 2rem;
  font-weight: 700;
  text-decoration: none;
}

.mobile-nav a:hover {
  color: var(--nav-hover);
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  color: var(--nav-text);
  cursor: pointer;
}

.close-btn:hover {
  color: var(--nav-hover);
}

/* ===============================
   SECTIONS & CARDS
================================ */
section {
  padding: 90px 1.5rem 50px;
  scroll-margin-top: 80px;
}

.card {
  background: var(--bg-section);
  padding: 2.5rem;
  border-radius: 16px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
}

p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ===============================
   GRANTS
================================ */
.grant-content.open {
  overflow: visible;
}

.grant-subsection {
  background: #f3f0ff;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1rem 0;
}

.grant-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.grant-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.grant-content.open {
  max-height: 2000px;
  opacity: 1;
  margin-top: 1rem;
}

.toggle-icon {
  width: 1rem;
  height: 1rem;
  position: relative;
  margin-right: 0.5rem;
}

.toggle-icon::before,
.toggle-icon::after {
  content: '';
  position: absolute;
  background: var(--accent-primary);
  transition: all 0.3s ease;
}

.toggle-icon::before {
  width: 100%;
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}

.toggle-icon::after {
  width: 2px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.toggle-icon.minus::after {
  transform: scaleY(0);
}

/* ===============================
   CONTACT
================================ */
.contact-subsection {
  background: #f3f0ff;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-item {
  display: flex;
  gap: 0.5rem;
}

.contact-subsection a {
  text-decoration: none;
  color: var(--text-main);
}

.contact-subsection a:hover {
  color: var(--accent-primary);
}

/* ===============================
   FOOTER & BUTTONS
================================ */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
}

button {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: var(--btn-hover-bg);
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  nav ul {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  header img {
    max-height: 44px;
  }
}

/* ===============================
   TOAST NOTFICATION
================================ */
#download-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: var(--text-main);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 3000;
  min-width: 420px;
  max-width: 520px;
  bottom: 1.75rem;
}

#download-toast.show {
  opacity: 1;
}

.toast-icon {
  font-size: 3.5em;
}

.toast-text {
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  color: #6F42C1;
}