/* ============================================
   DIGITALIZA TU NEGOCIO - CUSTOM STYLES
   ============================================ */

/* Variables CSS */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #1f2937;
  --whatsapp-color: #25d366;
  --transition-fast: 0.2s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-color);
  color: #212529;
  line-height: 1.6;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* Selection Color */
::selection {
  background-color: var(--primary-color);
  color: white;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
  padding: 1rem 0;
  z-index: 1000;
}

.navbar.bg-transparent {
  background-color: transparent !important;
}

.navbar.scrolled {
  background-color: var(--dark-color) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
  transition: transform var(--transition-normal) ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-brand img {
  transition: transform var(--transition-normal) ease;
}

.navbar-brand:hover img {
  transform: rotate(360deg);
}

.btn-outline-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Offcanvas Menu */
.offcanvas {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.offcanvas .nav-link {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all var(--transition-normal) ease;
  position: relative;
  overflow: hidden;
}

.offcanvas .nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-normal) ease;
}

.offcanvas .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  padding-left: 1.5rem;
}

.offcanvas .nav-link:hover::before {
  width: 100%;
}

/* ============================================
   HERO CAROUSEL - MANTENIDO EXACTAMENTE
   ============================================ */
#hero-carousel {
  height: 60vh;
  position: relative;
  overflow: hidden;
}

.carousel-inner,
.carousel-item {
  height: 100%;
}

.carousel-item {
  position: relative;
}

.carousel-item .background-blur {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px) brightness(1.0);
  z-index: 1;
}

.carousel-item .carousel-foreground {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-item .carousel-foreground img {
  height: 100%;
  width: auto;
  object-fit: contain;
  -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary-color);
  opacity: 0.5;
  transition: all var(--transition-normal) ease;
}

.carousel-indicators .active {
  opacity: 1;
  transform: scale(1.2);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  transition: transform var(--transition-normal) ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon {
  transform: translateX(-5px);
}

.carousel-control-next:hover .carousel-control-next-icon {
  transform: translateX(5px);
}

@media (max-width: 768px) {
  #hero-carousel,
  #hero-carousel .carousel-item {
    height: 65vh;
  }

  .carousel-item .carousel-foreground img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
    margin: 0 auto;
    display: block;
  }
}

/* ============================================
   SECTIONS
   ============================================ */
.services {
  background: linear-gradient(135deg, #f4f7fa 0%, #e8f0fe 100%);
  padding: 80px 20px;
}

section h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

section h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--success-color));
  border-radius: 2px;
}

/* ============================================
   PACKAGE CARDS
   ============================================ */
.package-card {
  transition: all var(--transition-normal) ease;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.package-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.package-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 15px 40px rgba(13, 110, 253, 0.2) !important;
}

.package-card:hover::before {
  left: 100%;
}

.package-popular {
  border: 2px solid var(--success-color) !important;
}

.package-popular:hover {
  border-color: var(--success-color) !important;
  box-shadow: 0 15px 40px rgba(25, 135, 84, 0.3) !important;
}

.badge-popular {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--success-color);
  color: white;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(25, 135, 84, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.05);
  }
}

.package-icon i {
  font-size: 3rem;
  transition: all var(--transition-normal) ease;
}

.package-card:hover .package-icon i {
  transform: scale(1.2) rotate(10deg);
}

.feature-list li {
  padding: 8px 0;
  transition: all var(--transition-fast) ease;
}

.feature-list li:hover {
  padding-left: 10px;
  color: var(--primary-color);
}

.feature-list i {
  margin-right: 10px;
  font-size: 1.1rem;
}

.price {
  background: linear-gradient(135deg, var(--primary-color), var(--success-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  transition: all var(--transition-normal) ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #0b5ed7);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #157347);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color), #ffb300);
  color: #000;
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
  transition: all var(--transition-normal) ease;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-8px) rotate(2deg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
}

.service-card i {
  transition: all var(--transition-normal) ease;
}

.service-card:hover i {
  transform: scale(1.2) rotate(360deg);
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonial {
  background: linear-gradient(135deg, #f0f2f5 0%, #e8ecef 100%);
}

.testimonial-card {
  transition: transform var(--transition-normal) ease;
}

.testimonial-card:hover {
  transform: scale(1.05);
}

.testimonial-img {
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(13, 110, 253, 0.4);
  transition: all var(--transition-normal) ease;
}

.testimonial-card:hover .testimonial-img {
  border-color: var(--success-color);
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(25, 135, 84, 0.5);
}

blockquote {
  position: relative;
  font-style: italic;
}

blockquote::before {
  content: '"';
  font-size: 4rem;
  position: absolute;
  top: -20px;
  left: -10px;
  color: var(--primary-color);
  opacity: 0.2;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: linear-gradient(135deg, var(--dark-color) 0%, #111827 100%);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

footer a {
  transition: all var(--transition-fast) ease;
  position: relative;
}

footer a.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-normal) ease;
}

footer a.hover-underline:hover::after {
  width: 100%;
}

footer a:hover {
  color: var(--primary-color) !important;
  transform: translateX(5px);
}

footer i {
  transition: transform var(--transition-fast) ease;
}

footer a:hover i {
  transform: scale(1.2);
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */
.whatsapp-float-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.whatsapp-float {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--whatsapp-color), #20ba5a);
  color: white;
  font-size: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  animation: float 3s ease-in-out infinite, pulse-ring 2s infinite;
  transition: all var(--transition-normal) ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.15) rotate(15deg);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
  color: white;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-tooltip {
  background: #333;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-top: 10px;
  opacity: 0;
  transition: opacity var(--transition-normal) ease;
  white-space: nowrap;
  pointer-events: none;
}

.whatsapp-float-container:hover .whatsapp-tooltip {
  opacity: 1;
}

/* Mobile: Draggable WhatsApp Button */
@media (max-width: 768px) {
  .whatsapp-float-container {
    cursor: move;
    touch-action: none;
  }
}

/* ============================================
   SHADOW UTILITIES
   ============================================ */
.shadow-hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  transition: box-shadow var(--transition-normal) ease;
}

.shadow-hover:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.shadow-hover-lg {
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  transition: box-shadow var(--transition-normal) ease;
}

.shadow-hover-lg:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
[data-aos] {
  pointer-events: auto;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
  .services {
    padding: 60px 15px;
  }

  .package-card {
    margin-bottom: 20px;
  }

  section h2 {
    font-size: 1.75rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}

@media (max-width: 576px) {
  .package-icon i {
    font-size: 2.5rem;
  }

  .service-card i {
    font-size: 2.5rem;
  }

  section h2 {
    font-size: 1.5rem;
  }
}

/* ============================================
   LOADING ANIMATION
   ============================================ */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--light-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-to-content:focus {
  top: 0;
}

/* Focus Visible */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .navbar,
  .whatsapp-float-container,
  footer {
    display: none;
  }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--light-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0b5ed7;
}