html {
  scroll-behavior: auto;
  overflow: hidden;
}

:root{
  --bg: #020408;
  --fg: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);
  --line: rgba(255,255,255,.08);
  --card: rgba(255,255,255,.03);
  --radius: 18px;
}

body{
  margin: 0;
  min-height: 100vh;
  height: 100vh;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
}

/* Liquid Canvas Background */
#liquid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: #000;
  filter: blur(60px);
  will-change: transform;
}

/* Navbar always visible */
.navbar-float,
.mobile-nav-toggle,
.mobile-menu-overlay {
  z-index: 300;
}

/* layout */
.app{
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow: hidden;
  /* Eliminado grid sidebar */
  transition: filter .3s ease, opacity .3s ease;
}

/* Estado inactivo cuando el menú móvil está abierto */
.app.is-inactive {
  filter: blur(4px) brightness(.6);
  pointer-events: none;
  user-select: none;
}

/* Sections container */
.main,
.portfolio-section,
.pricing-section,
.contact-section,
.comparativa-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0s 0.5s;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
}

.main.active,
.portfolio-section.active,
.pricing-section.active,
.contact-section.active,
.comparativa-section.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.5s ease, visibility 0s 0s;
}

/* Navbar Flotante (Desktop) */
.navbar-float {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 300;
  pointer-events: none; /* Para que no bloquee clicks fuera de la isla */
  transition: opacity .4s ease;
}

/* Desvanecer si no hay hover en el área del navbar */
.navbar-float:not(:hover) {
  opacity: 0.6; /* Un poco visible para saber que está ahí, o 0 si se quiere ocultar total */
}
/* Si el usuario quiere que se oculte totalmente y aparezca al hover en la zona superior, 
   necesitaríamos un área de detección más grande o JS. 
   Por ahora "desvanece" lo interpretaré como baja opacidad. */

.nav-island {
  pointer-events: auto;
  background: rgba(15, 20, 30, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 24px;
  display: flex;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transition: transform .3s ease, background .3s ease;
}

.navbar-float:hover .nav-island {
  background: rgba(15, 20, 30, 0.85);
  transform: translateY(0);
}

.nav-icon{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center; /* Centrado inicial */
  height: 44px;
  padding: 0 14px; /* Padding horizontal */
  border-radius: 16px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .3s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  white-space: nowrap;
}

.nav-icon i{
  font-size: 1.2rem;
  transition: transform .4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-icon span{
  max-width: 0;
  opacity: 0;
  margin-left: 0;
  transition: all .3s ease;
  overflow: hidden;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Hover effects */
.nav-icon:hover, .nav-icon.active {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-color: rgba(255,255,255,.1);
}

.nav-icon.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.nav-icon.active i {
  color: #3B82F6;
  filter: brightness(1.5) drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

.nav-icon:hover i {
  transform: rotate(15deg); /* Giro a la derecha */
}

.nav-icon:hover span {
  max-width: 100px; /* Revelar texto */
  opacity: 1;
  margin-left: 8px;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 350;
}

.btn-toggle {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--fg);
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all .3s ease;
  padding: 0;
}

.btn-toggle:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.btn-toggle .bar {
  width: 24px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: all .3s ease;
}

.btn-toggle.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.btn-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.btn-toggle.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 320;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 75%;
  max-width: 320px;
  height: 100vh;
  background: rgba(0, 5, 15, 0.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 30px;
  transform: translateX(-100%);
  transition: transform .4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.is-open .mobile-menu-panel {
  transform: translateX(0);
}

.btn-close-menu {
  display: none;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.mobile-nav-links a {
  font-size: 1.8rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: all .3s ease;
  padding: 12px 0;
  position: relative;
}

.mobile-nav-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 100, 255, 0.8), transparent);
  transition: width .3s ease;
}

.mobile-nav-links a:hover {
  color: #fff;
  transform: translateX(10px);
}

.mobile-nav-links a.active {
  color: #3B82F6;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

.mobile-nav-links a.active::before {
  width: 60%;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.8), transparent);
}

.mobile-nav-links a:hover::before {
  width: 60%;
}

/* Ajuste para el contenido principal en móvil */
@media (max-width: 767px) {
  .app {
    margin-left: 0;
  }
  
  .portfolio-section,
  .pricing-section {
    padding: 80px 20px 40px 20px;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .hero-logo {
    bottom: 20px;
  }
  
  .hero-logo img {
    width: 200px;
  }
}

/* About Us Section */
.about-us-section {
  max-width: 1000px;
  margin: 0 auto 60px;
}

.about-us-content {
  display: flex;
  align-items: center;
  gap: 60px;
}

.about-logo {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  transition: all 0.3s ease;
}

.about-logo:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(59, 130, 246, 0.3);
  transform: scale(1.05);
}

.about-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.about-text {
  flex: 1;
}

.about-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--fg);
  position: relative;
  padding-bottom: 16px;
}

