/*
Theme Name: Black Bird Editorial
Theme URI: https://blackbirdone.net
Author: Black Bird Agencia Digital
Author URI: https://blackbirdone.net
Description: Tema WordPress editorial que replica el sistema de diseño Quiet Luxury de Black Bird. Integra tipografía Outfit, tokens de color corporativos y el sistema de cards de blog animado.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
License: Proprietary
Text Domain: blackbird-editorial
*/

/* ═══════════════════════════════════════════════════════════
   BLACK BIRD — DESIGN TOKENS
   ═══════════════════════════════════════════════════════════ */
:root {
  /* Paleta cromática */
  --bb-color-surface:          #E6E6E6;
  --bb-color-gray-10:          #E6E6E6;
  --bb-color-gray-20:          #CCCCCC;
  --bb-color-gray-60:          #666666;
  --bb-color-gray-70:          #4D4D4D;
  --bb-color-gray-80:          #333333;

  /* Aliases semánticos */
  --bb-text-primary:           #212121;
  --bb-text-secondary:         #616161;
  --bb-text-inverse:           #FFFFFF;

  /* Azul Corporativo BlackBird One */
  --bb-color-blue-deepest:     #0D1257;
  --bb-color-blue-primary:     #1A237E;
  --bb-color-blue-mid:         #283593;
  --bb-color-blue-light:       #3949AB;
  --bb-color-blue-tint:        #E8EAF6;

  /* Espaciado — escala 4px */
  --bb-space-2:    0.5rem;
  --bb-space-4:    1rem;
  --bb-space-5:    1.25rem;
  --bb-space-6:    1.5rem;
  --bb-space-8:    2rem;
  --bb-space-10:   2.5rem;
  --bb-space-12:   3rem;
  --bb-space-16:   4rem;
  --bb-space-20:   5rem;
  --bb-space-24:   6rem;

  /* Tipografía */
  --bb-font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bb-font-mono: 'IBM Plex Mono', 'Fira Code', 'Courier New', monospace;

  /* Escala tipográfica */
  --bb-text-sm:   0.875rem;
  --bb-text-base: 1rem;
  --bb-text-lg:   1.125rem;
  --bb-text-xl:   1.25rem;
  --bb-text-2xl:  1.5rem;
  --bb-text-3xl:  1.875rem;
  --bb-text-4xl:  2.25rem;
  --bb-text-5xl:  3rem;

  /* Contenedores */
  --bb-container-max:    1200px;
  --bb-container-narrow: 900px;

  /* Bordes */
  --bb-radius-sm:   4px;
  --bb-radius-md:   8px;
  --bb-radius-lg:   12px;
  --bb-radius-xl:   20px;
  --bb-radius-full: 9999px;
}

/* ═══════════════════════════════════════════════════════════
   BASE RESET
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--bb-font-sans);
  font-size: var(--bb-text-base);
  line-height: 1.6;
  color: var(--bb-text-primary);
  background-color: var(--bb-color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ═══════════════════════════════════════════════════════════
   NAVEGACIÓN — Idéntica al sitio principal
   ═══════════════════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(230, 230, 230, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease;
}

.header.is-scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav {
  width: 100%;
}

.nav__container {
  max-width: var(--bb-container-max);
  margin: 0 auto;
  padding: 0 var(--bb-space-6);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav__logo-img {
  height: 32px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--bb-space-8);
  list-style: none;
}

.nav__link {
  font-family: var(--bb-font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bb-color-gray-70);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  padding: 4px 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--bb-color-blue-primary);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__link:hover { color: var(--bb-text-primary); }
.nav__link:hover::after { width: 100%; }
.nav__link.active { color: var(--bb-color-blue-primary); }
.nav__link.active::after { width: 100%; }

.nav__link--cta {
  background: var(--bb-color-blue-primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: var(--bb-radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.nav__link--cta::after { display: none; }
.nav__link--cta:hover {
  background: var(--bb-color-blue-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,35,126,0.35);
}

/* Hamburger Mobile */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
}

.nav__toggle-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--bb-color-gray-80);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  .nav__links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bb-color-surface);
    flex-direction: column;
    align-items: stretch;
    padding: var(--bb-space-4) var(--bb-space-6);
    border-bottom: 1px solid var(--bb-color-gray-20);
    gap: 0;
  }
  .nav__links.is-open { display: flex; }
  .nav__item { border-bottom: 1px solid rgba(0,0,0,0.06); }
  .nav__link { display: block; padding: 14px 0; }
  .nav__link--cta { display: inline-block; margin: 12px 0; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT PRINCIPAL
   ═══════════════════════════════════════════════════════════ */
.site-main {
  padding-top: 72px; /* Compensar header fijo */
  min-height: 100vh;
}

.page-container {
  max-width: var(--bb-container-max);
  margin: 0 auto;
  padding: 0 var(--bb-space-6);
}

/* ═══════════════════════════════════════════════════════════
   SECTION HEADER — Eyebrow + Título grande
   ═══════════════════════════════════════════════════════════ */
.section-header {
  max-width: 780px;
  margin-bottom: var(--bb-space-12);
}

.section-header__eyebrow {
  display: block;
  font-family: var(--bb-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--bb-color-blue-primary);
  margin-bottom: var(--bb-space-4);
}

.section-header__title {
  font-family: var(--bb-font-sans);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--bb-color-gray-80);
  margin-bottom: var(--bb-space-5);
}

