:root {
  --acm-blue: #1595d1;
  --acm-blue-dark: #0b6f9e;
  --acm-blue-soft: #eaf6fc;
  --rhu-purple: #54217b;
  --ink: #102a3a;
  --text: #334b59;
  --muted: #667985;
  --line: #d9e3e8;
  --surface: #f5f8fa;
  --white: #ffffff;
  --content: 1180px;
  --shadow: 0 14px 36px rgba(16, 42, 58, 0.09);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--white);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
}

h2 {
  font-size: clamp(2rem, 3.6vw, 3.25rem);
}

h3 {
  font-size: 1.45rem;
}

p {
  margin-top: 0;
}

:focus-visible {
  outline: 3px solid rgba(21, 149, 209, 0.35);
  outline-offset: 4px;
}

.hidden {
  display: none !important;
}

header.fixed-top {
  max-width: 100vw;
  border-bottom: 1px solid rgba(217, 227, 232, 0.9);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 18px rgba(16, 42, 58, 0.04);
  backdrop-filter: blur(12px);
}

.navbar {
  min-height: 82px;
  padding: 0;
  background: transparent;
}

.navbar .container-fluid {
  width: min(100% - 40px, var(--content));
  margin: 0 auto;
  padding: 0;
}

.branding-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.rhu-logo-img,
.rhu-logo-img-min,
.rhu-logo-img-max {
  width: 152px;
  height: 40px;
  object-fit: contain;
  object-position: left center;
  padding-right: 14px;
  border-right: 1px solid var(--line) !important;
}

.acm-logo-img,
.acm-logo-img-min,
.acm-logo-img-max {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.navbar-nav {
  align-items: center;
  gap: 8px;
}

.navbar-nav .nav-link {
  position: relative;
  padding: 28px 12px 24px !important;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
}

.navbar-nav .nav-link::after {
  position: absolute;
  right: 12px;
  bottom: 18px;
  left: 12px;
  height: 2px;
  background: var(--acm-blue);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
  color: var(--acm-blue-dark) !important;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus::after,
.navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

.navbar-toggler {
  min-width: 48px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(21, 149, 209, 0.18);
}

#progress-bar {
  height: 3px;
  background: transparent;
}

#progress-bar-fill {
  width: 100%;
  height: 100%;
  background: var(--rhu-purple);
  transform: scaleX(0);
  transform-origin: left;
}

.button-primary,
.button-secondary,
.button-transparent {
  max-width: 100%;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 11px 22px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button-primary {
  border-color: var(--acm-blue);
  background: var(--acm-blue);
  color: var(--white);
}

.button-primary:hover {
  border-color: var(--acm-blue-dark);
  background: var(--acm-blue-dark);
  color: var(--white);
  transform: translateY(-1px);
}

.button-secondary {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--ink);
  background: var(--white);
  color: var(--ink);
}

.button-transparent {
  border-color: rgba(255, 255, 255, 0.75);
  background: transparent;
  color: var(--white);
}

.button-transparent:hover {
  background: var(--white);
  color: var(--ink);
}

.button-primary a,
.button-secondary a,
.button-transparent a,
.read-more-link {
  color: inherit !important;
  text-decoration: none;
}

.read-more-link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.55);
  text-underline-offset: 4px;
}

.read-more-link:hover {
  color: inherit;
  text-decoration-color: currentColor;
}

