/**
 * ConectaMax Tech — Cyber Editorial Design System (1:1 with Approved Mockups)
 * Colors: Deep Cyber Navy (#030816), Neon Cyan Glow (#00E5FF), Lime Green (#D4FF00 / #76FF03)
 */

:root {
  --cm-cyber-bg: #030816;
  --cm-cyber-card-bg: #07132B;
  --cm-cyber-card-inner: #0A1B3D;
  --cm-cyber-neon-cyan: #00E5FF;
  --cm-cyber-neon-glow: rgba(0, 229, 255, 0.28);
  --cm-cyber-lime: #D4FF00;
  --cm-cyber-lime-glow: rgba(212, 255, 0, 0.35);
  --cm-cyber-text-main: #FFFFFF;
  --cm-cyber-text-dim: #94A3B8;
  --cm-cyber-text-muted: #64748B;
  --cm-cyber-radius: 20px;
}

/* Base Canvas Isolation */
body.cmx-tech-portal,
.cm-tech-page-wrap {
  background-color: var(--cm-cyber-bg) !important;
  color: var(--cm-cyber-text-main) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.cm-tech-page-wrap *,
.cm-tech-page-wrap *::before,
.cm-tech-page-wrap *::after {
  box-sizing: border-box;
}

/* ==========================================================================
   1. CYBER HEADER (Responsive: Mobile App Style / Desktop Portal)
   ========================================================================== */
.cm-tech-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(3, 8, 22, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  width: 100%;
  padding: 10px 16px;
}

.cm-tech-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 16px;
}

/* Mobile Icon Controls */
.cm-tech-icon-btn {
  background: none;
  border: none;
  color: #FFFFFF;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-width: 40px;
  min-height: 40px;
}

.cm-tech-icon-btn:hover {
  color: var(--cm-cyber-neon-cyan);
  background: rgba(0, 229, 255, 0.1);
}

.cm-tech-logo-center {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.cm-tech-logo-img {
  height: 40px;
  width: auto;
  max-height: 46px;
  object-fit: contain;
  display: block;
}

/* Desktop Header Additions */
.cm-tech-desktop-nav {
  display: none;
  align-items: center;
  gap: 20px;
}

.cm-tech-desktop-nav a {
  color: #CBD5E1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.cm-tech-desktop-nav a:hover,
.cm-tech-desktop-nav a.active {
  color: var(--cm-cyber-neon-cyan);
}

.cm-tech-desktop-actions {
  display: none;
  align-items: center;
  gap: 12px;
}

.cm-tech-back-commercial-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: #CBD5E1;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cm-tech-back-commercial-link:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--cm-cyber-neon-cyan);
  color: var(--cm-cyber-neon-cyan);
}

/* ==========================================================================
   2. CATEGORY PILLS BAR (Touch Scroll Horizontal)
   ========================================================================== */
.cm-tech-pills-bar {
  background: rgba(3, 8, 22, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
}

.cm-tech-pills-container {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  max-width: 1200px;
  margin: 0 auto;
}

.cm-tech-pills-container::-webkit-scrollbar {
  display: none;
}

.cm-tech-cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
  background: #091734;
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: #CBD5E1;
}

.cm-tech-cat-pill:hover {
  border-color: var(--cm-cyber-neon-cyan);
  color: var(--cm-cyber-neon-cyan);
  background: #0C214B;
}

.cm-tech-cat-pill.active {
  background: var(--cm-cyber-lime);
  border-color: var(--cm-cyber-lime);
  color: #030816;
  font-weight: 800;
  box-shadow: 0 0 14px var(--cm-cyber-lime-glow);
}

/* ==========================================================================
   3. CYBER CARDS (The Exact Signature Neon Border & Glow)
   ========================================================================== */
.cm-tech-content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 80px; /* Space for bottom mobile nav */
}

/* News Cards with Neon Border */
.cm-tech-cyber-card {
  background: var(--cm-cyber-card-bg);
  border: 1.5px solid var(--cm-cyber-neon-cyan);
  box-shadow: 0 0 20px var(--cm-cyber-neon-glow), inset 0 0 10px rgba(0, 229, 255, 0.04);
  border-radius: var(--cm-cyber-radius);
  overflow: hidden;
  margin-bottom: 22px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cm-tech-cyber-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.45), inset 0 0 14px rgba(0, 229, 255, 0.08);
}

.cm-tech-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050E24;
  overflow: hidden;
}

.cm-tech-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.cm-tech-cyber-card:hover .cm-tech-card-image-wrap img {
  transform: scale(1.03);
}