.section-header__description {
  font-size: var(--bb-text-lg);
  color: var(--bb-text-secondary);
  line-height: 1.65;
  max-width: 640px;
}

/* ═══════════════════════════════════════════════════════════
   BLOG PAGE HEADER
   ═══════════════════════════════════════════════════════════ */
.blog-page-header {
  padding: 80px 0 60px;
}

/* ═══════════════════════════════════════════════════════════
   BLOG LIST — Cards editoriales
   ═══════════════════════════════════════════════════════════ */
.blog-list {
  display: flex;
  flex-direction: column;
  margin-top: 0;
}

.blog-card {
  padding: 56px 0;
  border-top: 1px solid rgba(0,0,0,0.12);
  cursor: default;
}

.blog-card:last-child {
  border-bottom: 1px solid rgba(0,0,0,0.12);
}

.blog-card__header {
  cursor: pointer;
  user-select: none;
}

.blog-card__eyebrow {
  font-family: var(--bb-font-mono);
  font-size: 13px;
  color: var(--bb-color-blue-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: 20px;
  display: block;
}

.blog-card__title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.blog-card__title {
  font-family: var(--bb-font-sans);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #000;
  line-height: 1.25;
  max-width: none;
  margin-bottom: 0;
}

/* Eliminar estilos por defecto de WordPress para h2 dentro del card */
.blog-card .blog-card__title a {
  color: #000;
  text-decoration: none;
}
.blog-card .blog-card__title a:hover {
  color: var(--bb-color-blue-primary);
}

.blog-card__chevron {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,23,138,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bb-color-blue-primary);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease;
  margin-top: 4px;
  background: transparent;
}

.blog-card__chevron svg {
  width: 14px;
  height: 14px;
  stroke: var(--bb-color-blue-primary);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card.is-expanded .blog-card__chevron {
  background: var(--bb-color-blue-primary);
}

.blog-card.is-expanded .blog-card__chevron svg {
  stroke: #fff;
  transform: rotate(180deg);
}

.blog-card__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  opacity: 0;
}

.blog-card.is-expanded .blog-card__content {
  max-height: 2000px;
  opacity: 1;
}

.blog-card__body {
  padding-top: 32px;
}

.blog-card__body p {
  font-size: 1.0625rem;
  color: #666;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 780px;
}

.blog-card__body p:last-child {
  margin-bottom: 0;
}

/* Bloques de WordPress dentro del contenido */
.blog-card__body h2,
.blog-card__body h3,
.blog-card__body h4 {
  font-family: var(--bb-font-sans);
  font-weight: 500;
  color: var(--bb-color-gray-80);
  margin: 28px 0 12px;
  letter-spacing: -0.01em;
}

.blog-card__body h2 { font-size: 1.5rem; }
.blog-card__body h3 { font-size: 1.25rem; }

.blog-card__body ul,
.blog-card__body ol {
  padding-left: 1.5rem;
  color: #666;
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 780px;
}

.blog-card__body blockquote {
  border-left: 3px solid var(--bb-color-blue-primary);
  padding-left: var(--bb-space-6);
  margin: var(--bb-space-8) 0;
  font-style: italic;
  color: var(--bb-color-gray-70);
}

.blog-card__body img {
  border-radius: var(--bb-radius-md);
  margin: var(--bb-space-8) 0;
}

.blog-card__preview {
  margin-top: 24px;
}

.blog-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--bb-font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--bb-color-blue-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  margin-top: 20px;
  transition: gap 0.25s ease;
  background: none;
  border: none;
  padding: 0;
  text-decoration: none;
}

.blog-card__read-more:hover {
  gap: 16px;
  color: var(--bb-color-blue-mid);
}

.blog-card__read-more svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  transition: transform 0.35s ease;
  flex-shrink: 0;
}

.blog-card.is-expanded .blog-card__read-more svg {
  transform: rotate(90deg);
}

/* Paginación de WordPress */
.bb-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--bb-space-2);
  padding: var(--bb-space-16) 0;
}

.bb-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-family: var(--bb-font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--bb-color-gray-70);
  border: 1.5px solid var(--bb-color-gray-20);
  transition: all 0.2s ease;
  text-decoration: none;
}

