/* ============================================
   ULTRAVIOLETA - ESTILOS PRINCIPALES
   ============================================ */

:root {
  --color-primary: #734A82;
  --color-secondary: #9B6BA8;
  --color-accent: #C199CD;
  --color-light: #F5EBFA;
  --color-dark: #3D2742;
  --color-white: #FFFFFF;
  --color-text: #333333;
  --color-text-light: #666666;
  --shadow: 0 4px 6px rgba(115, 74, 130, 0.1);
  --shadow-lg: 0 10px 30px rgba(115, 74, 130, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--color-text);
  font-size: 1.3rem;
  line-height: 1.8;
  overflow-x: hidden;
  background: var(--color-white);
}

p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.container li,
.section li {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* ============================================
   CANVAS DE PARTÍCULAS
   ============================================ */
#canvas {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 100;
}

/* ============================================
   NAVEGACIÓN
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
  display: block;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active::after {
  width: 100%;
}

/* Submenú */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: var(--shadow-lg);
  border-radius: 8px;
  padding: 1rem 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  list-style: none;
}

.nav-item:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li {
  padding: 0;
}

.submenu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.3s ease;
}

.submenu a:hover {
  background: var(--color-light);
  color: var(--color-primary);
  padding-left: 2rem;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--color-primary);
  transition: all 0.3s ease;
  border-radius: 3px;
}

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

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

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 2rem;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, var(--color-light) 0%, white 100%);
}

.hero-with-bg {
  background-image: url('images/portada.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(115, 74, 130, 0.85) 0%,
    rgba(155, 107, 168, 0.75) 50%,
    rgba(193, 153, 205, 0.7) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  max-width: 300px;
  width: 80%;
  height: auto;
  margin-bottom: 2rem;
  animation: fadeInDown 1s ease;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4)) brightness(1.1);
}

.hero-title {
  font-size: 3rem;
  color: white;
  margin-bottom: 2rem;
  font-weight: 600;
  animation: fadeInUp 1s ease 0.3s both;
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.8rem;
  color: white;
  margin-bottom: 2rem;
  font-weight: 300;
  animation: fadeInUp 1s ease 0.6s both;
  text-shadow: 2px 3px 6px rgba(0, 0, 0, 0.4);
}

.hero-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: white;
  color: var(--color-primary);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  animation: fadeInUp 1s ease 0.9s both;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.hero-cta:hover {
  background: var(--color-accent);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* ============================================
   BANNER DE PÁGINA
   ============================================ */
.page-banner {
  height: 300px;
  background-image: linear-gradient(135deg, rgba(115, 74, 130, 0.75), rgba(155, 107, 168, 0.6)), url('images/base-banner.jpeg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 70px;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.45) 100%);
  z-index: 0;
}

.page-banner h1 {
  font-size: 3rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section {
  margin-bottom: 4rem;
}

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

.section-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-light);
  text-align: center;
  margin-bottom: 3rem;
}

/* ============================================
   TARJETAS DE SERVICIOS
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.75rem;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.service-icon {
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;  /* Altura mínima para mantener consistencia */
}

.service-icon img {
  width: 120px;  /* Tamaño del icono */
  height: 120px;  /* Tamaño del icono */
  object-fit: contain;  /* Mantiene las proporciones de la imagen */
  filter: drop-shadow(0 2px 4px rgba(115, 74, 130, 0.2));  /* Sombra suave */
  transition: transform 0.3s ease;  /* Animación suave */
}

/* Icono dominante para ocupar la mayor parte de la tarjeta */
.service-card .service-icon.service-icon--dominant {
  width: 100%;
  display: block;
  min-height: 0;
}

.service-card .service-icon.service-icon--dominant img {
  width: 100%;
  height: auto;
  max-height: none; /* Permite ocupar todo el ancho disponible */
  display: block;
}

.service-icon img:hover {
  transform: scale(1.1);  /* Efecto al pasar el mouse */
}

.service-card h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  text-align: center;
}

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

.service-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.service-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.service-link:hover {
  color: var(--color-secondary);
  transform: translateX(5px);
}

/* (sin estilos de centrado específico de tarjeta) */

/* ============================================
   PASOS "¿CÓMO FUNCIONA?"
   ============================================ */
.how-step-icon {
  width: 90px;
  height: 90px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 6px rgba(115, 74, 130, 0.1);
  padding: 10px;
}

.how-step-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ============================================
   FORMULARIO DE CONTACTO
   ============================================ */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--color-light);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-submit:hover {
  background: var(--color-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary) 100%);
  color: white;
  padding: 3rem 2rem 1rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.fade-in {
  animation: fadeInUp 0.6s ease;
}

/* ============================================
   EFECTO DE PÉTALOS
   ============================================ */
.petal {
  position: fixed;
  top: -10vh;
  width: 18px;
  height: 18px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(135deg, #f7c6d9 0%, #d0b3f5 100%);
  opacity: 0.9;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(115, 74, 130, 0.15));
  animation: petal-fall var(--petal-duration, 4s) linear forwards;
  transform: rotate(var(--petal-rotate, 15deg));
  z-index: 999;
}

@keyframes petal-fall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(var(--petal-rotate, 15deg));
  }
  100% {
    transform: translateY(110vh) translateX(var(--petal-drift, 25px)) rotate(calc(var(--petal-rotate, 15deg) + 180deg));
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: white;
    flex-direction: column;
    padding: 2rem;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
    align-items: flex-start;
    gap: 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--color-light);
    padding: 1rem 0;
  }

  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0.5rem 0 0 1rem;
    display: none;
  }

  .nav-item:hover .submenu,
  .nav-item.active .submenu {
    display: block;
  }

  .hero-with-bg {
    background-attachment: scroll;
  }

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

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

  .page-banner h1 {
    font-size: 2rem;
    padding: 0 1rem;
  }

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

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

@media (max-width: 480px) {
  .nav-container {
    padding: 1rem;
  }

  .hero {
    padding: 5rem 1rem 2rem;
  }

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

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

  .container {
    padding: 2rem 1rem;
  }

  .contact-form {
    padding: 2rem 1.5rem;
  }
}

/* ============================================
   UTILIDADES
   ============================================ */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--color-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

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

/* ============================================
   LAYOUT SOBRE MÍ - DOS COLUMNAS
   ============================================ */
.about-content {
  display: flex;
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.about-content.align-start {
  align-items: flex-start;
}

.about-text {
  flex: 1;
  min-width: 0;
}

.about-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
    gap: 2rem;
  }
  
  .about-image {
    width: 100%;
  }
  
  .about-image img {
    max-width: 100%;
    max-height: 400px;
  }
}
