:root{
  --text:#222;
  --link:#333;
  --link-hover:#b22222;
  --card-bg:rgba(255,255,255,.85);
  --radius:12px;
  --shadow:0 4px 12px rgba(0,0,0,.1);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:"Segoe UI",Tahoma,Geneva,Verdana,sans-serif;
  color:var(--text);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  background:url("background.jpg") no-repeat center/cover;
  z-index:-1;
}

/* Header / Nav */
header{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(255,255,255,.9);
  backdrop-filter:blur(6px);
}

nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.5rem 2rem;
  flex-wrap:wrap;
}

nav .logo img{height:50px}

nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  gap:2rem;
}

nav a{
  color:var(--link);
  text-decoration:none;
  font-weight:700;
  transition:color .25s ease;
}
nav a:hover{color:var(--link-hover)}

nav .donate a{
  display:flex;
  align-items:center;
  padding:.35rem .7rem;
  border-radius:999px;
  transition:transform .2s ease;
}
nav .donate a:hover{transform:scale(1.05)}
nav .donate img{height:28px}

/* Smaller donate icon when used inside page content */
.content .logo.donate img {
  height: 80px;   /* tweak to taste: 20–26px */
}

/* Dropdown */
.dropdown{position:relative}
.dropdown > a{cursor:default}
.dropdown-content{
  display:none;
  position:absolute;
  top:100%;
  right:0;
  min-width:180px;
  margin:0;
  padding:0;
  background:rgba(255,255,255,.95);
  border-radius:0 0 6px 6px;
  box-shadow:0 8px 16px rgba(0,0,0,.2);
}
.dropdown:hover .dropdown-content{display:block}
.dropdown-content li{display:block}
.dropdown-content a{
  display:block;
  padding:12px 16px;
  white-space:nowrap;
}
.dropdown-content li:not(:last-child){border-bottom:1px solid #eee}

/* Layout / Content */
main{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2rem;
  padding:4rem 1rem;
}

.content{
  width:100%;
  max-width:1000px;
  padding:2rem;
  border-radius:var(--radius);
  background:var(--card-bg);
  box-shadow:var(--shadow);
}

.content h1{
  text-align:center;
  font-size:3rem;
  font-weight:800;
  margin:0 0 .25rem;
}
.content h3{
  text-align:center;
  font-size:1.5rem;
  font-weight:300;
  margin:0 0 1.5rem;
}

.subtext{display:block; margin-left:1.2em}
.content ul li{margin-bottom:.75rem}
.content ul li:last-child{margin-bottom:0}

.text-center{text-align:center}

/* Layout Right Side Bar */
.page-layout{
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.page-layout > main{
  flex: 1;
  min-width: 0;
}

.rightbar{
  width: 280px;
  position: sticky;
  top: 90px;                 /* sticky threshold */
  margin-top: 16px;          /* <-- always-visible gap */
  height: auto; /* 110px + 16px to keep height consistent */
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rightbar__top{
  flex: 0 0 auto;
  overflow: auto;
  background: rgba(255,255,255,0.9);
  border-radius: 12px;
  padding: 0.75rem;
}

.rightbar__rest{
  flex: 1;
  overflow: auto;
  background: rgba(255,255,255,0.9);
  border-radius: 12px;
  padding: 0.75rem;
}

.rightbar__heading{
  margin: 0 0 0.5rem;
  text-align: center;
}

/* Mini calendar styling */
.mini-cal__header{
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.mini-cal__title{
  text-align: center;
  font-weight: 600;
}

.mini-cal__btn{
  height: 32px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

.mini-cal__btn:disabled{
  opacity: 0.4;
  cursor: not-allowed;
}

.mini-cal__dow,
.mini-cal__grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.mini-cal__dow span{
  font-size: 0.75rem;
  text-align: center;
  opacity: 0.75;
}

.mini-cal__cell{
  aspect-ratio: auto;   /* stop forcing squares */
  height: 28px;         /* choose your preferred height */
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 0.85rem;
}

.mini-cal__cell--blank{
  opacity: 0;
}

.mini-cal__cell--day{
  border: 1px solid #eee;
  background: #fff;
}

.mini-cal__cell--today{
  border: 2px solid #777;
  font-weight: 700;
}

.mini-cal__cell--event{
  background: rgba(209, 118, 14, 0.25);
  border: 2px solid rgba(0,0,0,0.25);
  font-weight: 600;
}

.events-list{
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.event-row{
  display: grid;
  grid-template-columns: 88px 1fr; /* date column + title column */
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0.25rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.event-date{
  font-weight: 700;
  white-space: nowrap;
}

.event-title{
  line-height: 1.2;
}

.events-empty{
  opacity: 0.7;
  text-align: center;
  padding: 0.75rem 0.25rem;
}

.event-link{
  color: inherit;               /* match text color */
  text-decoration: none;
  font-weight: 500;
}

.event-link:hover{
  text-decoration: underline;
}


/* Mobile: stack sidebar under main */
@media (max-width: 900px){
  .page-layout{ flex-direction: column; }
  .rightbar{
    width: 100%;
    position: static;
    height: auto;
  }
  .rightbar__top{
    flex: 0 0 auto;
    overflow: auto;
    }
}

/* Gallery */
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:10px;
  justify-items:center;
}

.gallery-thumb{
  width:100%;
  height:175px;
  object-fit:cover;
  border-radius:6px;
  cursor:pointer;
}

/* Video thumbnail (YouTube / external) */
.gallery-video-thumb{
  width:225px;
  height:175px;
  border-radius:6px;
  cursor:pointer;
  position:relative;
  background:#333 center/cover no-repeat;
  box-shadow:0 2px 4px rgba(0,0,0,.2);
  display:flex;
  justify-content:center;
  align-items:center;
}
.gallery-video-thumb::after{
  content:"▶";
  position:absolute;
  inset:50% auto auto 50%;
  transform:translate(-50%,-50%);
  color:#fff;
  font-size:30px;
  text-shadow:0 0 5px rgba(0,0,0,.8);
  background:rgba(0,0,0,.4);
  border-radius:50%;
  padding:5px 10px 5px 13px;
  line-height:1;
  transition:opacity .25s ease;
}
.gallery-video-thumb:hover::after{opacity:.8}
.gallery-video-center{grid-column:1 / -1; justify-self:center}

/* Viewer modal */
#viewer{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.85);
  z-index:2000;
  justify-content:center;
  align-items:center;
  padding:1rem;
}
#viewer.is-open{display:flex}
#viewer img, #viewer video, #viewer iframe{
  width:min(900px, 95vw);
  height:min(85vh, 700px);
  max-width:95vw;
  max-height:95vh;
  border-radius:8px;
  object-fit:contain;
  background:#000;
}

/* viewer navigation + stage */
#viewer .viewer-stage{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
}

#viewer .viewer-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:48px;
  height:48px;
  border:0;
  border-radius:999px;
  cursor:pointer;
  font-size:28px;
  line-height:1;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,0.85);
}

#viewer .viewer-prev{ left:18px; }
#viewer .viewer-next{ right:18px; }

/* keep existing #viewer img rules if you have them; this helps iframe/video too */
#viewer iframe, #viewer video, #viewer img{
  max-width:95vw;
  max-height:90vh;
}

