/* ======================
   Variables y Reset
   ====================== */
:root {
  --color-primary: #a855f7;
  --color-secondary: #ec4899;
  --color-accent: #06b6d4;
  --color-dark: #0f172a;
  --color-light: #f8fafc;
  --color-gray: #64748b;
  --color-white: #ffffff;

  --gradient-primary: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #06b6d4 100%);
  --gradient-dark: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);

  --font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-neon: 0 0 20px rgba(168, 85, 247, 0.3);

  --border-radius: 1.5rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-dark);
  background-color: var(--color-light);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul {
  list-style: none;
}

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

/* ======================
   Utilidades
   ====================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  text-align: center;
  color: var(--color-gray);
  font-size: 1.125rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ======================
   Botones
   ====================== */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  font-size: 1rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}

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

.btn-secondary:hover {
  background: var(--color-white);
  color: var(--color-dark);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  padding: 0.75rem 1.5rem;
  margin-top: 1rem;
}

.btn-outline:hover {
  background: var(--gradient-primary);
  color: var(--color-white);
  border-color: transparent;
}

.btn-block {
  width: 100%;
}

.btn-cta {
  background: var(--gradient-primary);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
}

.btn-cta:hover {
  box-shadow: var(--shadow-neon);
}

/* ======================
   Header
   ====================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

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

.nav-logo h2 {
  font-size: 1.5rem;
  color: var(--color-white);
  font-weight: 800;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu a {
  color: var(--color-white);
  font-weight: 500;
  position: relative;
}

.nav-menu a:not(.btn-cta)::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
}

.nav-menu a:not(.btn-cta):hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ======================
   Hero Section
   ====================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-dark);
  color: var(--color-white);
  overflow: hidden;
  padding-top: 5rem;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0.1;
  animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  animation: fade-up 0.8s ease;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2.5rem;
  animation: fade-up 0.8s ease 0.2s backwards;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fade-up 0.8s ease 0.4s backwards;
}

.hero-badges {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin-top: 4rem;
  animation: fade-up 0.8s ease 0.6s backwards;
}

.badge {
  text-align: center;
}

.badge-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-text {
  display: block;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======================
   Servicios Section
   ====================== */
.servicios {
  padding: 6rem 0;
  background: var(--color-light);
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.servicio-card {
  background: var(--color-white);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  text-align: center;
}

.servicio-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl), var(--shadow-neon);
}

.servicio-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  animation: bounce 2s ease infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.servicio-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-dark);
}

.servicio-card p {
  color: var(--color-gray);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.servicio-link {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.servicio-link:hover {
  text-decoration: underline;
}

/* ======================
   Zonas Section
   ====================== */
.zonas {
  padding: 6rem 0;
  background: var(--color-white);
}

.zonas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.zona-card {
  background: var(--gradient-primary);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  color: var(--color-white);
  transition: var(--transition);
}

.zona-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-neon);
}

.zona-card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.zona-card p {
  font-size: 1rem;
  opacity: 0.9;
}

/* ======================
   Portafolio Section
   ====================== */
.portafolio {
  padding: 6rem 0;
  background: var(--color-light);
}

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

.portafolio-item {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.portafolio-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-xl);
}

.portafolio-item img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: var(--transition);
}

.portafolio-item:hover img {
  transform: scale(1.1);
}

.portafolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--gradient-dark);
  color: var(--color-white);
  padding: 1.5rem;
  transform: translateY(100%);
  transition: var(--transition);
}

.portafolio-item:hover .portafolio-overlay {
  transform: translateY(0);
}

.portafolio-overlay h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.portafolio-overlay p {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* ======================
   Testimonios Section
   ====================== */
.testimonios {
  padding: 6rem 0;
  background: var(--color-white);
}

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

.testimonio-card {
  background: var(--color-light);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.testimonio-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
}

.testimonio-rating {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.testimonio-text {
  color: var(--color-gray);
  font-style: italic;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.testimonio-author strong {
  display: block;
  color: var(--color-dark);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.testimonio-author span {
  color: var(--color-gray);
  font-size: 0.875rem;
}

/* ======================
   Contacto Section
   ====================== */
.contacto {
  padding: 6rem 0;
  background: var(--color-light);
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.contacto-info h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--color-dark);
}

.contacto-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contacto-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contacto-item strong {
  display: block;
  color: var(--color-dark);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contacto-item p,
.contacto-item a {
  color: var(--color-gray);
}

.contacto-item a:hover {
  color: var(--color-primary);
}

/* Formulario */
.contacto-form,
.presupuesto-form {
  background: var(--color-white);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.form-group small {
  display: block;
  color: var(--color-gray);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
  cursor: pointer;
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: 400;
}

.checkbox-group a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Mapa */
.mapa-container {
  margin-top: 4rem;
}

.mapa-container h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-dark);
}

.mapa-container iframe {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

/* ======================
   Footer
   ====================== */
.footer {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 4rem 0 2rem;
}

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

.footer-col h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-col ul li a:hover {
  color: var(--color-white);
  padding-left: 0.5rem;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--color-white);
}

/* ======================
   WhatsApp Flotante
   ====================== */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 999;
  animation: pulse-whatsapp 2s ease infinite;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-dark);
  color: var(--color-white);
  padding: 0.4rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  animation: badge-appear 0.5s ease 1s forwards;
}

@keyframes pulse-whatsapp {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7), 0 0 0 15px rgba(37, 211, 102, 0.1);
  }
}

@keyframes badge-appear {
  to {
    opacity: 1;
  }
}

/* ======================
   Modal
   ====================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--color-white);
  border-radius: var(--border-radius);
  padding: 3rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modal-appear 0.3s ease;
}

@keyframes modal-appear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: var(--color-gray);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  background: var(--color-light);
  color: var(--color-dark);
}

.modal-content h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-subtitle {
  color: var(--color-gray);
  margin-bottom: 2rem;
}

/* ======================
   Lightbox
   ====================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: var(--border-radius);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  backdrop-filter: blur(10px);
}

.lightbox-close {
  top: 2rem;
  right: 2rem;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

/* ======================
   Responsive
   ====================== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.75rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .contacto-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--color-dark);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: var(--transition);
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-badges {
    gap: 2rem;
  }

  .servicios-grid,
  .zonas-grid,
  .portafolio-grid,
  .testimonios-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .modal-content {
    padding: 2rem 1.5rem;
  }

  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
    width: 55px;
    height: 55px;
  }

  .whatsapp-badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.7rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .badge-number {
    font-size: 2rem;
  }

  .servicio-card,
  .testimonio-card {
    padding: 1.5rem;
  }

  .contacto-form,
  .presupuesto-form {
    padding: 1.5rem;
  }
}
