* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #ffffff;
  font-family: 'Segoe UI', Arial, sans-serif;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
}

/* ── Slide canvas ── */
.slide-wrap {
  width: 1200px;
  height: 675px;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(17,55,91,.15);
  flex-shrink: 0;
  background: #ffffff;
}

.slide {
  position: absolute;
  inset: 0;
  display: none;
  background: #ffffff;
}
.slide.active { display: block; }

/* ── Image slides ── */
.slide-img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  background: #ffffff;
}

/* ── Placeholder ── */
.slide-ph {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; width: 100%; height: 100%;
}
.slide-ph__num  { font-size: 96px; font-weight: 700; color: #dde3ee; line-height: 1; }
.slide-ph__file { font-size: 13px; color: #bbb; font-family: monospace; }

/* ── Nav arrows ── */
.nav-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid #11375b;
  background: rgba(255,255,255,.92);
  color: #11375b;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  transition: background .18s, color .18s, opacity .18s;
  opacity: .75;
}
.nav-btn:hover:not(:disabled) { background: #11375b; color: #fff; opacity: 1; }
.nav-btn:disabled { opacity: .15; cursor: default; border-color: #aaa; color: #aaa; }
.nav-btn--prev { left: 14px; }
.nav-btn--next { right: 14px; }

/* ── Global logo overlay ── */
.logo-overlay {
  position: absolute;
  top: 40px; right: 56px;
  background: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  z-index: 40;
}
.logo-overlay img { height: 40px; width: auto; flex-shrink: 0; }
.logo-overlay__text { display: flex; flex-direction: column; line-height: 1.3; }
.logo-overlay__name { font-size: 14px; font-weight: 700; color: #11375b; white-space: nowrap; }
.logo-overlay__tag  { font-size: 11px; color: #888; white-space: nowrap; }

/* ── Bottom controls ── */
.controls { display: flex; align-items: center; gap: 20px; }
.ctrl {
  padding: 9px 26px;
  border: 1px solid #11375b;
  background: #fff;
  color: #11375b;
  border-radius: 8px;
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.ctrl:hover:not(:disabled) { background: #11375b; color: #fff; }
.ctrl:disabled { opacity: .2; cursor: default; border-color: #bbb; color: #bbb; }
.counter { font-size: 14px; color: #888; min-width: 64px; text-align: center; }
.counter b { color: #11375b; font-size: 18px; }
.ctrl--pdf { background: #11375b; color: #fff; border-color: #11375b; }
.ctrl--pdf:hover:not(:disabled) { background: #0e2d4d; color: #fff; }
.ctrl--pdf:disabled { opacity: .4; background: #11375b; color: #fff; }

/* ═══════════════════════════════════════
   TYPE: TEAM (slide 1)
═══════════════════════════════════════ */
.presa-team {
  width: 100%; height: 100%;
  background: linear-gradient(130deg, #0b2340 0%, #11375b 50%, #1e4a66 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 50px;
  gap: 28px;
  position: relative; overflow: hidden;
}
.presa-team::before {
  content: '';
  position: absolute; top: -80px; right: -60px;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(112,157,152,.08);
  pointer-events: none;
}
.presa-team__logo {
  position: absolute; top: 30px; right: 24px;
  background: #ffffff; border-radius: 14px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; z-index: 2;
}
.presa-team__logo img { height: 40px; width: auto; flex-shrink: 0; }
.presa-team__logo-text { display: flex; flex-direction: column; line-height: 1.3; }
.presa-team__logo-name { font-size: 14px; font-weight: 700; color: #11375b; white-space: nowrap; }
.presa-team__logo-tag  { font-size: 11px; color: #888; white-space: nowrap; }
.presa-team__heading {
  font-size: 36px; font-weight: 700; color: #fff;
  text-align: center; position: relative; z-index: 1;
}
.presa-team__experts {
  display: flex; gap: 14px;
  position: relative; z-index: 1; width: 100%;
}
.presa-team__expert {
  flex: 1;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.presa-team__expert-top { display: flex; align-items: center; gap: 16px; }
.presa-team__photo {
  width: 108px; height: 108px; border-radius: 50%;
  background-size: cover; background-position: center top; background-repeat: no-repeat;
  border: 2px solid rgba(112,157,152,.4); flex-shrink: 0;
}
.presa-team__name { font-size: 28px; font-weight: 700; color: #fff; line-height: 1.2; }
.presa-team__role { font-size: 15px; color: rgba(255,255,255,.55); line-height: 1.4; margin-top: 4px; }
.presa-team__tag {
  display: inline-flex; align-items: center;
  background: rgba(112,157,152,.15); border: 1px solid rgba(112,157,152,.3);
  border-radius: 100px; padding: 4px 14px;
  font-size: 15px; color: #9bbab6; width: fit-content;
}
.presa-team__domain { font-size: 14px; color: rgba(255,255,255,.25); position: relative; z-index: 1; }

/* ═══════════════════════════════════════
   TYPE: OVERLAY (slides with positioned text)
═══════════════════════════════════════ */
.presa-overlay {
  width: 100%; height: 100%;
  position: relative; overflow: hidden;
  background: #ffffff;
}
.presa-overlay__bg {
  position: absolute;
  object-fit: contain;
}

/* text-wrap handles absolute positioning; presa-overlay__text handles content */
.text-wrap {
  position: absolute;
}
.presa-overlay__text {
  white-space: pre-wrap;
  word-break: break-word;
}
.presa-overlay__blocks {
  position: absolute;
  display: flex; flex-direction: column;
}
.presa-overlay__block {
  padding: 16px 0;
  border-bottom: 1px solid rgba(0,0,0,.1);
}
.presa-overlay__block:last-child { border-bottom: none; }
.presa-overlay__block-heading { margin-bottom: 6px; }

/* ── Admin mode ── */
.slide-wrap.admin-mode { outline: 3px solid #e67e22; outline-offset: 2px; }

.admin-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.admin-badge {
  font-size: 12px; font-weight: 600;
  color: #fff;
  background: #e67e22;
  padding: 5px 14px;
  border-radius: 6px;
}

.admin-undo {
  font-size: 12px; font-weight: 600; font-family: inherit;
  color: #e67e22;
  background: #fff;
  border: 1px solid #e67e22;
  border-radius: 6px;
  padding: 5px 14px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.admin-undo:hover:not(:disabled) { background: #e67e22; color: #fff; }
.admin-undo:disabled { opacity: .35; cursor: default; }

.admin-editable {
  cursor: grab;
  outline: 1px dashed rgba(230,126,34,.7);
  outline-offset: 2px;
  min-width: 20px; min-height: 16px;
}
.admin-editable:active { cursor: grabbing; }

/* ── Admin toolbar (inside slide canvas) ── */
.admin-toolbar {
  position: absolute;
  top: 6px; right: 6px;
  display: none;
  align-items: center; gap: 4px;
  z-index: 60;
}
.admin-mode .admin-toolbar { display: flex; }

.adm-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(230,126,34,.6);
  background: rgba(255,255,255,.92);
  color: #e67e22;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background .15s, color .15s;
}
.adm-btn:hover:not(:disabled) { background: #e67e22; color: #fff; }
.adm-btn:disabled { opacity: .3; cursor: default; }
.adm-btn--add { font-size: 18px; font-weight: 400; }

/* ── Trash button ── */
.trash-btn {
  display: none;
  position: absolute;
  top: -10px; left: 28px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(192,57,43,.5);
  background: rgba(255,255,255,.9);
  color: #c0392b;
  font-size: 11px;
  cursor: pointer;
  align-items: center; justify-content: center;
  padding: 0;
  z-index: 60;
  transition: background .15s, color .15s;
}
.admin-mode .trash-btn { display: flex; }
.trash-btn:hover { background: #c0392b; color: #fff; border-color: #c0392b; }

/* ── Add menu ── */
.add-menu {
  position: fixed;
  z-index: 9200;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  overflow: hidden;
  min-width: 160px;
}
.add-menu__item {
  display: block; width: 100%;
  padding: 10px 16px;
  background: none; border: none;
  font-size: 13px; font-family: inherit;
  color: #1c1c2e; text-align: left;
  cursor: pointer;
  transition: background .12s;
}
.add-menu__item:hover { background: #f7f8fa; }

/* ── Gear button ── */
.gear-btn {
  display: none;
  position: absolute;
  top: -10px; left: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(230,126,34,.6);
  background: rgba(255,255,255,.9);
  color: #e67e22;
  font-size: 12px;
  cursor: pointer;
  align-items: center; justify-content: center;
  padding: 0;
  z-index: 60;
  line-height: 1;
  transition: background .15s, color .15s;
}
.admin-mode .gear-btn { display: flex; }
.gear-btn:hover { background: #e67e22; color: #fff; border-color: #e67e22; }

/* ── Gear panel ── */
.gear-panel {
  position: fixed;
  z-index: 9100;
  width: 280px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 32px rgba(0,0,0,.22);
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 13px;
  overflow: hidden;
}
.gear-panel__hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: #e67e22;
  color: #fff;
  font-weight: 600; font-size: 13px;
}
.gear-panel__hd { cursor: grab; user-select: none; }
.gear-panel__x {
  background: none; border: none; color: #fff;
  font-size: 16px; cursor: pointer; line-height: 1; padding: 0 2px;
}
.gear-panel__bd { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.gp-lbl { display: flex; flex-direction: column; gap: 3px; color: #555; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.gp-row { display: flex; gap: 8px; }
.gp-row .gp-lbl { flex: 1; }
.gp-in {
  width: 100%; padding: 6px 8px;
  border: 1px solid #d0d7e3; border-radius: 6px;
  font-size: 13px; font-family: inherit;
  outline: none; color: #1c1c2e;
  transition: border-color .15s;
}
.gp-in:focus { border-color: #e67e22; }
textarea.gp-in { resize: vertical; min-height: 52px; }
.gp-hex { font-family: monospace; letter-spacing: .5px; }

/* Color palette */
.gp-palette {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 5px;
}
.gp-swatch {
  width: 20px; height: 20px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer; padding: 0;
  transition: transform .1s;
}
.gp-swatch:hover { transform: scale(1.2); }
.gp-swatch.active { border-color: #e67e22; transform: scale(1.15); }

.gp-more {
  font-size: 10px; font-family: inherit;
  color: #709d98; background: none;
  border: 1px dashed #9bbab6;
  border-radius: 4px;
  padding: 2px 6px; cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.gp-more:hover { color: #11375b; border-color: #11375b; }

/* ── Image picker panel ── */
.img-picker {
  position: fixed;
  z-index: 9200;
  width: 520px;
  max-height: 480px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 32px rgba(0,0,0,.22);
  font-family: 'Segoe UI', Arial, sans-serif;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.img-picker__body {
  overflow-y: auto;
  flex: 1;
  padding: 12px;
}
.img-picker__loading {
  padding: 20px; text-align: center;
  font-size: 13px; color: #888;
}
.img-picker__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.img-picker__item {
  cursor: pointer;
  border-radius: 6px;
  border: 2px solid transparent;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .15s;
}
.img-picker__item:hover { border-color: #e67e22; }
.img-picker__item img {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover; display: block;
  background: #f0f0f0;
}
.img-picker__item span {
  font-size: 10px; color: #666;
  padding: 3px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Validation errors */
.gp-errors {
  background: #fff5f5;
  border: 1px solid #f5c6c6;
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 4px;
}
.gp-errors p {
  font-size: 11px;
  color: #c0392b;
  margin: 0 0 3px;
  line-height: 1.4;
}
.gp-errors p:last-child { margin-bottom: 0; }

/* ── Image wrapper ── */
.img-wrap {
  position: absolute;
  overflow: visible;
}
.admin-mode .img-wrap {
  outline: 2px dashed rgba(230,126,34,.7);
  outline-offset: 1px;
  cursor: grab;
}
.admin-mode .text-wrap { cursor: grab; user-select: none; }
.admin-mode .presa-overlay__text { pointer-events: none; user-select: none; }

/* Image gear/trash — positioned on .slide div or inside .img-wrap */
.gear-btn--img { position: absolute; z-index: 55; }
.gear-panel__ft {
  display: flex; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
}
.gear-panel__save {
  flex: 1; padding: 8px;
  background: #11375b; color: #fff;
  border: none; border-radius: 7px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .15s;
}
.gear-panel__save:hover { background: #0e2d4d; }
.gear-panel__cancel {
  flex: 1; padding: 8px;
  background: #f0f4f8; color: #555;
  border: none; border-radius: 7px;
  font-size: 13px; font-family: inherit;
  cursor: pointer;
}
