:root {
  /* Logo Palette */
  --logo-green: #34a853;
  /* Primary */
  --google-blue: #1a73e8;
  /* Secondary/Support */
  --google-red: #ea4335;
  --google-yellow: #fbbc04;

  --primary-color: var(--logo-green);

  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-navbar: rgba(255, 255, 255, 0.9);

  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-light: #ffffff;

  --border-color: #f1f3f4;
  --card-bg: #ffffff;

  --border-radius-card: 24px;
  --border-radius-pill: 50px;

  --shadow-subtle: 0 1px 2px 0 rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
  --shadow-hover: 0 4px 6px 0 rgba(60, 64, 67, .3), 0 4px 12px 2px rgba(60, 64, 67, .15);

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --bg-navbar: rgba(18, 18, 18, 0.9);

  --text-primary: #e8eaed;
  --text-secondary: #9aa0a6;

  --border-color: #3c4043;
  --card-bg: #202124;

  --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 4px 20px 0 rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Google Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4 {
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: var(--transition-smooth);
  background: none;
}

/* Base Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-navbar);
  backdrop-filter: blur(12px);
  z-index: 1000;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 80px;
  /* Slightly adjusted for better fit with socials */
  width: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-subtle);
}

.logo-socials {
  display: flex;
  gap: 8px;
  border-left: 1px solid var(--border-color);
  padding-left: 12px;
}

.logo-socials a {
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.logo-socials a:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.lang-selector {
  position: relative;
  display: inline-block;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  display: none;
  min-width: 140px;
  margin-top: 8px;
  padding: 8px 0;
  z-index: 1001;
}

.lang-dropdown.active {
  display: block;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  width: 100%;
  text-align: left;
  font-size: 14px;
}

.lang-item:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

.flag-img {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 15px;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-btn {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 24px;
  border-radius: var(--border-radius-pill);
  font-weight: 500;
  font-size: 14px;
}

.nav-btn:hover {
  box-shadow: 0 4px 10px rgba(52, 168, 83, 0.3);
  filter: brightness(1.1);
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.theme-toggle:hover {
  color: var(--primary-color);
  background: var(--border-color);
}

/* Hero */
.hero {
  padding: 220px 0 120px;
  text-align: center;
  background: radial-gradient(circle at 10% 10%, rgba(52, 168, 83, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(26, 115, 232, 0.05) 0%, transparent 40%);
}

.hero h1 {
  font-size: 68px;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero p {
  font-size: 22px;
  max-width: 700px;
  margin: 0 auto 40px;
}

/* Sections */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 42px;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

/* Card */
.card {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--border-radius-card);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.card-icon svg {
  width: 32px;
  height: 32px;
}

.card h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

.card p {
  flex-grow: 1;
}

.card ul {
  list-style: none;
  margin-top: 16px;
}

.card li {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card li::before {
  content: "•";
  color: var(--primary-color);
  font-weight: bold;
}

/* Pricing Section */
.pricing {
  background-color: var(--bg-secondary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Force 4 columns on desktop */
  gap: 24px;
  margin-bottom: 80px;
}

.price-card {
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (max-width: 1200px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.price-card.featured {
  border: 2px solid var(--primary-color);
  transform: scale(1.02);
  z-index: 1;
}

.tag {
  background: var(--primary-color);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
}

.price {
  font-size: 38px;
  font-weight: 700;
  margin: 20px 0;
  white-space: nowrap;
  /* Keep 'A medida' on one line */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* n8n Stripe Section */
.n8n-stripe {
  background-color: var(--logo-green);
  color: white;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.n8n-stripe::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml;utf8,<svg width="400" height="400" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="rgba(0,0,0,0.15)" stroke-width="2"><rect x="50" y="50" width="80" height="50" rx="10"/><rect x="250" y="50" width="80" height="50" rx="10"/><rect x="150" y="200" width="80" height="50" rx="10"/><path d="M130 75h120M290 100v100h-60M90 100v100h60"/></g></svg>');
  opacity: 0.6;
  z-index: 1;
}

.n8n-stripe-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.n8n-stripe h2 {
  color: white;
  font-size: 42px;
  margin-bottom: 24px;
}

/* Sectors Section */
.sectors-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.sector-tag {
  padding: 12px 24px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-pill);
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.sector-tag:hover {
  background: var(--primary-color);
  color: white;
}

/* Contact Info */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: 16px;
}

/* Footer */
footer {
  background: var(--bg-secondary);
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-color);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
}

/* WhatsApp Floating */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 999;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 48px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}