/* BASE — reset, variables, global */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0a1f3c;
  --ocean: #0077b6;
  --sky: #5fc6ff;
  --foam: #caf0f8;
  --white: #ffffff;
  --text: #1a1a2e;
  --gray: #6b7280;
}

html { scroll-behavior: smooth;  }

/* Soft cross-fade between pages on supporting browsers (Chrome/Edge);
   ignored elsewhere with no side effects. */
@view-transition { navigation: auto; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  /* Sticky-footer: keep the footer pinned to the viewport bottom so it never
     rides up into view before JS-rendered content is injected (no flash). */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

footer {
  margin-top: auto;
}

/* Reserve space for JS-rendered content to minimise layout shift on load. */
#courseGrid,
#courseDetailContent,
#contact .contact-info {
  min-height: 240px;
}

/* Section common */
section { padding: 6rem 6%; }

.section-label {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ocean);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

/* GO TO TOP */
.gotop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 150;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ocean);
  color: var(--white);
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s;
}

.gotop--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  background: linear-gradient(to right, #389bdd, #55d3ee);
}

.gotop:hover {
  background: linear-gradient(to right, #389bdd, #55d3ee);
}
