/* The Kacey Project - Global Styles */
:root {
  --bg: #0f1115;
  --panel: #161922;
  --text: #e9edf1;
  --muted: #aab3bf;
  --accent: #4aa3ff;
  --accent-2: #ff5c7a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.site-wrap { max-width: 1080px; margin: 0 auto; padding: 24px; }
.brand {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 0;
}
.brand h1 { margin: 0; font-size: 1.75rem; letter-spacing: 0.3px; }
.brand small { color: var(--muted); }

nav { background: var(--panel); border: 1px solid #222632; border-radius: 10px; }
nav ul { list-style: none; margin: 0; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
nav a { display: inline-block; padding: 10px 14px; border-radius: 8px; color: var(--text); text-decoration: none; }
nav a:hover { background: #1d2130; color: #fff; }

/* WordPress/Bootstrap header bar to match dark theme */
.navbar, .navbar-inverse { background: var(--panel) !important; border: 1px solid #222632; border-radius: 10px; }
.navbar a, .navbar-inverse a { color: var(--text) !important; }
.navbar a:hover, .navbar-inverse a:hover { color: #fff !important; background: #1d2130; border-radius: 8px; }

/* Clickable banner under menus */
.banner { display: block; margin: 12px 0; border: 1px solid #222632; border-radius: 12px; overflow: hidden; }
.banner img { display: block; width: 100%; height: auto; }

.hero {
  margin: 18px 0 8px; border-radius: 12px; overflow: hidden; border: 1px solid #222632;
}
.hero img { width: 100%; display: block; }
.header-hero { width: 100%; height: auto; border-radius: 12px; border: 1px solid #222632; }
.page-title { font-size: 1.4rem; margin: 16px 4px; color: var(--muted); }
.page-title > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.page-title a { display: inline-block; padding: 10px 14px; border-radius: 8px; text-decoration: none; color: var(--text); }
.page-title a:hover { background: #1d2130; color: #fff; }

.content {
  background: var(--panel); border: 1px solid #222632; border-radius: 12px; padding: 22px; margin-top: 12px;
}
.content h2, .content h3 { color: #fff; }
.content a { color: var(--accent); }
.content a:hover { color: #87c6ff; }

/* Scoped override: make only the main content section white with black text */
main.content {
  background: #ffffff;
  color: #000000;
  border-color: #e5e7eb;
}
main.content h2,
main.content h3 {
  color: #000000;
}

/* Page-specific override: light content area with white background and black text */
.content--light {
  background: #ffffff;
  color: #000000;
  border-color: #e5e7eb;
}
.content--light h2,
.content--light h3 {
  color: #000000;
}

/* Sidebar blocks on page.html */
#sidebar1 { margin-top: 12px; }
#sidebar1 .sidebar-wrap { background: var(--panel); border: 1px solid #222632; border-radius: 12px; padding: 14px; margin: 12px 0; }
#sidebar1 .sidebar-wrap p, #sidebar1 .sidebar-wrap a { color: var(--text); }
#sidebar1 .sidebar-wrap a:hover { color: #fff; text-decoration: none; }
.responsive-container iframe { width: 100%; max-width: 100%; border: none; border-radius: 12px; }

/* Page container alignment for WordPress boxed layout */
.boxed-wrapper, .container { background: transparent; }

/* Small utility styles */
.muted { color: var(--muted); }
.align-center { text-align: center; }

.radio, .ads { margin-top: 20px; }
.radio iframe { width: 100%; max-width: 100%; border: none; border-radius: 12px; }

.ad-card { display: grid; grid-template-columns: 160px 1fr; gap: 14px; align-items: center; background: #1a1e29; border: 1px dashed #2b3141; border-radius: 12px; padding: 12px; }
.ad-card img { width: 100%; height: auto; border-radius: 10px; display: block; }
.ad-card .ad-title { font-weight: 600; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }

.tiny-ad { display: inline-flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #2b3141; border-radius: 999px; background: #141824; }
.tiny-ad .dot { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: inline-block; }
.tiny-ad .title { font-size: 0.92rem; }

footer { margin-top: 28px; color: var(--muted); font-size: 0.95rem; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* Collage banner for media.html */
.media-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  height: 200px;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid #222632;
  border-bottom: 1px solid #222632;
  background: var(--panel);
}
.media-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  .ad-card { grid-template-columns: 1fr; }
}

/* Generic responsive video/embed container (16:9) */
.responsive-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #222632;
  background: #0c0f17;
  margin: 16px 0;
}
.responsive-embed iframe,
.responsive-embed object,
.responsive-embed embed {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  border-radius: 12px;
}

/* Media gallery (mosaic with uniform thumbnails) */
.media-gallery { margin-top: 16px; }
.media-gallery h3 { margin: 0 0 10px; }
.media-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.media-gallery__item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* uniform squares */
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f7f7f7;
  padding: 0;
  cursor: pointer;
}
.media-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox modal */
.lightbox { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,0.6); z-index: 1000; }
.lightbox[hidden] { display: none; }
.lightbox__dialog {
  position: relative;
  background: #11151f;
  border-radius: 12px;
  border: 1px solid #222632;
  padding: 12px;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.lightbox__dialog img { display: block; max-width: 86vw; max-height: 80vh; border-radius: 8px; }
.lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #1a1e29;
  color: #fff;
  border: 1px solid #2b3141;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

