/* VibeBlog — hand-written CSS that Tailwind utility classes don't cover. */

* {
  transition-property: background-color, border-color, color;
  transition-duration: 300ms;
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------------------------------------------------------------------
   Ad slots — clearly labelled placeholders that read cleanly in both
   themes without ever looking like real editorial content.
--------------------------------------------------------------------- */
.ad-slot__inner {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 97, 97, 0.04),
    rgba(255, 97, 97, 0.04) 10px,
    transparent 10px,
    transparent 20px
  );
}

/* ---------------------------------------------------------------------
   Article layout + responsive sidebar (used on single.php)
--------------------------------------------------------------------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.5rem;
  max-width: 1120px;
  margin-inline: auto;
}

.article-sidebar {
  align-self: start;
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card {
  border: 1px solid #E5E7EB;
  border-radius: 0.75rem;
  padding: 1.125rem;
  background: rgba(255, 255, 255, 0.96);
}

#related-posts-title {
  color: #FF6161;
}

.dark .sidebar-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-card__heading p {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #6B7280;
}

.dark .sidebar-card__heading p {
  color: #9CA3AF;
}

.share-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  margin-top: 1rem;
}

.share-button {
  display: inline-flex;
  width: 100%;
  height: 2.65rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E7EB;
  border-radius: 0.55rem;
  background: #FFFFFF;
  color: #111827;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.share-button:hover {
  transform: translateY(-1px);
  border-color: #FF6161;
  color: #FF6161;
}

.share-button svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
  stroke: none;
}

.share-button--instagram svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.dark .share-button {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #F9FAFB;
}

.share-help,
.share-feedback {
  margin: 0.7rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #9CA3AF;
}

.share-feedback {
  min-height: 1rem;
  color: #FF6161;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1rem;
}

.contact-form label {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.contact-form input:not([type="hidden"]),
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #D1D5DB;
  border-radius: 0.5rem;
  padding: 0.65rem 0.7rem;
  background: #FFFFFF;
  color: #111827;
  font: inherit;
  font-size: 0.85rem;
}

.contact-form textarea {
  resize: vertical;
  min-height: 110px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(255, 97, 97, 0.2);
  border-color: #FF6161;
}

.dark .contact-form input:not([type="hidden"]),
.dark .contact-form textarea {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #F9FAFB;
}

.contact-submit {
  margin-top: 0.5rem;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.7rem 0.85rem;
  background: #FF6161;
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.contact-submit:hover {
  background: #ef5555;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-status {
  font-size: 0.82rem;
  line-height: 1.5;
  border-left-width: 4px;
}

.contact-status--success {
  border-left-color: #16A34A;
  color: #166534;
}

.contact-status--warning {
  border-left-color: #D97706;
  color: #92400E;
}

.contact-status--error {
  border-left-color: #DC2626;
  color: #991B1B;
}

.dark .contact-status--success { color: #86EFAC; }
.dark .contact-status--warning { color: #FCD34D; }
.dark .contact-status--error { color: #FCA5A5; }

.sidebar-label {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9CA3AF;
}

.sidebar-ad-card {
  padding-bottom: 1rem;
}

.ad-slot--sidebar .ad-slot__inner {
  min-height: 250px;
}

.related-post {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  align-items: start;
}

.related-post__image-link {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 0.55rem;
  background: #F3F4F6;
}

.dark .related-post__image-link {
  background: rgba(255, 255, 255, 0.08);
}

.related-post__image {
  display: flex;
  width: 100%;
  height: 150px;
  object-fit: cover;
  align-items: center;
  justify-content: center;
}

.related-post__image--placeholder {
  background: linear-gradient(135deg, #111827 0%, #FF6161 100%);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.related-post__image--placeholder span span {
  color: #FFFFFF;
}

.related-post__title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 700;
}

.related-post__title a {
  color: inherit;
  text-decoration: none;
}

.related-post__title a:hover {
  color: #FF6161;
}

.related-post__date {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #9CA3AF;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .article-layout {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .sidebar-card {
    padding: 1rem;
  }
}

/* ---------------------------------------------------------------------
   Article body typography (used on single.php)
--------------------------------------------------------------------- */
.prose-vibe {
  max-width: 70ch;
  line-height: 1.75;
}
.prose-vibe h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.prose-vibe h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.prose-vibe p {
  margin-bottom: 1.25rem;
}
.prose-vibe a {
  color: #FF6161;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose-vibe img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}
.prose-vibe blockquote {
  border-left: 3px solid #FF6161;
  padding-left: 1rem;
  font-style: italic;
  color: inherit;
  opacity: 0.85;
}

/* ---------------------------------------------------------------------
   Rich text editor (contributor dashboard)
--------------------------------------------------------------------- */
.editor-toolbar button {
  min-width: 2.25rem;
}
.editor-surface {
  min-height: 320px;
}
.editor-surface:focus {
  outline: none;
}
.editor-surface[data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: #9CA3AF;
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   Responsive site footer
--------------------------------------------------------------------- */
.site-footer__inner {
  width: 100%;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.8fr);
  gap: 2rem;
  align-items: start;
}

.site-footer__title {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #111827;
}

.dark .site-footer__title {
  color: #F9FAFB;
}

.site-footer__address-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.site-footer__address {
  display: flex;
  min-height: 7rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.9rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.65rem;
  background: #F9FAFB;
  color: #4B5563;
  font-size: 0.8rem;
  line-height: 1.45;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.site-footer__address:hover {
  transform: translateY(-1px);
  border-color: #FF6161;
  background: #FFFFFF;
}

.site-footer__address-label {
  margin-bottom: 0.25rem;
  color: #111827;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dark .site-footer__address {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #D1D5DB;
}

.dark .site-footer__address:hover {
  border-color: #FF6161;
  background: rgba(255, 255, 255, 0.07);
}

.dark .site-footer__address-label {
  color: #F9FAFB;
}

.site-footer__contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.site-footer__contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.55rem;
  background: #FFFFFF;
  color: #111827;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.site-footer__contact-link:hover {
  border-color: #FF6161;
  color: #FF6161;
}

.dark .site-footer__contact-link {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #F9FAFB;
}

.dark .site-footer__contact-link:hover {
  border-color: #FF6161;
  color: #FF6161;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #E5E7EB;
  color: #6B7280;
  font-size: 0.8rem;
}

.dark .site-footer__bottom {
  border-top-color: rgba(255, 255, 255, 0.1);
  color: #9CA3AF;
}

@media (max-width: 800px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__address-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .site-footer__address-grid {
    grid-template-columns: 1fr;
  }

  .site-footer__address {
    min-height: auto;
  }

  .site-footer__contact-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__contact-link {
    width: 100%;
  }

  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ---------------------------------------------------------------------
   Floating WhatsApp contact button
--------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1000;
  display: inline-flex;
  width: 3.4rem;
  height: 3.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #25D366;
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.whatsapp-float:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.whatsapp-float svg {
  width: 1.65rem;
  height: 1.65rem;
  fill: currentColor;
}

@media (max-width: 640px) {
  .whatsapp-float {
    right: 1rem;
    bottom: 1rem;
    width: 3.1rem;
    height: 3.1rem;
  }
}


/* ---------------------------------------------------------------------
   Post editor SEO controls + content statistics
--------------------------------------------------------------------- */
.seo-panel {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid #E5E7EB;
  border-radius: 0.85rem;
  padding: 1.25rem;
  background: #F9FAFB;
  overflow: visible;
}

.seo-panel legend {
  padding: 0 0.45rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: #111827;
}

.seo-field {
  position: relative;
  min-width: 0;
}

.seo-field + .seo-field {
  margin-top: 1.1rem;
}

.seo-field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}

.seo-field__label label {
  color: #111827;
  line-height: 1.4;
}

.seo-field__hint {
  color: #6B7280;
  font-size: 0.72rem;
  font-weight: 500;
  text-align: right;
}

.seo-input,
.seo-textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid #CBD5E1;
  border-radius: 0.65rem;
  background: #FFFFFF;
  color: #111827;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.seo-input {
  min-height: 2.85rem;
  padding: 0.7rem 0.85rem;
}