.bb-pagination .page-numbers:hover,
.bb-pagination .page-numbers.current {
  background: var(--bb-color-blue-primary);
  color: #fff;
  border-color: var(--bb-color-blue-primary);
}

.bb-pagination .page-numbers.dots {
  border: none;
  width: auto;
}

/* No hay posts */
.blog-empty {
  padding: var(--bb-space-24) 0;
  text-align: center;
  color: var(--bb-text-secondary);
}

.blog-empty__title {
  font-size: var(--bb-text-2xl);
  font-weight: 300;
  margin-bottom: var(--bb-space-4);
}

/* ═══════════════════════════════════════════════════════════
   SINGLE POST — Artículo individual
   ═══════════════════════════════════════════════════════════ */
.single-post {
  padding: 80px 0 var(--bb-space-32);
}

.single-post__meta {
  display: flex;
  align-items: center;
  gap: var(--bb-space-4);
  margin-bottom: var(--bb-space-8);
  flex-wrap: wrap;
}

.single-post__category {
  font-family: var(--bb-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--bb-color-blue-primary);
}

.single-post__date {
  font-family: var(--bb-font-mono);
  font-size: 11px;
  color: var(--bb-text-secondary);
  letter-spacing: 0.05em;
}

.single-post__title {
  font-family: var(--bb-font-sans);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--bb-color-gray-80);
  margin-bottom: var(--bb-space-8);
}

.single-post__content {
  max-width: 720px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #555;
}

.single-post__content p { margin-bottom: var(--bb-space-6); }
.single-post__content h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--bb-color-gray-80);
  margin: var(--bb-space-10) 0 var(--bb-space-4);
  letter-spacing: -0.02em;
}
.single-post__content h3 {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--bb-color-gray-70);
  margin: var(--bb-space-8) 0 var(--bb-space-3);
}

.single-post__content blockquote {
  border-left: 3px solid var(--bb-color-blue-primary);
  padding: var(--bb-space-4) var(--bb-space-6);
  margin: var(--bb-space-8) 0;
  font-style: italic;
  color: var(--bb-color-gray-70);
  background: var(--bb-color-blue-tint);
  border-radius: 0 var(--bb-radius-md) var(--bb-radius-md) 0;
}

.single-post__content img {
  border-radius: var(--bb-radius-lg);
  margin: var(--bb-space-8) 0;
  width: 100%;
}

.single-post__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--bb-font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bb-color-blue-primary);
  margin-bottom: var(--bb-space-12);
  text-decoration: none;
  transition: gap 0.25s ease;
}

.single-post__back:hover { gap: 14px; }

.single-post__featured-image {
  border-radius: var(--bb-radius-lg);
  overflow: hidden;
  margin-bottom: var(--bb-space-10);
  aspect-ratio: 16 / 7;
}

.single-post__featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER — Idéntico al sitio principal
   ═══════════════════════════════════════════════════════════ */
.footer {
  background: var(--bb-color-gray-80);
  color: #fff;
  padding: var(--bb-space-16) 0 0;
}

.footer__container {
  max-width: var(--bb-container-max);
  margin: 0 auto;
  padding: 0 var(--bb-space-6) var(--bb-space-12);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--bb-space-12);
  align-items: start;
}

.footer__logo-wrapper {
  margin-bottom: var(--bb-space-4);
}

.footer__logo-img {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer__tagline {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  max-width: 280px;
}

.footer__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--bb-space-8);
}

.footer__nav-heading {
  font-family: var(--bb-font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--bb-space-4);
}

.footer__nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--bb-space-2);
}

.footer__nav-link {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__nav-link:hover { color: #fff; }

.footer__social-list {
  display: flex;
  gap: var(--bb-space-3);
  margin-top: var(--bb-space-6);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  transition: all 0.25s ease;
  text-decoration: none;
}

.footer__social-link:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}

.footer__social-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--bb-space-5) var(--bb-space-6);
  max-width: var(--bb-container-max);
  margin: 0 auto;
}

.footer__copyright {
  font-family: var(--bb-font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════
   WHATSAPP FLOATING BUTTON
   ═══════════════════════════════════════════════════════════ */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  width: 52px;
  height: 52px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}

.whatsapp-float__icon {
  width: 26px;
  height: 26px;
  fill: #fff;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .footer__container {
    grid-template-columns: 1fr;
    gap: var(--bb-space-10);
  }
}

@media (max-width: 640px) {
  .blog-card {
    padding: 40px var(--bb-space-6);
  }

  .blog-card__title {
    font-size: 1.375rem;
  }

  .page-container {
    padding: 0 var(--bb-space-6);
  }

  .footer__nav {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════
   OVERRIDES WordPress — Limpiar estilos por defecto
   ═══════════════════════════════════════════════════════════ */
.wp-block-group,
.wp-block-columns {
  margin: 0;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  word-wrap: normal !important;
  width: 1px;
}
