/* CSS Variables - Theme Configuration */
:root {
  /* Primary Colors */
  --primary-color: #3273dc;
  --primary-hover: #2366d1;
  --primary-light: #5ba0f2;
  --primary-dark: #1e5bb8;
  
  /* Secondary Colors */
  --secondary-color: #48c774;
  --secondary-hover: #3ec46d;
  --secondary-light: #71d18a;
  --secondary-dark: #2a9c4e;
  
  /* Neutral Colors */
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  
  /* Accent Colors */
  --accent-orange: #ff6b35;
  --accent-orange-hover: #ff5722;
  --accent-purple: #8b5cf6;
  --accent-purple-hover: #7c3aed;
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-dark: #1a1a1a;
  --bg-gradient-hero: linear-gradient(135deg, rgba(50, 115, 220, 0.9) 0%, rgba(139, 92, 246, 0.8) 100%);
  --bg-gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --bg-gradient-pricing: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  
  /* Typography */
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-mono: 'Fira Code', 'Monaco', 'Consolas', monospace;
  
  /* Font Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(50, 115, 220, 0.3);
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-blob: 40% 60% 70% 30% / 40% 40% 60% 50%;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
}

/* Global Resets and Base Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: var(--font-regular);
  line-height: 1.6;
  color: var(--neutral-700);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6,
.title, .subtitle {
  font-family: var(--font-heading) !important;
  font-weight: var(--font-semibold);
  color: var(--neutral-800);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.title.is-1 { font-size: 3.5rem; font-weight: var(--font-bold); }
.title.is-2 { font-size: 2.75rem; font-weight: var(--font-bold); }
.title.is-3 { font-size: 2.25rem; }
.title.is-4 { font-size: 1.75rem; }
.title.is-5 { font-size: 1.5rem; }

.subtitle.is-4 { font-size: 1.5rem; }
.subtitle.is-5 { font-size: 1.25rem; }
.subtitle.is-6 { font-size: 1rem; }

/* Global Button Styles */
.button, .btn, input[type="submit"], button {
  font-family: var(--font-heading);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.025em;
  text-transform: none;
}

.button.is-primary, .btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border: none;
  color: white;
  box-shadow: var(--shadow-md);
}

.button.is-primary:hover, .btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.button.is-secondary, .btn-secondary {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
  border: none;
  color: white;
  box-shadow: var(--shadow-md);
}

.button.is-secondary:hover, .btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-hover) 0%, var(--secondary-color) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.button.is-light {
  background: var(--bg-primary);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.button.is-light:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Global Section Styling */
.section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.section.has-background-light {
  background: var(--bg-secondary);
}

/* Main Container */
.main-container {
  padding-top: 70px;
}

/* Privacy and Terms Pages */
.privacy-content, .terms-content {
  padding-top: 100px;
}

/* Success Page */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gradient-hero);
}

.success-content {
  text-align: center;
  color: white;
  padding: var(--space-xl);
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Navigation Styles */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.navbar.is-fixed-top {
  z-index: 1000;
}

.navbar-brand .navbar-item {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  font-size: 1.5rem;
  color: var(--primary-color) !important;
}

.navbar-item {
  font-family: var(--font-heading);
  font-weight: var(--font-medium);
  color: var(--neutral-700);
  transition: color var(--transition-fast);
  position: relative;
}

.navbar-item:hover {
  color: var(--primary-color) !important;
  background-color: transparent !important;
}

.navbar-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.navbar-item:hover::after {
  width: 80%;
}

/* Hero Section */
.hero {
  position: relative;
  background-attachment: fixed;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center center;
  display: flex;
  align-items: center;
  min-height: 100vh;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  z-index: 1;
}

.hero-body {
  position: relative;
  z-index: 2;
}

.hero .title,
.hero .subtitle {
  color: white !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Card Styles */
.card {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: none;
  background: var(--bg-gradient-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.card-image {
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 250px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  margin: 0 auto;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: var(--space-lg);
  text-align: center;
  flex: 1;
}

/* Pricing Cards */
.pricing-card {
  position: relative;
  background: var(--bg-primary);
  border: 2px solid var(--neutral-200);
  height: 100%;
}

.pricing-card.is-featured {
  border-color: var(--primary-color);
  transform: scale(1.05);
  background: var(--bg-gradient-pricing);
}

.pricing-card.is-featured::before {
  content: 'Recomendado';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-lg);
  font-family: var(--font-heading);
  font-weight: var(--font-semibold);
  font-size: 0.875rem;
}

/* Story Cards */
.story-card {
  height: 100%;
  background: var(--bg-primary);
  border-left: 4px solid var(--primary-color);
}

.story-card .image-container {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-light);
  margin: 0 auto;
}

.story-card .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Press Cards */
.press-card {
  height: 100%;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  position: relative;
}

.press-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bg-gradient-hero);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.press-card a {
  text-decoration: none;
  transition: color var(--transition-fast);
}

.press-card a:hover {
  color: var(--primary-hover) !important;
}

/* Contact Form */
.contact-card {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

.contact-form .field {
  margin-bottom: var(--space-md);
}

.contact-form .label {
  font-family: var(--font-heading);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-xs);
}

.input, .textarea, .select select {
  border-radius: var(--radius-md);
  border: 2px solid var(--neutral-200);
  transition: all var(--transition-fast);
  font-family: var(--font-body);
  background: var(--bg-primary);
}

.input:focus, .textarea:focus, .select select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(50, 115, 220, 0.1);
}