.seo-textarea {
  min-height: 7rem;
  padding: 0.75rem 0.85rem;
  resize: vertical;
  overflow-y: auto;
}

.seo-input:hover,
.seo-textarea:hover {
  border-color: #94A3B8;
}

.seo-input:focus,
.seo-textarea:focus {
  outline: none;
  border-color: #FF6161;
  box-shadow: 0 0 0 3px rgba(255, 97, 97, 0.14), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.seo-input::placeholder,
.seo-textarea::placeholder {
  color: #9CA3AF;
}

.seo-field__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.45rem;
}

.seo-field__status {
  min-width: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #6B7280;
}

.seo-field__status--good {
  color: #15803D;
}

.seo-field__counter {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #6B7280;
}

.seo-field__counter--near {
  color: #D97706;
}

.seo-field__counter--limit {
  color: #DC2626;
  font-weight: 800;
}

.seo-input[aria-invalid="true"],
.seo-textarea[aria-invalid="true"] {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.editor-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 0.65rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.55rem;
  background: #F9FAFB;
  color: #6B7280;
  font-size: 0.75rem;
}

.editor-stats strong {
  color: #111827;
  font-variant-numeric: tabular-nums;
}

.dark .seo-panel {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.dark .seo-panel legend,
.dark .seo-field__label label,
.dark .seo-input,
.dark .seo-textarea,
.dark .editor-stats strong {
  color: #F9FAFB;
}

.dark .seo-field__hint,
.dark .seo-field__status,
.dark .seo-field__counter {
  color: #9CA3AF;
}

.dark .seo-input,
.dark .seo-textarea,
.dark .editor-stats {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.dark .seo-input:focus,
.dark .seo-textarea:focus {
  border-color: #FF6161;
  box-shadow: 0 0 0 3px rgba(255, 97, 97, 0.18);
}

.dark .seo-field__status--good {
  color: #86EFAC;
}

.dark .seo-field__counter--near {
  color: #FBBF24;
}

.dark .seo-field__counter--limit {
  color: #FCA5A5;
}

@media (max-width: 640px) {
  .seo-panel {
    padding: 1rem;
  }

  .seo-field__label,
  .seo-field__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .seo-field__hint {
    text-align: left;
  }

  .seo-input,
  .seo-textarea {
    font-size: 1rem;
  }
}


/* ---------------------------------------------------------------------
   Responsive mobile navigation
--------------------------------------------------------------------- */
.mobile-menu-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0;
  border: 1px solid #E5E7EB;
  border-radius: 0.65rem;
  background: #FFFFFF;
  color: #111827;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus-visible {
  border-color: #FF6161;
  color: #FF6161;
  outline: none;
}

.mobile-menu-toggle__bar {
  display: block;
  width: 1.15rem;
  height: 2px;
  border-radius: 9999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.mobile-menu-toggle.is-open .mobile-menu-toggle__bar:nth-child(2) {
  transform: translateY(5px) rotate(45deg);
}

.mobile-menu-toggle.is-open .mobile-menu-toggle__bar:nth-child(3) {
  opacity: 0;
}

.mobile-menu-toggle.is-open .mobile-menu-toggle__bar:nth-child(4) {
  transform: translateY(-5px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

@media (max-width: 639px) {
  .site-nav {
    gap: 0.55rem;
  }

  .site-nav__desktop {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 900;
    padding: 0.65rem 1rem 1rem;
    border-bottom: 1px solid #E5E7EB;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  }

  .mobile-menu.is-open {
    display: block;
  }

  .mobile-menu__inner {
    width: min(100%, 32rem);
    margin: 0 auto;
    padding: 0.4rem;
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    background: #FFFFFF;
  }

  .mobile-menu__link {
    display: flex;
    width: 100%;
    min-height: 2.9rem;
    align-items: center;
    padding: 0.7rem 0.85rem;
    border-radius: 0.55rem;
    color: #111827;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 150ms ease, color 150ms ease;
  }

  .mobile-menu__link:hover,
  .mobile-menu__link:focus-visible {
    background: #FFF1F1;
    color: #FF6161;
    outline: none;
  }

  .mobile-menu__logout {
    margin: 0;
  }

  .mobile-menu__logout-button {
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .dark .mobile-menu-toggle {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #F9FAFB;
  }

  .dark .mobile-menu {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background: rgba(17, 17, 17, 0.98);
  }

  .dark .mobile-menu__inner {
    border-color: rgba(255, 255, 255, 0.1);
    background: #111111;
  }

  .dark .mobile-menu__link {
    color: #F9FAFB;
  }

  .dark .mobile-menu__link:hover,
  .dark .mobile-menu__link:focus-visible {
    background: rgba(255, 97, 97, 0.1);
    color: #FF6161;
  }
}

/* Header is the positioning context for the mobile menu. */
header {
  position: relative;
}
