/* ===== RESPONSIVE - MIHARI INTELLIGENCE ===== */

/* ===== MENÚ HAMBURGUESA ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 200;
  padding: 6px;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--cyan);
  transition: all .3s;
  border-radius: 2px;
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== TABLET (max 1024px) ===== */
@media (max-width: 1024px) {
  section {
    padding: 50px 30px;
  }
  #metrics {
    padding: 50px 30px;
  }
  #providers {
    padding: 50px 30px;
  }
  .hero-product {
    font-size: 4.5rem;
  }
  .hero-tagline {
    font-size: 1.5rem;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .eco-scene {
    height: 700px;
  }
  .eco-el img {
    width: 140px;
    height: 140px;
  }
  .eco-el.el-core img {
    width: 180px;
    height: 180px;
  }
  .df-scene {
    height: 650px;
  }
  .df-el.df-core img {
    width: 170px;
    height: 170px;
  }
  .df-el.df-sat img {
    width: 110px;
    height: 110px;
  }
  footer {
    padding: 40px 30px 30px;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  .chart-stats-box {
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
  }
  .chart-stat-divider:nth-child(4) {
    display: none;
  }
  .chart-stat:nth-child(n+5) {
    grid-column: span 1;
  }
}

/* ===== MÓVIL (max 768px) ===== */
@media (max-width: 768px) {
  /* Navbar móvil */
  nav {
    padding: 0 20px;
    height: 60px;
  }
  .nav-brand img {
    height: 34px;
  }
  .nav-brand span {
    font-size: .85rem;
    letter-spacing: 1px;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    background: rgba(4,8,15,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 30px 30px;
    gap: 0;
    transition: right .3s ease;
    border-left: 1px solid rgba(0,212,255,0.1);
    z-index: 150;
  }
  .nav-links.open {
    right: 0;
  }
  .nav-links a {
    padding: 14px 0;
    font-size: 1rem;
    width: 100%;
    border-bottom: 1px solid rgba(0,212,255,0.06);
  }
  .nav-links .btn-demo {
    margin-top: 20px;
    width: 100%;
    text-align: center;
  }

  /* Overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 140;
  }
  .nav-overlay.show {
    display: block;
  }

  /* Scroll padding ajustado */
  html {
    scroll-padding-top: 68px;
  }

  /* Hero */
  #hero {
    min-height: 85vh;
    padding-top: 80px;
  }
  .hero-product {
    font-size: 2.8rem;
    letter-spacing: 2px;
  }
  .hero-tagline {
    font-size: 1.15rem;
    letter-spacing: 1px;
  }
  .hero-desc {
    font-size: .95rem;
    padding: 0 10px;
    margin-bottom: 30px;
  }
  .hero-btns {
    flex-direction: column;
    gap: 14px;
    width: 100%;
    padding: 0 20px;
  }
  .hero-btns .btn-primary,
  .hero-btns .btn-outline {
    width: 100%;
    text-align: center;
  }

  /* Secciones generales */
  section {
    padding: 40px 20px;
  }
  .section-title {
    font-size: 1.4rem !important;
    letter-spacing: 1px;
  }
  .section-subtitle {
    font-size: .9rem;
  }
  .section-label {
    font-size: .7rem;
  }

  /* Ecosystem */
  #ecosystem {
    padding-top: 50px;
    padding-bottom: 40px;
  }
  #ecosystem .section-subtitle {
    margin-bottom: 30px;
  }
  .eco-scene {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  canvas#ecoDiagram {
    display: none;
  }
  .eco-el {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
  }
  .eco-el img {
    width: 100px;
    height: 100px;
  }
  .eco-el.el-core img {
    width: 130px;
    height: 130px;
  }
  .eco-el .el-name {
    font-size: .75rem;
  }
  .eco-tt,
  .eco-tt-static {
    display: none !important;
  }

  /* Módulos */
  .modules-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .module-card {
    padding: 28px 22px;
  }
  .module-card .mod-img {
    width: 70px;
    height: 70px;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .feature-card {
    padding: 24px 20px;
  }

  /* Metrics */
  #metrics {
    padding: 40px 20px;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .metric-card {
    padding: 20px 14px;
  }
  .metric-number {
    font-size: 1.8rem;
  }
  .metric-label {
    font-size: .7rem;
  }
  .metric-detail {
    font-size: .6rem;
  }

  /* Dashboard */
  .dashboard-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 16px;
    gap: 16px;
  }
  .dashboard-topbar {
    padding: 10px 16px;
  }
  .dashboard-topbar-title {
    font-size: .6rem;
    display: none;
  }
  .dashboard-status {
    font-size: .65rem;
  }
  .chart-bars {
    height: 180px;
    padding: 15px 5px 0 30px;
    gap: 8px;
  }
  .chart-bar-wrap {
    max-width: 40px;
  }
  .chart-y-label {
    font-size: .45rem;
  }
  .chart-x-axis {
    padding: 8px 5px 0 30px;
    gap: 8px;
  }
  .chart-x-label {
    font-size: .5rem;
    max-width: 40px;
  }
  .chart-stats-box {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 14px 12px;
  }
  .chart-stat-divider {
    display: none;
  }
  .chart-stat-value {
    font-size: 1rem;
  }
  .chart-stat-label {
    font-size: .65rem;
  }

  /* Alertas */
  .threat-item {
    font-size: .7rem;
  }
  .threat-badge {
    font-size: .45rem;
    padding: 2px 5px;
  }
  .threat-timestamp {
    font-size: .45rem;
  }

  /* Providers */
  #providers {
    padding: 40px 20px;
  }
  .providers-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .provider-card {
    padding: 30px 20px;
  }

  /* Dataflow */
  .df-scene {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  canvas#dfCanvas {
    display: none;
  }
  .df-el {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
  }
  .df-el.df-core img {
    width: 130px;
    height: 130px;
  }
  .df-el.df-sat img {
    width: 90px;
    height: 90px;
  }
  .df-el.df-core::before,
  .df-el.df-core::after {
    display: none;
  }

  /* Blog */
  #blog {
    padding: 40px 20px;
  }
  .blog-header h1 {
    font-size: 1.5rem;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .card-image {
    height: 180px;
  }
  .card-content {
    padding: 20px;
  }
  .card-title {
    font-size: .95rem;
  }

  /* Footer */
  footer {
    padding: 40px 20px 30px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ===== MÓVIL PEQUEÑO (max 480px) ===== */
@media (max-width: 480px) {
  .hero-product {
    font-size: 2.2rem;
  }
  .hero-tagline {
    font-size: 1rem;
  }
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .metric-number {
    font-size: 1.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .chart-stats-box {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .chart-stat {
    flex-direction: row;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0,212,255,0.03);
    border-radius: 6px;
  }
  .blog-header h1 {
    font-size: 1.3rem;
  }
}