/* Mercado Binário — tema blog (liquid glass) */

:root {
  --mb-purple: #6406b0;
  --mb-purple-light: #7905f1;
  --mb-teal: #0ff0ac;
  --mb-teal-dark: #0cd99a;
  --mb-bg: hsl(240 20% 4%);
  --mb-fg: #ffffff;
  --mb-muted: hsl(0 0% 100% / 0.6);
  --mb-border: hsl(0 0% 100% / 0.1);
  --mb-glass: hsl(0 0% 100% / 0.05);
  --mb-container: 80rem;
  --mb-nav-height: 5rem;
  --font-sans: 'Montserrat', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: var(--mb-nav-height);
}

body.mb-theme {
  margin: 0;
  background: var(--mb-bg);
  color: var(--mb-fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Layout */
.mb-container {
  width: 100%;
  max-width: var(--mb-container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.mb-main {
  padding-top: calc(var(--mb-nav-height) + 2rem);
  padding-bottom: 4rem;
  min-height: 60vh;
}

/* Glass */
.mb-glass {
  background: var(--mb-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--mb-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.36);
  border-radius: 1.5rem;
}

.mb-glass--hover {
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.mb-glass--hover:hover {
  transform: translateY(-4px);
  background: hsl(0 0% 100% / 0.1);
  border-color: hsl(0 0% 100% / 0.2);
}

/* Typography */
.mb-text-gradient {
  background: linear-gradient(135deg, #fff 0%, var(--mb-teal) 50%, var(--mb-purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mb-section-bar {
  display: block;
  width: 6rem;
  height: 4px;
  margin: 0.75rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mb-teal), var(--mb-purple-light));
}

.mb-page-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  text-align: center;
}

.mb-page-intro {
  color: var(--mb-muted);
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

/* Liquid background */
.mb-liquid-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.mb-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: mb-blob 7s infinite;
}

.mb-blob--purple {
  width: 24rem;
  height: 24rem;
  background: hsl(274 90% 36% / 0.25);
  top: -6rem;
  left: -6rem;
}

.mb-blob--teal {
  width: 20rem;
  height: 20rem;
  background: hsl(163 100% 47% / 0.2);
  bottom: 10%;
  right: -4rem;
  animation-delay: 2s;
}

.mb-blob--purple2 {
  width: 18rem;
  height: 18rem;
  background: hsl(271 96% 48% / 0.15);
  top: 40%;
  left: 30%;
  animation-delay: 4s;
}

@keyframes mb-blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

@media (prefers-reduced-motion: reduce) {
  .mb-blob { animation: none; }
}

/* Header / Nav */
.mb-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1rem 0;
}

.mb-header.is-scrolled {
  padding-top: 0.75rem;
}

.mb-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
}

.mb-logo img {
  height: 2.5rem;
  width: auto;
}

@media (min-width: 768px) {
  .mb-logo img { height: 3rem; }
}

.mb-nav__links {
  display: none;
  align-items: center;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .mb-nav__links { display: flex; }
}

.mb-nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(0 0% 100% / 0.7);
  transition: color 0.2s;
}

.mb-nav__link:hover,
.mb-nav__link.is-current {
  color: var(--mb-fg);
}

.mb-nav__link.is-current {
  color: var(--mb-teal);
}

.mb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.mb-btn--primary {
  background: var(--mb-teal);
  color: #000;
}

.mb-btn--primary:hover {
  background: var(--mb-teal-dark);
}

.mb-nav__toggle {
  display: flex;
  background: none;
  border: none;
  color: var(--mb-fg);
  padding: 0.5rem;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .mb-nav__toggle { display: none; }
}

.mb-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: hsl(240 20% 4% / 0.97);
  backdrop-filter: blur(12px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 5rem 2rem 2rem;
}

.mb-mobile-menu.is-open {
  display: flex;
}

.mb-mobile-menu a {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--mb-fg);
  transition: color 0.2s;
}

.mb-mobile-menu a:hover {
  color: var(--mb-teal);
}

/* Post grid */
.mb-posts-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .mb-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .mb-posts-grid { grid-template-columns: repeat(3, 1fr); }
}

.mb-post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.mb-post-card__image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  border-radius: 1.5rem 1.5rem 0 0;
}

.mb-post-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mb-post-card__meta {
  font-size: 0.75rem;
  color: var(--mb-muted);
  margin-bottom: 0.5rem;
}

.mb-post-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

.mb-post-card__title a:hover {
  color: var(--mb-teal);
}

.mb-post-card__excerpt {
  font-size: 0.875rem;
  color: var(--mb-muted);
  margin: 0 0 1rem;
  flex: 1;
}

.mb-post-card__more {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--mb-teal);
}

/* Single post */
.mb-single {
  max-width: 48rem;
  margin-inline: auto;
}

.mb-single__header {
  margin-bottom: 2rem;
  text-align: center;
}

.mb-single__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.mb-single__meta {
  font-size: 0.875rem;
  color: var(--mb-muted);
}

