/**
 * Components - Buttons, Cards, Badges, Inputs
 * 
 * @package DigiHub
 */

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  transition: all var(--dur-normal) var(--ease-smooth);
  cursor: pointer;
  border: none;
  text-decoration: none;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Sheen effect on buttons */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-ghost:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--primary);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: var(--text-xs);
}

.btn-lg {
  padding: 1.25rem 3rem;
  font-size: var(--text-base);
}

/* ── CARDS ───────────────────────────────────────── */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--dur-normal) var(--ease-smooth);
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--glass-border);
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--dur-normal) var(--ease-smooth);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.3);
}

@supports not (backdrop-filter: blur(20px)) {
  .glass-card {
    background: rgba(255, 255, 255, 0.95);
  }
  
  [data-theme="dark"] .glass-card {
    background: rgba(30, 41, 59, 0.95);
  }
}

/* App Card */
.app-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--dur-normal) var(--ease-smooth);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--dur-normal);
}

.app-card:hover {
  transform: translateY(-8px) perspective(1000px) rotateX(2deg);
  box-shadow: var(--shadow-card-hover);
}

.app-card:hover::before {
  opacity: 1;
}

.app-card__icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: 2rem;
}

.app-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.app-card__name {
  font-family: var(--font-secondary);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.app-card__desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.app-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* Template Card */
.template-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--dur-normal) var(--ease-smooth);
  border: 1px solid var(--glass-border);
}

.template-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.template-card__image {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-smooth);
}

.template-card:hover .template-card__image {
  transform: scale(1.05);
}

.template-card__placeholder {
  width: 100%;
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

/* Un solo punto de luz sutil en la esquina */
.template-card__placeholder::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 120px;
  height: 120px;
  background: var(--primary);
  filter: blur(60px);
  opacity: 0.15;
  border-radius: 50%;
}

.template-card__placeholder-icon {
  color: var(--primary-light);
  opacity: 1;
  transition: all var(--dur-normal) var(--ease-smooth);
  z-index: 1;
}

.template-card:hover .template-card__placeholder-icon {
  transform: scale(1.1);
  color: #fff; /* Blanco al hacer hover para máximo contraste */
}

.template-card__placeholder-icon svg {
  width: 52px;
  height: 52px;
  stroke-width: 1.5px; /* Un poco más de grosor para que sea legible */
}

.template-card__content {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.template-card__title {
  font-family: var(--font-secondary);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.template-card__desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.template-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
}

.template-card__meta svg {
  opacity: 0.6;
  color: var(--primary-light);
}

.template-card__footer {
  margin-top: auto;
}

.template-card .btn {
  width: fit-content;
  min-width: 190px;
  margin: 0 auto;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  background: #0f172a;
  border: 1.5px solid rgba(59, 130, 246, 0.4);
  color: #fff;
  padding: 0.875rem 2rem;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 100px; /* Forma de píldora absoluta */
  transition: all var(--dur-normal) var(--ease-smooth);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.2);
  text-decoration: none;
}

.template-card .btn:hover {
  background: #1e293b;
  border-color: #3b82f6;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.5);
  color: #fff;
}

.template-card .btn svg {
  width: 12px;
  height: 12px;
  fill: #fff; /* Icono blanco sólido */
  stroke: none;
}

.template-card__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ── BADGES ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.template-card__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  padding: 0.35rem 0.85rem;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.badge-blue {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.badge-green {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.badge-slate {
  background: rgba(100, 116, 139, 0.1);
  color: var(--muted);
}

/* ── INPUTS ──────────────────────────────────────── */
.input,
.textarea,
.select {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: all var(--dur-fast) var(--ease-smooth);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.textarea {
  min-height: 150px;
  resize: vertical;
}

/* ── FORMS ───────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.form-error {
  font-size: var(--text-xs);
  color: #ef4444;
  margin-top: var(--space-xs);
}

/* ── ALERTS ──────────────────────────────────────── */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

/* ── DIVIDERS ────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--glass-border);
  margin: var(--space-xl) 0;
}

/* ── TAGS ────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--bg-alt);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  transition: all var(--dur-fast);
}

.tag:hover {
  background: var(--primary);
  color: #fff;
}

/* ── AVATARS ─────────────────────────────────────── */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-primary);
  box-shadow: var(--shadow-sm);
}

.avatar-lg {
  width: 64px;
  height: 64px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

/* ── PLAY STORE BADGE ────────────────────────────── */
.play-store-badge {
  display: inline-block;
  transition: transform var(--dur-normal);
}

.play-store-badge:hover {
  transform: scale(1.05);
}

.play-store-badge img {
  height: 40px;
  width: auto;
}

/* ── POST ENTRY ──────────────────────────────────── */
.entry-single {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  overflow: hidden;
}

.entry-header {
  padding-bottom: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--glass-border);
}

.entry-title {
  margin: var(--space-md) 0;
  line-height: 1.2;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.entry-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.entry-meta svg {
  color: var(--primary);
}

.entry-meta a {
  color: inherit;
  transition: color var(--dur-fast);
}

.entry-meta a:hover {
  color: var(--primary);
}

.post-thumbnail {
  margin-bottom: var(--space-3xl);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.entry-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--text-primary);
  margin: var(--space-2xl) 0 var(--space-md);
  font-family: var(--font-secondary);
}

.entry-content p {
  margin-bottom: var(--space-xl);
}

.entry-content ul,
.entry-content ol {
  margin-bottom: var(--space-xl);
  padding-left: var(--space-xl);
}

.entry-content li {
  margin-bottom: var(--space-sm);
}

.entry-content blockquote {
  margin: var(--space-2xl) 0;
  padding: var(--space-xl);
  background: var(--bg-alt);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
  font-size: 1.25rem;
}

.entry-footer {
  margin-top: var(--space-4xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--glass-border);
}

.tags-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-3xl);
}