/* Board profiles */
.profile{
  display:flex;
  gap:1.25rem;
  align-items:flex-start;
  margin:1rem 0 2rem;
}
.profile img{
  width:250px;          /* fixed visual width */
  height:300px;         /* fixed visual height */
  object-fit:contain;   /* scale without cropping */
  object-position:center;
  background:#f5f5f5;   /* optional neutral background */
  border-radius:10px;
  box-shadow:0 6px 15px rgba(0,0,0,.15);
}

.profile--small img{
  width:150px;
  height:180px;   /* scaled proportionally */
}

.profile h2 {
  margin-top: 0;
}

/* Footer */
.site-footer{
  width: 100%;
  color: #fff;
  padding: 1.25rem 1rem;
  text-align:center;
}

.footer-inner{
  max-width: 1000px;       /* SAME as .content */
  margin: 0 auto;          /* center */
  text-align: center;
}
.footer-social{
  display:flex;
  justify-content:center;
  gap:30px;
  margin-bottom:.5rem;
}
.footer-social a{display:flex; width:28px; height:28px; align-items:center; justify-content:center}
.footer-social img{
  width:40px;
  height:40px;
  filter:drop-shadow(0 0 4px rgba(255,255,255,.35));
}
.footer-social a:hover img{filter:drop-shadow(0 2px 6px rgba(0,0,0,.8))}
.footer-copy{font-size:.75rem; opacity:.7; margin:0}

/* Mobile */
@media (max-width:768px){
  nav{padding:.5rem 1rem}
  nav ul{flex-direction:column; gap:1rem; width:100%}
  main{padding:2rem .5rem}
  .content{padding:1rem}
  .content h1{font-size:2rem}
  .content h3{font-size:1.2rem}
  .gallery-thumb{height:auto}
  .gallery-video-thumb{width:100%; max-width:400px}
  #viewer img, #viewer video, #viewer iframe{height:min(75vh, 520px)}
  .profile{flex-direction:column}
  .profile img{max-width:100%}
}