.card {
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: 4px !important;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(16, 42, 58, 0.07);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.card:hover {
  border-color: rgba(21, 149, 209, 0.6) !important;
  box-shadow: var(--shadow);
  cursor: pointer;
  transform: translateY(-4px);
}

.card-img-top {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card-text {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

.image-container {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.blue-circle {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 54px;
  min-height: 54px;
  border-radius: 2px;
  background: var(--white);
  box-shadow: 0 6px 16px rgba(16, 42, 58, 0.16);
}

.circle-number,
.circle-month {
  margin: 0 !important;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.circle-number {
  padding-top: 8px;
  font-size: 1.1rem;
}

.circle-month {
  color: var(--rhu-purple);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-type {
  position: absolute;
  bottom: 0;
  left: 0;
  min-width: 104px;
  padding: 7px 12px;
  background: var(--acm-blue);
}

.card-type-title {
  margin: 0;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
}

.section-template {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: center;
  width: 100%;
  padding: 110px max(24px, calc((100vw - var(--content)) / 2));
}

.section-template:nth-of-type(even) {
  grid-template-columns: minmax(260px, 0.6fr) minmax(0, 1.4fr);
}

.section-template-words {
  min-width: 0;
  max-width: 720px;
}

.section-template-words > *:last-child {
  margin-bottom: 0;
}

.section-template h2 {
  margin-bottom: 28px;
}

.section-template p,
.section-template li {
  font-size: 1.05rem;
}

.section-template-illustration {
  min-width: 0;
  text-align: center;
}

.section-template-illustration img {
  max-height: 300px;
  object-fit: contain;
}

.section-template-blue {
  background: var(--acm-blue-dark);
  color: rgba(255, 255, 255, 0.9);
}

.section-template-blue h2,
.section-template-blue h3 {
  color: var(--white);
}

.bottom-to-top-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1000;
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--acm-blue-dark);
  border-radius: 3px;
  background: var(--acm-blue);
  box-shadow: 0 8px 22px rgba(16, 42, 58, 0.2);
  cursor: pointer;
}

.bottom-to-top-button:hover {
  background: var(--acm-blue-dark);
}

.bottom-to-top-button .arrow {
  width: 16px;
  fill: var(--white);
}

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px 30px;
  border-top: 5px solid var(--rhu-purple);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

footer > * {
  margin: 0 0 20px;
}

footer > a > img {
  width: 76px;
  height: 76px;
}

footer h3 {
  margin-bottom: 24px;
  color: var(--white);
  font-size: 1.25rem;
}

footer .navbar-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 24px;
}

footer .navbar-footer a {
  padding: 4px 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
}

footer .navbar-footer a:hover,
footer .navbar-footer a.active {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--acm-blue);
  text-underline-offset: 5px;
}

footer .image-footer-container {
  display: flex;
  justify-content: center;
  gap: 12px;
}

footer .image-footer-container a {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 3px;
}

footer .image-footer-container a:hover {
  border-color: var(--acm-blue);
  background: rgba(21, 149, 209, 0.14);
}

footer .image-footer-container img {
  width: 20px;
  height: 20px;
  margin: 0;
  object-fit: contain;
}

.instagram-image:hover,
.linkedin-image:hover {
  border-radius: 0 !important;
  background: none;
}

.footer-copyright {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.86rem;
}

.logout-button {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 9px 16px;
  border: 1px solid #b42318;
  border-radius: 3px;
  background: #b42318;
  color: var(--white);
  font-size: 0.95rem;
  cursor: pointer;
}

.logout-button:hover {
  background: #8f1b13;
}

@media (max-width: 991px) {
  header.fixed-top {
    max-height: 100dvh;
    overflow-y: auto;
  }

  .navbar {
    min-height: 72px;
  }

  .navbar .container-fluid {
    width: min(100% - 28px, var(--content));
    padding: 9px 0;
  }

  .navbar-collapse {
    margin-top: 10px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--white);
    box-shadow: 0 14px 24px rgba(16, 42, 58, 0.08);
  }

  .navbar-nav {
    align-items: stretch;
    gap: 0;
    padding: 8px 0 12px;
  }

  .navbar-nav .nav-link {
    display: flex;
    min-height: 48px;
    align-items: center;
    padding: 10px 4px !important;
  }

  .navbar-nav .nav-link::after {
    right: auto;
    bottom: 4px;
    left: 4px;
    width: 28px;
  }

  .section-template,
  .section-template:nth-of-type(even) {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .section-template-illustration {
    order: 2;
  }

  .section-template-words {
    max-width: none;
  }
}

@media (max-width: 600px) {
  body {
    line-height: 1.65;
  }

  h1 {
    font-size: clamp(2.25rem, 11vw, 3.15rem);
  }

  h2 {
    font-size: 2rem;
  }

  .rhu-logo-img,
  .rhu-logo-img-min,
  .rhu-logo-img-max {
    width: 118px;
    height: 32px;
    padding-right: 10px;
  }

  .acm-logo-img,
  .acm-logo-img-min,
  .acm-logo-img-max {
    width: 44px;
    height: 44px;
  }

  .bottom-to-top-button {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .section-template,
  .section-template:nth-of-type(even) {
    gap: 32px;
    padding: 64px 16px;
  }

  .section-template p,
  .section-template li {
    font-size: 1rem;
  }

  .section-template-illustration img {
    max-height: 240px;
  }

  .section-template .button-primary,
  .section-template .button-secondary,
  .section-template .button-transparent {
    width: 100%;
  }

  footer {
    padding: 52px 18px 26px;
  }

  footer .navbar-footer {
    flex-direction: column;
    gap: 8px;
  }

  footer .navbar-footer a {
    min-height: 48px;
    padding: 8px 14px;
  }
}

@media (max-width: 360px) {
  .navbar .container-fluid {
    width: calc(100% - 20px);
  }

  .branding-container {
    gap: 8px;
  }

  .rhu-logo-img,
  .rhu-logo-img-min,
  .rhu-logo-img-max {
    width: 104px;
    padding-right: 8px;
  }

  .acm-logo-img,
  .acm-logo-img-min,
  .acm-logo-img-max {
    width: 40px;
    height: 40px;
  }
}

@media (hover: none) {
  .card:hover,
  .member:hover,
  .button-primary:hover {
    transform: none;
  }
}

.content-state {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--acm-blue);
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
}

.content-state.is-error {
  border-left-color: #b42318;
  background: #fff7f6;
  color: #8f1b13;
}

.content-state[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
