﻿/* Estilos Globales */
*{ box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }

/* Definición de Variables de Tema (Intercambiables vía body class) */
body.theme-dark {
  --bg: radial-gradient(140% 100% at 80% -10%, #191b21 0%, #0a0a0c 55%);
  --text: #f5f5f5;
  --muted: #9a9aa0;
  --card: #141519;
  --cborder: transparent;
  --header: rgba(10,10,12,0.92);
  --hborder: #17171b;
  --footer: #0a0a0c;
  background: #0a0a0c;
}

body.theme-light {
  --bg: radial-gradient(140% 100% at 80% -10%, #ffffff 0%, #e7eaf0 60%);
  --text: #182034;
  --muted: #586074;
  --card: #ffffff;
  --cborder: #e2e5ec;
  --header: rgba(255,255,255,0.92);
  --hborder: #e2e5ec;
  --footer: #eef1f6;
  background: #e7eaf0;
}

body {
  font-family: 'Segoe UI', 'Open Sans', system-ui, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
.msy { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; line-height: 1; display: inline-block; }

/* Animaciones */
@keyframes screenIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes tileIn { 0% { opacity: 0; transform: scale(0.94); } 100% { opacity: 1; transform: none; } }

.animate-screen { animation: screenIn 0.4s ease-out both; }

/* Contenedor Principal */
.site-wrapper {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Header */
.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hborder);
}
.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-area img { height: clamp(30px, 4.5vw, 46px); width: auto; display: block; }

/* Control de Visibilidad de Logos según Tema */
body.theme-dark .logo-light { display: none; }
body.theme-dark .logo-dark { display: block; }
body.theme-light .logo-light { display: block; }
body.theme-light .logo-dark { display: none; }

.main-nav { display: flex; align-items: center; gap: 20px; }
.nav-controls { display: flex; align-items: center; gap: 10px; }
.btn-icon { background: none; border: 1px solid var(--muted); color: var(--text); padding: 5px 6px; cursor: pointer; display: flex; align-items: center; }

/* Layout Metro Grid */
.metro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 11px;
  grid-auto-flow: dense;
}

/* Clases auxiliares para las baldosas */
.tile { background: var(--card); border: 1px solid var(--cborder); transition: transform 0.2s ease; animation: tileIn 0.45s both; }
.tile:active { transform: scale(0.96); }

/* Main Area */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 40px) 60px;
}

/* Footer */
.main-footer {
  border-top: 1px solid var(--hborder);
  background: var(--footer);
}
.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}