@import url("variables.css");

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--cbhs-text-secondary);
  background: var(--cbhs-white);
}

a {
  color: var(--cbhs-teal-dark);
  text-decoration: underline;
  transition: color 0.2s;
}

a:hover, a:focus {
  color: var(--cbhs-teal);
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--cbhs-text);
  line-height: 1.3;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cbhs-teal);
  margin: 2rem 0 1rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: var(--cbhs-white);
  border-bottom: 3px solid var(--cbhs-teal);
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.logo-link:hover {
  text-decoration: none;
}

.logo-link img {
  height: 60px;
  width: auto;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--cbhs-teal-dark);
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cbhs-teal);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Navigation */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.main-nav a {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cbhs-text-secondary);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--cbhs-teal);
  border-bottom-color: var(--cbhs-teal);
}

/* Main content */
main {
  padding: 2.5rem 0 4rem;
  min-height: calc(100vh - 200px);
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--cbhs-bg-alt);
}

.page-header h1 {
  color: var(--cbhs-teal);
}

/* Home page cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  border: 1px solid var(--cbhs-border);
  padding: 1.5rem;
  background: var(--cbhs-bg-light);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--cbhs-teal);
  box-shadow: 0 2px 8px rgba(17, 124, 157, 0.12);
}

.card h2 {
  margin-top: 0;
  font-size: 1.125rem;
}

.card p {
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--cbhs-teal);
  background: var(--cbhs-teal);
  color: var(--cbhs-white);
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--cbhs-white);
  color: var(--cbhs-teal);
  text-decoration: none;
}

.btn-outline {
  background: var(--cbhs-white);
  color: var(--cbhs-teal);
}

.btn-outline:hover {
  background: var(--cbhs-teal);
  color: var(--cbhs-white);
}

/* Course cards */
.department-section {
  margin-bottom: 3rem;
}

.department-intro {
  font-size: 1rem;
  color: var(--cbhs-text-muted);
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--cbhs-cyan);
}

.course-card {
  background: var(--cbhs-bg-light);
  border: 1px solid var(--cbhs-border);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  background: var(--cbhs-teal);
  color: var(--cbhs-white);
}

.badge-muted {
  background: var(--cbhs-text-muted);
}

.badge-accent {
  background: var(--cbhs-cyan);
  color: var(--cbhs-text);
}

.prerequisites {
  font-size: 0.875rem;
  color: var(--cbhs-text-muted);
  margin-bottom: 0;
}

/* Endorsement */
.requirement-list {
  padding-left: 1.5rem;
}

.requirement-list li {
  margin-bottom: 0.75rem;
}

.note {
  background: var(--cbhs-bg-light);
  border-left: 3px solid var(--cbhs-teal);
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
}

/* Opportunity cards */
.opportunity-card {
  background: var(--cbhs-bg-light);
  border: 1px solid var(--cbhs-border);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

/* Scaffold / blank pages */
.scaffold-message {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--cbhs-bg-light);
  border: 2px dashed var(--cbhs-border);
}

.scaffold-message h2 {
  color: var(--cbhs-text-muted);
}

/* Footer */
.site-footer {
  background: var(--cbhs-teal-dark);
  color: var(--cbhs-white);
  padding: 2rem 0;
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--cbhs-cyan);
}

.site-footer p {
  margin: 0.25rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  h1 {
    font-size: 1.625rem;
  }
}
