/* ============================================
   CaixaBank Accionistas – uBelong Clone
   Pixel-perfect replica from screenshots
   ============================================ */

:root {
  --theme: rgb(0, 160, 223);
  --theme-dark: #3080B8;
  --secondary: #ffffff;
  --bg: rgba(0, 0, 0, 0);
  --white: #FFFFFF;
  --panel-bg: #EEEFF3;
  --text-primary: #333333;
  --text-body: #444444;
  --text-label: #8D8E8F;
  --text-hint: #CACACA;
  --border: #E9E9E9;
  --bar-bg: #333333;
  --bar-icon: #D8D8D8;
  --card-shadow: 0 5px 14px rgba(51, 51, 51, 0.2);
  --content-shadow: 0 3px 8px rgba(85, 0, 0, 0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --selected-date: #E8A030;
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--white);
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

/* ============================================
   App Shell
   ============================================ */

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* ============================================
   HEADER (always visible, blue bar)
   ============================================ */

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
  padding: 0 18px;
  background: var(--theme);
  flex-shrink: 0;
  z-index: 20;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 2px;
}


.header-logo {
  height: 36px;
  width: auto;
}

.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white);
  -webkit-tap-highlight-color: transparent;
}

.header-icon-btn:active { opacity: 0.6; }

/* ============================================
   Main Content
   ============================================ */

.app-main {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.screen {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  display: block;
  animation: screenIn 0.2s ease-out;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.home-content {
  padding-bottom: 20px;
  width: 100%;
  background: var(--white);
}

.screen-inner {
  padding-bottom: 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  background: rgb(240 240 240);
  min-height: 100%;
}

.screen::-webkit-scrollbar { width: 0; }

/* ============================================
   HOME – Banner
   ============================================ */

.banner-wrap {
  margin: 14px 14px 0;
  border-radius: 10px;
  overflow: hidden;
}

.banner-wrap a { display: block; }

.banner-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   HOME – Accesos
   ============================================ */

.accesos-block {
  margin-top: 28px;
  padding-bottom: 10px;
}

.accesos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  margin-bottom: 18px;
}

.accesos-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--theme);
  letter-spacing: 0.5px;
}

.accesos-arrows {
  display: flex;
  gap: 8px;
}

.arrow-btn {
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374260;
  padding: 4px;
  -webkit-tap-highlight-color: transparent;
}

.arrow-btn:active { opacity: 0.6; }

.modules-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.modules-scroll::-webkit-scrollbar { display: none; }

.modules-track {
  display: flex;
  padding: 4px 7px 12px;
}

.module-card {
  flex-shrink: 0;
  width: 30vw;
  min-width: 120px;
  max-width: 160px;
  aspect-ratio: 1;
  margin: 0 7px;
  background: linear-gradient(160deg, #2eb8e6 0%, #009ad4 100%);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.module-card:active { transform: scale(0.95); }

.module-icon-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-svg {
  width: 55%;
  height: auto;
}

.module-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding-bottom: 12px;
  flex-shrink: 0;
}

/* ============================================
   Sub-bar (screen title bar)
   ============================================ */

.screen-sub-bar {
  background: var(--theme);
  padding: 14px 20px;
  text-align: center;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sub-bar-back-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white);
  -webkit-tap-highlight-color: transparent;
}

.sub-bar-back-btn:active { opacity: 0.6; }

.screen-sub-title {
  font-size: 30px;
  font-weight: 400;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   PONENTES – Hero
   ============================================ */

.ponentes-hero {
  background: #4398D2;
  padding: 30px 20px 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  border-radius: 0 0 50% 50% / 0 0 40px 40px;
  margin-top: 20px;
}

.ponentes-illustration {
  width: 140px;
  height: auto;
}

/* ============================================
   PONENTES – Speaker Cards
   ============================================ */

.speakers-list {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.speaker-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 20px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--content-shadow);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease;
}

.speaker-row:active { transform: scale(0.98); }

