/* ============================================================
   MUNICIPIO DIGITAL V2 — Gov-Tech Premium Redesign
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --navy: #0F172A;
  --navy-light: #1E293B;
  --blue-deep: #1E3A5F;
  --teal: #14B8A6;
  --teal-dark: #0D9488;
  --gold: #F59E0B;
  --gold-light: #FBBF24;
  --white: #FFFFFF;
  --off-white: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-700: #334155;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.16);
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --glass: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.15);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--gray-700);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
.container-v2 { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* --- Navbar --- */
.nav-v2 {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}
.nav-v2.scrolled {
  background: rgba(15,23,42,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 0;
  box-shadow: 0 4px 24px rgba(0,0,0,.2);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-logo img { height: 44px; filter: brightness(0) invert(1); }
.nav-logo .v2-badge {
  display: inline-block; background: var(--teal); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
  margin-left: 6px; vertical-align: super;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  color: rgba(255,255,255,.8); font-size: 14px; font-weight: 500;
  transition: var(--transition); position: relative;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--teal); transition: var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  background: var(--teal); color: #fff !important; padding: 10px 24px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
}
.nav-cta:hover { background: var(--teal-dark); transform: translateY(-1px); }
.nav-cta::after { display: none !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: var(--transition); }

/* --- Hero --- */
.hero-v2 {
  min-height: 100vh; display: flex; align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-deep) 50%, #0c4a6e 100%);
  position: relative; overflow: hidden; padding: 120px 0 80px;
}
.hero-v2::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(20,184,166,.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-v2::after {
  content: ''; position: absolute; bottom: -30%; left: -10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(245,158,11,.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px); padding: 8px 16px; border-radius: 50px;
  color: var(--teal); font-size: 13px; font-weight: 600; margin-bottom: 24px;
}
.hero-badge .dot { width: 8px; height: 8px; background: var(--teal); border-radius: 50%; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.hero-title { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 20px; }
.hero-title .highlight {
  color: var(--teal);
  position: relative;
  display: inline-block;
  background: linear-gradient(120deg, var(--teal) 0%, #fff 20%, var(--teal) 40%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
}
@keyframes shine {
  to { background-position: 200% center; }
}
.hero-subtitle { font-size: 1.125rem; color: rgba(255,255,255,.7); line-height: 1.7; margin-bottom: 36px; max-width: 520px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  background: var(--teal); color: #fff; padding: 14px 32px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; border: none; cursor: pointer;
  transition: var(--transition); display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,184,166,.3); }
.btn-outline {
  background: transparent; color: #fff; padding: 14px 32px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; border: 1px solid rgba(255,255,255,.3);
  cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.hero-image { position: relative; }
.hero-image img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.hero-float-card {
  position: absolute; background: rgba(255,255,255,.1); backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: 12px; padding: 16px 20px;
  color: #fff; font-size: 13px; font-weight: 500;
  animation: float 6s ease-in-out infinite;
}
.hero-float-card.card-1 { top: 10%; right: -20px; }
.hero-float-card.card-2 { bottom: 15%; left: -30px; animation-delay: -3s; }
.hero-float-card.card-3 { bottom: 35%; right: -40px; animation-delay: -1.5s; }
.hero-float-card .card-icon { font-size: 24px; margin-bottom: 6px; }
.hero-float-card .card-number { font-size: 22px; font-weight: 700; color: var(--teal); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Shine Effect for Buttons */
.btn-shine {
  background: linear-gradient(120deg, var(--teal) 0%, #5eead4 20%, var(--teal) 40%);
  background-size: 200% auto;
  animation: shine-btn 3s linear infinite;
}
@keyframes shine-btn {
  to { background-position: 200% center; }
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--navy-light); border-top: 1px solid rgba(255,255,255,.06);
  padding: 48px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-item .stat-number { font-size: 2.5rem; font-weight: 800; color: var(--teal); }
.stat-item .stat-label { font-size: 14px; color: var(--gray-400); margin-top: 4px; }

/* --- Section Common --- */
.section-v2 { padding: 100px 0; }
.section-v2.bg-light { background: var(--gray-100); }
.section-v2.bg-dark { background: var(--navy); color: #fff; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 60px; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--teal); font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; margin-bottom: 16px;
}
.section-label .line { width: 32px; height: 2px; background: var(--teal); }
.section-title { font-size: clamp(2rem, 3.5vw, 2.75rem); font-weight: 800; color: var(--navy); line-height: 1.2; margin-bottom: 16px; }
.bg-dark .section-title { color: #fff; }
.section-subtitle { font-size: 1.05rem; color: var(--gray-500); line-height: 1.7; }
.bg-dark .section-subtitle { color: var(--gray-400); }

/* --- Services Grid --- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 36px 28px; transition: var(--transition); position: relative; overflow: hidden;
}
.service-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-md);
  border-color: var(--teal);
}
.service-card .card-icon {
  width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 24px; margin-bottom: 20px; color: #fff;
}
.service-card .card-icon.teal { background: linear-gradient(135deg, var(--teal), #0ea5e9); }
.service-card .card-icon.gold { background: linear-gradient(135deg, var(--gold), #f97316); }
.service-card .card-icon.blue { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.service-card .card-icon.green { background: linear-gradient(135deg, #22c55e, #14b8a6); }
.service-card .card-icon.purple { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.service-card .card-icon.rose { background: linear-gradient(135deg, #f43f5e, #ec4899); }
.service-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.service-card p { font-size: .9rem; color: var(--gray-500); line-height: 1.6; }

/* --- Modules V2 --- */
.modules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.module-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 28px 22px; transition: var(--transition); text-align: center; position: relative;
}
.module-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent;
  background: linear-gradient(var(--white), var(--white)) padding-box,
              linear-gradient(135deg, var(--teal), var(--gold)) border-box;
  border: 1px solid transparent;
}
.module-card .new-badge {
  position: absolute; top: 12px; right: 12px; background: var(--gold);
  color: var(--navy); font-size: 10px; font-weight: 800; padding: 3px 8px;
  border-radius: 4px; text-transform: uppercase;
}
.module-card .mod-icon { font-size: 2rem; margin-bottom: 14px; }
.module-card h4 { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.module-card p { font-size: .8rem; color: var(--gray-500); line-height: 1.5; }

/* --- New V2 Feature Showcase --- */
.feature-showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.feature-showcase.reversed { direction: rtl; }
.feature-showcase.reversed > * { direction: ltr; }
.feature-list { display: flex; flex-direction: column; gap: 20px; }
.feature-item {
  display: flex; gap: 16px; padding: 20px; border-radius: 12px;
  transition: var(--transition); border: 1px solid transparent;
}
.feature-item:hover { background: var(--gray-100); border-color: var(--gray-200); }
.feature-item .fi-icon {
  width: 44px; height: 44px; min-width: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20,184,166,.1); color: var(--teal); font-size: 18px;
}
.feature-item h4 { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.feature-item p { font-size: .85rem; color: var(--gray-500); line-height: 1.5; }
.feature-image { position: relative; }
.feature-image img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* --- Themes Section --- */
.themes-showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.theme-card {
  border-radius: var(--radius); overflow: hidden; transition: var(--transition);
  border: 2px solid var(--gray-200); position: relative;
}
.theme-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--teal); }
.theme-card .theme-preview { height: 220px; background: var(--gray-100); overflow: hidden; }
.theme-card .theme-preview img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.theme-card .theme-info { padding: 24px; text-align: center; }
.theme-card .theme-info h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.theme-card .theme-info p { font-size: .85rem; color: var(--gray-500); }
.theme-card .theme-badge {
  position: absolute; top: 14px; left: 14px; background: var(--teal); color: #fff;
  padding: 4px 12px; border-radius: 6px; font-size: 11px; font-weight: 700;
}

/* --- Pricing --- */
.pricing-toggle { display: flex; justify-content: center; gap: 0; margin-bottom: 48px;
  background: var(--gray-100); border-radius: 50px; padding: 4px; max-width: 360px; margin-left: auto; margin-right: auto;
}
.pricing-toggle button {
  padding: 10px 28px; border: none; background: transparent; border-radius: 50px;
  font-weight: 600; font-size: 14px; color: var(--gray-500); cursor: pointer;
  transition: var(--transition);
}
.pricing-toggle button.active { background: var(--teal); color: #fff; box-shadow: 0 4px 12px rgba(20,184,166,.3); }
.discount-badge {
  background: var(--gold);
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}
.card-discount-badge {
  background: var(--gold);
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 8px;
  vertical-align: middle;
  position: relative;
  top: -15px;
}
.old-price {
  display: block;
  font-size: 1.25rem;
  color: var(--gray-400);
  text-decoration: line-through;
  font-weight: 500;
  margin-bottom: -10px;
}
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.price-card {
  background: var(--white); border: 2px solid var(--gray-200); border-radius: var(--radius);
  padding: 40px 32px; text-align: center; transition: var(--transition); position: relative;
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.price-card.featured {
  border-color: var(--teal); background: linear-gradient(180deg, rgba(20,184,166,.04) 0%, var(--white) 100%);
}
.price-card.featured::before {
  content: 'Popular'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--teal); color: #fff; padding: 4px 20px; border-radius: 50px;
  font-size: 12px; font-weight: 700;
}
.price-card .plan-name { font-size: 1rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.price-card .plan-icon { font-size: 2rem; margin-bottom: 16px; }
.price-card .plan-price { font-size: 3rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.price-card .plan-price .currency { font-size: 1.5rem; vertical-align: super; }
.price-card .plan-period { font-size: .85rem; color: var(--gray-400); margin-bottom: 28px; }
.price-card .plan-features { text-align: left; margin-bottom: 32px; }
.price-card .plan-features li {
  padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: .9rem;
  color: var(--gray-700); display: flex; align-items: center; gap: 10px;
}
.price-card .plan-features li .check { color: var(--teal); font-weight: 700; }
.price-card .plan-btn {
  display: block; width: 100%; padding: 14px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; text-align: center;
  border: 2px solid var(--teal); color: var(--teal); background: transparent;
  cursor: pointer; transition: var(--transition);
}
.price-card .plan-btn:hover, .price-card.featured .plan-btn {
  background: var(--teal); color: #fff;
}
.price-card.featured .plan-btn:hover { background: var(--teal-dark); }
.pricing-note { text-align: center; margin-top: 24px; font-size: .85rem; color: var(--gray-400); }

/* Animación llamativa en precio */
@keyframes pricePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); color: var(--teal); }
  100% { transform: scale(1); }
}
.price-animate { animation: pricePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: inline-block; }

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-deep) 100%);
  padding: 80px 0; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(20,184,166,.15), transparent 70%);
  border-radius: 50%;
}
.cta-section h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; color: #fff; margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,.7); font-size: 1.1rem; margin-bottom: 36px; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* --- Footer --- */
.footer-v2 { background: var(--navy); padding: 60px 0 0; color: rgba(255,255,255,.7); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { font-size: .9rem; line-height: 1.7; margin-top: 16px; }
.footer-brand img { height: 120px; }
.footer-col h4 { color: #fff; font-size: .9rem; font-weight: 700; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col a { display: block; padding: 6px 0; font-size: .85rem; transition: var(--transition); }
.footer-col a:hover { color: var(--teal); padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding: 24px 0;
  display: flex; justify-content: space-between; align-items: center; font-size: .8rem;
}
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; background: rgba(255,255,255,.06); color: rgba(255,255,255,.6);
  transition: var(--transition); font-size: 16px;
}
.footer-social a:hover { background: var(--teal); color: #fff; }

/* --- WhatsApp Float --- */
.whatsapp-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 60px; height: 60px; background: #25d366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.4); transition: var(--transition);
  color: #fff; font-size: 28px;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(37,211,102,.5); }

/* --- Animations --- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-content, .feature-showcase, .feature-showcase.reversed { grid-template-columns: 1fr; gap: 40px; }
  .hero-image { order: -1; }
  .feature-showcase.reversed { direction: ltr; }
  .modules-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .themes-showcase { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(15,23,42,.95); backdrop-filter: blur(20px);
    flex-direction: column; padding: 24px; gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .modules-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .hero-buttons { justify-content: center; }
  .hero-title, .hero-subtitle { text-align: center; }
  .hero-badge { justify-content: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
}
