:root {
  --bg: #020617;
  --bg2: #0f172a;
  --surface: rgba(15, 23, 42, 0.7);
  --soft: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.05);
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --accent: #22d3ee;
  --shadow: 0 20px 50px -12px rgba(0,0,0,0.8);
  --glow: 0 0 30px rgba(99, 102, 241, 0.15);
  --radius: 20px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { 
  overflow-x: hidden;
  margin: 0; 
  padding: 0;
}
body { 
  font-family: 'Inter', system-ui, -apple-system, sans-serif; 
  color: var(--text); 
  background: var(--bg); 
  line-height: 1.65;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(34, 211, 238, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
img { max-width: 100%; display: block; border-radius: 12px; }
.container { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }

/* Topbar Navigation - Fixed */
.topbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 200; 
  background: rgba(3, 7, 18, 0.7); 
  backdrop-filter: blur(16px); 
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
body { padding-top: 80px; } /* Buffer for fixed topbar */

.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; }
.brand { font-weight: 800; font-size: 2.2rem; color: #fff; letter-spacing: -0.04em; }
.brand span { color: var(--primary); }
.menu { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.menu a { color: var(--muted); font-weight: 500; font-size: 0.96rem; }
.menu a:hover { color: #fff; }
.menu a.btn { 
  color: #fff; 
  font-weight: 600; 
  padding: 10px 20px;
  font-size: 0.9rem;
}
.menu a.btn:hover { color: #fff; transform: translateY(-2px); }

/* Reveal on Scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax Decorative Blobs */
.parallax-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.2;
  pointer-events: none;
  transform: translateY(calc(var(--scroll-y, 0) * var(--speed, 0.1) * 1px));
}

/* Base Styles */
.btn, .btn-outline { 
  display: inline-flex; align-items: center; justify-content: center; 
  padding: 14px 26px; border-radius: 14px; font-weight: 600; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
  cursor: pointer;
}
.btn { 
  background: var(--primary); color: #fff; 
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn:hover { 
  background: var(--primary-dark); 
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5);
}
.btn-outline { 
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line); color: #fff; 
  backdrop-filter: blur(8px);
}
.btn-outline:hover { 
  background: rgba(255, 255, 255, 0.08); 
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* Typography */
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 16px; color: #fff; }
h1 { font-size: clamp(2.5rem, 5vw, 4.2rem); font-weight: 800; background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 780px; margin-bottom: 32px; }
.kicker { display: inline-block; color: var(--primary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin-bottom: 16px; }
.muted { color: var(--muted); }

/* Layouts & Sections */
.hero { padding: 120px 0 100px; position: relative; overflow: hidden; }
.hero::before { 
  content: ''; position: absolute; top: -10%; left: 50%; transform: translateX(-50%); 
  width: 140%; height: 120%; 
  background: radial-gradient(circle at 50% 30%, rgba(99, 102, 241, 0.15), transparent 60%),
              radial-gradient(circle at 80% 60%, rgba(34, 211, 238, 0.1), transparent 50%); 
  z-index: -1; 
  transform: translateY(calc(var(--scroll-y, 0) * 0.15 * 1px));
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.badge { display: inline-flex; padding: 8px 16px; border-radius: 999px; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); color: var(--primary); font-size: 0.85rem; font-weight: 600; margin-bottom: 24px; letter-spacing: 0.02em; }

.section { padding: 90px 0; }
.section-soft { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.article-list { display: grid; gap: 32px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* Cards & Components - Premium Glass */
.card, .article-card, .hero-card, .contact-box { 
  background: var(--surface); 
  border: 1px solid var(--line); 
  border-radius: var(--radius); 
  padding: 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}
.hero-card { background: linear-gradient(145deg, rgba(17,24,39,0.8), rgba(3,7,18,0.9)); position: relative; overflow: hidden; }
.hero-card::after { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: linear-gradient(to bottom right, rgba(255,255,255,0.03), transparent); transform: rotate(30deg); pointer-events: none; }
.article-card:hover { 
  transform: translateY(-5px); 
  border-color: rgba(255,255,255,0.15); 
  box-shadow: var(--glow), var(--shadow); 
}

ul.clean { padding-left: 20px; margin: 16px 0 0; }
ul.clean li { margin: 10px 0; color: var(--text); position: relative; }
ul.clean li::marker { color: var(--primary); }

.cta-band { 
  background: linear-gradient(135deg, rgba(17,24,39,1), rgba(16,185,129,0.05)); 
  border-radius: 30px; padding: 56px; 
  border: 1px solid var(--line); 
  box-shadow: var(--glow); 
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Forms */
.form { display: grid; gap: 20px; }
.form input, .form textarea, .form select { 
  width: 100%; padding: 16px 20px; 
  background: rgba(3, 7, 18, 0.5); 
  border: 1px solid var(--line); 
  border-radius: 12px; font: inherit; color: #fff;
  transition: all 0.2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }
.form textarea { min-height: 150px; resize: vertical; }

.callout { padding: 20px 24px; border-radius: 16px; background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); color: #bfdbfe; }

/* Footer */
footer { 
  background: #020617; color: var(--muted); 
  padding: 80px 0 60px; margin-top: 80px; 
  border-top: 1px solid var(--line);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer-col h4 { color: #fff; margin-bottom: 24px; font-size: 1rem; font-weight: 700; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
footer a { color: var(--muted); }
footer a:hover { color: #fff; }
.small { font-size: 0.85rem; line-height: 1.5; display: block; margin-top: 8px;}
.footer-disclaimer { margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.05); font-size: 0.8rem; color: #6b7280; max-width: 800px; }

/* Global Additions for IAX.ar */
.menu a { position: relative; }
.menu a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--primary); transition: width 0.3s; }
.menu a:hover::after { width: 100%; }
.menu a.btn::after { display: none; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 60;
}
.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: #fff;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-toggle.active span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

.resource-icon {
  width: 48px;
  height: 48px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
}

.resource-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  background: var(--soft);
  color: var(--primary);
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 12px;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
  color: #fff;
}
.whatsapp-icon {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 110px;
  right: 40px;
  width: 54px;
  height: 54px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.back-to-top:hover { 
  transform: translateY(-5px); 
  background: var(--primary-dark);
  box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}
.back-to-top svg { width: 24px; height: 24px; stroke: #fff; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr !important; gap: 40px; text-align: center; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 40px; }
  .menu-toggle { display: flex !important; }
  .menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #020617;
    flex-direction: column;
    padding: 100px 40px 40px;
    gap: 32px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    border-left: 1px solid var(--line);
    align-items: flex-start;
    z-index: 250;
    display: flex !important;
  }
  .menu.active { transform: translateX(0) !important; }
}

@media (max-width: 768px) {
  .whatsapp-float {
    width: 60px !important;
    height: 60px !important;
    bottom: 20px !important;
    right: 20px !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 9999999 !important;
    pointer-events: auto !important;
    transform: none !important;
  }
  .back-to-top { bottom: 85px; right: 20px; width: 48px; height: 48px; }
}



