/* Custom CSS for Zafra Seguros */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #7cb342;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #689f38;
}

/* Animation delays */
.animation-delay-1000 {
  animation-delay: 1s;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

/* Glassmorphism effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Custom gradient text */
.gradient-text {
  background: linear-gradient(135deg, #7cb342 0%, #8bc34a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Floating animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* Pulse animation for elements */
@keyframes pulse-custom {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse-custom {
  animation: pulse-custom 2s ease-in-out infinite;
}

/* Navigation transitions */
.nav-link {
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  background-color: #7cb342;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

/* Card hover effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button animations */
.btn-animate {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-animate::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-animate:hover::before {
  left: 100%;
}

/* Loading states */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Focus states for accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
  outline: 2px solid #7cb342;
  outline-offset: 2px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  #navbar {
    position: sticky;
    top: 0;
  }

  .mobile-nav-link {
    font-size: 1rem;
    padding: 0.75rem;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-gradient-to-br {
    background: #1b4b66 !important;
  }

  .text-gray-300 {
    color: #ffffff !important;
  }

  .nav-link {
    font-weight: 600;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  #cursor,
  #cursor-follower {
    display: none !important;
  }

  .nav-link::before {
    transition: none;
  }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles if needed */
}

/* Custom utilities */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur-custom {
  backdrop-filter: blur(20px);
}

.border-gradient {
  border-image: linear-gradient(45deg, #7cb342, #8bc34a) 1;
}

/* Animation for counters */
.counter {
  transition: all 0.3s ease;
}

/* Testimonial carousel */
.testimonial-card {
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: scale(1.02);
}

/* Service cards special effects */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(124, 179, 66, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.service-card:hover::before {
  opacity: 1;
  transform: rotate(45deg) translate(50%, 50%);
}

/* Enhanced Custom Cursor */
#cursor {
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#cursor-follower {
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9998;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Cursor states */
.cursor-hover #cursor {
  transform: translate(-50%, -50%) scale(1.5);
  background-color: #8bc34a;
}

.cursor-hover #cursor-follower {
  transform: translate(-50%, -50%) scale(1.2);
  border-color: #8bc34a;
}

.cursor-click #cursor {
  transform: translate(-50%, -50%) scale(0.8);
}

/* Enhanced scrollbar */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Animation delays */
.animation-delay-200 {
  animation-delay: 0.2s;
}

.animation-delay-400 {
  animation-delay: 0.4s;
}

.animation-delay-600 {
  animation-delay: 0.6s;
}

/* Enhanced navigation effects */
.nav-link {
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-link::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7cb342, #8bc34a);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateX(-50%);
}

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

/* Dropdown menu animations */
.dropdown-menu {
  transform-origin: top center;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mobile dropdown animations */
.mobile-dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-dropdown-content.show {
  max-height: 200px;
}

.mobile-dropdown-icon {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-dropdown-icon.rotate {
  transform: rotate(180deg);
}

/* Enhanced button effects */
.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::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.6s;
}

.btn-glow:hover::before {
  left: 100%;
}

/* Improved mobile responsiveness */
@media (max-width: 1024px) {
  .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 768px) {
  /* Hide custom cursor on mobile */
  #cursor,
  #cursor-follower {
    display: none !important;
  }

  /* Mobile navigation improvements */
  .mobile-nav-link {
    font-size: 1rem;
    padding: 1rem;
  }

  /* Mobile dropdown improvements */
  .mobile-dropdown-content {
    padding-left: 1rem;
  }

  /* Mobile hero adjustments */
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }

  /* Mobile button improvements */
  .mobile-cta-button {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.75rem;
  }
}

@media (max-width: 640px) {
  /* Extra small mobile adjustments */
  .hero-title {
    font-size: 1.75rem;
  }

  .mobile-nav-link {
    padding: 0.875rem;
    font-size: 0.95rem;
  }

  /* Compact mobile menu */
  #mobile-menu {
    max-height: calc(100vh - 120px);
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .nav-link:hover::before {
    width: 0;
  }

  /* Enhance tap targets */
  .mobile-nav-link,
  .mobile-dropdown-trigger {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  /* Improve button sizes for touch */
  button {
    min-height: 44px;
  }
}

/* Loading states */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Enhanced glassmorphism */
.glass-enhanced {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Improved card hover effects */
.card-enhanced {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
}

.card-enhanced:hover {
  transform: translateY(-8px) rotateX(5deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Micro-interactions */
.micro-bounce {
  transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.micro-bounce:active {
  transform: scale(0.95);
}

/* Improved typography */
.text-gradient {
  background: linear-gradient(135deg, #7cb342 0%, #8bc34a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced mobile menu */
@media (max-width: 1023px) {
  #mobile-menu {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.98);
  }

  .mobile-nav-link {
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .mobile-nav-link:active {
    transform: scale(0.98);
    background-color: rgba(124, 179, 66, 0.1);
  }
}

/* Navigation scroll effects */
#navbar {
  transition: all 0.3s ease;
}

#navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#navbar.scrolled .nav-link {
  color: #374151;
}

#navbar.scrolled .nav-link:hover {
  color: #7cb342;
}

/* Dropdown animations */
.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

.group:hover .group-hover\:visible {
  visibility: visible;
}

.group:hover .group-hover\:translate-y-0 {
  transform: translateY(0);
}

.group:hover .group-hover\:rotate-180 {
  transform: rotate(180deg);
}

/* Button hover effects */
button {
  transition: all 0.3s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* Video Modal Styles */
#videoModal {
  backdrop-filter: blur(8px);
}

#videoModal.show {
  opacity: 1;
  visibility: visible;
}

#videoModal.show #videoModalContent {
  transform: scale(1);
}

/* Video responsive styles */
.aspect-video {
  aspect-ratio: 16 / 9;
}

/* Custom video controls */
video::-webkit-media-controls-panel {
  background-color: rgba(0, 0, 0, 0.8);
}

video::-webkit-media-controls-play-button,
video::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-timeline {
  filter: brightness(1.2);
}

/* Mobile optimizations for video modal */
@media (max-width: 768px) {
  #videoModal {
    padding: 1rem;
  }

  #videoModalContent {
    max-height: 90vh;
    overflow-y: auto;
  }

  .aspect-video {
    aspect-ratio: 16 / 9;
    min-height: 200px;
  }

  /* Mobile video controls */
  video {
    object-fit: contain;
  }

  /* Adjust modal header on mobile */
  #videoModalContent .p-6:first-child {
    padding: 1rem;
  }

  #videoModalContent h3 {
    font-size: 1.25rem;
  }

  /* Mobile buttons */
  #videoModalContent .flex.gap-2 {
    flex-direction: column;
  }

  #videoModalContent .flex.gap-2 button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  #videoModal {
    padding: 0.5rem;
  }

  .aspect-video {
    min-height: 180px;
  }

  #videoModalContent .p-6 {
    padding: 0.75rem;
  }
}

