/* =============================================
   HOMESCHOOL360 — Complete Stylesheet
   Aesthetic: Warm editorial. Refined but approachable.
   Fonts: Playfair Display (headings) + DM Sans (body)
   Colors: Deep forest green + warm cream + gold accent
============================================= */

:root {
  --green-dark:   #1a3a2a;
  --green-mid:    #2d6a4f;
  --green-light:  #52b788;
  --gold:         #e9c46a;
  --gold-dark:    #c9a227;
  --cream:        #fdf6ec;
  --cream-dark:   #f0e6d3;
  --text-main:    #1c1c1c;
  --text-soft:    #5a5a5a;
  --white:        #ffffff;
  --radius:       14px;
  --shadow:       0 4px 24px rgba(26,58,42,0.10);
  --shadow-hover: 0 8px 36px rgba(26,58,42,0.16);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- HEADER ---- */
.site-header {
  background: var(--green-dark);
  padding: 28px 20px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(233,196,106,0.18) 0%, transparent 70%);
  border-radius: 50%;
}

.header-inner { position: relative; z-index: 1; }

.logo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 8vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}

.logo-h { color: var(--white); }
.logo-s { color: var(--white); }
.logo-360 {
  color: var(--gold);
  font-style: italic;
  text-shadow: 0 0 30px rgba(233,196,106,0.4);
}

.tagline {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* ---- NAV PILLS ---- */
.pill-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 4px 16px;
  justify-content: center;
  flex-wrap: wrap;
  scrollbar-width: none;
}
.pill-nav::-webkit-scrollbar { display: none; }

.pill {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 40px;
  padding: 8px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.pill:hover {
  background: rgba(255,255,255,0.18);
  color: var(--white);
}

.pill.active {
  background: var(--gold);
  color: var(--green-dark);
  border-color: var(--gold);
  font-weight: 700;
}

/* ---- MAIN ---- */
.main-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}

/* ---- SECTIONS ---- */
.tool-section { display: none; }
.tool-section.active { display: block; animation: fadeIn 0.35s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-hero {
  margin-bottom: 24px;
}
.section-hero h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 900;
  color: var(--green-dark);
  line-height: 1.1;
  margin-bottom: 8px;
}
.section-hero p {
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---- CARDS ---- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(26,58,42,0.07);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-hover); }

.card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 6px;
}
.card-sub {
  color: var(--text-soft);
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ---- STATE INFO ---- */
.state-info {
  margin-top: 14px;
  background: linear-gradient(135deg, #e8f5e9, #f1f8f2);
  border-left: 4px solid var(--green-light);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--green-dark);
}
.state-info strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }

/* ---- INPUTS ---- */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  flex: 1;
}
.input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #dde8e2;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text-main);
  background: var(--cream);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--green-light);
  background: var(--white);
}
textarea { resize: vertical; }

.goal-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.goal-row .input-group { min-width: 120px; }

/* ---- PROGRESS BAR ---- */
.progress-wrap { margin: 16px 0 8px; }
.progress-bar-bg {
  background: var(--cream-dark);
  border-radius: 40px;
  height: 18px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 40px;
  background: linear-gradient(90deg, var(--green-mid), var(--green-light));
  width: 0%;
  transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1);
}
.progress-label {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-top: 6px;
}
.progress-message {
  background: linear-gradient(135deg, #fff8e1, #fffde7);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--green-dark);
  font-weight: 500;
  display: none;
  margin-top: 8px;
}

/* ---- ATTENDANCE GRID ---- */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.month-nav button {
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}
.month-nav button:hover { background: var(--green-mid); }
.month-nav span {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-dark);
}

.tap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 12px;
}
.day-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--cream-dark);
  color: var(--text-soft);
  border: 1.5px solid transparent;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.day-cell:hover { border-color: var(--green-light); }
.day-cell.present {
  background: var(--green-mid);
  color: var(--white);
  border-color: var(--green-mid);
}
.day-cell.today { border-color: var(--gold); border-width: 2px; }
.day-cell.empty { background: transparent; cursor: default; border-color: transparent; }
.day-header {
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 4px;
}
.attendance-summary {
  font-size: 0.85rem;
  color: var(--text-soft);
  text-align: center;
}

