/* ============================================================
   styles.css - Estilos de la Rueda de Negocios Virtual
   ============================================================ */

/* --- Variables --- */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --secondary: #5f6368;
  --success: #1e8e3e;
  --success-light: #e6f4ea;
  --warning: #f9ab00;
  --warning-light: #fef7e0;
  --danger: #d93025;
  --danger-light: #fce8e6;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f4;
  --gray-200: #e8eaed;
  --gray-300: #dadce0;
  --gray-400: #bdc1c6;
  --gray-500: #9aa0a6;
  --gray-600: #80868b;
  --gray-700: #5f6368;
  --gray-800: #3c4043;
  --gray-900: #202124;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 40px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.3s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
  min-height: 100vh;
}

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

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

img {
  max-width: 100%;
  height: auto;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--gray-900);
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 2rem 0;
}

/* --- Navigation --- */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.navbar-brand i {
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary);
  color: var(--white);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-700);
  cursor: pointer;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1557b0 50%, #0d47a1 100%);
  color: var(--white);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}

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

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

.btn-white:hover {
  background: var(--gray-100);
  transform: translateY(-1px);
  color: var(--primary);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}

.btn-success:hover {
  background: #1a7a35;
  border-color: #1a7a35;
  color: var(--white);
}

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

.btn-danger:hover {
  background: #c5221f;
  border-color: #c5221f;
  color: var(--white);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

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

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0;
}

.card-body {
  padding: 1rem 1.25rem;
}

.card-footer {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.card-text {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.card-meta i {
  color: var(--primary);
}

/* --- Proveedor Card --- */
.proveedor-card .card-header {
  padding-bottom: 0.5rem;
}

.proveedor-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  object-fit: cover;
}

.proveedor-logo-sm {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  object-fit: cover;
}

/* --- Proveedores Grid --- */
.proveedores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* --- Filtros --- */
.filtros-section {
  margin-bottom: 1.5rem;
}

.filtros-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filtro-btn {
  padding: 0.4rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  background: var(--white);
  color: var(--gray-700);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.filtro-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filtro-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.search-box {
  position: relative;
  max-width: 400px;
}

.search-box input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.search-box i {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-categoria {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-sm {
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
}

.badge-estado {
  padding: 0.3rem 0.75rem;
}

.badge-pendiente {
  background: var(--warning-light);
  color: #e37400;
}

.badge-aceptada {
  background: var(--success-light);
  color: var(--success);
}

.badge-rechazada {
  background: var(--danger-light);
  color: var(--danger);
}

/* --- Forms --- */
.form-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-section {
  margin-bottom: 2rem;
}

.form-section-title {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.form-group label i {
  color: var(--primary);
  margin-right: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* --- Alerts --- */
.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid #a8dab5;
}

.alert-error {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid #f5c6cb;
}

.alert-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

.alert-close:hover {
  opacity: 1;
}

/* --- Stats / Dashboard --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

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

.stat-icon {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-pendiente .stat-icon { color: var(--warning); }
.stat-aceptada .stat-icon { color: var(--success); }
.stat-rechazada .stat-icon { color: var(--danger); }

/* --- Benefits Section --- */
.benefits-section {
  padding: 4rem 0;
  background: var(--white);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.benefit-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  transition: var(--transition);
}

.benefit-card:hover {
  background: var(--primary-light);
  transform: translateY(-4px);
}

.benefit-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.benefit-card h4 {
  margin-bottom: 0.5rem;
}

.benefit-card p {
  color: var(--gray-600);
  font-size: 0.9rem;
}

/* --- Productos Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}

.modal-header h3 {
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-500);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.modal-body {
  padding: 2rem;
}

/* --- Productos Grid --- */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.producto-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.producto-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.producto-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.producto-info {
  padding: 1rem;
}

.producto-info h4 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.producto-info p {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin: 0.5rem 0;
}

.producto-detalles {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.75rem 0;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.producto-precio {
  font-weight: 700;
  color: var(--success);
}

/* --- Agenda --- */
.agenda-header {
  margin-bottom: 2rem;
}

.proveedor-info-agenda {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.proveedor-info-agenda h3 {
  margin-bottom: 0.25rem;
}

.proveedor-info-agenda span {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-right: 0.75rem;
}

.form-agenda {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.horarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.horario-option {
  cursor: pointer;
}

.horario-option input {
  display: none;
}

.horario-label {
  display: block;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.85rem;
  transition: var(--transition);
}

.horario-option input:checked + .horario-label {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.horario-label:hover {
  border-color: var(--primary);
}

/* --- Reuniones Panel --- */
.reuniones-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.modo-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--gray-100);
  padding: 0.25rem;
  border-radius: var(--radius);
}

.modo-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--gray-600);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.modo-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.reuniones-list {
  display: grid;
  gap: 1rem;
}

.reunion-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.reunion-card:hover {
  box-shadow: var(--shadow);
}

.reunion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.reunion-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reunion-info h4 {
  font-size: 1.05rem;
}

.reunion-body {
  display: grid;
  gap: 0.5rem;
}

.reunion-detail {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--gray-600);
  flex-wrap: wrap;
}

.reunion-detail i {
  color: var(--primary);
  width: 14px;
}

.reunion-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

/* --- Post Form Actions --- */
.post-form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* --- Page Header --- */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--gray-600);
}

/* --- Checkboxes for horarios --- */
.horarios-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem;
}

.horario-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.horario-check:hover {
  border-color: var(--primary);
}

.horario-check input[type="checkbox"] {
  accent-color: var(--primary);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-500);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--gray-400);
}

.empty-state h3 {
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

/* --- Post Registro --- */
#postRegistro {
  display: none;
  margin-top: 1.5rem;
  text-align: center;
}

/* --- Footer --- */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.85rem;
}

/* --- Section Title --- */
.section-title {
  text-align: center;
  margin-bottom: 1rem;
}

.section-title h2 {
  font-size: 1.75rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-container {
    padding: 1.5rem;
  }

  .proveedores-grid {
    grid-template-columns: 1fr;
  }

  .productos-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reunion-detail {
    flex-direction: column;
    gap: 0.4rem;
  }

  .reuniones-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .horarios-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
}