.speaker-icon-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.speaker-icon-svg {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.speaker-text {
  flex: 1;
  min-width: 0;
}

.speaker-text h3 {
  font-size: 25px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================
   VOTACIONES
   ============================================ */

.votaciones-body {
  padding: 20px 20px;
}

.votaciones-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--content-shadow);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.votaciones-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.votaciones-card > p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
  max-width: 280px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 13px 32px;
  background: var(--bar-bg);
  color: var(--theme);
  text-decoration: none;
  border-radius: 34px;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  -webkit-tap-highlight-color: transparent;
}

.btn-action:active { opacity: 0.85; }

.agenda-inner {
  background: var(--white);
}

/* ============================================
   AGENDA – Date Selector
   ============================================ */

.agenda-dates-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.agenda-dates-scroll::-webkit-scrollbar { display: none; }

.agenda-dates-track {
  display: inline-flex;
  justify-content: center;
  padding: 16px 10px;
  min-width: 100%;
}

.agenda-date-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px;
  min-width: 85px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease;
}

.agenda-date-item.selected {
  border-color: var(--selected-date);
}

.agenda-date-weekday {
  font-size: 13px;
  font-weight: 600;
  color: var(--theme);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.agenda-date-day {
  font-size: 32px;
  font-weight: 500;
  color: var(--theme);
  line-height: 1.2;
}

.agenda-date-month {
  font-size: 13px;
  font-weight: 600;
  color: var(--theme);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

/* Agenda Event Detail */
.agenda-detail {
  padding: 28px 24px;
}

.agenda-event-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--theme);
  text-transform: uppercase;
  line-height: 1.4;
}

.agenda-event-time {
  font-size: 16px;
  color: var(--theme);
  margin-top: 10px;
  opacity: 0.7;
}

.agenda-event-lang {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--theme);
  background: rgba(0,160,223,0.1);
  padding: 3px 10px;
  border-radius: 4px;
  margin-top: 8px;
}

/* ============================================
   SPEAKER DETAIL (full page)
   ============================================ */

.speaker-detail-hero {
  background: #4398D2;
  padding: 40px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 0 0 50% 50% / 0 0 50px 50px;
  margin-top: 20px;
  position: relative;
}

.speaker-detail-name {
  font-size: 40px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.speaker-detail-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 10px solid transparent;
  background-image: linear-gradient(#fff, #fff), linear-gradient(to bottom, #FFFFFF, #4398D2);
  background-origin: border-box;
  background-clip: content-box, border-box;
  position: absolute;
  bottom: -80px;
}

.speaker-detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.speaker-detail-body {
  padding: 130px 24px 40px;
}

.speaker-detail-bio {
  font-size: 20px;
  line-height: 1.75;
  color: #000000;
}

/* ============================================
   INBOX / Side Menu
   ============================================ */

.inbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 90;
}

.inbox-overlay.open { display: block; }

.inbox-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 80%;
  max-width: 400px;
  background: var(--panel-bg);
  animation: slideInRight 0.25s ease;
  display: flex;
  flex-direction: column;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.inbox-menu { flex: 1; overflow-y: auto; padding-top: 16px; }

.inbox-item {
  display: flex;
  align-items: center;
  gap: 15px;
  height: 70px;
  margin: 0 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.inbox-item:active { opacity: 0.7; }

.inbox-item-icon {
  font-size: 25px;
  color: var(--text-label);
}

.inbox-item span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: uppercase;
}

/* ============================================
   BOTTOM BAR (mobile only)
   ============================================ */

.bottom-bar {
  display: none;
  align-items: center;
  justify-content: space-around;
  height: 56px;
  background: var(--bar-bg);
  flex-shrink: 0;
  padding: 0 40px;
  padding-bottom: var(--safe-bottom);
}

.bottom-bar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bar-icon);
  -webkit-tap-highlight-color: transparent;
}

.bottom-bar-btn:active { opacity: 0.6; }

/* ============================================
   Mobile layout
   ============================================ */

@media (max-width: 768px) {
  .header-main {
    justify-content: center;
    height: 52px;
  }

  .header-right {
    display: none;
  }

  .header-left {
    gap: 0;
  }

  .bottom-bar {
    display: flex;
  }

  .module-svg {
    width: 49%;
  }

  .module-label {
    font-size: 12px;
  }
}

