/* style.css */
/* This controls how everything looks */

/* Import a clean font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

/* Basic reset - makes everything start clean */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Root colours - change these to match your school colours */
:root {
  --primary: #3499D1;      /* Legacy House blue */
  --secondary: #878787;    /* Legacy House grey */
  --white: #ffffff;
  --light-grey: #f5f5f5;
  --dark-grey: #000000;
  --danger: #e74c3c;
  --success: #27ae60;
}

/* The whole page */
body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--light-grey);
  color: var(--dark-grey);
  min-height: 100vh;
}

/* TOP BAR */
header {
  background-color: var(--primary);
  color: var(--white);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 65px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

header .logo img {
  height: 45px;
  width: auto;
}

header .logo h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}

header .logo span {
  display: block;
  font-size: 0.7rem;
  color: var(--secondary);
  font-weight: 400;
}

/* Navigation tabs at the bottom of screen */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 100;
}

.bottom-nav button {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  color: #999;
  font-size: 0.65rem;
  font-family: 'Open Sans', sans-serif;
  padding: 5px 15px;
  border-radius: 10px;
  transition: all 0.2s;
}

.bottom-nav button.active {
  color: var(--primary);
}

.bottom-nav button svg {
  width: 24px;
  height: 24px;
}

/* Main content area */
.main-content {
  padding: 20px;
  padding-bottom: 80px; /* Space for bottom nav */
  max-width: 680px;
  margin: 0 auto;
}

/* Page sections (Home, Newsletters, Calendar) */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* Cards - the white boxes that hold content */
.card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555;
}

.card .date {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card .grade-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 10px;
}

/* Welcome banner on home page */
.welcome-banner {
  background: linear-gradient(135deg, #3499D1, #1a7ab5);
  color: var(--white);
  border-radius: 16px;
  padding: 25px 20px;
  margin-bottom: 20px;
}

.welcome-banner h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.welcome-banner p {
  font-size: 0.85rem;
  opacity: 0.85;
}

.welcome-banner .grade-tag {
  display: inline-block;
  background: var(--secondary);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 14px;
  border-radius: 20px;
  margin-top: 12px;
}

/* Section titles */
.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  margin-bottom: 12px;
  margin-top: 20px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: #2a5a8c;
}

.btn-secondary {
  background: var(--secondary);
  color: var(--primary);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

/* Forms - login and register boxes */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-grey);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Open Sans', sans-serif;
  transition: border-color 0.2s;
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* Login / Register screen */
.auth-screen {
  min-height: 100vh;
  background: linear-gradient(160deg, #3499D1 0%, #1a7ab5 50%, #3499D1 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-box {
  background: var(--white);
  border-radius: 20px;
  padding: 30px 25px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-box .school-name {
  text-align: center;
  margin-bottom: 25px;
}

.auth-box .school-name h1 {
  font-family: 'Montserrat', sans-serif;
  color: var(--primary);
  font-size: 1.4rem;
}

.auth-box .school-name p {
  color: var(--secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

.auth-tabs {
  display: flex;
  margin-bottom: 25px;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid #eee;
}

.auth-tabs button {
  flex: 1;
  padding: 10px;
  border: none;
  background: var(--light-grey);
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: #999;
  transition: all 0.2s;
}

.auth-tabs button.active {
  background: var(--primary);
  color: var(--white);
}

/* Error and success messages */
.message {
  padding: 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  text-align: center;
  display: none;
}

.message.error {
  background: #fde8e8;
  color: var(--danger);
  display: block;
}

.message.success {
  background: #e8f8ee;
  color: var(--success);
  display: block;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state - when there's nothing to show */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.empty-state svg {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 0.9rem;
}

/* Notification bell */
.notif-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white);
  position: relative;
  padding: 5px;
}

.notif-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  background: var(--secondary);
  border-radius: 50%;
}

/* Make it look good on bigger screens too */
@media (min-width: 680px) {
  .auth-screen {
    background: linear-gradient(160deg, var(--primary) 0%, #1a3a5c 100%);
  }
  /* Gallery grid */
.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  background: #eee;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  padding: 20px 8px 8px;
  font-size: 0.7rem;
  font-family: 'Montserrat', sans-serif;
}

.gallery-item .gallery-grade {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #3499D1;
  color: white;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}
/* Documents list */
.document-item {
  background: var(--white);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s;
}

.document-item:active {
  transform: scale(0.98);
}

.document-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #3499D1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
}

.document-info {
  flex: 1;
}

.document-info h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.document-info p {
  font-size: 0.75rem;
  color: #999;
}

.document-arrow {
  color: #ccc;
  font-size: 1.2rem;
}

.document-category {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #3499D1;
  font-weight: 700;
  margin-bottom: 8px;
  margin-top: 16px;
}

}