/* ── Bruins Rugby – Main Stylesheet ─────────────────────────────────────────── */
:root {
  --navy:      #1A2E5A;
  --navy-mid:  #243A6E;
  --navy-dark: #111C38;
  --gold:      #C8A951;
  --gold-lt:   #F0D080;
  --white:     #FFFFFF;
  --off-white: #F8F9FB;
  --gray-lt:   #EEF0F4;
  --gray:      #6B7280;
  --text:      #1A1A2E;
  --radius:    8px;
  --shadow:    0 4px 18px rgba(26,46,90,.12);
  --transition: 0.22s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}

/* ── TOP BAR ─────────────────────────────────────────────────────────────── */
.top-bar {
  background: var(--gold);
  color: var(--navy-dark);
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem 1rem;
  letter-spacing: .04em;
}

/* ── NAV ─────────────────────────────────────────────────────────────────── */
nav {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.nav-inner {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 1.5rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  padding: .5rem 0;
  flex-shrink: 0;
}
.nav-logo img { height: 52px; width: auto; }
.nav-logo span {
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  list-style: none;
  margin-left: auto;
  gap: 0;
}
.nav-links > li { position: relative; }
.nav-links > li > a,
.nav-links > li > .nav-toggle {
  display: block;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  padding: 1.1rem .9rem;
  letter-spacing: .03em;
  transition: color var(--transition), background var(--transition);
  cursor: pointer;
  background: none;
  border: none;
  white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-links > li > .nav-toggle:hover,
.nav-links > li > a.active {
  color: var(--gold);
  background: rgba(255,255,255,.06);
}
/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navy-dark);
  min-width: 160px;
  border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .86rem;
  font-weight: 500;
  padding: .7rem 1.1rem;
  transition: background var(--transition), color var(--transition);
}
.dropdown-menu a:hover { background: rgba(255,255,255,.08); color: var(--gold); }

/* Hamburger (mobile) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-hamburger span {
  display: block;
  width: 25px;
  height: 2.5px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO ────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-mid) 60%, #2a4a8a 100%);
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-inner { position: relative; max-width: 800px; margin: auto; }
.hero img.hero-logo { height: 200px; width: auto; margin-bottom: 1.5rem; filter: drop-shadow(0 4px 24px rgba(0,0,0,.45)); }

/* ── BEAR WATERMARK (fixed lower-right, behind page content) ─────────────── */
.bear-corner-strip {
  position: fixed;
  bottom: 0;
  right: 0;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.bear-corner-strip img {
  height: 52vh;
  max-height: 480px;
  min-height: 280px;
  width: auto;
  display: block;
  opacity: 0.5;
}
/* Ensure all page content sits above the bear watermark */
.page-hero, .hero, .section, footer {
  position: relative;
  z-index: 1;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; margin-bottom: .6rem; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,.78); max-width: 560px; margin: .8rem auto 2rem; }
.gold-bar { width: 60px; height: 4px; background: var(--gold); border-radius: 2px; margin: 1rem auto; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: .75rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: .03em;
}
.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-gold:hover { background: var(--gold-lt); transform: translateY(-2px); }
.btn-outline { border: 2px solid rgba(255,255,255,.6); color: var(--white); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ── PAGE HERO (inner pages) ─────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy-mid));
  color: var(--white);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}
.page-hero .pill {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: .78rem;
  font-weight: 700;
  padding: .3rem .9rem;
  border-radius: 50px;
  letter-spacing: .08em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
.page-hero p { color: rgba(255,255,255,.75); margin-top: .5rem; font-size: 1rem; max-width: 600px; margin-inline: auto; }

/* ── SECTIONS ────────────────────────────────────────────────────────────── */
.section { padding: 4rem 1.5rem; }
.section-alt { background: var(--off-white); }
.container { max-width: 1100px; margin: auto; }
.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: .4rem;
}
.section-sub { color: var(--gray); font-size: 1rem; margin-bottom: 2.5rem; }
.accent-line {
  width: 48px; height: 4px;
  background: var(--gold);
  border-radius: 2px;
  margin: .6rem 0 2rem;
}

/* ── CARDS ───────────────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(26,46,90,.18); }
.card-accent { height: 5px; }
.card-body { padding: 1.5rem; }
.card-icon { font-size: 2rem; margin-bottom: .8rem; }
.card h3 { font-size: 1.15rem; color: var(--navy); margin-bottom: .4rem; }
.card p { font-size: .9rem; color: var(--gray); }

/* ── TEAM BADGE ──────────────────────────────────────────────────────────── */
.team-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem 1rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: .88rem;
  margin-bottom: 1.2rem;
}

