/* Global CSS for CCTT MathSummer Site Modernization */

:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-primary: #1e293b;
  --color-primary-light: #475569;
  --color-accent: #d97706; /* Educational amber/gold */
  --color-accent-light: #fef08a; /* Soft gold background */
  --color-text: #334155;
  --color-text-light: #64748b;
  --color-border: #e2e8f0;
  --color-success: #16a34a;
  
  --font-header: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Site Layout Elements */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .header-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

.cctt-logo {
  max-height: 48px;
  object-fit: contain;
}

.site-header .subheading {
  font-family: var(--font-header);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Main Homepage Cards */
.intro-section {
  text-align: center;
  margin-bottom: 3rem;
}

.intro-section h1 {
  font-family: var(--font-header);
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.intro-section p {
  color: var(--color-text-light);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.topic-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.topic-card h2 {
  font-family: var(--font-header);
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--color-accent-light);
  padding-bottom: 0.5rem;
}

.activity-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-list li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary-light);
  font-weight: 600;
}

.activity-list li a::before {
  content: "→";
  color: var(--color-accent);
  transition: var(--transition);
}

.activity-list li a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.activity-list li a:hover::before {
  transform: translateX(3px);
}

/* Activity Pages Wrapper */
.activity-container {
  max-width: 900px;
  margin: 2rem auto;
  background: var(--color-surface);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .activity-container {
    padding: 1.5rem;
    margin: 1rem;
  }
}

/* Disclaimer Banner */
.disclaimer-card {
  background-color: #fefbeb;
  border-left: 4px solid #f59e0b;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: #b45309;
  font-weight: 500;
}

/* Copyright Footer */
.site-footer {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--color-text-light);
  font-size: 0.875rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  margin-top: 3rem;
}

/* Standard Content Styles inside Activities */
h1, h2, h3, h4 {
  font-family: var(--font-header);
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: 1.5rem; }
h3 { font-size: 1.25rem; margin-top: 1.25rem; }

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

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* Flex layout helper for text + graphic side-by-side */
.split-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 1.5rem 0;
}

@media (min-width: 768px) {
  .split-layout {
    flex-direction: row;
    align-items: center;
  }
  .split-layout > * {
    flex: 1;
  }
}

/* Forms, Questions and Worksheet Elements */
ol, ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Modern inputs for blanks */
.blank-input {
  border: none;
  border-bottom: 2px solid var(--color-border);
  background: transparent;
  padding: 0 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-primary);
  width: 120px;
  outline: none;
  transition: var(--transition);
}

.blank-input:focus {
  border-color: var(--color-accent);
}

/* Modern responsive table styles for activities */
.math-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.math-table th, .math-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--color-border);
}

.math-table th {
  background-color: var(--color-primary);
  color: var(--color-surface);
  font-family: var(--font-header);
  font-weight: 600;
}

.math-table tr:nth-child(even) {
  background-color: #f1f5f9;
}

/* Dashboard styles for Teachers pages */
.teacher-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .teacher-grid {
    grid-template-columns: 1fr;
  }
}

.teacher-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.teacher-sidebar h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.sidebar-menu {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-menu li a {
  color: var(--color-primary-light);
  display: block;
}

.sidebar-menu li a:hover {
  color: var(--color-accent);
}
