/*
Theme Name: WhatsThisCalled
*/

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background:#f6f7f9;
  color:#111;
}

.container{
  max-width:1200px;
  margin:0 auto;
  padding:40px 20px;
}

.hero{
  padding-bottom:10px;
}

.hero h1{
  font-size:42px;
  margin:0 0 10px 0;
}

.hero p{
  color:#666;
  margin:0;
}

.object-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:25px;
  margin-top:40px;
}

@media(max-width:1000px){
  .object-grid{
    grid-template-columns:repeat(3,1fr);
  }
}

@media(max-width:750px){
  .object-grid{
    grid-template-columns:repeat(2,1fr);
  }
}

@media(max-width:480px){
  .object-grid{
    grid-template-columns:1fr;
  }
}

.object-card{
  display:block;
  text-decoration:none;
  color:#111;
  transition:transform .2s ease;
}

.object-card:hover{
  transform:translateY(-4px);
}

.object-thumb{
  width:100%;
  aspect-ratio:1/1;
  background:#fff;
  overflow:hidden;
  border-radius:8px;
}

.object-thumb img{
  width:100%;
  height:100%;
  object-fit:fill;
  display:block;
}

.object-title{
  margin-top:12px;
  font-size:16px;
  font-weight:600;
  line-height:1.4;
}

/* ===== CLEAN SINGLE-COLUMN TOC ===== */

.wiki-toc{
  display:inline-block;     /* key change */
  width:auto;               /* do not stretch */
  max-width:100%;           /* prevent overflow */
  border:1px solid #e2e5e9;
  background:#f8f9fa;
  padding:14px 18px;
  margin:24px 0;
  font-size:14px;
  max-width:520px;   /* narrower */
  border-radius:6px;
}

.wiki-toc-title{
  font-weight:700;
  margin-bottom:10px;
  font-size:15px;
}

.wiki-toc ul{
  list-style:none;
  padding:0;
  margin:0;
}

.wiki-toc li{
  margin:4px 0;   /* tighter spacing */
  line-height:1.4;
}

.wiki-toc a{
  text-decoration:none;
  color:#0645ad;
}

.wiki-toc a:hover{
  text-decoration:underline;
}

.toc-number{
  margin-right:6px;
  color:#6b7280;
  font-size:13px;
}

/* ===== TOP TOPIC BAR (hover dropdown, NO horizontal scroll) ===== */
.top-topicbar{
  background:#1f1f1f;
  color:#fff;
  position:relative;
  z-index:999999; /* must be above page content + WP admin bar */
}

.top-topicbar .top-topicbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:0 20px;
}

.top-topicnav{ flex:1; min-width:0; }

.top-topicnav-list{
  display:flex;
  gap:26px;
  align-items:center;
  list-style:none;
  margin:0;
  padding:0;

  /* IMPORTANT: stop the scrollbar */
  overflow:visible;
  flex-wrap:nowrap;
}

/* Optional: if too many topics, wrap to next line instead of scrolling */
@media (max-width: 900px){
  .top-topicnav-list{
    flex-wrap:wrap;
    gap:14px 18px;
    padding:10px 0;
  }
}

.top-topic-item{
  position:relative;
  padding:14px 0;
  white-space:nowrap;
}

.top-topic-link{
  color:#fff;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  letter-spacing:.02em;
  text-transform:uppercase;
  opacity:.92;
}

.top-topic-item:hover .top-topic-link,
.top-topic-item.is-active .top-topic-link{
  opacity:1;
}

/* Dropdown */
.top-subnav{
  position:absolute;
  left:0;
  top:100%;
  display:none;

  min-width:240px;
  background:#fff;
  color:#111;

  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  box-shadow:0 18px 48px rgba(0,0,0,.18);
  padding:10px;

  z-index:999999; /* above everything */
}

/* Show dropdown on hover */
.top-topic-item:hover .top-subnav{
  display:block;
}

/* Prevent dropdown from being clipped by parent containers */
.top-topicbar,
.top-topicbar *{
  overflow:visible !important;
}

.top-subnav-link{
  display:block;
  padding:10px 10px;
  border-radius:10px;
  text-decoration:none;
  color:#111;
  font-weight:700;
  font-size:14px;
}
.top-subnav-link:hover{ background:rgba(0,0,0,.06); }

/* ===== BRAND HEADER ===== */

.brandbar{
  background:#ffffff;
  border-bottom:1px solid rgba(0,0,0,.08);
}

.brand-inner{
  display:flex;
  justify-content:center;
  padding:22px 0;
}

.brand-logo{
  font-size:36px;
  font-weight:800;
  text-decoration:none;
  color:#111;
  letter-spacing:-1px;
}

.brand-logo span{
  color:#242a56; /* same as topicbar */
}

.brand-logo:hover{
  opacity:.8;
}

/* ===== TOP TOPIC BAR (hover subtopics) ===== */
.top-topicbar{
  background:#1f1f1f;
  color:#fff;
}
.top-topicbar-inner{
  padding:0 20px;
}
.top-topicnav-list{
  display:flex;
  gap:26px;
  align-items:center;
  list-style:none;
  margin:0;
  padding:0;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.top-topic-item{
  position:relative;
  padding:16px 0;
  white-space:nowrap;
}
.top-topic-link{
  color:#fff;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  letter-spacing:.02em;
  text-transform:uppercase;
  opacity:.92;
}
.top-topic-item:hover .top-topic-link,
.top-topic-item.is-active .top-topic-link{
  opacity:1;
}
.top-subnav{
  position:absolute;
  left:0;
  top:100%;
  display:none;
  min-width:240px;
  background:#fff;
  color:#111;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  box-shadow:0 18px 48px rgba(0,0,0,.18);
  padding:10px;
  z-index:9999;
}
.top-topic-item:hover .top-subnav{
  display:block;
}
.top-subnav-link{
  display:block;
  padding:10px 10px;
  border-radius:10px;
  text-decoration:none;
  color:#111;
  font-weight:700;
  font-size:14px;
}
.top-subnav-link:hover{
  background:rgba(0,0,0,.06);
}

/* ===== BRAND ROW (big premium name) ===== */
.site-header{
  background:#fff;
  border-bottom:1px solid rgba(0,0,0,.08);
}
.site-header-inner{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px 20px;
  position:relative;
}
.brand{
  text-align:center;
}
.brand-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:#111;
}
.brand-text{
  font-size:44px;
  font-weight:900;
  letter-spacing:-.03em;
  line-height:1;
}
.brand img{
  height:44px;
  width:auto;
  display:block;
}

