/* University Brand Variables */
:root {
  --primary-color: #00539b;
  --secondary-color: #0071b3;
  --accent-color: #00853f;
  --accent-hover: #006630;
  --text-main: #333333;
  --text-muted: #555555;
  --text-heading: #202024;
  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --border-radius: 8px;
  --transition: all 0.3s ease;
  --container-width: 1500px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans", sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: var(--bg-body);
  color: var(--text-main);
}

/* Header Bar */
.main-header {
  background-color: var(--bg-body);
  border-bottom: 2px solid #e5e7eb;
  position: relative;
  z-index: 50;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0.75rem 2rem;
}

.main-header .logo {
  height: 50px;
}

.hamburger-menu {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}

/* Breadcrumbs */
.breadcrumbs-container {
  background-color: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.breadcrumbs {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs .separator {
  margin: 0 0.75rem;
  color: #94a3b8;
}

/* Hero Section */
.hero-wrapper {
  background-image:
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.8) 75%,
      rgba(255, 255, 255, 1) 100%
    ),
    url("https://www.st-andrews.ac.uk/assets/university/about/images/st-salvators-quad.jpg");
  background-size: cover;
  background-position: center 30%;
  position: relative;
}

.hero {
  padding: 4rem 2rem 6rem 2rem;
  text-align: left;
}

.hero-container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Hero Tags */
.hero-tags {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.tag {
  background-color: var(--primary-color);
  color: white;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hero Video Embed */
.hero-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  background-color: #000;
}

.hero-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hero h1 {
  font-size: 3rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero p.lead {
  font-size: 1.25rem;
  margin: 0 0 2rem 0;
  color: var(--text-main);
  font-weight: 400;
  max-width: 650px;
}

/* Hero Buttons */
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-family: "Noto Sans", sans-serif;
}

.btn-primary {
  background-color: var(--accent-color);
  color: white;
  border: 2px solid var(--accent-color);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 133, 63, 0.25);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.7);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: rgba(0, 83, 155, 0.05);
  transform: translateY(-2px);
}

/* Main Content Container */
.container {
  max-width: var(--container-width);
  margin: -3rem auto 4rem auto;
  padding: 0 2rem;
  position: relative;
  z-index: 10;
}

/* Bento Grid Sections */
.info-panel {
  background: var(--bg-card);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 83, 155, 0.08);
  border: 1px solid #f0f4f8;
  margin-bottom: 4rem;
}

.info-panel h2 {
  margin-top: 0;
  font-size: 1.5rem;
  color: var(--text-heading);
  margin-bottom: 1.5rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.dates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.bento-card,
.date-card {
  background: #f8fafc;
  padding: 1.75rem;
  border-radius: var(--border-radius);
  border: 1px solid #e2e8f0;
  transition: var(--transition);
}

.bento-card:hover,
.date-card:hover {
  background: #ffffff;
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 83, 155, 0.12);
  border-color: #cbd5e1;
}

/* Refined Typography for Bento Boxes */
.bento-card h3,
.date-card h3 {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.bento-data-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bento-data-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.bento-data-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.data-label {
  font-weight: 700;
  color: var(--text-heading);
  font-size: 1.05rem;
}

.data-value {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 500;
}

.bento-primary-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.bento-secondary-value {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.date-card .bento-primary-value {
  font-size: 1.25rem;
}

.date-card .bento-secondary-value {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Section Divider within panel */
.panel-divider {
  height: 1px;
  background-color: #e2e8f0;
  margin: 2.5rem 0;
}

/* Expanded Two-Column Layout */
.content-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
}

.sidebar {
  height: 100%;
}

/* Sticky Navigation Column */
.sticky-nav {
  position: sticky;
  top: 2rem;
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid #e2e8f0;
}

.sticky-nav h3 {
  margin-top: 0;
  color: var(--text-heading);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.sticky-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sticky-nav li {
  margin-bottom: 0.85rem;
}

.sticky-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  display: block;
}

.sticky-nav a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

/* Main Body Content Formatting */
.main-content section {
  margin-bottom: 4rem;
  scroll-margin-top: 2rem;
}

.main-content h2 {
  color: var(--text-heading);
  font-size: 1.8rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.main-content h3 {
  color: var(--text-heading);
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.main-content p {
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.main-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.main-content li {
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

/* Modal styling */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 83, 155, 0.7);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-content {
  background-color: var(--bg-card);
  padding: 3rem;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 1rem;
}

.modal-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #94a3b8;
  transition: var(--transition);
  line-height: 1;
}

.close-btn:hover {
  color: var(--text-main);
}

.step {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-title {
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  font-size: 1.1rem;
}

.selected-info {
  background: #f0f7ff;
  color: var(--secondary-color);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid #cce4ff;
}

.option-btn {
  display: block;
  width: 100%;
  padding: 1.2rem;
  margin-bottom: 1rem;
  background-color: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  font-family: "Noto Sans", sans-serif;
}

.option-btn:hover {
  border-color: var(--secondary-color);
  background-color: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 113, 179, 0.05);
}

.option-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  display: block;
}

.option-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  display: block;
}

.back-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  font-family: "Noto Sans", sans-serif;
}

.back-btn:hover {
  color: var(--secondary-color);
}

/* Mobile Adjustments */
@media (max-width: 960px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .content-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
  }
  .sticky-nav {
    position: static;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .breadcrumbs-container {
    display: none;
  }
  .hero h1 {
    font-size: 2.25rem;
  }
}