/* Loading animation improvements */
#videoLoading {
  background: linear-gradient(135deg, rgba(27, 75, 102, 0.9), rgba(42, 95, 122, 0.9));
}

/* Smooth transitions */
#videoModal,
#videoModalContent {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Focus states for accessibility */
#videoModal button:focus {
  outline: 2px solid #7cb342;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  #videoModal {
    background-color: rgba(0, 0, 0, 0.9);
  }

  #videoModalContent {
    border: 2px solid #7cb342;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  #videoModal,
  #videoModalContent {
    transition: none;
  }

  #videoLoading svg {
    animation: none;
  }
}

/* Phone dropdown styles */
#phoneDropdown {
  max-height: 400px;
  overflow-y: auto;
  transform-origin: bottom left; /* Cambiar de bottom right a bottom left */
}

#phoneDropdown::-webkit-scrollbar {
  width: 4px;
}

#phoneDropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

#phoneDropdown::-webkit-scrollbar-thumb {
  background: #7cb342;
  border-radius: 2px;
}

#phoneDropdown::-webkit-scrollbar-thumb:hover {
  background: #689f38;
}

/* Date time display styles */

/* Phone button pulse animation */
#phoneButton {
  position: relative;
}

#phoneButton::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.3);
  animation: phone-pulse 2s infinite;
  z-index: -1;
}

@keyframes phone-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* Mobile optimizations for phone dropdown */
@media (max-width: 768px) {
  #phoneDropdown {
    width: 90vw;
    left: 0;
    right: auto;
    max-height: 60vh;
  }

  #currentDateTime {
    display: none;
  }
}

/* Hover effects for phone links */
#phoneDropdown a {
  transition: all 0.2s ease;
}

#phoneDropdown a:hover {
  transform: translateX(2px);
}

/* Emergency services styling */
#phoneDropdown a[href*="123"],
#phoneDropdown a[href*="767"],
#phoneDropdown a[href*="119"] {
  border-left: 3px solid #ef4444;
}

/* Insurance companies styling */
#phoneDropdown a[href*="*"] {
  border-left: 3px solid #3b82f6;
}

/* Floating elements responsive positioning */
@media (max-width: 640px) {
  .fixed.bottom-6.right-6 {
    bottom: 80px; /* Account for mobile CTA bar */
  }

  .fixed.bottom-6.left-6 {
    bottom: 80px; /* Account for mobile CTA bar */
    left: 1rem;
  }
}

/* Animation for dropdown appearance */
#phoneDropdown {
  transform-origin: bottom right;
}

/* Improved accessibility */
#phoneDropdown a:focus {
  outline: 2px solid #7cb342;
  outline-offset: 2px;
  background-color: #f3f4f6;
}

/* Loading state for phone dropdown */
.phone-dropdown-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.phone-dropdown-loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #7cb342;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.aliados {
  padding: 50px 20px;
  text-align: center;
  background: #f9f9f9;
}

.aliados h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

.aliados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  align-items: center;
  justify-items: center;
}

.aliado img {
  max-width: 150px;
  height: auto;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.aliado img:hover {
  filter: grayscale(0%);
}