/* optional: utility menu (top right) */
.utility-nav{
  position:absolute;
  right:20px;
  top:50%;
  transform:translateY(-50%);
}
.utility-menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:18px;
}
.utility-menu a{
  text-decoration:none;
  color:#111;
  font-weight:700;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.02em;
  opacity:.75;
}
.utility-menu a:hover{opacity:1}

/* ===== SUBHEADER MENU (Home, Blog, About...) ===== */
.subheader-nav{
  background:#fff;
  border-bottom:1px solid rgba(0,0,0,.08);
}
.subheader-menu{
  list-style:none;
  margin:0;
  padding:14px 0;
  display:flex;
  gap:26px;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
}
.subheader-menu a{
  text-decoration:none;
  color:#111;
  font-weight:700;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.7;
}
.subheader-menu a:hover{opacity:1}

/* mobile tweaks */
@media (max-width: 900px){
  .brand-text{font-size:34px}
  .utility-nav{display:none}
}

/* ===== TOPIC BAR LAYOUT FIX ===== */

.top-topicbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

/* Keep topic list left */
.top-topicnav-list{
  display:flex;
  gap:26px;
  list-style:none;
  margin:0;
  padding:0;
  align-items:center;
}

/* ===== SEARCH ON RIGHT ===== */

.topic-search{
  display:flex;
  align-items:center;
  background:rgba(255,255,255,.15);
  border-radius:999px;
  padding:4px 8px;
  backdrop-filter: blur(6px);
}

.topic-search input{
  background:transparent;
  border:none;
  outline:none;
  color:#fff;
  padding:6px 8px;
  font-size:13px;
  min-width:180px;
}

.topic-search input::placeholder{
  color:rgba(255,255,255,.7);
}

.topic-search button{
  border:none;
  background:transparent;
  color:#fff;
  cursor:pointer;
  font-size:14px;
}

/* ===== READABLE WIDTH ON SINGLE OBJECT ===== */
.layout{
  display:grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap:40px;
  align-items:start;
}

.article{
  min-width:0;
}

.article h1{
  max-width:780px;
}

.section-content,
.article .wiki-toc{
  max-width:780px;     /* <- this is the key */
}

@media (max-width: 980px){
  .layout{
    grid-template-columns: 1fr;
  }
  .section-content,
  .article .wiki-toc,
  .article h1{
    max-width:100%;
  }
}

/* ===== IMAGE WRAP INSIDE OBJECT CONTENT ===== */

.section-content img{
  float:right;              /* change to left if you prefer */
  max-width:420px;          /* control image size */
  height:auto;
  margin:0 0 20px 30px;     /* spacing: bottom + left gap */
  border-radius:6px;
}

/* Clear float after section */
.object-section::after{
  content:"";
  display:block;
  clear:both;
}

/* =====================================================
   WTC PRODUCT CAROUSEL — EQUAL HEIGHT + CLEAN LAYOUT
===================================================== */

/* Make Swiper slides stretch */
.wtcpc-swiper .swiper-wrapper {
  align-items: stretch;
}

.wtcpc-slide {
  height: auto !important;
  display: flex;
}

/* Card layout */
.wtcpc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  transition: transform .2s ease, box-shadow .2s ease;
}

.wtcpc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,.15);
}

/* Image area */
.wtcpc-img {
  display: block;
  width: 100%;
  height: 180px;              /* uniform image height */
  overflow: hidden;
  background: #f6f7f9;
}

.wtcpc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* crop clean */
  display: block;
}

/* Card body */
.wtcpc-body {
  display: flex;
  flex-direction: column;
  padding: 14px;
  flex-grow: 1;
}

/* Badge */
.wtcpc-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: #e6f4ea;
  color: #137333;
  margin-bottom: 8px;
  width: fit-content;
}

/* Product title clamp */
.wtcpc-name {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.4;

  display: -webkit-box;
  -webkit-line-clamp: 3;     /* max 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;

  min-height: 4.2em;         /* ensures equal height */
  margin-bottom: 8px;
}

/* Price */
.wtcpc-price {
  font-weight: 700;
  margin-bottom: 12px;
}

/* Button pinned to bottom */
.wtcpc-btn {
  margin-top: auto;          /* pushes to bottom */
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  background: #2e6edc;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: background .2s ease;
}

.wtcpc-btn:hover {
  background: #1f4fa8;
}

/* Navigation arrows */
.wtcpc-prev,
.wtcpc-next {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  background: #ffffff;
  font-size: 22px;
  cursor: pointer;
}

.wtcpc-prev:hover,
.wtcpc-next:hover {
  background: #f3f3f3;
}

/* Responsive tweaks */
@media (max-width: 1100px) {
  .wtcpc-img {
    height: 160px;
  }
}

@media (max-width: 768px) {
  .wtcpc-img {
    height: 140px;
  }
}