/* ---- GRADE / GPA ROWS ---- */
.grade-row, .gpa-row, .split-row, .recipe-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.grade-row input, .gpa-row input, .gpa-row select,
.split-row input, .recipe-row input {
  flex: 1;
  min-width: 70px;
  margin-bottom: 0;
}
.gr-label, .gpa-course, .split-name, .rec-label { flex: 2; }

.remove-btn {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: background 0.2s;
}
.remove-btn:hover { background: #fecaca; }

/* ---- BUTTONS ---- */
.btn-add {
  background: transparent;
  color: var(--green-mid);
  border: 1.5px dashed var(--green-light);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  margin-right: 8px;
  transition: all 0.2s;
}
.btn-add:hover { background: #e8f5e9; }

.btn-calc {
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s, transform 0.1s;
}
.btn-calc:hover { background: var(--green-mid); }
.btn-calc:active { transform: scale(0.98); }

.btn-clear {
  background: transparent;
  color: #dc2626;
  border: 1.5px solid #fecaca;
  border-radius: 8px;
  padding: 7px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s;
}
.btn-clear:hover { background: #fee2e2; }

/* ---- RESULT BOX ---- */
.result-box {
  margin-top: 14px;
  background: linear-gradient(135deg, var(--green-dark), #2d5a40);
  color: var(--white);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  display: none;
}
.result-box.show { display: block; animation: fadeIn 0.3s ease; }
.result-box .big { font-size: 1.6rem; font-family: 'Playfair Display', serif; color: var(--gold); display: block; }
.result-box .sub { font-size: 0.82rem; font-weight: 400; opacity: 0.8; }

/* ---- LOG LIST ---- */
.log-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.log-item {
  background: var(--cream);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  border-left: 3px solid var(--green-light);
}
.log-item .log-date { font-weight: 700; color: var(--green-dark); font-size: 0.78rem; margin-bottom: 2px; }
.log-item .log-student { color: var(--text-soft); font-size: 0.78rem; }

/* ---- QUIZ ---- */
.quiz-card { min-height: 260px; }
.quiz-progress-bar {
  background: var(--cream-dark);
  border-radius: 40px;
  height: 6px;
  margin-bottom: 24px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-mid), var(--gold));
  border-radius: 40px;
  transition: width 0.4s ease;
  width: 0%;
}
.quiz-question {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 20px;
  line-height: 1.3;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-option {
  background: var(--cream);
  border: 2px solid #dde8e2;
  border-radius: 10px;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
  color: var(--text-main);
}
.quiz-option:hover { border-color: var(--green-light); background: #e8f5e9; }
.quiz-option.selected { border-color: var(--green-mid); background: #d8f0e2; font-weight: 600; }

/* ---- CURRICULUM MATCHES ---- */
.match-card {
  background: var(--cream);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--green-light);
}
.match-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--green-dark);
  margin-bottom: 4px;
}
.match-card p { font-size: 0.85rem; color: var(--text-soft); margin-bottom: 8px; line-height: 1.5; }
.match-card a {
  color: var(--green-mid);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px solid var(--green-light);
}
.match-card a:hover { color: var(--green-dark); }
.match-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--green-dark);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 2px 10px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- PCT TABS ---- */
.pct-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.pct-tab {
  background: var(--cream-dark);
  color: var(--text-soft);
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.pct-tab.active { background: var(--green-dark); color: var(--white); }
.pct-panel { display: none; }
.pct-panel.active { display: block; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 28px 20px;
  font-size: 0.82rem;
  line-height: 1.9;
}
.site-footer a { color: var(--gold); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-small { font-size: 0.75rem; opacity: 0.5; margin-top: 4px; }

/* ---- AD SLOTS ---- */
.ad-slot {
  width: 100%;
  max-width: 680px;
  margin: 0 auto 18px;
  padding: 0 16px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-dark);
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ad-slot-top {
  margin-top: 12px;
}

/* ---- UTILITIES ---- */
.hidden { display: none !important; }

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
  .card { padding: 18px 14px; }
  .goal-row { flex-direction: column; }
  .grade-row, .gpa-row, .split-row, .recipe-row { flex-wrap: wrap; }
  .pill { padding: 7px 12px; font-size: 0.78rem; }
}