.about-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, #3B82F6 0%, rgba(59, 130, 246, 0) 100%);
  border-radius: 2px;
}

.about-description {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--muted);
  margin: 20px 0 0 0;
  font-weight: 400;
}

/* Portfolio Styles */
.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 40px;
}

.project-item.reverse {
  flex-direction: row-reverse;
}

.project-content {
  flex: 1;
}

.project-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.project-content p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-image {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  max-width: 600px;
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.placeholder-img {
  width: 100%;
  height: 300px;
  background: linear-gradient(45deg, #1a1f2e, #2a3040);
}

.btn-link {
  color: #78b4ff;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap .2s;
}

.btn-link:hover {
  gap: 12px;
  color: #9dcaff;
}

/* Pricing Styles */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* Desktop: 3 columnas, últimos 2 centrados */
@media (min-width: 1025px) {
  .pricing-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .pricing-card:nth-child(1),
  .pricing-card:nth-child(2),
  .pricing-card:nth-child(3) {
    grid-column: span 2;
  }
  
  .pricing-card:nth-child(4) {
    grid-column: 2 / span 2;
  }
  
  .pricing-card:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

.pricing-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  transition: transform .3s, border-color .3s;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
}

.pricing-card.featured {
  background: rgba(120,180,255,0.08);
  border-color: rgba(120,180,255,0.3);
}

.badge-popular {
  position: absolute;
  top: -12px;
  right: 20px;
  background: #78b4ff;
  color: #000;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}

.card-header {
  text-align: center;
  margin-bottom: 30px;
}

.card-header h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.card-header .price {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.features {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  flex: 1;
}

.features li {
  margin-bottom: 15px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.features li i {
  color: #78b4ff;
}

@media (max-width: 768px) {
  .about-us-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  
  .about-logo {
    width: 140px;
    height: 140px;
  }
  
  .about-title {
    font-size: 1.6rem;
  }
  
  .about-title::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .about-description {
    font-size: 1.05rem;
  }
  
  .project-item, .project-item.reverse {
    flex-direction: column;
  }
  
  .project-image {
    max-width: 100%;
    max-height: 300px;
    width: 100%;
  }
  
  .project-content h3 {
    font-size: 1.5rem;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-card:nth-child(4),
  .pricing-card:nth-child(5) {
    max-width: 100%;
  }
}

/* Tablet view - 2 columnas */
@media (min-width: 769px) and (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .pricing-card:nth-child(5) {
    grid-column: span 2;
    max-width: 450px;
    justify-self: center;
  }
}

/* center hero */
.main{
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

/* Sections */
.portfolio-section,
.pricing-section,
.contact-section {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 100px 20px 40px 20px;
}

.portfolio-section .container,
.pricing-section .container,
.contact-section .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 3rem;
}

.contact-section {
  justify-content: center;
  padding: 100px 20px;
}

.contact-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
}

.contact-info {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  color: var(--fg);
  text-decoration: none;
  padding: 20px 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: all .3s ease;
}

.contact-link:hover {
  background: rgba(0, 70, 240, 0.1);
  border-color: rgba(0, 100, 255, 0.3);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 70, 240, 0.2);
}

.whatsapp-link {
  color: #25D366;
}

.whatsapp-link i {
  font-size: 1.8rem;
}

.whatsapp-link:hover {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.3);
  color: #25D366;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.2);
}

.hero{
  width: min(920px, 100%);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(10px);
  padding: clamp(22px, 4vw, 46px);
  /* No border */
}

.kicker{
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 500;
}

.title-typing {
  margin-top: 10px;
  font-weight: 650;
  line-height: 1.05;
  font-size: clamp(2rem, 5vw, 3.3rem);
  min-height: 3.3em; /* Espacio para 3 líneas - previene que los botones se muevan */
  display: flex;
  align-items: flex-start;
}

.typing-text {
  color: var(--fg);
}

.cursor {
  display: inline;
  animation: blink 0.7s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-subtitle {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  font-weight: 400;
}

.hero-logo {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.hero-logo img {
  width: 300px;
  height: auto;
  opacity: 0.15;
  transition: opacity 0.3s ease;
  filter: brightness(1.3);
}

.cta{
  margin-top: 26px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-min{
  border-radius: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--fg);
  transition: transform .2s ease, background .2s ease;
}
.btn-min:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.10);
  color: var(--fg);
}

.btn-primary-min{
  border-radius: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(120,180,255,.35);
  background: rgba(120,180,255,.14);
  color: var(--fg);
  transition: transform .2s ease, background .2s ease;
}
.btn-primary-min:hover{
  transform: translateY(-1px);
  background: rgba(120,180,255,.18);
  color: var(--fg);
}

/* reduce motion */
@media (prefers-reduced-motion: reduce){
  .cursor-glow{ display:none; }
  .nav-icon,
  .nav-icon i,
  .nav-icon span,
  .rotator .phrase,
  .btn-min,
  .btn-primary-min{ transition: none !important; }
}

/* Utility classes */
.text-muted {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* FAQ Section */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
}

.faq-section h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--fg);
}

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: background 0.3s ease;
}

