/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Skip Link (accessibility) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #333;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
  text-decoration: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

/* Header Styles */
.site-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.75rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.branding-link {
  text-decoration: none;
  color: white;
}

.branding-link:hover {
  color: white;
}

.branding h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.branding .tagline {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 0.25rem;
  font-weight: 300;
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: white !important;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white !important;
}

/* Logout button styled as nav link */
.nav-logout-form {
  display: inline;
  margin: 0;
  padding: 0;
}

.nav-logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

/* Register button - slightly more prominent */
.nav-register {
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.nav-register:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.2);
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Footer */
.site-footer {
  background: #2d3748;
  color: #a0aec0;
  padding: 0.75rem 1.5rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-info p {
  margin: 0;
  font-size: 0.8rem;
}

.footer-tagline {
  font-size: 0.75rem !important;
  opacity: 0.7;
  margin-top: 0.15rem !important;
}

.footer-links p {
  margin: 0;
  font-size: 0.8rem;
}

.footer-links a {
  color: #90cdf4;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

/* Django Messages */
.alert {
  border-radius: 6px;
}

/* Forms (used by login, register, and school profile pages) */
.auth-card {
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

.auth-card .card-body {
  padding: 2rem;
}

.auth-card .card-title {
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #333;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .site-header {
    padding: 1rem 1.5rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .branding h1 {
    font-size: 1.3rem;
  }

  .branding .tagline {
    font-size: 0.8rem;
  }

  .main-nav {
    gap: 0.75rem;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0.8rem 1rem;
  }

  .branding h1 {
    font-size: 1.1rem;
  }

  .branding .tagline {
    font-size: 0.75rem;
  }

  .main-nav {
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
  }
}