/* ── SCHEDULE TABLE ──────────────────────────────────────────────────────── */
.schedule-wrap { overflow-x: auto; margin-top: 1.5rem; }
table.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
table.schedule thead tr { background: var(--navy); color: var(--white); }
table.schedule thead th {
  padding: .8rem 1rem;
  text-align: left;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
}
table.schedule thead th:first-child { border-radius: var(--radius) 0 0 0; }
table.schedule thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
table.schedule thead tr td:last-child { border-bottom: 3px solid var(--gold); }
table.schedule thead { border-bottom: 3px solid var(--gold); }
table.schedule tbody tr { border-bottom: 1px solid var(--gray-lt); transition: background var(--transition); }
table.schedule tbody tr:hover { background: #f0f4ff; }
table.schedule tbody td { padding: .75rem 1rem; }
table.schedule tbody td:first-child { font-weight: 600; color: var(--navy); }
/* opponent logo pill */
.sched-logo {
  height: 26px;
  width: 26px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 7px;
  border: 1px solid var(--gray-lt);
  background: #fff;
}
.tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 4px;
  letter-spacing: .04em;
}
.tag-home { background: #D4EDDA; color: #1B5E20; }
.tag-away { background: #FFF3CD; color: #BF360C; }
.tag-date-group td { background: var(--gray-lt) !important; font-size: .78rem; color: var(--gray); padding: .3rem 1rem !important; font-weight: 600; letter-spacing: .06em; }

/* ── INFO BOXES ──────────────────────────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; margin-top: 1.5rem; }
.info-box {
  background: var(--white);
  border: 1px solid var(--gray-lt);
  border-radius: var(--radius);
  padding: 1.4rem;
  border-left: 4px solid var(--gold);
}
.info-box h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray); margin-bottom: .4rem; }
.info-box p { font-size: 1.05rem; font-weight: 600; color: var(--navy); }

/* ── STAFF CARDS ─────────────────────────────────────────────────────────── */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.staff-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  text-align: center;
}
.staff-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--navy);
  margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--gold);
}
.staff-card h3 { font-size: 1.05rem; color: var(--navy); }
.staff-card .role { font-size: .85rem; color: var(--gold); font-weight: 700; margin-top: .2rem; }
.staff-card p { font-size: .88rem; color: var(--gray); margin-top: .6rem; }

/* ── COACH BADGES (team pages) ───────────────────────────────────────────── */
.coach-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: 1.75rem 0 2rem;
}
.coach-badge {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: var(--white);
  border-radius: 40px;
  padding: .35rem .85rem .35rem .35rem;
  box-shadow: var(--shadow);
}
.coach-badge .badge-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  letter-spacing: .03em;
}
.coach-badge .badge-name {
  font-size: .83rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.coach-badge .badge-role {
  font-size: .72rem;
  color: var(--gold);
  font-weight: 600;
  line-height: 1.2;
}

/* ── TEAM HEADER ROW (badge + league schedule link) ─────────────────────── */
.team-header-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .85rem;
  margin-bottom: .5rem;
}
.league-link {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.league-link .rrc-logo {
  height: 26px;
  width: auto;
}
.league-link a {
  font-size: .82rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 1px;
  transition: color .2s;
}
.league-link a:hover { color: var(--gold); }

/* ── AWARDS ──────────────────────────────────────────────────────────────── */
.award-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.8rem;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 1rem;
}
.award-icon { font-size: 2.2rem; flex-shrink: 0; }
.award-card h3 { color: var(--navy); font-size: 1.05rem; }
.award-card p { color: var(--gray); font-size: .9rem; margin-top: .2rem; }
.award-card .award-winner { color: var(--gold); font-weight: 700; font-size: 1rem; }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.65);
  padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}
footer h4 { color: var(--gold); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
footer ul { list-style: none; }
footer ul li { margin-bottom: .5rem; }
footer ul li a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .88rem; transition: color var(--transition); }
footer ul li a:hover { color: var(--gold); }
.footer-logo img { height: 60px; width: auto; margin-bottom: .8rem; }
.footer-logo p { font-size: .85rem; }
.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

.footer-affiliates { display: flex; align-items: center; gap: 1rem; }
.affiliate-logo { height: 36px; width: 36px; object-fit: contain; opacity: .9; }

/* ── UTILITIES ───────────────────────────────────────────────────────────── */
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-dark); padding: 1rem 0; }
  .nav-links.open { display: flex; }
  .nav-links > li > a, .nav-links > li > .nav-toggle { padding: .8rem 1.5rem; }
  .dropdown-menu { position: static; box-shadow: none; border-top: none; padding-left: 1rem; }
  .dropdown:hover .dropdown-menu { display: none; }
  .dropdown.open .dropdown-menu { display: block; }
  .nav-hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero { padding: 3rem 1rem 2.5rem; }

  /* ── Hero banner scales down on small screens ── */
  .hero img.hero-logo { height: 140px; max-width: 90vw; width: auto; }

  /* ── Photos page: keep bear behind content ── */
  .photo-section, .albums-section { position: relative; z-index: 1; }

  /* ── Learn Rugby: tiles stack to single column ── */
  .info-grid {
    grid-template-columns: 1fr !important;
  }
  .info-grid .info-box {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
  /* Offsides tiles: flip image+text from row to column */
  .info-grid .info-box[style*="flex-direction:row"],
  .info-grid .info-box[style*="flex-direction: row"] {
    flex-direction: column !important;
  }
  .info-grid .info-box[style*="flex-direction:row"] img,
  .info-grid .info-box[style*="flex-direction: row"] img {
    width: 100% !important;
    height: 200px !important;
  }
}