.faq-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: var(--fg);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: rgba(120, 180, 255, 0.9);
}

.faq-question i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 24px 20px 24px;
}

.faq-answer p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .faq-question {
    padding: 16px 20px;
    font-size: 0.95rem;
  }
  
  .faq-section h3 {
    font-size: 1.5rem;
  }
}

/* Comparativa Section */
.comparativa-section {
  padding-top: 100px;
}

.btn-comparativa {
  border-radius: 16px;
  padding: 20px 40px;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--fg);
}

.btn-comparativa:hover {
  background: rgba(0, 70, 240, 0.1);
  border-color: rgba(0, 100, 255, 0.3);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 70, 240, 0.2);
}

.btn-back-planes {
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-back-planes:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.comparison-table thead {
  background: rgba(255, 255, 255, 0.05);
}

.comparison-table th {
  padding: 20px 16px;
  text-align: center;
  font-weight: 600;
  color: var(--fg);
  border-bottom: 2px solid var(--line);
  font-size: 0.95rem;
}

.comparison-table th:first-child {
  text-align: left;
  width: 200px;
}

.comparison-table td {
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--fg);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.comparison-table .featured-col {
  background: rgba(59, 130, 246, 0.08);
  border-left: 2px solid rgba(59, 130, 246, 0.3);
  border-right: 2px solid rgba(59, 130, 246, 0.3);
}

.comparison-table .feature-name {
  font-weight: 600;
  color: var(--fg);
}

.comparison-table i.bi-check-circle-fill {
  font-size: 1.2rem;
}

.comparison-table i.bi-x-circle-fill {
  font-size: 1.2rem;
  opacity: 0.3;
}

.maintenance-info {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.maintenance-info h4 {
  color: var(--fg);
  margin: 0;
}

.note-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-left: 4px solid rgba(59, 130, 246, 0.6);
}

.note-section h4 {
  color: var(--fg);
}

/* Responsive Table */
@media (max-width: 1200px) {
  .comparison-table {
    font-size: 0.85rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 12px 8px;
  }
  
  .comparison-table th:first-child {
    width: 150px;
  }
}

@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .comparison-table {
    min-width: 800px;
  }
  
  .btn-back-planes {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}
