:root{
  --bg:#0f0f10;
  --panel:#1b1b1d;
  --panel2:#232326;
  --border:#2c2c30;
  --text:#e8e8ea;
  --muted:#b7b7bd;

  --red:#d11f2b;
  --green:#00b37a;
	
  --puprple:#ff36f8;
  --entertaiment:#ff1616;
  --animations:#00AAFF;
  --production:#ffa484;
  --live: #ff0000;
  --development: #4d9b39;
  --university: #d27bff;
  --sounds: #fdff56;
  --games: #ff36f8;
  
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ===== Layout ===== */
.shell{
  min-height:100vh;
  display:flex;
  justify-content:center;
  padding:26px 14px;
}

.frame{
  width:100%;
  max-width:1100px;
  background: linear-gradient(#151517, #111112);
  border:1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  display:flex;
  overflow:hidden; /* prevents any content overflow */
}

/* ===== Sidebar ===== */
.sidebar{
  width:220px;
  flex:0 0 220px;
  border-right:1px solid var(--border);
  background:#141416;
  padding:14px 12px;
}

.brand{
  display:flex;
  justify-content:center;
  align-items:center;
  padding:10px 6px 16px;
  border-bottom:1px solid var(--border);
  margin-bottom:14px;
  padding-bottom:18px;
}

.brand a{ display:inline-block; }

/* Bigger, clearer logo */
.brand-logo{
  max-width:100%;
  max-height:76px;                 /* bigger */
  width:auto;
  height:auto;
  object-fit:contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.7));
  transition: filter .25s ease, transform .25s ease;
}
.brand-logo:hover{
  filter:
    drop-shadow(0 0 10px rgba(209,31,43,.35))
    drop-shadow(0 2px 8px rgba(0,0,0,.7));
  transform: translateY(-1px);
}

.nav a{
  display:block;
  padding:10px 10px;
  margin:6px 0;
  border:1px solid transparent;
  border-radius:10px;
  text-decoration:none;
  color:var(--muted);
  background:transparent;
}

.nav a:hover{
  background:#1a1a1d;
  border-color:var(--border);
  color:var(--text);
}

.nav a.active{
  background:#1f1f22;
  border-color:var(--border);
  color:var(--text);
}

/* ===== Main ===== */
.main{
  flex:1;
  min-width:0; /* critical: prevents overflow from large media */
  padding:14px 14px 20px;
  background: radial-gradient(1200px 600px at 50% -20%, rgba(255,255,255,.06), transparent 60%);
}

.main .panel:first-of-type .thumb{
  height:190px;                    /* hero height */
  border-radius:14px;
}
.main .panel:first-of-type .thumb img{
  object-position: 50% 35%;        /* lifts framing a bit */
}

/* Keep the layout balanced when there is no video
   (your PHP already sets grid-column inline, this just helps spacing) */
.thumb-col{
  gap:10px;
}

/* Slightly nicer button alignment under hero image */
.main .panel:first-of-type .thumb-col .btn{
  margin-top:2px;
}

.top-sep{
  display:inline-block;
  width:1px;
  height:14px;
  background: var(--border);
  margin:0 6px;
  align-self:center;
}

/* ===== Top Sections Nav (subcategories) ===== */
.subnav{
  display:flex;
  gap:10px;
  align-items:center;
  margin:10px 0 16px;
  padding:10px;
  background: var(--panel);
  border:1px solid var(--border);
  border-radius:14px;

  /* mobile-friendly */
  overflow:auto;
  -webkit-overflow-scrolling: touch;
}

.subnav a{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid transparent;
  text-decoration:none;
  color:var(--muted);
  background:transparent;
  white-space:nowrap;
  font-size:13px;
}

.subnav a:hover{
  background:#1a1a1d;
  border-color:var(--border);
  color:var(--text);
}

.subnav a.active{
  background:#1f1f22;
  border-color:var(--border);
  color:var(--text);
}


.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:16px;
}