.cm-tech-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Exact Lime Pill Tag */
.cm-tech-tag-lime {
  display: inline-block;
  align-self: flex-start;
  background: var(--cm-cyber-lime);
  color: #030816;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 12px;
  box-shadow: 0 0 8px rgba(212, 255, 0, 0.3);
}

/* Card Titles */
.cm-tech-card-title {
  font-size: 19px;
  line-height: 1.35;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 12px;
}

.cm-tech-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cm-tech-card-title a:hover {
  color: var(--cm-cyber-neon-cyan);
}

.cm-tech-card-excerpt {
  color: var(--cm-cyber-text-dim);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 14px;
}

/* Card Metrics (Thumbs up + Balloon Comments) */
.cm-tech-card-metrics {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: auto;
  padding-top: 12px;
  font-size: 13.5px;
  color: #CBD5E1;
}

.cm-tech-metric-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #CBD5E1;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.cm-tech-metric-item:hover {
  color: var(--cm-cyber-neon-cyan);
}

.cm-tech-metric-item svg {
  stroke: currentColor;
}

.cm-tech-comment-btn-lime {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: rgba(212, 255, 0, 0.1);
  border: 1px solid var(--cm-cyber-lime);
  color: var(--cm-cyber-lime);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cm-tech-comment-btn-lime:hover {
  background: var(--cm-cyber-lime);
  color: #030816;
  box-shadow: 0 0 12px var(--cm-cyber-lime-glow);
}

/* ==========================================================================
   4. GRID LAYOUT (Responsive: 1 col mobile, 2 col tablet, 3 col desktop)
   ========================================================================== */
.cm-tech-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* ==========================================================================
   5. NATIVE CONVERSION BANNER (ConectaMax Fibra)
   ========================================================================== */
.cm-tech-commercial-banner {
  background: linear-gradient(135deg, #071533 0%, #0C2353 100%);
  border: 1.5px solid var(--cm-cyber-neon-cyan);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.2);
  border-radius: var(--cm-cyber-radius);
  padding: 24px 20px;
  margin: 30px 0;
  position: relative;
  overflow: hidden;
}

.cm-tech-commercial-title {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 8px;
}

.cm-tech-commercial-text {
  font-size: 14px;
  color: #CBD5E1;
  line-height: 1.5;
  margin: 0 0 16px;
}

.cm-tech-commercial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cm-tech-btn-lime-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--cm-cyber-lime);
  color: #030816;
  font-size: 14px;
  font-weight: 800;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px var(--cm-cyber-lime-glow);
}

.cm-tech-btn-lime-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--cm-cyber-lime-glow);
}

.cm-tech-btn-cyan-outline {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--cm-cyber-neon-cyan);
  color: var(--cm-cyber-neon-cyan);
  font-size: 14px;
  font-weight: 700;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cm-tech-btn-cyan-outline:hover {
  background: rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.3);
}

/* ==========================================================================
   6. MOBILE APP NAVIGATION BAR (Bottom Fixed)
   ========================================================================== */
.cm-tech-mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(3, 8, 22, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 229, 255, 0.2);
  display: flex;
  justify-content: space-around;
  padding: 8px 12px 10px;
}

.cm-tech-mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #64748B;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: color 0.2s ease;
  min-width: 60px;
}

.cm-tech-mobile-nav-item.active {
  color: var(--cm-cyber-lime);
}

.cm-tech-mobile-nav-item.active svg {
  stroke: var(--cm-cyber-lime);
}

.cm-tech-mobile-nav-item:hover {
  color: var(--cm-cyber-neon-cyan);
}

/* ==========================================================================
   7. DESKTOP & TABLET ADAPTATIONS (Responsive Media Queries)
   ========================================================================== */
@media (min-width: 680px) {
  .cm-tech-grid-layout {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (min-width: 992px) {
  .cm-tech-grid-layout {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
  
  /* Show desktop header navigation & actions, hide mobile hamburger */
  .cm-tech-icon-btn {
    display: none;
  }
  .cm-tech-desktop-nav {
    display: flex;
  }
  .cm-tech-desktop-actions {
    display: flex;
  }
  
  /* Hide mobile bottom app bar on desktop */
  .cm-tech-mobile-nav {
    display: none;
  }
  
  .cm-tech-content-container {
    padding-bottom: 40px;
  }

  .cm-tech-commercial-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 36px;
  }
  .cm-tech-commercial-banner > div:first-child {
    max-width: 65%;
  }
}

@media (min-width: 1200px) {
  .cm-tech-grid-layout {
    grid-template-columns: repeat(3, 1fr);
  }
}