/* Post Navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin: var(--space-4xl) 0;
}

.nav-links {
  display: contents;
}

.nav-links a {
  display: flex;
  flex-direction: column;
  padding: var(--space-xl);
  background: var(--bg-alt);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: all var(--dur-normal);
  border: 1px solid var(--glass-border);
  height: 100%;
}

.nav-links .nav-next a {
  text-align: right;
  align-items: flex-end;
}

.nav-links a:hover {
  background: var(--bg-primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow-sm);
  transform: translateY(-4px);
}

.nav-subtitle {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.nav-title {
  font-weight: 800;
  color: var(--text-primary);
  font-size: var(--text-base);
  line-height: 1.4;
  font-family: var(--font-secondary);
}

/* Related Posts */
.related-posts {
  margin: var(--space-5xl) 0;
  padding-top: var(--space-3xl);
  border-top: 1px solid var(--glass-border);
}

.related-posts .heading-3 {
  margin-bottom: var(--space-2xl);
  font-family: var(--font-secondary);
}

.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.related-post {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: transform var(--dur-normal);
}

.related-post:hover {
  transform: translateY(-5px);
}

.related-post__image {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: block;
}

.related-post__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow);
}

.related-post:hover .related-post__image img {
  transform: scale(1.1);
}

.related-post__title {
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.related-post__title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.related-post__title a:hover {
  color: var(--primary);
}

.related-post__date {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Comments Area */
.comments-area {
  margin-top: var(--space-5xl);
  padding: var(--space-3xl);
  background: var(--bg-alt);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--glass-border);
}

.comments-title {
  margin-bottom: var(--space-2xl);
  font-family: var(--font-secondary);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin-bottom: var(--space-4xl);
}

.comment-body {
  padding: var(--space-xl);
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  margin-bottom: var(--space-lg);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.comment-author .avatar {
  width: 40px;
  height: 40px;
}

.comment-form-comment textarea {
  min-height: 150px;
}

/* ── POST CARDS (Blog Grid) ───────────────────────── */
.post-card {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  transition: all var(--dur-normal) var(--ease-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-light);
}

.post-card__image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  background: var(--bg-alt);
}

.post-card__image-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 40%);
  opacity: 0;
  transition: opacity var(--dur-normal);
  z-index: 1;
}

.post-card:hover .post-card__image-link::after {
  opacity: 1;
}

.post-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s var(--ease-smooth);
}

.post-card:hover .post-card__image {
  transform: scale(1.08);
}

.post-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--glass-bg) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}

.post-card__placeholder::before {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  background: var(--primary);
  filter: blur(40px);
  opacity: 0.2;
}

.post-card__content {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  font-size: var(--text-xs);
  font-weight: 600;
}

.post-card__category {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-card__date {
  color: var(--text-muted);
}

.post-card__title {
  font-family: var(--font-secondary);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

.post-card__title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--dur-fast);
}

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

.post-card__excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
  flex-grow: 1;
}

.post-card__excerpt .read-more {
  display: none !important;
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
}

.post-card__reading-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-card__reading-time::before {
  content: '⏱️';
  font-size: 0.8rem;
}

.post-card__read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-decoration: none;
  transition: all var(--dur-normal) var(--ease-smooth);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  white-space: nowrap;
}

.post-card__read-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 640px) {
  .post-navigation {
    grid-template-columns: 1fr;
  }
}

/* ── PAGINATION ──────────────────────────────────── */
.archive-pagination {
  margin-top: var(--space-4xl);
  display: flex;
  justify-content: center;
}

.archive-pagination .nav-links {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.archive-pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: var(--text-sm);
  border: 1px solid var(--glass-border);
  transition: all var(--dur-fast);
}

