/* =========================================================
   SURGICON 2027 — layout.css
   Containers, sections, grids, header/navigation, footer.
   ========================================================= */

/* ---- Containers & sections ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 0.5rem + 2vw, 2rem);
}
.container--narrow { max-width: 880px; }

.section { padding-block: var(--section-y); position: relative; }
.section--surface { background: var(--surface); }
.section--tint { background: var(--primary-50); }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }

/* ---- Grids ---- */
.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Two-column layout: content + sidebar */
.split { display: grid; gap: var(--space-7); align-items: start; }
@media (min-width: 960px) {
  .split { grid-template-columns: 1.6fr 1fr; }
  .split--even { grid-template-columns: 1fr 1fr; }
  .split--center { align-items: center; }
}

/* =========================================================
   HEADER — two tiers:
   1) top row: logo, date/venue, Register Now
   2) maroon navigation bar with every page (desktop)
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow); }

/* Thin brand stripe across the very top, like the poster bars */
.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500) 0 70%, var(--orange-500) 70% 100%);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: var(--header-h);
  transition: height 0.3s var(--ease);
}
.site-header.is-scrolled .site-header__inner { height: 76px; }

/* Brand (seal + wordmark) */
.brand { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; margin-right: auto; }
.brand__seal {                     /* larger seal on a clean white disc */
  width: 88px;
  height: 88px;
  padding: 3px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--primary-100);
  box-shadow: 0 4px 12px rgba(70, 18, 26, 0.12);
  /* The seal PNG has empty space above the seal. These two lines make the
     browser show only the seal itself, so it fills the circle (file unchanged). */
  object-fit: contain;
  object-view-box: inset(27% 3% 0% 14%);
  transition: width 0.3s, height 0.3s;
}
.site-header.is-scrolled .brand__seal { width: 64px; height: 64px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.1rem;
  letter-spacing: 0.02em;
  color: var(--primary-500);
}
.brand__name span { color: var(--orange-500); }
.brand__tag {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.brand__text { gap: 2px; }

/* Smaller screens: logo stays large but fits next to the menu button */
@media (max-width: 767px) {
  .site-header__inner { height: 88px; }
  .brand__seal { width: 66px; height: 66px; }
  .site-header.is-scrolled .brand__seal { width: 54px; height: 54px; }
  .brand__name { font-size: 1.55rem; }
  .brand__tag { font-size: 0.74rem; }
}
@media (max-width: 400px) {
  .brand { gap: var(--space-2); }
  .brand__seal { width: 58px; height: 58px; }
  .brand__name { font-size: 1.3rem; }
  .brand__tag { font-size: 0.66rem; }
}

/* Date + venue next to the logo (large screens only) */
.site-header__meta { display: none; gap: var(--space-5); }
.site-header__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}
.site-header__meta svg { width: 18px; height: 18px; color: var(--primary-500); }
@media (min-width: 1024px) { .site-header__meta { display: flex; } }

.site-header .site-header__cta { display: none; }
@media (min-width: 560px) { .site-header .site-header__cta { display: inline-flex; } }

/* ---- Desktop navigation bar ---- */
.main-nav { display: none; background: var(--primary-800); }
.main-nav__list {
  display: flex;
  justify-content: space-between;
}
.main-nav__link {
  display: block;
  margin-block: 6px;               /* the link is a box inside the bar */
  padding: 8px 9px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
/* Hover: soft golden tint */
.main-nav__link:hover { color: var(--white); background: rgba(243, 154, 46, 0.18); }
/* Active page: the whole box turns golden, with dark text for readability.
   Only the current page has aria-current="page", so only one box is golden. */
.main-nav__link[aria-current="page"],
.main-nav__link[aria-current="page"]:hover {
  color: var(--primary-900);
  background: var(--orange-500);
  box-shadow: 0 4px 12px rgba(243, 154, 46, 0.35);
}

/* ---- Hamburger toggle ---- */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--primary-800);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile slide-in panel ---- */
.mobile-nav {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 200;
  width: min(360px, 88vw);
  display: flex;
  flex-direction: column;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s var(--ease), visibility 0.35s;
}
.mobile-nav.is-open { transform: translateX(0); visibility: visible; }

.mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
}
.mobile-nav__close {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  color: var(--primary-800);
}
.mobile-nav__body { flex: 1; overflow-y: auto; padding: var(--space-2) var(--space-5); }
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
  transition: color 0.25s, padding 0.25s, background-color 0.25s;
}
.mobile-nav__link:hover { color: var(--primary-600); padding-left: 8px; }
.mobile-nav__link[aria-current="page"] {   /* same golden box as desktop */
  color: var(--primary-900);
  background: var(--orange-500);
  border-radius: 6px;
  padding-left: 12px;
}
.mobile-nav__foot { padding: var(--space-5); border-top: 1px solid var(--line); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(70, 18, 26, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.nav-overlay.is-visible { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }

/* Desktop: show the full navigation bar, hide hamburger */
@media (min-width: 1200px) {
  .main-nav { display: block; }
  .nav-toggle, .mobile-nav, .nav-overlay { display: none; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  position: relative;
  background: var(--primary-900);
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fs-sm);
}
.site-footer::before {   /* orange + maroon stripe on top, echoing the posters */
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--orange-500) 0 30%, var(--primary-500) 30% 100%);
}
.site-footer__main {
  display: grid;
  gap: var(--space-7);
  grid-template-columns: 1fr;
  padding-block: var(--space-8) var(--space-7);
}
@media (min-width: 640px) {
  .site-footer__main { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .site-footer__main { grid-template-columns: 1.5fr 0.9fr 1fr 1.3fr; }
}

.footer-brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer-brand img {
  width: 60px; height: 60px;
  background: var(--white);
  border-radius: 50%;
  padding: 3px;
}
.footer-brand .brand__name { color: var(--white); font-size: 1.4rem; }
.footer-brand .brand__tag { font-size: 0.72rem; }
.mobile-nav__head .brand__name { font-size: 1.4rem; }
.footer-brand .brand__tag { color: rgba(255, 255, 255, 0.65); }

.site-footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  position: relative;
}
.site-footer h4::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 32px; height: 2px;
  background: var(--orange-500);
}
.footer-links li + li { margin-top: var(--space-2); }
.footer-links a { transition: color 0.2s, padding 0.2s; }
.footer-links a:hover { color: var(--orange-500); padding-left: 4px; }

.footer-contact li { display: flex; gap: var(--space-3); align-items: flex-start; }
.footer-contact li + li { margin-top: var(--space-3); }
.footer-contact svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; color: var(--orange-500); }
.footer-contact a:hover { color: var(--white); }

.footer-manager {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  margin-top: var(--space-6);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border-radius: var(--radius);
}
.footer-manager small {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.footer-manager img { width: 120px; }

.socials { display: flex; gap: var(--space-2); margin-top: var(--space-5); }
.socials a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background-color 0.2s, border-color 0.2s;
}
.socials a:hover { background: var(--primary-500); border-color: var(--primary-500); color: var(--white); }
.socials svg { width: 16px; height: 16px; }

.site-footer__bar {
  background: var(--primary-500);
  color: var(--white);
  font-size: var(--fs-xs);
}
.site-footer__bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  justify-content: space-between;
  align-items: center;
  padding-block: var(--space-4);
}
.site-footer__bar a { font-weight: 600; }
.site-footer__bar a:hover { text-decoration: underline; }
.footer-legal { display: flex; gap: var(--space-4); }