@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

/**
 * GreenCard Modern Design System
 * CSS Variables and Base Styles - Enhanced Version
 */

:root {
  /* Brand Colors */
  --gc-primary: #2E8B57; /* Sea Green */
  --gc-primary-rgb: 46, 139, 87;
  --gc-primary-light: #4CAF75;
  --gc-primary-dark: #1E673D;
  
  --gc-secondary: #556b2f; /* Dark Olive Green */
  --gc-secondary-rgb: 85, 107, 47;
  --gc-secondary-light: #708238;
  --gc-secondary-dark: #3B4922;
  
  /* Accent Colors */
  --gc-accent: #FFA500; /* Orange */
  --gc-accent-rgb: 255, 165, 0;
  
  --gc-accent-success: #28a745; /* Success Green */
  --gc-accent-success-rgb: 40, 167, 69;
  --gc-accent-warning: #ffc107; /* Warning Yellow */
  --gc-accent-warning-rgb: 255, 193, 7;
  --gc-accent-danger: #dc3545; /* Danger Red */
  --gc-accent-danger-rgb: 220, 53, 69;
  --gc-accent-info: #17a2b8; /* Info Blue */
  --gc-accent-info-rgb: 23, 162, 184;
  
  /* Semantic alias */
  --gc-success: var(--gc-accent-success);
  --gc-success-rgb: var(--gc-accent-success-rgb);
  --gc-success-light: #48c766;
  --gc-success-dark: #218838;
  
  --gc-warning: var(--gc-accent-warning);
  --gc-warning-rgb: var(--gc-accent-warning-rgb);
  --gc-warning-light: #ffce3a;
  --gc-warning-dark: #d39e00;
  
  --gc-danger: var(--gc-accent-danger);
  --gc-danger-rgb: var(--gc-accent-danger-rgb);
  --gc-danger-light: #e4606d;
  --gc-danger-dark: #bd2130;
  
  --gc-info: var(--gc-accent-info);
  --gc-info-rgb: var(--gc-accent-info-rgb);
  --gc-info-light: #31d2f2;
  --gc-info-dark: #117a8b;
  
  /* Neutral Colors */
  --gc-neutral-100: #ffffff; /* White */
  --gc-neutral-200: #f8f9fa; /* Light Gray */
  --gc-neutral-300: #e9ecef; /* Lighter Gray */
  --gc-neutral-400: #dee2e6; /* Light Gray */
  --gc-neutral-500: #adb5bd; /* Medium Gray */
  --gc-neutral-600: #6c757d; /* Dark Gray */
  --gc-neutral-700: #495057; /* Darker Gray */
  --gc-neutral-800: #343a40; /* Very Dark Gray */
  --gc-neutral-900: #212529; /* Almost Black */
  
  /* Semantic Colors */
  --gc-text: var(--gc-neutral-700);
  --gc-text-dark: var(--gc-neutral-900);
  --gc-text-light: var(--gc-neutral-500);
  --gc-text-muted: var(--gc-neutral-600);
  
  --gc-bg: var(--gc-neutral-100);
  --gc-bg-alt: var(--gc-neutral-200);
  --gc-bg-light: var(--gc-neutral-200);
  --gc-bg-dark: var(--gc-neutral-800);
  --gc-bg-hover: var(--gc-neutral-300);
  
  --gc-border-color: var(--gc-neutral-300);
  --gc-divider-color: var(--gc-neutral-300);
  
  /* Typography */
  --gc-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-primary: var(--gc-font-family);
  --font-heading: 'Montserrat', var(--gc-font-family);
  --font-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  
  --gc-font-size-base: 1rem;
  --gc-font-size-sm: 0.875rem;
  --gc-font-size-xs: 0.75rem;
  --gc-font-size-lg: 1.25rem;
  --gc-font-size-xl: 1.5rem;
  --gc-font-size-2xl: 1.75rem;
  --gc-font-size-3xl: 2rem;
  --gc-font-size-4xl: 2.5rem;
  
  --gc-font-weight-regular: 400;
  --gc-font-weight-medium: 500;
  --gc-font-weight-semibold: 600;
  --gc-font-weight-bold: 700;
  
  --gc-line-height-tight: 1.25;
  --gc-line-height-normal: 1.5;
  --gc-line-height-relaxed: 1.75;
  
  /* Spacing */
  --gc-space-1: 0.25rem;
  --gc-space-2: 0.5rem;
  --gc-space-3: 0.75rem;
  --gc-space-4: 1rem;
  --gc-space-5: 1.25rem;
  --gc-space-6: 1.5rem;
  --gc-space-8: 2rem;
  --gc-space-10: 2.5rem;
  --gc-space-12: 3rem;
  --gc-space-16: 4rem;
  --gc-space-20: 5rem;
  
  /* Legacy spacing variables for backward compatibility */
  --spacing-xs: var(--gc-space-1);
  --spacing-sm: var(--gc-space-2);
  --spacing-md: var(--gc-space-4);
  --spacing-lg: var(--gc-space-6);
  --spacing-xl: var(--gc-space-8);
  --spacing-xxl: var(--gc-space-12);
  
  /* Borders */
  --gc-border-width: 1px;
  --gc-border-width-thick: 2px;
  
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-circle: 50%;
  
  /* Enhanced border radius with more options */
  --gc-border-radius-sm: var(--border-radius-sm);
  --gc-border-radius-md: var(--border-radius-md);
  --gc-border-radius-lg: var(--border-radius-lg);
  --gc-border-radius-xl: var(--border-radius-xl);
  --gc-border-radius-2xl: 1rem;
  --gc-border-radius-pill: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-index */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;
  
  /* Container widths */
  --gc-container-sm: 540px;
  --gc-container-md: 720px;
  --gc-container-lg: 960px;
  --gc-container-xl: 1140px;
  
  /* Breakpoints */
  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-xxl: 1400px;
  
  /* Layout */
  --gc-sidebar-width: 280px;
  --gc-sidebar-collapsed-width: 70px;
  --gc-header-height: 60px;
}

/* Estilos base */
body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.5;
  color: var(--gc-neutral-800);
  background-color: var(--gc-neutral-200);
  margin: 0;
  padding: 0;
}

/* Content transitions */
.gc-content-fade-out {
  opacity: 0.5;
  transition: opacity 0.15s ease-out;
}

.gc-content-fade-in {
  opacity: 1;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-top: 0;
}

a {
  color: var(--gc-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gc-primary-dark);
}

/* Accesibilidad */
:focus-visible {
  outline: 3px solid var(--gc-primary);
  outline-offset: 2px;
}

.gc-text-high-contrast {
  color: var(--gc-neutral-900);
}

/* Soporte para modo oscuro del sistema */
@media (prefers-color-scheme: dark) {
  :root {
    --gc-neutral-100: #121212;
    --gc-neutral-200: #1e1e1e;
    --gc-neutral-300: #2c2c2c;
    --gc-neutral-400: #3c3c3c;
    --gc-neutral-500: #5c5c5c;
    --gc-neutral-600: #7c7c7c;
    --gc-neutral-700: #a0a0a0;
    --gc-neutral-800: #e0e0e0;
    --gc-neutral-900: #f5f5f5;
    
    /* Ajustes para colores primarios en modo oscuro */
    --gc-primary: #4CAF50;
    --gc-primary-light: #66BB6A;
    --gc-primary-dark: #388E3C;
  }
}

/* Reducción de movimiento para usuarios sensibles */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}