/* ============================================
   WordPress-Specific Overrides
   Ensures WP admin bar, block editor, and
   plugin output plays nicely with Fewinc theme.
   ============================================ */

/* --- Admin Bar offset --- */
body.admin-bar .header {
  top: 32px;
}
@media (max-width: 782px) {
  body.admin-bar .header {
    top: 46px;
  }
}

/* --- WordPress block alignment --- */
.alignwide {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}
.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
}
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* --- WordPress image captions --- */
.wp-caption {
  max-width: 100%;
}
.wp-caption-text {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 0.5rem;
  text-align: center;
}

/* --- WordPress galleries --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* --- WordPress navigation --- */
.nav-links .page-numbers {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  color: var(--gray-500);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition);
}
.nav-links .page-numbers.current,
.nav-links .page-numbers:hover {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  font-weight: 700;
}

/* --- WordPress comments (if enabled later) --- */
.comment-respond {
  margin-top: 3rem;
}
.comment-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--navy);
  font-size: 0.9rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white-pure);
  color: var(--text-body);
  transition: all var(--transition);
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,168,83,0.15);
}
.comment-form .submit {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--gold);
  color: var(--navy);
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.comment-form .submit:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212,168,83,0.35);
}

/* --- Custom logo in header --- */
.custom-logo-link {
  display: flex;
  align-items: center;
}
.custom-logo {
  max-height: 40px;
  width: auto;
}

/* --- WordPress footer menu items (strip li wrappers) --- */
.footer-links li {
  list-style: none;
}
.footer-links li a {
  display: block;
  color: var(--gray-400);
  padding: 0.3rem 0;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.footer-links li a:hover {
  color: var(--gold);
  transform: translateX(3px);
}
.footer-legal li {
  display: inline;
}
.footer-legal li a {
  margin-left: 1.5rem;
  color: var(--gray-500);
}
.footer-legal li a:hover {
  color: var(--gold);
}

/* --- Screen reader text --- */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* --- WP search form --- */
.search-form {
  display: flex;
  gap: 0;
}
.search-form .search-field {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.search-form .search-submit {
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: var(--navy);
  border: none;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* --- Post content styling --- */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.entry-content p {
  margin-bottom: 1.25rem;
}
.entry-content ul,
.entry-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  list-style: disc;
}
.entry-content ol {
  list-style: decimal;
}
.entry-content li {
  margin-bottom: 0.5rem;
  color: var(--text-body);
}
.entry-content blockquote {
  border-left: 4px solid var(--gold);
  padding: 1.5rem 2rem;
  background: var(--gray-100);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 2rem 0;
  font-style: italic;
  color: var(--navy);
}
.entry-content img {
  border-radius: var(--radius-md);
}
.entry-content a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.entry-content a:hover {
  color: var(--gold);
}
