/* ===================================================
   HESTIA HEALTH TV - ESTILOS CORPORATIVOS Y ACCESIBLES
   =================================================== */

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

:root {
  --hestia-blue: #0069A7;
  --hestia-accent: #2B7FE0;
  --hestia-green: #3E9E70;
  --hestia-mint: #6cca98;
  --hestia-dark: #1E2A32;
  --hestia-muted: #4A5760;
  --hestia-bg: #FAFAF8;
  --hestia-border: #E4E1D9;
  --hestia-card: #FFFFFF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  background: #0d1418;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--hestia-dark);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* Base Stage for 1080p Smart TV Scaling */
#tv-viewport {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#stage {
  width: 1920px;
  height: 1080px;
  flex: none;
  position: relative;
  transform-origin: center center;
  background: var(--hestia-bg);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

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

.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--hestia-bg);
  animation: screenFadeIn 0.26s ease;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* In TV mode, hide the virtual mouse cursor so Smart TV browser disables pointer mode */
body:not(.mobile-mode),
body:not(.mobile-mode) * {
  cursor: none !important;
}

/* Remote Control / Hover / Native TV Focus States */
.focusable {
  outline: none;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.focusable:hover,
.focusable:focus,
.focusable.focused {
  transform: scale(1.03) !important;
  box-shadow: 0 0 0 6px var(--hestia-accent), 0 0 0 15px rgba(43, 127, 224, 0.24), 0 24px 56px rgba(43, 127, 224, 0.32) !important;
  border-color: var(--hestia-accent) !important;
  z-index: 10;
}

/* Primary Action Buttons */
.btn-primary {
  background: var(--hestia-accent);
  color: #fff;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 46px;
  box-shadow: 0 14px 34px rgba(43, 127, 224, 0.28);
}

.btn-secondary {
  background: #fff;
  border: 1px solid var(--hestia-border);
  color: var(--hestia-dark);
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 46px;
  box-shadow: 0 14px 34px rgba(30, 42, 50, 0.07);
}

/* Chips / Badges */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--hestia-border);
  border-radius: 999px;
  padding: 18px 34px;
  font-family: 'Inter';
  font-weight: 600;
  font-size: 27px;
  color: var(--hestia-dark);
  box-shadow: 0 10px 26px rgba(30, 42, 50, 0.05);
  cursor: pointer;
}

/* Bottom Nav Pill Bar (El Hospital) */
.bottom-nav-bar {
  position: absolute;
  left: 50%;
  bottom: 46px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--hestia-border);
  border-radius: 999px;
  padding: 10px 12px;
  box-shadow: 0 14px 34px rgba(30, 42, 50, 0.12);
  z-index: 20;
}

.nav-pill {
  cursor: pointer;
  font-family: 'Inter';
  font-weight: 600;
  font-size: 22px;
  color: var(--hestia-muted);
  border-radius: 999px;
  padding: 12px 26px;
  transition: all 0.2s;
}

.nav-pill.active {
  color: #fff;
  background: var(--hestia-accent);
}

/* Modal Backdrop */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 32, 40, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: screenFadeIn 0.2s ease;
}

/* Dynamic Mobile View Toggle Bar */
#device-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  background: rgba(14, 23, 29, 0.9);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 6px 12px;
  display: flex;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.device-btn {
  background: transparent;
  color: #c7d2da;
  border: none;
  font-family: 'Inter';
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.device-btn.active {
  background: var(--hestia-accent);
  color: #fff;
}

/* Mobile Adaptive Layout */
body.mobile-mode #stage {
  width: 100vw !important;
  height: 100vh !important;
  transform: none !important;
  box-shadow: none;
  overflow-y: auto !important;
  overflow-x: hidden;
}

body.mobile-mode .screen {
  overflow-y: auto !important;
  position: relative !important;
  min-height: 100vh;
}
