/* ========================================
   Tinkuy UNLaR - Main Styles
   Dark Corporate Design System
   ======================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* Design Tokens - CSS Custom Properties */
:root {
  /* Primary Colors */
  --color-primary: #0A1931;       /* Azul Corp - main backgrounds, structural blocks */
  --color-secondary: #C5A880;     /* Dorado - accents, highlights, active states */
  --color-text-light: #E2E8F0;    /* Fondo Claro / Texto principal */
  
  /* Shade Ramp */
  --color-bg-base: #060F1E;       /* Fondo general de la aplicación */
  --color-border: #1E2D4A;        /* Bordes de botones, separadores */
  --color-text-muted: #94A3B8;    /* Textos secundarios, deshabilitados */
  --color-white: #FFFFFF;         /* Focos de luz, indicadores activos */
  
  /* Typography */
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Segoe UI', sans-serif;
  --font-label: 'Helvetica', sans-serif;
  
  /* Font Sizes */
  --text-h1: 1.375rem;    /* 22pt */
  --text-h2: 0.9375rem;   /* 15pt */
  --text-body: 0.6875rem; /* 11pt */
  --text-caption: 0.625rem; /* 10pt */
  
  /* Border Radius */
  --radius-card: 14px;
  --radius-button: 9px;
  --radius-input: 8px;
  --radius-pill: 24px;
  
  /* Spacing */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* Global Styles - Dark Mode First */
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.5;
  color: var(--color-text-light);
  background-color: var(--color-bg-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--color-text-light);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-body); }

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: opacity 150ms ease;
}

a:hover {
  opacity: 0.8;
}

/* Layout */
main {
  flex: 1;
  width: 100%;
}

.container {
  width: 100%;
  max-width: 100%;
  padding: var(--space-md);
  margin: 0 auto;
}

/* Mobile-first responsive container */
@media (min-width: 768px) {
  .container {
    max-width: 720px;
    padding: var(--space-lg);
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
  }
}

/* Sections */
.content-section {
  padding: var(--space-xl) 0;
}

.content-section.bg-alt {
  background-color: rgba(255, 255, 255, 0.02);
}

.section-title {
  font-size: var(--text-h1);
  margin-bottom: var(--space-lg);
  color: var(--color-text-light);
}

/* Grid Layout - Responsive */
.publications-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .publications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .publications-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .publications-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  height: 40vh;
  min-height: 300px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-bg-base) 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-lg);
  color: var(--color-text-light);
  max-width: 600px;
}

.hero-overlay h1 {
  font-size: var(--text-h1);
  margin-bottom: var(--space-sm);
  color: var(--color-secondary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-overlay p {
  font-size: var(--text-body);
  margin-bottom: var(--space-lg);
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .hero {
    height: 60vh;
    min-height: 400px;
  }
  
  .hero-overlay h1 {
    font-size: var(--text-h1);
  }
  
  .hero-overlay p {
    font-size: var(--text-body);
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: var(--text-body);
  font-weight: 600;
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
}

.btn:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary Button - Dark bg with gold border */
.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.9;
}

/* Secondary Button - Gold bg with dark text */
.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-primary);
  border-color: var(--color-secondary);
}

.btn-secondary:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-success {
  background-color: #22C55E;
  color: var(--color-bg-base);
}

.btn-success:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-danger {
  background-color: #FA383E;
  color: var(--color-white);
}

.btn-danger:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--color-secondary);
  color: var(--color-secondary);
}

.btn-outline:hover:not(:disabled) {
  background-color: rgba(197, 168, 128, 0.1);
}

.btn-large {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-h2);
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  font-size: var(--text-h2);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  color: var(--color-text-light);
}

/* Page-specific styles */
.page-title {
  font-size: var(--text-h1);
  margin-bottom: var(--space-lg);
  text-align: center;
  color: var(--color-text-light);
}

.marketplace-page {
  padding-bottom: var(--space-xl);
}

.admin-page {
  padding-bottom: var(--space-xl);
}

/* Stats Bar */
.stats-bar {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  margin-bottom: var(--space-xl);
  padding: var(--space-md);
  background-color: var(--color-primary);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: var(--text-h1);
  font-weight: 700;
  color: var(--color-secondary);
}

.stat-label {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-xl);
  color: var(--color-text-muted);
  font-size: var(--text-body);
}

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

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-primary);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-secondary);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  animation: slideIn 250ms ease;
}

.toast.success {
  border-left: 4px solid var(--color-secondary);
}

.toast.error {
  border-left: 4px solid #FA383E;
}

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