/* Timeline Styles */
.timeline-container {
  position: relative;
  padding: var(--space-xl) 0;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-color);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-item:nth-child(odd) .timeline-content {
  text-align: right;
  padding-right: var(--space-lg);
}

.timeline-item:nth-child(even) .timeline-content {
  text-align: left;
  padding-left: var(--space-lg);
}

.timeline-marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 4px solid white;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.timeline-marker.is-success {
  background: var(--secondary-color);
}

.timeline-content {
  flex: 1;
  max-width: calc(50% - 40px);
}

.timeline-content .heading {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: var(--space-xs);
}

/* Footer Styles */
.footer {
  background: var(--bg-dark) !important;
  padding: var(--space-3xl) 0 var(--space-xl) 0;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bg-gradient-hero);
}

.footer .title {
  color: white !important;
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--neutral-300);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-light);
  transition: width var(--transition-normal);
}

.footer-links a:hover::after {
  width: 100%;
}

/* Social Links */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.social-links a {
  color: var(--neutral-300);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: var(--font-medium);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
  color: white;
  background: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

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

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

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
  animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
  animation: fadeIn 1s ease-out 0.6s both;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

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

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

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

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-white { color: white !important; }
.text-muted { color: var(--neutral-500) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-light { background-color: var(--bg-secondary) !important; }
.bg-dark { background-color: var(--bg-dark) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-2xl { border-radius: var(--radius-2xl) !important; }

.blob-shape {
  border-radius: var(--radius-blob);
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
  .hero .title.is-1 {
    font-size: 2.5rem;
  }
  
  .section {
    padding: var(--space-2xl) 0;
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    flex-direction: row;
  }
  
  .timeline-item:nth-child(odd) {
    flex-direction: row;
  }
  
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    text-align: left;
    padding-left: var(--space-lg);
    padding-right: 0;
    max-width: calc(100% - 60px);
  }
  
  .timeline-marker {
    position: absolute;
    left: 20px;
  }
}

@media screen and (max-width: 768px) {
  .main-container {
    padding-top: 60px;
  }
  
  .privacy-content, .terms-content {
    padding-top: 80px;
  }
  
  .hero .title.is-1 {
    font-size: 2rem;
  }
  
  .hero .subtitle.is-4 {
    font-size: 1.125rem;
  }
  
  .section {
    padding: var(--space-xl) 0;
  }
  
  .pricing-card.is-featured {
    transform: none;
    margin-bottom: var(--space-lg);
  }
  
  .social-links {
    justify-content: center;
  }
  
  .buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .buttons .button {
    margin-bottom: var(--space-sm);
  }
}

@media screen and (max-width: 480px) {
  .hero {
    background-attachment: scroll;
  }
  
  .hero .title.is-1 {
    font-size: 1.75rem;
  }
  
  .hero .subtitle.is-4 {
    font-size: 1rem;
  }
  
  .card-content {
    padding: var(--space-md);
  }
  
  .section {
    padding: var(--space-lg) 0;
  }
  
  .timeline-content .heading {
    font-size: 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus States */
.button:focus,
.input:focus,
.textarea:focus,
.select select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --neutral-700: #000000;
    --neutral-800: #000000;
    --primary-color: #0066cc;
    --secondary-color: #009900;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .hero,
  .footer,
  #contact {
    display: none;
  }
  
  .section {
    padding: 1rem 0;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid var(--neutral-300);
  }
}