/* Move these menu items next to the social links */
.toplinks {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* Make the logo align left and social links align right */
.topbar .logo {
  flex: 1; /* Make the logo take up available space */
}

.toplinks a{
  color:var(--muted);
  text-decoration:none;
  margin-left:14px;
  font-size:13px;
}

.toplinks a:hover{ color:var(--text); }

.h1{
  font-size:22px;
  font-weight:800;
  margin:4px 0 12px;
}

/* ===== Panels ===== */
.panel{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  margin-top:14px;
}

.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.section-title h2{
  margin:0;
  font-size:15px;
  font-weight:800;
}

.rule{
  height:3px;
  border-radius:99px;
  background:var(--red);
  margin:8px 0 12px;
}

.rule.green{ background:var(--green); }

.meta{
  color:var(--muted);
  font-size:12px;
  margin-bottom:10px;
}

.badge{
  display:inline-block;
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  background:#141416;
  border:1px solid var(--border);
  color:var(--muted);
}

/* ===== Post card ===== */
.post-card{
  background:var(--panel2);
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  position:relative; /* Important for logo positioning */
}

.post-card h3{
  margin:0 0 8px;
  font-size:16px;
}

.post-card p{
  margin:0 0 12px;
  color:var(--muted);
  line-height:1.5;
}

/* ===== Media layout ===== */
.media-row{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:12px;
  align-items:start;
}

.video-box{
	width: auto;
	height: auto;
	border-radius:12px;
  background:#2a2a2d;
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#cfcfd6;
  font-weight:700;
  letter-spacing:.2px;
  overflow:hidden;
}

.video-box iframe{
  width:100%;
  height:100%;
  border:0;
}

.thumb-col{
  display:grid;
  gap:10px;
}

/* Taller preview images across the site */
.thumb{
  height:150px;                    /* was ~90px */
  border-radius:12px;
  background:#2a2a2d;
  border:1px solid var(--border);
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}

/* Ensure images fill cleanly */
.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
  transform: scale(1);
  transition: transform .35s ease, filter .35s ease;
}

/* Subtle hover zoom (premium, not annoying) */
.thumb:hover img{
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.03);
}
.thumb::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.00) 0%,
    rgba(0,0,0,0.10) 55%,
    rgba(0,0,0,0.30) 100%
  );
}

/* ===== Buttons ===== */
.btn{
  display:inline-block;
  padding:8px 12px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#1a1a1d;
  color:var(--text);
  text-decoration:none;
  font-size:13px;
}

.btn:hover{ background:#202024; }

/* ===== Forms ===== */
input, select, textarea{
  background:#111113;
  color:var(--text);
  border:1px solid var(--border);
  border-radius:10px;
}

/* ===== GLOBAL: stop any images from blowing up layout ===== */
img{
  max-width:100%;
  height:auto;
}

/* ===== HARD FIX: stop huge images inside TinyMCE post body ===== */
.body,
.post-content{
  max-width:100%;
  overflow:hidden;
  overflow-wrap:anywhere;
}

.body img,
.post-content img{
  max-width:100% !important;
  width:auto !important;
  height:auto !important;
  display:block;
  border-radius:12px;
  border:1px solid var(--border);
  margin:12px 0;
  max-height:620px;
  object-fit:contain;
}

.body img[style],
.post-content img[style]{
  max-width:100% !important;
  width:auto !important;
  height:auto !important;
}

/* Embedded content */
.body iframe,
.post-content iframe,
.body video,
.post-content video{
  max-width:100% !important;
}

/* ===== Responsive ===== */
@media (min-width: 1200px){
  .shell{ padding:26px 18px; }
}

@media (max-width: 820px){
  .frame{ flex-direction:column; }
  .sidebar{
    width:100%;
    flex:0 0 auto;
    border-right:0;
    border-bottom:1px solid var(--border);
  }
  .brand-logo{ max-height:64px; }
  .thumb{ height:160px; }
  .main .panel:first-of-type .thumb{ height:200px; }
  .media-row{ grid-template-columns:1fr; }
  .video-box{ height:200px; }
}

/* ===== Small logo at top-right of post card ===== */
.post-card .post-logo {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: auto;
  z-index: 10;
}

.post-card {
  position: relative; /* Required for positioning the logo */
}
