:root {
  --primary: #5c2dd5;
  --primary-dark: #4622a5;
  --accent: #ffcc00;
  --accent-hover: #e5b800;
  --bg-color: #f8f9fa;
  --text-dark: #1f1f1f;
  --text-light: #ffffff;
  --text-gray: #6c757d;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

/* Header */
header {
  background-color: var(--primary);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.logo img {
  height: 75px;
  object-fit: contain;
}

.footer-logo {
  height: 70px;
  display: block;
  margin: 0 auto 20px auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent);
}

.btn {
  background-color: var(--accent);
  color: var(--primary);
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  display: inline-block;
  border: 2px solid transparent;
}

.btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 204, 0, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: var(--primary);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--text-light);
  padding: 100px 0 150px;
  position: relative;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 40px;
  opacity: 0.9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wave-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-bottom svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 80px;
}

.wave-bottom .shape-fill {
  fill: var(--bg-color);
}

/* Services Section */
.services {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-gray);
  max-width: 700px;
  margin: 0 auto 60px;
  font-size: 1.1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background: white;
  padding: 40px 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--primary);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(92, 45, 213, 0.15);
}

.service-icon {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary);
}

.service-card p {
  color: var(--text-gray);
  line-height: 1.6;
}

/* Call to Action */
.cta {
  background-color: var(--primary);
  color: white;
  padding: 80px 0;
  text-align: center;
  position: relative;
}

.cta h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.cta p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* Footer */
footer {
  background-color: #1a1a1a;
  color: white;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--accent);
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-col p, .footer-col ul {
  color: #a0a0a0;
  line-height: 1.6;
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #a0a0a0;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333;
  color: #777;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 32px;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.2);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 2px 6px 16px rgba(0,0,0,0.3);
  color: #fff;
}
@media (max-width: 768px) {
  .whatsapp-float {
    width: 55px;
    height: 55px;
    bottom: 20px;
    right: 20px;
    font-size: 28px;
  }
}

/* Contact Form */
.contact-form {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  text-align: left;
}
.form-group {
  margin-bottom: 20px;
}
.form-row {
  display: flex;
  gap: 20px;
}
.form-group.half {
  flex: 1;
}
.form-group label {
  display: block;
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* History Cubes (Nosotros) */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}
.history-cube {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 5px solid var(--primary);
  position: relative;
  overflow: hidden;
}
.history-cube:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.history-cube.active {
  border-bottom: 5px solid var(--accent);
}
.cube-front i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}
.cube-front h3 {
  color: var(--primary);
  font-size: 1.3rem;
  margin-bottom: 15px;
}
.cube-front p {
  color: var(--text-gray);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0;
}
.cube-content {
  display: none;
}
.read-more {
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s;
}
.read-more i {
  margin-left: 8px;
}

/* History Modal */
.history-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}
.history-modal.active {
  display: flex;
}
.history-modal-content {
  background-color: #fff;
  padding: 40px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  position: relative;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  animation: modalFadeIn 0.3s ease-out;
}
.history-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #999;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}
.history-modal-close:hover {
  color: var(--primary);
}
.history-modal-body h3 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.8rem;
}
.history-modal-body p {
  color: var(--text-dark);
  line-height: 1.7;
  font-size: 1.05rem;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Clients Section */
.clients {
  padding: 80px 0;
  background-color: white;
  text-align: center;
}
.clients h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 40px;
}
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 30px;
  align-items: center;
  justify-items: center;
}
.client-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 150px;
  height: 100px;
  padding: 15px;
  border-radius: 8px;
  background-color: var(--bg-color);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: var(--text-gray);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}
.client-logo:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  background-color: white;
}
.client-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  nav ul {
    display: none; /* simple mobile fallback */
  }
}
