:root {
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-soft: #eef6fc;
  --surface-strong: #dcedfa;
  --text: #18242f;
  --text-soft: #5f6f7d;
  --line: rgba(24, 36, 47, 0.1);

  --primary: #9ed8ff;
  --primary-strong: #79c7f8;
  --primary-deep: #2d5f7a;

  --true-black: #000000;
  --footer: #000000;

  --shadow-sm: 0 6px 18px rgba(30, 66, 92, 0.08);
  --shadow-md: 0 14px 34px rgba(30, 66, 92, 0.12);

  --glow-soft: 0 0 0 1px rgba(158, 216, 255, 0.2),
               0 0 12px rgba(158, 216, 255, 0.14);

  --glow-strong: 0 0 0 1px rgba(158, 216, 255, 0.28),
                 0 0 12px rgba(158, 216, 255, 0.22),
                 0 0 26px rgba(158, 216, 255, 0.18);

  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 30px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  margin: 0;
  line-height: 1.6;
}

/* HEADER */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--true-black);
  padding: 1.2rem 3vw;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(158, 216, 255, 0.12);
}

.logo-wrap {
  display: flex;
  align-items: center;
}

.logo {
  height: 84px;
  width: auto;
  border: none;
  box-shadow: none;
  background: none;
  display: block;
}

/* NAVIGATION */
nav ul {
  list-style: none;
  display: flex;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  color: #f5fbff;
  font-size: 1rem;
  text-decoration: none;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.88);
  border: 1px solid rgba(158, 216, 255, 0.14);
  display: inline-block;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.16s ease,
    box-shadow 0.22s ease,
    border-color 0.2s ease;
}

nav a:hover,
nav a.active {
  background: rgba(0, 0, 0, 0.96);
  color: var(--primary);
  transform: translateY(-1px);
  border-color: rgba(158, 216, 255, 0.55);
  box-shadow: var(--glow-strong);
}

nav a:focus-visible,
.button:focus-visible,
.cta-button:focus-visible,
.footer-content a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  box-shadow: var(--glow-strong);
}

/* MAIN */
main {
  min-height: 400px;
  margin: 2.5rem auto 0 auto;
  max-width: 1120px;
  padding: 0 1.2rem 1rem;
}

#tab-content {
  background: transparent;
}

/* Generic content styling for loaded pages */
section,
.content-card,
.page-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

h1,
h2,
h3 {
  color: var(--true-black);
  line-height: 1.1;
  margin-top: 0;
}

p {
  color: var(--text-soft);
}

/* Hero / home helpers */
.hero-box {
  background: linear-gradient(135deg, #ffffff 0%, var(--surface-soft) 100%);
  border: 1px solid rgba(121, 199, 248, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(2rem, 4vw, 4rem);
  position: relative;
  overflow: hidden;
}

.hero-box::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(158, 216, 255, 0.2);
}

.hero-box > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-deep);
}

.home-hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  margin-bottom: 1rem;
}

.hero-intro {
  max-width: 60ch;
  font-size: 1.1rem;
  margin-bottom: 1.4rem;
}

/* BUTTONS */
.button,
.cta-button {
  display: inline-block;
  background: var(--true-black);
  color: #f5fbff;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(158, 216, 255, 0.18);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  cursor: pointer;
}

.button:hover,
.cta-button:hover {
  background: rgba(0, 0, 0, 0.96);
  color: var(--primary);
  transform: translateY(-2px);
  border-color: rgba(158, 216, 255, 0.55);
  box-shadow: var(--glow-strong);
}

/* Home page sections */
.home-split {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1.5rem;
  align-items: stretch;
}

.home-copy,
.home-highlight-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
}

/* ONLY HOME CARD SPLIT: LOGO LEFT, TEXT RIGHT */
.home-copy-split {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.1fr);
  gap: 2rem;
  align-items: center;
}

.home-copy-split .home-copy-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  padding: 0.5rem 1rem 0.5rem 0.5rem;
}

.home-copy-split .home-copy-logo img {
  width: min(100%, 300px);
  height: auto;
  display: block;
  object-fit: contain;
}

.home-copy-split .home-copy-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}

.home-copy-split .home-copy-text .eyebrow {
  margin-bottom: 0.75rem;
}

.home-copy-split .home-copy-text h2 {
  margin: 0 0 1rem 0;
  text-align: left;
  width: 100%;
}

.home-copy-split .home-copy-text p {
  margin: 0;
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
  max-width: 62ch;
}

