/**
 * Decisão Certa — Additional WordPress-Specific Styles
 * Complements style.css with block editor, admin bar,
 * comment styles, and miscellaneous WP overrides.
 *
 * @package decisao-certa
 */

/* ── Admin bar offset for fixed navbar ── */
html.admin-bar #navbar {
  top: 32px;
}
@media screen and (max-width: 782px) {
  html.admin-bar #navbar {
    top: 46px;
  }
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 99999;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: .75rem 1.5rem;
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}

/* ── Search Form ── */
.search-form {
  display: flex;
  gap: .5rem;
  max-width: 480px;
  margin: 1.5rem auto;
}
.search-form .search-field {
  flex: 1;
  padding: .85rem 1.25rem;
  border: 2px solid #e8e8e8;
  border-radius: 50px;
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  transition: border-color .35s ease;
}
.search-form .search-field:focus {
  border-color: var(--red, #D72323);
}
.search-form .search-submit {
  padding: .85rem 1.75rem;
  background: var(--red, #D72323);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform .35s ease;
}
.search-form .search-submit:hover {
  transform: translateY(-2px);
}

/* ── WordPress Caption ── */
.wp-caption {
  max-width: 100%;
  margin: 1.5rem 0;
}
.wp-caption img {
  display: block;
  border-radius: 12px;
}
.wp-caption-text,
figcaption {
  font-size: .82rem;
  color: #aaa;
  text-align: center;
  margin-top: .5rem;
  font-style: italic;
}

/* ── Gallery ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.gallery-columns-1 { grid-template-columns: 1fr; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-item img {
  border-radius: 10px;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 600px) {
  .gallery, .gallery-columns-3, .gallery-columns-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── WordPress Blocks ── */
.wp-block-image figure {
  margin: 2rem 0;
}
.wp-block-image figcaption {
  font-size: .82rem;
  color: #aaa;
  text-align: center;
}
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .9rem;
}
.wp-block-table th,
.wp-block-table td {
  border: 1px solid #ebebeb;
  padding: .75rem 1rem;
  text-align: left;
}
.wp-block-table th {
  background: #f9f9f9;
  font-weight: 700;
}
.wp-block-table tr:hover td {
  background: #fafafa;
}
.wp-block-pullquote {
  border-top: 4px solid var(--red, #D72323);
  border-bottom: 4px solid var(--red, #D72323);
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}
.wp-block-pullquote blockquote {
  border: none;
  background: none;
  padding: 0;
}
.wp-block-pullquote blockquote p {
  font-size: 1.3rem;
  font-weight: 700;
  font-style: italic;
  color: var(--dark, #1a1a1a);
}
.wp-block-verse {
  font-family: inherit;
  font-size: .9rem;
  color: var(--gray, #58595B);
  white-space: pre-wrap;
}
.wp-block-cover {
  border-radius: 18px;
  overflow: hidden;
  margin: 2rem 0;
}
.wp-block-media-text {
  gap: 2rem;
}
.wp-block-media-text .wp-block-media-text__media img {
  border-radius: 12px;
}
.wp-block-columns {
  gap: 2rem;
}
.wp-block-column {
  min-width: 0;
}
.wp-block-list {
  margin: 1rem 0 1.25rem 1.5rem;
  color: var(--gray, #58595B);
  line-height: 1.8;
}

/* ── Comments ── */
.comments-area {
  padding: 60px 0;
  border-top: 1px solid #ebebeb;
  margin-top: 3rem;
}
.comments-area h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
}
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.comment-author b {
  font-weight: 700;
}
.comment-meta {
  font-size: .8rem;
  color: #aaa;
  margin-top: .25rem;
  margin-bottom: .75rem;
}
.comment-content p {
  font-size: .95rem;
  color: var(--gray, #58595B);
  line-height: 1.7;
}
.comment-reply-link {
  font-size: .8rem;
  font-weight: 600;
  color: var(--red, #D72323);
  margin-top: .5rem;
  display: inline-block;
}
#respond {
  margin-top: 3rem;
}
#respond h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
#respond .comment-form-comment label,
#respond .comment-form-author label,
#respond .comment-form-email label,
#respond .comment-form-url label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray, #58595B);
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"],
#respond textarea {
  width: 100%;
  padding: .82rem 1rem;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--dark, #1a1a1a);
  background: #fff;
  transition: border-color .35s ease;
  outline: none;
  appearance: none;
  margin-bottom: 1rem;
}
#respond input:focus,
#respond textarea:focus {
  border-color: var(--red, #D72323);
  box-shadow: 0 0 0 3px rgba(215,35,35,.12);
}
#respond textarea { min-height: 120px; resize: vertical; }
#respond .submit {
  background: var(--red, #D72323);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .85rem 2rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  font-size: .95rem;
  transition: transform .35s ease;
}
#respond .submit:hover { transform: translateY(-2px); }

/* ── Sticky CTA visibility logic ── */
@media (min-width: 601px) {
  #sticky-cta { display: none !important; }
}

/* ── Accessibility: focus styles ── */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--red, #D72323);
  outline-offset: 3px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}
