/* CONFIGURACIÓN GLOBAL */
:root {
  --primary: #071331;
  --secondary: #183a78;
  --accent: #ffd600;
  --ticker-duration: 42s;
  --page-gap: clamp(9px, 1.05vh, 20px);
  --page-pad: clamp(16px, 2.3vw, 34px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { color: white; font-family: 'Manrope', sans-serif; background: var(--primary); }
.signage {
  width: 100%; height: 100vh; height: 100dvh;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--page-gap); padding: var(--page-pad) var(--page-pad) 0;
  overflow: hidden; isolation: isolate; position: relative;
  background: radial-gradient(ellipse at 90% 0%, #244983 0%, transparent 42%),
    radial-gradient(ellipse at 0% 85%, #122d61 0%, transparent 50%),
    linear-gradient(150deg, var(--primary), #0c2046 60%, #06122b);
}
.signage::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .12; background: repeating-linear-gradient(125deg, transparent 0 145px, #7c9de0 146px, transparent 147px 290px); }

/* ENCABEZADO HORIZONTAL */
.site-header {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr) auto;
  align-items: center; column-gap: clamp(10px, 1.8vw, 26px);
  min-height: 0; padding: clamp(9px, 1.3vh, 24px) 0;
  border-bottom: 1px solid #8ba6d145;
}
.identity, .clock, .floor-area { min-width: 0; }
.identity h1 { margin: 0; font-size: clamp(27px, 4.45vw, 62px); font-weight: 800; line-height: 1.08; letter-spacing: -.055em; }
.identity p { margin: clamp(6px, .65vh, 12px) 0 0; font-size: clamp(11px, 1.52vw, 22px); letter-spacing: .18em; font-weight: 600; color: #c9d8f1; }
.identity-accent { width: clamp(48px, 7vw, 94px); height: 5px; margin-top: clamp(10px, 1.2vh, 20px); background: var(--accent); border-radius: 2px; }
.clock { padding-left: clamp(10px, 1.5vw, 24px); /*border-left: 2px solid var(--accent);*/ }
.clock-label { display: flex; align-items: center; gap: 9px; white-space: nowrap; font-size: clamp(11px, 1.27vw, 18px); font-weight: 800; letter-spacing: .045em; color: #d5e3f7; }
.status-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px #ffd60090; animation: pulse 2.5s ease-in-out infinite; }
.time { white-space: nowrap; font-size: clamp(30px, 4.25vw, 61px); font-weight: 800; line-height: 1.18; letter-spacing: -.070em; font-variant-numeric: tabular-nums; }
.time .ampm { font-size: .48em; margin-left: .18em; letter-spacing: 0; }
.date { white-space: nowrap; font-size: clamp(11px, 1.2vw, 18px); font-weight: 700; letter-spacing: .01em; color: #c6d6f0; }
.floor-area { display: flex; align-items: flex-start; gap: clamp(7px, 1vw, 16px); }
.floor { border-left: 3px solid var(--accent); padding-left: clamp(10px, 1.35vw, 20px); text-align: center; }
.floor-label { display: block; font-size: clamp(12px, 1.4vw, 20px); letter-spacing: .14em; font-weight: 700; }
.floor strong { display: block; font-size: clamp(65px, 10vw, 135px); font-weight: 900; line-height: .95; letter-spacing: -.08em; color: var(--accent); }
.fullscreen-button { width: clamp(30px, 3vw, 44px); height: clamp(30px, 3vw, 44px); padding: 7px; border: 1px solid #a1b9dd66; border-radius: 6px; background: #0c2248; color: #e7f0ff; cursor: pointer; }
.fullscreen-button svg { width: 100%; height: 100%; }
.fullscreen-button:hover { background: #1c427a; }

/* CONTENIDO CENTRAL */
.main-content { display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); gap: var(--page-gap); min-width: 0; min-height: 0; }
.advertising, .right-column { min-width: 0; min-height: 0; height: 100%; }
.advertising { position: relative; overflow: hidden; border: 1px solid #6f94ca7a; background: linear-gradient(155deg, #193f7d, #06152f); }
.ad-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px; font-size: clamp(18px, 2.5vw, 34px); font-weight: 800; color: #dce9ff; }
.ad-placeholder small { margin-top: 10px; font-size: .55em; font-weight: 500; }
.slide { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 1.1s ease; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; display: block; }
.ad-count { position: absolute; z-index: 3; right: 15px; bottom: 15px; padding: 5px 10px; background: #071331b8; font-size: clamp(11px, 1.2vw, 16px); font-weight: 700; font-variant-numeric: tabular-nums; }
.ad-progress { position: absolute; z-index: 4; bottom: 0; left: 0; width: 0; height: 5px; background: var(--accent); }
.ad-progress.running { animation: ad-progress var(--ad-duration, 8s) linear forwards; }
@keyframes ad-progress { from { width: 0; } to { width: 100%; } }
.right-column { display: flex; flex-direction: column; gap: var(--page-gap); }
.video-panel { position: relative; width: 100%; aspect-ratio: 16 / 9; flex: none; min-width: 0; background: #030918; border: 1px solid #6f94ca7a; overflow: hidden; }
#youtubePlayer, #youtubePlayer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 18px; font-size: clamp(12px, 1.4vw, 19px); background: #071631; color: #c8d7ee; }
.video-fallback.hidden { display: none; }
.institutional { min-height: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(18px, 2.8vw, 42px); border: 1px solid #6f94ca7a; background: linear-gradient(145deg, #1c3d77c9, #081936e8); }
.institutional-rule { width: clamp(45px, 6vw, 85px); height: 5px; margin-bottom: clamp(15px, 2vh, 30px); background: var(--accent); }
.institutional h2 { margin: 0; font-size: clamp(24px, 3.25vw, 45px); font-weight: 800; letter-spacing: -.035em; line-height: 1.18; }
.institutional p { margin: clamp(14px, 1.5vh, 26px) 0 0; font-size: clamp(17px, 2vw, 28px); line-height: 1.5; color: #d7e4f8; }

/* MARQUEE ORIGINAL V1: reglas, colores y animación conservados */
.ticker { margin-inline: calc(-1 * var(--page-pad)); overflow: hidden; background: #e6edff; color: #0a1942; display: flex; align-items: center; min-height: 0; height: 6dvh; }
.ticker-track { display: flex; align-items: center; width: max-content; animation: marquee var(--ticker-duration) linear infinite; will-change: transform; }
.ticker-copy { display: flex; align-items: center; flex: none; white-space: nowrap; font-size: clamp(14px, 1.8vw, 26px); font-weight: 800; letter-spacing: .02em; }
.ticker-item { padding-inline: clamp(20px, 3vw, 45px); }
.ticker-sep { color: #4b6cbb; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pulse { 50% { opacity: .35; } }

/* VENTANAS HORIZONTALES Y VIEWPORTS PEQUEÑOS */
@media (orientation: landscape) {
  :root { --page-gap: clamp(5px, .8vh, 12px); --page-pad: clamp(9px, 1.5vw, 24px); }
  .site-header { padding: 2px 0 5px; }
  .identity h1 { font-size: clamp(18px, 2.8vw, 42px); }
  .identity p { font-size: clamp(9px, 1.05vw, 16px); margin-top: 3px; }
  .identity-accent { margin-top: 5px; height: 3px; }
  /* .time { font-size: clamp(22px, 3.4vw, 46px); } */
  .date, .clock-label { font-size: clamp(9px, 1.05vw, 15px); }
  .floor strong { font-size: clamp(38px, 7vh, 80px); }
  .floor-label { font-size: 12px; }
  .institutional { padding: clamp(10px, 1.7vw, 24px); }
  .institutional h2 { font-size: clamp(18px, 2.2vw, 32px); }
  .institutional p { font-size: clamp(12px, 1.4vw, 20px); }
  .ticker { height: 7dvh; }
}
@media (max-width: 700px) {
  :root { --page-pad: 10px; --page-gap: 7px; }
  .site-header { column-gap: 6px; }
  .identity h1 { font-size: clamp(16px, 4.2vw, 28px); }
  .identity p { font-size: clamp(7px, 1.55vw, 12px); letter-spacing: .08em; }
  .clock { padding-left: 6px; }
  .clock-label { font-size: clamp(7px, 1.45vw, 11px); gap: 4px; }
  .status-dot { width: 5px; height: 5px; }
  .time { font-size: clamp(16px, 4vw, 28px); }
  .date { font-size: clamp(7px, 1.3vw, 11px); }
  .floor { padding-left: 5px; border-left-width: 2px; }
  .floor strong { font-size: clamp(32px, 9vw, 64px); }
  .floor-label { font-size: 9px; }
  .fullscreen-button { width: 25px; height: 25px; padding: 4px; }
  .institutional { padding: 10px; }
  .institutional h2 { font-size: clamp(15px, 3vw, 25px); }
  .institutional p { font-size: clamp(11px, 2.2vw, 17px); }
  .institutional-rule { margin-bottom: 8px; height: 3px; }
}
@media (prefers-reduced-motion: reduce) { .status-dot, .slide, .ad-progress.running { animation: none; transition: none; } }