.home-highlight-card {
  background: linear-gradient(180deg, var(--surface-soft) 0%, #ffffff 100%);
  border-color: rgba(121, 199, 248, 0.25);
}

.home-highlight-card h3 {
  margin-bottom: 1rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(24, 36, 47, 0.08);
  color: var(--text-soft);
  font-weight: 600;
}

.feature-list li:last-child {
  border-bottom: none;
}

.section-heading {
  margin-bottom: 1.2rem;
}

.teaching-section,
.news-section {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.teaching-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.teach-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.teach-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(121, 199, 248, 0.28);
}

.news-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.2rem;
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.featured-news {
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  border-color: rgba(121, 199, 248, 0.32);
}

.news-tag {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(158, 216, 255, 0.22);
  color: var(--primary-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.news-card h3,
.teach-card h3 {
  margin-bottom: 0.7rem;
}

.news-card p,
.teach-card p {
  margin-bottom: 0;
}

.contact-page {
  display: grid;
  gap: 1.5rem;
}

.contact-hero {
  background: linear-gradient(135deg, #ffffff 0%, var(--surface-soft) 100%);
  border: 1px solid rgba(121, 199, 248, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(2rem, 4vw, 3rem);
}

.contact-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  margin-bottom: 1rem;
}

.contact-hero p {
  max-width: 62ch;
  margin-bottom: 0.8rem;
}

.contact-response {
  font-weight: 700;
  color: var(--primary-deep);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.contact-card,
.contact-form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
}

.contact-details-card h2,
.contact-faq-card h2,
.contact-form-card h2 {
  margin-bottom: 1.2rem;
}

.contact-method + .contact-method {
  margin-top: 1.2rem;
}

.contact-method h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
  color: var(--true-black);
}

.contact-method p {
  margin: 0;
}

.contact-method a {
  color: var(--primary-deep);
  text-decoration: none;
  font-weight: 600;
}

.contact-method a:hover {
  color: var(--true-black);
}

.contact-faq-card h2 {
  margin-bottom: 1.2rem;
}

.faq-accordion {
  display: grid;
  gap: 0.85rem;
}

.faq-accordion details {
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  border: 1px solid rgba(24, 36, 47, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.faq-accordion details[open] {
  border-color: rgba(121, 199, 248, 0.35);
  box-shadow: var(--glow-soft);
}

.faq-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 700;
  color: var(--true-black);
  position: relative;
  padding-right: 3rem;
}

.faq-accordion summary::-webkit-details-marker {
  display: none;
}

.faq-accordion summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--primary-deep);
  transition: transform 0.18s ease;
}

.faq-accordion details[open] summary::after {
  content: "–";
}

.faq-accordion details p {
  margin: 0;
  padding: 0 1.2rem 1.2rem;
  color: var(--text-soft);
  max-width: 60ch;
}

.faq-accordion summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.form-intro {
  margin-bottom: 1.5rem;
}

.form-intro p {
  margin-bottom: 0;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field label {
  margin-bottom: 0.45rem;
  font-weight: 700;
  color: var(--true-black);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(24, 36, 47, 0.12);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(121, 199, 248, 0.55);
  box-shadow: var(--glow-soft);
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form .cta-button {
  justify-self: start;
  margin-top: 0.4rem;
}

@media (max-width: 900px) {
  .contact-grid,
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Card layouts */
.card-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.info-card {
  grid-column: span 4;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.info-card.highlight {
  background: var(--surface-soft);
  border-color: rgba(121, 199, 248, 0.3);
}

.info-card h3 {
  margin-bottom: 0.7rem;
}

.info-card p {
  margin-bottom: 0;
}

/* Timetable cards */
.room-wrapper {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  justify-content: center;
}

.room-card {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.2rem 1.5rem 1.6rem;
  min-width: 255px;
  flex: 1 1 260px;
  max-width: 350px;
  margin-bottom: 1.5rem;
}

.room-card h3 {
  text-align: center;
  font-size: 1.25rem;
  color: var(--primary-deep);
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.timetable {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  background: none;
}

.timetable th,
.timetable td {
  border: none;
  padding: 0.75rem 0.5rem;
  text-align: left;
}

.timetable th {
  color: var(--primary-deep);
  font-size: 1rem;
  font-weight: bold;
  border-bottom: 2px solid rgba(158, 216, 255, 0.45);
}

.timetable tr:nth-child(even) td {
  background: rgba(158, 216, 255, 0.12);
}

/* FOOTER */
footer {
  background: var(--footer);
  color: #f2f8fc;
  padding: 2.2rem 1rem 1.1rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.footer-content a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 0.4rem;
  transition: color 0.2s ease, transform 0.13s ease, filter 0.18s ease;
}

.footer-content a:hover {
  filter: brightness(1.08);
}

.footer-social {
  margin: 0.4rem 0;
  display: flex;
  gap: 1.2rem;
}

.footer-social a {
  display: inline-block;
  line-height: 0;
}

.footer-social a svg {
  display: block;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--primary);
  transition: filter 0.18s ease, transform 0.18s ease;
}

.footer-social a:hover svg {
  filter: brightness(1.1) drop-shadow(0 0 8px rgba(158, 216, 255, 0.6));
  transform: scale(1.12);
}

.footer-copy {
  margin-top: 0.7rem;
  font-size: 0.96rem;
  opacity: 0.9;
  letter-spacing: 0.03em;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.2rem 1rem;
  }

  nav ul {
    justify-content: center;
  }

  .logo {
    height: 72px;
    margin-bottom: 0.4rem;
  }

  .card-grid,
  .teaching-grid,
  .news-grid,
  .home-split {
    grid-template-columns: 1fr;
  }

  .home-copy-split {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .home-copy-split .home-copy-logo {
    justify-self: center;
    padding: 0 0 0.5rem 0;
  }

  .home-copy-split .home-copy-logo img {
    width: min(100%, 240px);
  }

  .home-copy-split .home-copy-text p {
    text-align: left;
    hyphens: manual;
  }

  .info-card {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .room-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .room-card {
    min-width: 0;
    max-width: 100%;
    padding: 1rem;
  }
}

@media (max-width: 600px) {
  main {
    padding: 0 0.9rem 1rem;
  }

  nav ul {
    gap: 0.5rem;
  }

  nav a {
    font-size: 0.95rem;
    padding: 0.68rem 0.9rem;
  }

  .footer-content {
    padding: 0;
  }

  section,
  .content-card,
  .page-panel,
  .hero-box,
  .home-copy,
  .home-highlight-card,
  .teach-card,
  .news-card {
    padding: 1.35rem;
  }
}