.mb-single__featured {
  margin-bottom: 2rem;
  border-radius: 1.5rem;
  overflow: hidden;
}

.mb-entry-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: hsl(0 0% 100% / 0.85);
}

.mb-entry-content h2,
.mb-entry-content h3,
.mb-entry-content h4 {
  color: var(--mb-fg);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.mb-entry-content h2 { font-size: 1.5rem; }
.mb-entry-content h3 { font-size: 1.25rem; }

.mb-entry-content p {
  margin: 0 0 1.25rem;
}

.mb-entry-content a {
  color: var(--mb-teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mb-entry-content a:hover {
  color: var(--mb-teal-dark);
}

.mb-entry-content ul,
.mb-entry-content ol {
  margin: 0 0 1.25rem 1.25rem;
  padding: 0;
  list-style: disc;
}

.mb-entry-content img {
  border-radius: 1rem;
  margin: 1.5rem 0;
}

.mb-entry-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--mb-teal);
  background: var(--mb-glass);
  border-radius: 0 0.75rem 0.75rem 0;
  color: var(--mb-muted);
}

/* CTA */
.mb-cta-box {
  margin-top: 3rem;
  padding: 2rem;
  text-align: center;
}

.mb-cta-box h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.mb-cta-box p {
  color: var(--mb-muted);
  font-size: 0.9375rem;
  margin: 0 0 1.25rem;
}

/* Footer */
.mb-footer {
  border-top: 1px solid var(--mb-border);
  background: hsl(0 0% 0% / 0.6);
  backdrop-filter: blur(8px);
  padding: 4rem 0 0;
}

.mb-footer__grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .mb-footer__grid { grid-template-columns: repeat(3, 1fr); }
}

.mb-footer__tagline {
  color: var(--mb-muted);
  font-size: 0.875rem;
  margin: 1rem 0 0;
}

.mb-footer__heading {
  font-weight: 600;
  display: block;
  margin-bottom: 1rem;
}

.mb-footer__links li {
  margin-bottom: 0.5rem;
}

.mb-footer__links a {
  font-size: 0.875rem;
  color: hsl(0 0% 100% / 0.7);
  transition: color 0.2s;
}

.mb-footer__links a:hover {
  color: var(--mb-fg);
}

.mb-footer__contact {
  font-size: 0.875rem;
  color: var(--mb-muted);
  margin: 0 0 0.5rem;
}

.mb-footer__contact a:hover {
  color: var(--mb-teal);
}

.mb-footer__email {
  color: var(--mb-teal);
}

.mb-footer__bottom {
  border-top: 1px solid var(--mb-border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: hsl(0 0% 100% / 0.4);
}

/* Social */
.mb-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.mb-social__link {
  display: inline-flex;
  color: var(--mb-teal);
  transition: transform 0.2s, color 0.2s;
}

.mb-social__link:hover {
  transform: scale(1.1);
  color: #5dffc4;
}

.mb-social__icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  overflow: visible;
}

/* Search */
.mb-search {
  max-width: 28rem;
  margin: 0 auto 2.5rem;
}

.mb-search__form {
  display: flex;
  gap: 0.5rem;
}

.mb-search__input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--mb-border);
  background: var(--mb-glass);
  color: var(--mb-fg);
  font-family: inherit;
  font-size: 0.9375rem;
}

.mb-search__input::placeholder {
  color: var(--mb-muted);
}

.mb-search__input:focus {
  outline: 2px solid var(--mb-teal);
  outline-offset: 2px;
}

/* Pagination */
.mb-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.mb-pagination a,
.mb-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  border: 1px solid var(--mb-border);
  background: var(--mb-glass);
  color: var(--mb-fg);
}

.mb-pagination a:hover {
  border-color: var(--mb-teal);
  color: var(--mb-teal);
}

.mb-pagination .current {
  background: var(--mb-teal);
  color: #000;
  border-color: var(--mb-teal);
}

/* RD Station forms (plugin) */
.mb-main .rd-form,
.mb-main form[class*="rdstation"] {
  max-width: 32rem;
  margin: 2rem auto;
}

.mb-main .rd-form input,
.mb-main .rd-form textarea,
.mb-main form[class*="rdstation"] input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--mb-border);
  background: var(--mb-glass);
  color: var(--mb-fg);
  font-family: inherit;
}

.mb-main .rd-form button,
.mb-main form[class*="rdstation"] button {
  background: var(--mb-teal);
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* 404 */
.mb-404 {
  text-align: center;
  padding: 4rem 1.5rem;
}

.mb-404 h1 {
  font-size: 4rem;
  margin: 0;
  color: var(--mb-teal);
}

.mb-404 p {
  color: var(--mb-muted);
  margin: 1rem 0 2rem;
}

/* Archive header */
.mb-archive-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.mb-archive-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin: 0;
}

.mb-breadcrumb {
  font-size: 0.8125rem;
  color: var(--mb-muted);
  margin-bottom: 1rem;
  text-align: center;
}

.mb-breadcrumb a:hover {
  color: var(--mb-teal);
}
