@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap");
@import url("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css");

:root {
  --primary-color: #4a90e2;
  --background-start: #e9f0f8;
  --background-end: #ffffff;
  --card-background: #ffffff;
  --text-color: #555;
  --heading-color: #333;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --border-color: #eaeaea;
  --whatsapp-color: #25d366;
  /* Acentos sutiles para el fondo */
  --background-accent-1: rgba(74, 144, 226, 0.06);
  --background-accent-2: rgba(74, 144, 226, 0.035);
}

body {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0 40px;
  /* Fondo minimalista con leves acentos azules */
  background:
    radial-gradient(1200px 600px at -10% -10%, var(--background-accent-1), transparent 60%),
    radial-gradient(900px 450px at 110% 10%, var(--background-accent-2), transparent 60%),
    linear-gradient(135deg, var(--background-start), var(--background-end));
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 960px;
  margin: 0 auto;
}

/* --- Floating Bubble Navigation --- */
.floating-nav {
  position: fixed;
  top: 50%;
  left: 30px;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-bubble {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-bubble svg {
  width: 20px;
  height: 20px;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.nav-bubble .nav-text {
  position: absolute;
  left: 60px;
  visibility: hidden;
  opacity: 0;
  color: var(--primary-color);
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
  font-size: 0.9em;
}

.nav-bubble:hover {
  width: 140px;
  border-radius: 16px;
  justify-content: flex-start;
  padding-left: 15px;
  background-color: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.12);
}

.nav-bubble:hover .nav-text {
  visibility: visible;
  opacity: 1;
  left: 50px;
}

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

.nav-bubble.active {
  background-color: var(--primary-color);
  box-shadow: 0 4px 25px rgba(74, 144, 226, 0.3);
  transform: scale(1.05);
}

.nav-bubble.active svg {
  color: white;
}

.nav-bubble.active .nav-text {
  color: white;
}

/* --- Main Content --- */
.main-content {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* --- Hero Section --- */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* padding: 40px 0; */
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-text {
  text-align: left;
}

.hero-text h1 {
  font-size: 3.5em;
  margin: 0 0 25px;
  font-weight: 700;
  color: var(--heading-color);
  line-height: 1.2;
}

.hero-text p {
  font-size: 1.3em;
  margin-bottom: 40px;
  font-weight: 300;
  color: var(--text-color);
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

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

.stat-number {
  display: block;
  font-size: 2.2em;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9em;
  color: var(--text-color);
  font-weight: 400;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  animation: float 6s ease-in-out infinite;
}

.hero-image img {
  width: 400px;
  height: 400px;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(74, 144, 226, 0.2));
  transition: all 0.3s ease;
}

.hero-image:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 15px 40px rgba(74, 144, 226, 0.3));
}

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

.cta-button {
  background-color: var(--primary-color);
  color: white;
  padding: 15px 35px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.cta-button:hover {
  background-color: #3a7ac8;
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

/* --- Projects & Contact Sections --- */
.content-section {
  padding: 50px 0;
}

h2.section-title {
  text-align: center;
  font-size: 2.8em;
  margin-bottom: 20px;
  color: var(--heading-color);
}

.section-subtitle {
  text-align: center;
  font-size: 1.2em;
  color: var(--text-color);
  margin-bottom: 30px;
  font-weight: 300;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 25px;
}

.proyecto-card {
  background-color: var(--card-background);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.proyecto-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.proyecto-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px 15px;
  background: linear-gradient(
    135deg,
    rgba(74, 144, 226, 0.05),
    rgba(74, 144, 226, 0.02)
  );
}

.proyecto-category {
  background: linear-gradient(135deg, var(--primary-color), #3a7ac8);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.proyecto-status {
  background-color: #10b981;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
  position: relative;
}

.proyecto-status::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translateY(-50%) scale(1.2);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

.proyecto-slider {
  width: 100%;
  height: 220px;
  position: relative;
}

.proyecto-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.proyecto-slider:hover .swiper-slide img {
  transform: scale(1.05);
}

.proyecto-slider .swiper-pagination {
  bottom: 15px;
}

.proyecto-slider .swiper-pagination-bullet {
  background-color: rgba(255, 255, 255, 0.5);
  opacity: 1;
  width: 8px;
  height: 8px;
  transition: all 0.3s ease;
}

.proyecto-slider .swiper-pagination-bullet-active {
  background-color: var(--primary-color);
  width: 20px;
  border-radius: 10px;
}

.proyecto-slider .swiper-button-next,
.proyecto-slider .swiper-button-prev {
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.9);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  margin-top: -17.5px;
  transition: all 0.3s ease;
}

.proyecto-slider .swiper-button-next:hover,
.proyecto-slider .swiper-button-prev:hover {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.proyecto-slider .swiper-button-next::after,
.proyecto-slider .swiper-button-prev::after {
  font-size: 14px;
  font-weight: bold;
}

.proyecto-content {
  padding: 25px;
}

.proyecto-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.proyecto-title h3 {
  margin: 0;
  font-size: 1.4em;
  color: var(--heading-color);
  font-weight: 600;
}

.proyecto-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(
    135deg,
    rgba(74, 144, 226, 0.1),
    rgba(74, 144, 226, 0.05)
  );
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.proyecto-card:hover .proyecto-icon {
  background: linear-gradient(135deg, var(--primary-color), #3a7ac8);
  transform: scale(1.1);
}

.proyecto-card:hover .proyecto-icon svg {
  stroke: white !important;
}

.proyecto-card:hover .proyecto-icon svg * {
  stroke: white !important;
}

.proyecto-description {
  font-size: 0.95em;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 20px;
  font-weight: 300;
}

.proyecto-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.feature-tag {
  background-color: rgba(74, 144, 226, 0.1);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
  border: 1px solid rgba(74, 144, 226, 0.2);
  transition: all 0.3s ease;
}

.feature-tag:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.proyecto-benefits {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.benefits-label {
  font-size: 0.8em;
  color: #999;
  font-weight: 400;
  min-width: fit-content;
  margin-top: 2px;
}

.benefits-stats {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background-color: rgba(74, 144, 226, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(74, 144, 226, 0.08);
  transition: all 0.3s ease;
}

.benefit-item:hover {
  background-color: rgba(74, 144, 226, 0.08);
  border-color: rgba(74, 144, 226, 0.15);
}

.benefit-percentage {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--primary-color);
  min-width: 35px;
}

.benefit-text {
  font-size: 0.75em;
  color: var(--text-color);
  font-weight: 400;
  line-height: 1.2;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2.5em;
  }

  .hero-stats {
    justify-content: center;
    gap: 20px;
  }

  .stat-number {
    font-size: 1.8em;
  }

  .hero-image img {
    width: 300px;
    height: 300px;
  }

  .proyectos-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .proyecto-card {
    margin: 0 10px;
  }

  .proyecto-header {
    padding: 15px 20px 10px;
  }

  .proyecto-content {
    padding: 20px;
  }

  .proyecto-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .proyecto-benefits {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .benefits-stats {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .benefit-item {
    flex: 1;
    justify-content: center;
    min-width: 0;
  }

  .floating-nav {
    left: 15px;
  }

  .nav-bubble {
    width: 45px;
    height: 45px;
  }

  .whatsapp-button {
    display: flex; /* asegurar visibilidad */
    width: 55px;
    height: 55px;
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-button svg {
    width: 24px;
    height: 24px;
  }

  .whatsapp-tooltip {
    display: none;
  }
}

/* Ajustes para safe areas (iPhone notch, etc.) */
@supports (bottom: env(safe-area-inset-bottom)) {
  .whatsapp-button {
    bottom: calc(30px + env(safe-area-inset-bottom));
    right: calc(30px + env(safe-area-inset-right));
  }
}

/* --- Contact Section --- */
.contact-container {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

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

.contact-image {
  margin-bottom: 30px;
}

.image-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  background: linear-gradient(
    135deg,
    rgba(74, 144, 226, 0.1),
    rgba(74, 144, 226, 0.05)
  );
  border-radius: 50%;
  border: 2px solid rgba(74, 144, 226, 0.2);
  transition: all 0.3s ease;
}

.image-placeholder:hover {
  transform: scale(1.05);
  background: linear-gradient(
    135deg,
    rgba(74, 144, 226, 0.15),
    rgba(74, 144, 226, 0.08)
  );
}

.contact-message h3 {
  font-size: 1.8em;
  color: var(--heading-color);
  margin: 0 0 15px;
  font-weight: 600;
}

.contact-message p {
  font-size: 1.1em;
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  font-weight: 300;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-method {
  display: flex;
  align-items: center;
  padding: 25px;
  background-color: var(--card-background);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.contact-method:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.method-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), #3a7ac8);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  flex-shrink: 0;
}

.method-icon img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.method-content h4 {
  margin: 0 0 5px;
  font-size: 1.1em;
  color: var(--heading-color);
  font-weight: 600;
}

.method-content a {
  display: block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 1em;
  margin-bottom: 5px;
  transition: color 0.3s ease;
}

.method-content a:hover {
  color: #3a7ac8;
}

.method-content span {
  font-size: 0.9em;
  color: #888;
  font-weight: 300;
}

/* Responsive Design for Contact */
@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .contact-method {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .method-icon {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .contact-message h3 {
    font-size: 1.5em;
  }

  .contact-message p {
    font-size: 1em;
  }
}

/* --- WhatsApp Button --- */
.whatsapp-button {
  position: fixed !important;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25d366, #20ba5a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 9999; /* asegurar tope de pila en móvil */
  text-decoration: none;
  overflow: hidden;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateZ(0);
}

.whatsapp-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

.whatsapp-button svg {
  width: 28px;
  height: 28px;
  color: white;
  transition: transform 0.3s ease;
}

.whatsapp-button:hover svg {
  transform: scale(1.1);
}

.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85em;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.whatsapp-tooltip::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(0, 0, 0, 0.8);
}

.whatsapp-button:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  right: 75px;
}

/* Pulse animation for WhatsApp button */
@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6),
      0 0 0 10px rgba(37, 211, 102, 0.1);
  }
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
  }
}

.whatsapp-button {
  animation: whatsapp-pulse 3s infinite;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 40px 20px;
  background-color: transparent;
}
