/* Custom CSS Variables and Global Styles for Mascotas Seguras */

:root {
  /* Primary Color Palette - Blues */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;

  /* Secondary Color Palette - Greens */
  --secondary-50: #f0fdf4;
  --secondary-100: #dcfce7;
  --secondary-200: #bbf7d0;
  --secondary-300: #86efac;
  --secondary-400: #4ade80;
  --secondary-500: #22c55e;
  --secondary-600: #16a34a;
  --secondary-700: #15803d;
  --secondary-800: #166534;
  --secondary-900: #14532d;

  /* Accent Color Palette - Oranges */
  --accent-50: #fff7ed;
  --accent-100: #ffedd5;
  --accent-200: #fed7aa;
  --accent-300: #fdba74;
  --accent-400: #fb923c;
  --accent-500: #f97316;
  --accent-600: #ea580c;
  --accent-700: #c2410c;
  --accent-800: #9a3412;
  --accent-900: #7c2d12;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 2rem;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
}

/* Tailwind CSS Custom Color Extensions */
@tailwind base;
@tailwind components;
@tailwind utilities;

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

  html {
    scroll-behavior: smooth;
  }

  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }

  body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: #374151;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
  }
}

@layer components {
  /* Custom Button Styles */
  .btn-primary {
    @apply bg-blue-600 text-white px-6 py-3 rounded-full font-semibold hover:bg-blue-700 transition-all duration-200 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5;
  }

  .btn-secondary {
    @apply bg-green-600 text-white px-6 py-3 rounded-full font-semibold hover:bg-green-700 transition-all duration-200 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5;
  }

  .btn-outline {
    @apply border-2 border-blue-600 text-blue-600 px-6 py-3 rounded-full font-semibold hover:bg-blue-600 hover:text-white transition-all duration-200;
  }

  /* Navigation Styles */
  .nav-link {
    @apply relative;
  }

  .nav-link::after {
    content: '';
    @apply absolute bottom-0 left-0 w-0 h-0.5 bg-blue-600 transition-all duration-300;
  }

  .nav-link:hover::after {
    @apply w-full;
  }

  /* Prevent hover effects on hero sections */
  .hero-section {
    transform: none !important;
    transition: none !important;
  }

  .hero-section:hover {
    transform: none !important;
  }

  /* Card Styles */
  .card {
    @apply bg-white rounded-2xl shadow-lg hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2;
  }

  .service-card {
    @apply bg-white rounded-2xl shadow-lg overflow-hidden hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2;
  }

  .feature-card {
    @apply text-center p-8 rounded-2xl hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1;
  }

  /* Form Styles */
  .form-input {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors duration-200;
  }

  .form-textarea {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors duration-200 resize-none;
  }

  /* Gradient Backgrounds */
  .gradient-primary {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  }

  .gradient-secondary {
    background: linear-gradient(135deg, var(--secondary-500) 0%, var(--secondary-600) 100%);
  }

  .gradient-accent {
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-600) 100%);
  }

  /* Hero Section Animations */
  .hero-content {
    animation: fadeInUp 1s ease-out;
  }

  .hero-image {
    animation: fadeInRight 1s ease-out 0.3s both;
  }

  /* Floating Animation */
  .floating {
    animation: floating 3s ease-in-out infinite;
  }

  /* Pulse Animation */
  .pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }
}