.archive-pagination .page-numbers:hover {
  background: var(--bg-alt);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.archive-pagination .page-numbers.current {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow-sm);
}

.archive-pagination .page-numbers.dots {
  background: transparent;
  border: none;
}

@media (max-width: 768px) {
  .post-navigation {
    grid-template-columns: 1fr;
  }
  
  .related-posts__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .related-posts__grid {
    grid-template-columns: 1fr;
  }
}
/* ── COOKIE NOTICE ───────────────────────────────── */
.cookie-notice {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: var(--z-fixed);
  max-width: 400px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-xl);
  transform: translateY(100px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--dur-slow) var(--ease-smooth);
}

.cookie-notice.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.cookie-notice__inner {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.cookie-notice__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  border: 1px solid var(--glass-border);
}

.cookie-notice__content p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.cookie-notice__actions {
  display: flex;
  justify-content: flex-end;
}

.cookie-notice__accept {
  padding: 0.5rem 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

@media (max-width: 767px) {
  .cookie-notice {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}

/* ── AD CONTAINERS ────────────────────────────────── */
.ad-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: var(--space-xl) auto;
  padding: var(--space-md);
  background: rgba(15, 23, 42, 0.3);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.ad-container::before {
  content: 'Publicidad';
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.5;
  letter-spacing: 0.05em;
}

.ad-container--horizontal {
  width: 100%;
  max-width: 970px;
  min-height: 90px;
}

.ad-container--rectangle {
  width: 300px;
  min-height: 250px;
}

.ad-container--in-content {
  margin: var(--space-2xl) 0;
  max-width: 100%;
}

/* ── SIDEBAR ─────────────────────────────────────── */
.sidebar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  position: sticky;
  top: calc(72px + var(--space-xl));   /* offset por el header */
  max-height: calc(100vh - 72px - var(--space-3xl));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 99px;
}

/* ── WIDGET BASE ─────────────────────────────────── */
.sidebar .widget {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--dur-normal) var(--ease-smooth),
              border-color var(--dur-normal) var(--ease-smooth);
}

/* Borde gradiente superior sutil */
.sidebar .widget::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(37,99,235,0.35) 0%, rgba(124,58,237,0.15) 60%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.sidebar .widget:hover {
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.18);
}

/* ── WIDGET TITLE ────────────────────────────────── */
.sidebar .widget-title {
  font-family: var(--font-secondary);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 var(--space-lg) 0;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Línea de acento debajo del título */
.sidebar .widget-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 99px;
}

/* Icono decorativo delante del título */
.sidebar .widget-title::before {
  content: '▸';
  color: var(--primary);
  font-size: 0.75rem;
  opacity: 0.8;
}

/* ── WIDGET: RECENT POSTS ────────────────────────── */
.sidebar .widget_recent_entries ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar .widget_recent_entries ul li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  transition: padding-left var(--dur-fast) var(--ease-smooth);
}

.sidebar .widget_recent_entries ul li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar .widget_recent_entries ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--gradient-primary);
  border-radius: 99px;
  transition: height var(--dur-fast) var(--ease-smooth);
}

.sidebar .widget_recent_entries ul li:hover {
  padding-left: 0.85rem;
}

.sidebar .widget_recent_entries ul li:hover::before {
  height: 65%;
}

.sidebar .widget_recent_entries ul li a {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.45;
  transition: color var(--dur-fast) var(--ease-smooth);
}

.sidebar .widget_recent_entries ul li a:hover {
  color: var(--primary);
}

/* ── WIDGET: AD / CUSTOM HTML ────────────────────── */
.sidebar .widget_custom_html,
.sidebar .widget-adsense {
  padding: var(--space-md);
  background: rgba(15, 23, 42, 0.03);
}

.sidebar .widget_custom_html .textwidget,
.sidebar .widget_custom_html .custom-html-widget {
  display: flex;
  justify-content: center;
}

/* Etiqueta "Publicidad" sobre el ad */
.sidebar .widget_custom_html::after,
.sidebar .widget-adsense::after {
  content: 'Publicidad';
  display: block;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.45;
  margin-top: 0.4rem;
}

/* ── WIDGET GENÉRICO (texto, categorías, etc.) ───── */
.sidebar .widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar .widget ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.sidebar .widget ul li:last-child {
  border-bottom: none;
}

.sidebar .widget ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.sidebar .widget ul li a:hover {
  color: var(--primary);
}

/* ── WIDGET SEARCH ───────────────────────────────── */
.sidebar .widget_search .search-field {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--text-sm);
  background: var(--bg-primary);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.sidebar .widget_search .search-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sidebar .widget_search .search-submit {
  display: none; /* El form submit se hace con Enter */
}
