/* ═══════════════════════════════════════════════════════════════
   BLOG AZ INNOVATIONX - OFFICIAL STYLESHEET
   Design System: Deep Blue + Glassmorphism + Cyberpunk Accents
   ═══════════════════════════════════════════════════════════════ */

:root {
  --blog-cyan: #00f5ff;
  --blog-purple: #c77dff;
  --blog-emerald: #10b981;
  --blog-amber: #f59e0b;
  --blog-card-bg: rgba(13, 20, 36, 0.75);
  --blog-border: rgba(255, 255, 255, 0.1);
  --blog-border-hover: rgba(0, 245, 255, 0.4);
}

/* ─── Hero Blog Header ─── */
.blog-hero {
  padding: 5rem 0 3rem 0;
  text-align: center;
  position: relative;
  z-index: 2;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 245, 255, 0.12);
  border: 1px solid rgba(0, 245, 255, 0.3);
  color: #00f5ff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.blog-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #00f5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.blog-hero-sub {
  max-width: 700px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* ─── Filter & Search Bar ─── */
.blog-controls-section {
  padding: 1.5rem 0 2.5rem 0;
  position: relative;
  z-index: 3;
}

.blog-controls-wrapper {
  background: rgba(13, 20, 36, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--blog-border);
  border-radius: 18px;
  padding: 1.25rem 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.blog-search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

.blog-search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.2rem;
}

.blog-search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.blog-search-box input:focus {
  border-color: #00f5ff;
  background: rgba(0, 245, 255, 0.06);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}

.blog-categories-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.category-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.category-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.category-pill.active {
  background: linear-gradient(135deg, #0A2463, #3E92CC);
  color: #ffffff;
  border-color: #00f5ff;
  box-shadow: 0 4px 15px rgba(62, 146, 204, 0.4);
}

/* ─── Featured Post Card ─── */
.featured-post-section {
  padding-bottom: 2.5rem;
  position: relative;
  z-index: 2;
}

.featured-card {
  background: var(--blog-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 24px;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 2.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45), 0 0 30px rgba(0, 245, 255, 0.1);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 6px; height: 100%;
  background: linear-gradient(180deg, #00f5ff, #3E92CC);
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 245, 255, 0.2);
}

.featured-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.featured-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.featured-desc {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.post-meta-row i {
  color: #00f5ff;
}

.featured-visual-box {
  background: linear-gradient(135deg, rgba(10, 36, 99, 0.5), rgba(6, 23, 64, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.featured-visual-box i {
  font-size: 4.5rem;
  color: #00f5ff;
  text-shadow: 0 0 25px rgba(0, 245, 255, 0.5);
  margin-bottom: 1rem;
}

.featured-visual-label {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
}

.featured-visual-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

/* ─── Grid de Artículos ─── */
.articles-grid-section {
  padding-bottom: 5rem;
  position: relative;
  z-index: 2;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--blog-card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--blog-border);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.article-card:hover {
  transform: translateY(-6px);
  border-color: var(--blog-border-hover);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 245, 255, 0.15);
}

.article-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: fit-content;
  margin-bottom: 1rem;
}

.cat-cyber {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.cat-ai {
  background: rgba(0, 245, 255, 0.12);
  border: 1px solid rgba(0, 245, 255, 0.35);
  color: #00f5ff;
}

.cat-community {
  background: rgba(199, 125, 255, 0.12);
  border: 1px solid rgba(199, 125, 255, 0.35);
  color: #c77dff;
}

.cat-web {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.article-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 0.85rem;
}

.article-card p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
  margin-top: auto;
}

.article-author-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.author-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 245, 255, 0.4);
}

.author-name-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.2;
}

.author-role-text {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.btn-read-article {
  background: none;
  border: none;
  color: #00f5ff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.25s ease;
}

.btn-read-article:hover {
  color: #ffffff;
  gap: 0.55rem;
}

/* ─── Modal Lector de Artículo ─── */
.article-modal-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.article-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.article-modal-card {
  background: #090e1a;
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 24px;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 50px rgba(0, 245, 255, 0.15);
  transform: translateY(30px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-modal-backdrop.active .article-modal-card {
  transform: translateY(0);
}

.article-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.article-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #f87171;
}

.modal-article-body {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 1.5rem 0 2rem 0;
}

.modal-article-body p {
  margin-bottom: 1.25rem;
}

.modal-article-body h4 {
  color: #00f5ff;
  font-size: 1.3rem;
  margin: 1.75rem 0 0.75rem 0;
}

.modal-article-body ul {
  margin: 0 0 1.5rem 1.5rem;
}

.modal-article-body li {
  margin-bottom: 0.5rem;
}

/* Callout Banner Comercial dentro del artículo */
.article-conversion-banner {
  background: linear-gradient(135deg, rgba(10, 36, 99, 0.75), rgba(6, 23, 64, 0.95));
  border: 1px solid rgba(0, 245, 255, 0.35);
  border-radius: 18px;
  padding: 1.75rem 2rem;
  margin: 2.5rem 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.article-conversion-banner h4 {
  color: #ffffff;
  font-size: 1.2rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-conversion-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  margin: 0;
}

.article-conversion-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #00f5ff, #3E92CC);
  color: #050a18;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  width: fit-content;
  transition: all 0.25s ease;
}

.article-conversion-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 245, 255, 0.4);
  color: #050a18;
}

/* Compartir en Redes */
.article-share-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.share-btn:hover {
  background: #00f5ff;
  color: #050a18;
  border-color: #00f5ff;
  transform: scale(1.1);
}

/* ─── Responsive Media Queries ─── */
@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.75rem;
  }
  .featured-visual-box {
    display: none;
  }
}

@media (max-width: 768px) {
  .blog-controls-wrapper {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }
  .blog-search-box {
    max-width: 100%;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .article-modal-card {
    padding: 1.5rem;
  }
}