@layer utilities {
  /* Custom Font Families */
  .font-inter {
    font-family: var(--font-primary);
  }

  .font-poppins {
    font-family: var(--font-heading);
  }

  /* Custom Text Sizes to avoid Tailwind CSS issues */
  .text-custom-3xl {
    font-size: 30px !important; /* 30px */
    line-height: 2.25rem; /* 36px */
  }

  .text-custom-4xl {
    font-size: 2.25rem; /* 36px */
    line-height: 2.5rem; /* 40px */
  }

  @media (min-width: 768px) {
    .md\:text-custom-4xl {
      font-size: 2.25rem; /* 36px */
      line-height: 2.5rem; /* 40px */
    }
  }

  /* Custom Colors */
  .border-primary-600 { border-color: var(--primary-600); }
  .border-secondary-600 { border-color: var(--secondary-600); }
  .border-accent-600 { border-color: var(--accent-600); }

  .from-primary-400 { --tw-gradient-from: var(--primary-400); }
  .from-primary-500 { --tw-gradient-from: var(--primary-500); }
  .to-primary-600 { --tw-gradient-to: var(--primary-600); }
  .to-secondary-500 { --tw-gradient-to: var(--secondary-500); }
  .from-secondary-400 { --tw-gradient-from: var(--secondary-400); }
  .to-secondary-600 { --tw-gradient-to: var(--secondary-600); }
  .from-accent-400 { --tw-gradient-from: var(--accent-400); }
  .to-accent-600 { --tw-gradient-to: var(--accent-600); }

  .hover\:bg-primary-700:hover { background-color: var(--primary-700); }
  .hover\:bg-secondary-700:hover { background-color: var(--secondary-700); }
  .hover\:bg-accent-700:hover { background-color: var(--accent-700); }
  .hover\:text-primary-600:hover { color: var(--primary-600); }
  .hover\:text-primary-500:hover { color: var(--primary-500); }
  .hover\:text-primary-400:hover { color: var(--primary-400); }
  .text-primary-50 { color: var(--primary-50); }
  .text-primary-100 { color: var(--primary-100); }
  .text-primary-200 { color: var(--primary-200); }
  .text-primary-300 { color: var(--primary-300); }
  .text-primary-400 { color: var(--primary-400); }
  .text-primary-500 { color: var(--primary-500); }
  .text-primary-600 { color: var(--primary-600); }
  .text-primary-700 { color: var(--primary-700); }
  .text-primary-800 { color: var(--primary-800); }
  .text-primary-900 { color: var(--primary-900); }

  .bg-primary-50 { background-color: var(--primary-50); }
  .bg-primary-100 { background-color: var(--primary-100); }
  .bg-primary-200 { background-color: var(--primary-200); }
  .bg-primary-300 { background-color: var(--primary-300); }
  .bg-primary-400 { background-color: var(--primary-400); }
  .bg-primary-500 { background-color: var(--primary-500); }
  .bg-primary-600 { background-color: var(--primary-600); }
  .bg-primary-700 { background-color: var(--primary-700); }
  .bg-primary-800 { background-color: var(--primary-800); }
  .bg-primary-900 { background-color: var(--primary-900); }

  .text-secondary-50 { color: var(--secondary-50); }
  .text-secondary-100 { color: var(--secondary-100); }
  .text-secondary-200 { color: var(--secondary-200); }
  .text-secondary-300 { color: var(--secondary-300); }
  .text-secondary-400 { color: var(--secondary-400); }
  .text-secondary-500 { color: var(--secondary-500); }
  .text-secondary-600 { color: var(--secondary-600); }
  .text-secondary-700 { color: var(--secondary-700); }
  .text-secondary-800 { color: var(--secondary-800); }
  .text-secondary-900 { color: var(--secondary-900); }

  .bg-secondary-50 { background-color: var(--secondary-50); }
  .bg-secondary-100 { background-color: var(--secondary-100); }
  .bg-secondary-200 { background-color: var(--secondary-200); }
  .bg-secondary-300 { background-color: var(--secondary-300); }
  .bg-secondary-400 { background-color: var(--secondary-400); }
  .bg-secondary-500 { background-color: var(--secondary-500); }
  .bg-secondary-600 { background-color: var(--secondary-600); }
  .bg-secondary-700 { background-color: var(--secondary-700); }
  .bg-secondary-800 { background-color: var(--secondary-800); }
  .bg-secondary-900 { background-color: var(--secondary-900); }

  .text-accent-50 { color: var(--accent-50); }
  .text-accent-100 { color: var(--accent-100); }
  .text-accent-200 { color: var(--accent-200); }
  .text-accent-300 { color: var(--accent-300); }
  .text-accent-400 { color: var(--accent-400); }
  .text-accent-500 { color: var(--accent-500); }
  .text-accent-600 { color: var(--accent-600); }
  .text-accent-700 { color: var(--accent-700); }
  .text-accent-800 { color: var(--accent-800); }
  .text-accent-900 { color: var(--accent-900); }

  .bg-accent-50 { background-color: var(--accent-50); }
  .bg-accent-100 { background-color: var(--accent-100); }
  .bg-accent-200 { background-color: var(--accent-200); }
  .bg-accent-300 { background-color: var(--accent-300); }
  .bg-accent-400 { background-color: var(--accent-400); }
  .bg-accent-500 { background-color: var(--accent-500); }
  .bg-accent-600 { background-color: var(--accent-600); }
  .bg-accent-700 { background-color: var(--accent-700); }
  .bg-accent-800 { background-color: var(--accent-800); }
  .bg-accent-900 { background-color: var(--accent-900); }
}

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

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes slideInFromTop {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInFromBottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .service-card {
    margin-bottom: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem;
  }
  
  /* Tablet optimizations */
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .grid-responsive {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Better spacing for medium screens */
  .section-padding {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

@media (max-width: 640px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .nav-link {
    padding: 0.75rem 1rem;
  }
  
  /* Mobile-specific optimizations */
  .mobile-menu {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Touch-friendly buttons */
  .btn-primary,
  .btn-secondary,
  .btn-outline {
    min-height: 44px;
    padding: 12px 24px;
  }
  
  /* Improved form inputs for mobile */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 44px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  /* Tablet landscape optimizations */
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  /* Small mobile devices */
  .text-responsive-sm {
    font-size: 0.875rem;
  }
  
  .hero-content h1 {
    font-size: 1.75rem;
  }
  
  .section-title {
    font-size: 1.875rem;
  }
  
  /* Compact cards for small screens */
  .service-card,
  .feature-card {
    padding: 1rem;
  }
  
  /* Smaller buttons for very small screens */
  .btn-sm-mobile {
    padding: 8px 16px;
    font-size: 0.875rem;
  }
}

/* Landscape orientation optimizations */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  .mobile-menu {
    max-height: 60vh;
    overflow-y: auto;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scroll Animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.scroll-animate.animate {
  opacity: 1;
  transform: translateY(0);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--primary-600);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-700);
}

/* Focus States for Accessibility */
.focus-visible:focus {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}

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

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }
}