:root{
  --bg:#0b0f17;
  --panel:#121826;
  --card:#0f1625;
  --text:#e5eefc;
  --muted:#9fb1d1;
  --accent:#9bd6ff;
  --danger:#ff6b6b;
}

*{ box-sizing:border-box }

body{
  margin:0;
  font-family:Inter,system-ui,Arial,sans-serif;
  background:linear-gradient(180deg,#0b0f17,#0b0f17 60%,#0a0e15);
  color:var(--text);
}

/* ------------ Layout helpers ------------ */
.container{ max-width:1100px; margin:0 auto; padding:16px }
.container.narrow{ max-width:560px }
.row{display:flex}
.between{justify-content:space-between}
.center{align-items:center}
.gap{gap:12px}

/* ========================================
   Header / Navigation (responsive)
======================================== */
.site-header{
  position:sticky; 
  top:0;
  background:rgba(12,18,30,.85);
  backdrop-filter:blur(10px);
  border-bottom:1px solid #1f2a44;
  z-index:2000;       /* single source of truth */
  padding:10px 0;
  isolation: isolate;   /* creates a new top-level stacking context */

}
.site-header .container{
  justify-content:space-between;
  align-items:center;
  padding:12px 0;
  position:relative;  /* anchor for absolute dropdown */
}

/* Brand */
.brand{
  background:linear-gradient(90deg,#9bd6ff 0%,#3a78ff 100%);
  -webkit-background-clip:text; background-clip:text;
  color:transparent;
  font-weight:900; font-size:36px; letter-spacing:.6px;
  text-transform:uppercase; text-decoration:none;
  transition:transform .2s ease, opacity .2s ease;
}
.brand:hover{ transform:scale(1.02); opacity:.95 }

/* Base nav (desktop) */
.nav{ display:flex; gap:20px; }
.nav a{
  color:var(--muted);
  font-size:16px;
  text-decoration:none;
  transition:color .2s;
}
.nav a:hover{ color:#fff }

/* Hamburger (mobile) */
.hamburger{
  display:none;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  width:40px; height:32px;
  background:none; border:0; cursor:pointer; gap:5px;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.hamburger span{
  width:24px; height:3px; background:var(--text);
  border-radius:2px; transition:all .3s ease;
}
.hamburger.active span:nth-child(1){ transform:translateY(8px) rotate(45deg) }
.hamburger.active span:nth-child(2){ opacity:0 }
.hamburger.active span:nth-child(3){ transform:translateY(-8px) rotate(-45deg) }

/* Mobile dropdown behaviour */
@media (max-width: 768px){
  .hamburger{ display:flex; position:relative; z-index:2002; }

  /* Hidden until toggled */
  .nav{
    position:absolute; right:16px; top:56px;
    display:none;
    flex-direction:column; gap:10px;
    background:var(--panel);
    border:1px solid #1b2439; border-radius:12px;
    padding:12px; min-width:180px;
    box-shadow:0 12px 32px rgba(0,0,0,.45);
    z-index:2001;
  }
  .nav.show{ display:flex; }

  .nav a{ padding:8px 6px; }
}

/* ========================================
   Page / Cards / Grids / Pagination
======================================== */
.page-title{ margin:18px 0 8px }

.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px }

.card{
  background:var(--card);
  border:1px solid #1b2439;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 6px 24px rgba(0,0,0,.25);
}
.card img{ display:block; width:100%; height:220px; object-fit:cover }
.card figcaption{ padding:8px 10px; color:var(--muted) }

.admin-card img{ height:160px }

.grid.fixed4{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px }
@media (max-width:1100px){ .grid.fixed4{ grid-template-columns:repeat(3,1fr) } }
@media (max-width:800px){  .grid.fixed4{ grid-template-columns:repeat(2,1fr) } }
@media (max-width:520px){  .grid.fixed4{ grid-template-columns:1fr } }

.pagination{
  display:flex; gap:8px; justify-content:center; align-items:center;
  margin:18px 0 6px; flex-wrap:wrap;
}
.pagination a,.pagination span{
  padding:8px 12px; border:1px solid #1b2439;
  border-radius:10px; background:var(--panel);
  color:var(--text); text-decoration:none; line-height:1;
}
.pagination a:hover{ border-color:#2b6de0 }
.pagination .current{ background:#1a2336; border-color:#2b6de0; font-weight:700 }
.pagination .disabled{ opacity:.5; pointer-events:none }
.pagination .dots{ color:var(--muted); padding:0 6px }

/* ========================================
   Videos
======================================== */
.video-list{ display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:16px }
.video-item{
  background:var(--card);
  border:1px solid #1b2439;
  border-radius:14px;
  padding:10px;
}
.video-item video{ width:100%; border-radius:8px }
.video-title{ color:var(--muted); margin-top:6px }

/* ========================================
   Footer
======================================== */
.site-footer{
  margin-top:32px; border-top:1px solid #1f2a44;
  padding:16px 0; color:var(--muted); text-align:center;
}

/* ========================================
   Forms / Tabs / Alerts
======================================== */
.card-form{
  background:var(--panel); border:1px solid #1b2439;
  padding:16px; border-radius:14px; display:grid; gap:12px;
}
.card-form label{ display:grid; gap:6px; color:var(--muted) }
.card-form input,.card-form textarea,.card-form select{
  padding:10px; border-radius:10px; border:1px solid #2b3756;
  background:#0d1424; color:#e8f1ff;
}
.card-form button,button{
  padding:10px 14px; border:0; border-radius:12px;
  background:linear-gradient(180deg,#3a78ff,#1e51e9);
  color:#fff; font-weight:600; cursor:pointer;
}
.card-form .danger,.danger{ color:#ffd9d9 }

.tabs{ display:flex; gap:8px; margin:8px 0 16px }
.tab{
  padding:8px 12px; border:1px solid #1b2439;
  border-radius:999px; color:var(--muted);
  text-decoration:none; background:var(--panel);
}
.tab.active{ color:#fff; border-color:#2b6de0; box-shadow:0 0 0 2px rgba(43,109,224,.2) }

.error{
  background:#3a0e0e; border:1px solid #6b1111;
  color:#ffd9d9; padding:8px 12px; border-radius:8px;
}

/* ========================================
   About page
======================================== */
.about-page{ padding-top:8px }

/* Hero banner (image is set via inline style or banner.php) */
.about-hero{
  position:relative; border-radius:16px; overflow:hidden;
  height:240px;
  background:#0a0e15 center/cover no-repeat;
  border:1px solid #1b2439; box-shadow:0 6px 24px rgba(0,0,0,.25);
}
.about-hero::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.15),rgba(0,0,0,.45));
  pointer-events:none;
}

/* Overlay card */
.about-overlay{
  position:absolute; left:16px; bottom:16px;
  display:flex; align-items:center; gap:12px;
  background:rgba(18,24,38,.85);
  border:1px solid #233257; padding:10px 12px;
  border-radius:14px; backdrop-filter:blur(6px);
}
.about-overlay .profile{
  width:64px; height:64px; border-radius:50%;
  object-fit:cover; border:2px solid #1f2a44;
}
.about-overlay .overlay-text h2{ margin:0; color:#fff; font-size:18px }
.about-overlay .overlay-text .muted{ margin:2px 0 0 }

/* Two-column layout */
.about-layout{
  display:grid; grid-template-columns:2fr 1fr; gap:14px; margin-top:14px;
}
.about-main{ text-align:left }
.about-side{ display:grid; gap:14px }

/* Reuse card styles */
.info-card{
  background:var(--card); border:1px solid #1b2439;
  border-radius:16px; padding:14px; box-shadow:0 6px 24px rgba(0,0,0,.25);
}
.info-card h3{ margin:4px 0 10px; color:#fff }
.equip-list{ margin:0; padding-left:18px }
.equip-list li{ margin:6px 0 }
.kv > div{ display:flex; align-items:center; gap:8px; margin:6px 0 }

/* Buttons & links */
.btn-primary{
  display:inline-block; padding:10px 14px; border-radius:12px;
  background:linear-gradient(180deg,#3a78ff,#1e51e9);
  color:#fff; text-decoration:none; font-weight:600;
}
.btn-link{ color:#9bd6ff; text-decoration:none }
.btn-link:hover{ color:#d5ecff }

/* Mobile tweaks for about page */
@media (max-width:900px){
  .about-layout{ grid-template-columns:1fr }
  .about-side{ grid-template-columns:1fr }
  .about-overlay{ left:12px; right:12px; bottom:12px }
}

/* ========================================
   Modal (image viewer)
======================================== */
.modal{
  position:fixed; inset:0; background:rgba(0,0,0,.85);
  display:flex; align-items:center; justify-content:center;
  padding:24px; z-index:9999;
}
.modal.hidden{ display:none }

.modal-content{
  background:var(--panel); border:1px solid #1b2439; border-radius:16px;
  display:grid; grid-template-columns:2fr 1fr; gap:0;
  width:min(1200px,95vw); max-height:90vh; overflow:hidden;
  box-shadow:0 0 40px rgba(0,0,0,.6); position:relative;
}
.modal .close{
  position:absolute; top:12px; right:12px;
  background:#0e1425; border:1px solid #233257; border-radius:50%;
  width:32px; height:32px; font-size:18px; color:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center; z-index:10;
}
.modal-content img{
  width:100%; height:100%; object-fit:contain; background:#000;
  max-height:90vh; display:block;
}
.modal .meta{
  padding:16px; overflow-y:auto; color:var(--text); font-size:14px;
}
.modal .meta h2{ margin-top:0; font-size:18px; color:#fff }
.modal .meta p{ margin:6px 0 }
.modal .meta button{ margin-top:12px }

@media (max-width:768px){
  .modal-content{ grid-template-columns:1fr; max-height:95vh }
  .modal-content img{ max-height:60vh }
  .modal .meta{ max-height:35vh }
}

/* ========================================
   Filters / Tag pills
======================================== */
.filter-bar{ margin:6px 0 12px; display:flex; align-items:center; gap:8px }
.chip{
  display:inline-flex; align-items:center; gap:6px;
  background:#0d1424; border:1px solid #2b3756; color:#e5eefc;
  padding:6px 10px; border-radius:999px;
}
.chip .chip-x{ color:#9fb1d1; text-decoration:none; font-weight:700 }
.chip.clear{ background:#1a2336; border-color:#2b6de0 }

.tags-inline{ padding:6px 10px; display:none !important }

.tag-pill,
.modal .meta a.tag-link{
  display:inline-block; margin:0 6px 6px 0; padding:4px 8px;
  border-radius:999px; background:#0d1424; border:1px solid #2b3756;
  color:#9bd6ff; text-decoration:none; font-size:12px;
}
.tag-pill:hover{ border-color:#4a7be6 }

/* Hide the checkbox; it controls the menu */
.menu-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Desktop: keep inline nav; hide hamburger */
@media (min-width: 769px){
  .hamburger { display: none !important; }
  .nav { display: flex !important; }
}

/* Admin About: responsive form layout */
.admin-about .card-form .form-row{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:12px;
}
@media (max-width: 900px){
  .admin-about .card-form .form-row{
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}
@media (max-width: 600px){
  .admin-about .card-form .form-row{
    grid-template-columns: 1fr;
  }
}

/* Make controls truly fill their grid cell */
.card-form label{ width:100% }
.card-form input,
.card-form textarea,
.card-form select{ width:100% }
.card-form textarea{ min-height:140px; resize:vertical }

/* File pickers & previews side-by-side, then stack */
.admin-about .files-row{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
  align-items:start;
}
@media (max-width: 700px){
  .admin-about .files-row{ grid-template-columns: 1fr; }
}

/* Previews */
.admin-about .preview{
  display:flex; gap:10px; align-items:flex-start; flex-wrap:wrap;
}
.admin-about .preview img{
  width:140px; height:auto; border-radius:10px; border:1px solid #1b2439;
}

/* Keep long URLs from blowing out */
.card-form input[type="url"], .card-form input[type="text"], .card-form input[type="email"]{
  overflow:hidden; text-overflow:ellipsis;
}


/* Mobile: dropdown controlled by the checkbox */
@media (max-width: 768px){
  .hamburger {
    display: flex;
    position: relative;
    z-index: 2002;               /* above dropdown */
  }

  /* Default: hidden */
  .nav {
    position: absolute;
    right: 16px;
    top: 56px;
    display: none;
    flex-direction: column;
    gap: 10px;
    background: var(--panel);
    border: 1px solid #1b2439;
    border-radius: 12px;
    padding: 12px;
    min-width: 180px;
    box-shadow: 0 12px 32px rgba(0,0,0,.45);
    z-index: 2001;
  }

  /* When checkbox is checked, show the menu */
  .menu-check:checked ~ .nav {
    display: flex;
  }

  /* Turn hamburger into an X when checked */
  .menu-check:checked + .hamburger span:nth-child(1){
    transform: translateY(8px) rotate(45deg);
  }
  .menu-check:checked + .hamburger span:nth-child(2){
    opacity: 0;
  }
  .menu-check:checked + .hamburger span:nth-child(3){
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* ===================================================
   Announcements Page
=================================================== */
.ann-page {
  padding-top: 10px;
}

.ann-hero {
  text-align: center;
  margin: 10px 0 18px;
}

.ann-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.ann-hero .sub {
  color: var(--muted);
}

.ann-wrap {
  max-width: 980px;
  margin: 0 auto;
}

/* --- Cards --- */
.ann-card {
  background: var(--panel);
  border: 1px solid #e0c27a40; /* soft golden tone */
  border-radius: 14px;
  padding: 14px;
  margin: 14px 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.ann-title {
  font-weight: 800;
  font-size: 18px;
  margin: 0 0 6px;
}

.ann-date {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 10px;
}

.ann-body {
  margin: 0 0 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* --- Image --- */
.ann-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #1b2439;
  max-height: 75vh;
  object-fit: cover;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .ann-card {
    padding: 12px;
  }
  .ann-title {
    font-size: 17px;
  }
  .ann-img {
    max-height: 60vh;
  }
}

