/* ══════════════════════════════════════════════════════════════
   USME Campus Theme — Extras stylesheet
   Covers: skip link, custom logo sizing, Page/Search/Archive
   sidebar layout, widgets, comments, 404 page.
   Kept separate from usme-theme.css / usme-blog.css so those two
   already-tuned files never need to be touched for these additions.
   ══════════════════════════════════════════════════════════════ */

/* ── Skip link (accessibility) ── */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.skip-link {
  top: -60px;
  left: 6px;
  z-index: 999999;
  background: var(--dark, #0B1426);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: var(--radius-sm, 8px);
  transition: top .2s ease;
}

.skip-link:focus {
  position: fixed !important;
  width: auto; height: auto;
  clip: auto;
  top: 10px;
  outline: 2px solid var(--amber, #F5A623);
}

/* ── Custom logo sizing (keeps header height stable whether it's the
   emoji fallback or an uploaded image logo) ── */
.nav-logo-custom img,
.oc-brand-logo-custom img,
.pf-logo-custom img {
  max-height: 44px;
  width: auto;
  display: block;
}

.oc-brand-logo-custom img { max-height: 36px; }
.pf-logo-custom img { max-height: 40px; }

/* ── Page / Archive / Search: optional sidebar layout ── */
.usme-layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.usme-primary-column { min-width: 0; }

@media (max-width: 860px) {
  .usme-layout-with-sidebar {
    grid-template-columns: 1fr;
  }
}

/* ── Sidebar widgets ── */
.usme-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.usme-sidebar .widget {
  background: var(--white, #fff);
  border: 1px solid var(--border, #DDE2EE);
  border-radius: var(--radius-card, 16px);
  padding: 24px;
}

.usme-sidebar .widget-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark, #0B1426);
  margin-bottom: 14px;
}

.usme-sidebar .widget ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.usme-sidebar .widget a {
  color: var(--text2, #4A5568);
  text-decoration: none;
  font-size: 14px;
}

.usme-sidebar .widget a:hover { color: var(--blue, #1E4FD8); }

/* ── Footer widget row (only appears if widgets are added) ── */
.pre-footer-widgets {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 32px 0;
}

.pre-footer-widgets-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

.pre-footer-widgets .widget-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pre-footer-widgets .widget,
.pre-footer-widgets .widget a {
  color: rgba(255,255,255,.75);
  font-size: 13px;
}

.pre-footer-widgets .widget a:hover { color: var(--amber, #F5A623); }

/* ── Comments ── */
.usme-comments {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border, #DDE2EE);
}

.usme-comments-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  margin-bottom: 24px;
  color: var(--dark, #0B1426);
}

.usme-comment-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.usme-comment-list .children {
  list-style: none;
  margin-top: 20px;
  margin-left: clamp(16px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.usme-comment-list article {
  display: flex;
  gap: 14px;
  background: var(--white, #fff);
  border: 1px solid var(--border, #DDE2EE);
  border-radius: var(--radius-card, 16px);
  padding: 18px 20px;
}

.usme-comment-list .avatar {
  border-radius: 50%;
  flex-shrink: 0;
}

.usme-comment-list .comment-author { font-weight: 600; font-size: 14px; color: var(--dark, #0B1426); }
.usme-comment-list .comment-metadata { font-size: 12px; color: var(--text3, #7B879A); margin-bottom: 8px; }
.usme-comment-list .comment-metadata a { color: inherit; text-decoration: none; }
.usme-comment-list .comment-content p { font-size: 14.5px; color: var(--text2, #4A5568); line-height: 1.7; }
.usme-comment-list .reply a {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue, #1E4FD8);
  text-decoration: none;
}

.usme-comments-closed { color: var(--text3, #7B879A); font-size: 14px; }

.usme-comment-form { max-width: 640px; }
.usme-comment-form p { margin-bottom: 16px; }
.usme-comment-form label { display: block; font-size: 13px; font-weight: 600; color: var(--dark, #0B1426); margin-bottom: 6px; }
.usme-comment-form input[type="text"],
.usme-comment-form input[type="email"],
.usme-comment-form input[type="url"],
.usme-comment-form textarea {
  width: 100%;
  border: 1px solid var(--border, #DDE2EE);
  border-radius: var(--radius-sm, 8px);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  background: var(--white, #fff);
  color: var(--text, #0B1426);
}
.usme-comment-form input:focus,
.usme-comment-form textarea:focus {
  outline: none;
  border-color: var(--border-hover, #B4C4F4);
}
.usme-comment-form .form-submit input[type="submit"] {
  background: var(--blue, #1E4FD8);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill, 50px);
  padding: 12px 28px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--speed, .2s) var(--ease, ease);
}
.usme-comment-form .form-submit input[type="submit"]:hover {
  background: var(--blue-hover, #1743B8);
}

/* ── Search form (used in header/search/404 fallbacks) ── */
.usme-search-form {
  display: flex;
  gap: 8px;
}
.usme-search-input {
  flex: 1;
  border: 1px solid var(--border, #DDE2EE);
  border-radius: var(--radius-pill, 50px);
  padding: 12px 18px;
  font-size: 14px;
  font-family: inherit;
}
.usme-search-input:focus {
  outline: none;
  border-color: var(--border-hover, #B4C4F4);
}
.usme-search-submit {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: var(--blue, #1E4FD8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--speed, .2s) var(--ease, ease);
}
.usme-search-submit:hover { background: var(--blue-hover, #1743B8); }

/* ── Archive / 404 description text ── */
.archive-description {
  color: var(--text2, #4A5568);
  font-size: 15px;
  margin-top: 8px;
}

.usme-404 .usme-search-form { max-width: 420px; margin: 0 auto; }
