/* Loredana Loghin – programare. CSS preluat din programare.html original; ajustările sunt la final. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; max-width: 100%; touch-action: manipulation; }
section, header, footer, nav, main, aside { max-width: 100vw; overflow-x: hidden; }
html { scroll-behavior: smooth; font-size: 17px; line-height: 1.7; overflow-x: hidden; max-width: 100vw; touch-action: pan-y; }
body {
  background: #0d0d0d;
  color: #f5f5f5;
  font-family: Georgia, 'Times New Roman', serif;
  min-height: 100svh;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  touch-action: pan-y;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

:root {
  --bg: #0d0d0d;
  --bg2: #141414;
  --bg3: #1a1a1a;
  --border: #262626;
  --fg: #f5f5f5;
  --fg70: rgba(245,245,245,.7);
  --fg50: rgba(245,245,245,.5);
  --gold: hsl(42 55% 55%);
  --gold-dark: hsl(42 55% 42%);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Style Script', cursive;
  --font-sans: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ── NAV ── */
nav.ll-topnav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(13,13,13,.8);
  border-bottom: 1px solid var(--border);
  height: 5rem;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--fg);
}
.nav-back {
  font-family: var(--font-sans);
  font-size: .875rem;
  color: var(--fg70);
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: color .15s;
}
.nav-back:hover { color: var(--gold); }

/* ── LAYOUT ── */
div.page {
  padding-top: 5rem;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
}
@media (max-width: 900px) {
  div.page {
    grid-template-columns: 1fr;
    display: block;
  }
  .page-sidebar { display: none !important; }
  .page-main {
    padding: 1.5rem 1.25rem 3rem;
    max-width: 100vw;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
}

/* ── SIDEBAR ── */
.page-sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: sticky;
  top: 5rem;
  height: calc(100svh - 5rem);
  overflow-y: auto;
}
@media (max-width: 900px) {
  .page-sidebar { display: none !important; }
}
.sidebar-label {
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
}
.sidebar-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1.2;
  margin-top: .5rem;
}
.sidebar-title em { font-style: italic; }
.sidebar-desc {
  font-family: var(--font-sans);
  font-size: .9375rem;
  color: var(--fg70);
  line-height: 1.7;
}
.sidebar-info { display: flex; flex-direction: column; gap: 0; }
.info-row {
  display: flex;
  gap: 1rem;
  padding: .875rem 0;
  border-top: 1px solid var(--border);
}
.info-key {
  font-family: var(--font-sans);
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  min-width: 5.5rem;
  flex-shrink: 0;
  padding-top: .1rem;
}
.info-val {
  font-family: var(--font-sans);
  font-size: .9375rem;
  color: var(--fg70);
}
.info-val a:hover { color: var(--gold); }

/* ── FORM AREA ── */
.page-main {
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}


.step-indicator {
  display: flex;
  gap: 0;
  margin-bottom: .5rem;
}
@media (max-width: 480px) {
  .step { font-size: .7rem; padding: .5rem .25rem; }
  .step-title { font-size: 1.5rem; }
  .btn-next, .btn-submit { padding: .875rem 1rem; font-size: .875rem; }
  .btn-prev { min-width: 5rem; padding: .875rem .75rem; font-size: .875rem; }
}
.step {
  flex: 1;
  text-align: center;
  padding: .625rem .5rem;
  font-family: var(--font-sans);
  font-size: .8125rem;
  color: var(--fg50);
  border-bottom: 2px solid var(--border);
  transition: color .2s, border-color .2s;
}
.step.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 600;
}
.step.done {
  color: var(--fg70);
  border-bottom-color: rgba(245,245,245,.2);
}

/* ── FORM STEPS ── */
.form-step { display: none; flex-direction: column; gap: 1.25rem; width: 100%; overflow-x: hidden; touch-action: pan-y; }
.form-step.active { display: flex; }

.step-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: .25rem;
}
.step-title em { font-style: italic; }

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: .875rem;
  color: var(--fg70);
  margin-bottom: .4rem;
}
.form-label span { color: var(--fg50); font-size: .8125rem; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: .9375rem;
  padding: .75rem 1rem;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--fg50); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
}
.form-select { cursor: pointer; }
.form-select option { background: #1a1a1a; }
.form-textarea { resize: vertical; min-height: 90px; }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 500px) { .form-row-2 { grid-template-columns: 1fr; } }

/* ── ORA picker — grid dinamic ── */
.ore-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .25rem;
  width: 100%;
}
@media (max-width: 500px) { .ore-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 380px) { .ore-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.ora-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--fg70);
  font-family: var(--font-sans);
  font-size: .875rem;
  padding: .6rem .25rem;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, color .15s, background .15s;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}
.ora-btn:hover { border-color: var(--gold); color: var(--fg); }
.ora-btn.selected { background: var(--gold); border-color: var(--gold); color: #0d0d0d; font-weight: 600; }
.ora-btn:disabled, .ora-btn.ocupat {
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
}

.ore-loading {
  font-family: var(--font-sans);
  font-size: .875rem;
  color: var(--fg50);
  padding: 1rem 0;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.spinner {
  width: 1rem; height: 1rem;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ore-error {
  font-family: var(--font-sans);
  font-size: .875rem;
  color: var(--fg50);
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  background: var(--bg2);
}

/* ── Date input styling ── */
input[type="date"] {
  color-scheme: dark;
  position: relative;
}
/* Ascunde iconita nativa */
input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
/* Wrapper pentru iconita custom */
.date-wrap {
  position: relative;
}
.date-wrap::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  background-color: var(--gold);
  pointer-events: none;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a84c' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a84c' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* ── Buttons ── */
.btn-nav {
  display: flex;
  gap: 1rem;
  margin-top: .5rem;
}
.btn-next, .btn-prev, .btn-submit {
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .025em;
  padding: .875rem 2rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-next, .btn-submit {
  background: var(--gold);
  color: #0d0d0d;
  flex: 1;
}
.btn-next:hover, .btn-submit:hover { background: var(--gold-dark); }
.btn-next:disabled, .btn-submit:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.btn-prev {
  background: transparent;
  border-color: var(--border);
  color: var(--fg70);
  min-width: 7rem;
}
.btn-prev:hover { border-color: var(--fg50); color: var(--fg); }

.form-note {
  font-family: var(--font-sans);
  font-size: .8125rem;
  color: var(--fg50);
  text-align: center;
  margin-top: -.5rem;
}

/* ── Rezumat ── */
.rezumat {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}
.rez-row {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.rez-row:last-child { border-bottom: none; padding-bottom: 0; }
.rez-key {
  display: block !important;
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .25rem;
}
.rez-val {
  display: block !important;
  font-family: var(--font-sans);
  color: var(--fg);
  font-weight: 500;
  font-size: 1rem;
  word-break: break-all;
  overflow-wrap: anywhere;
  max-width: 100%;
}

/* ── Succes ── */
.success-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  padding: 3rem 1rem;
}
.success-screen.show { display: flex; }
.success-icon {
  width: 5rem; height: 5rem;
  border-radius: 50%;
  background: rgba(180,150,80,.12);
  border: 1px solid rgba(180,150,80,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.success-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1.2;
}
.success-desc {
  font-family: var(--font-sans);
  font-size: .9375rem;
  color: var(--fg70);
  max-width: 28rem;
  line-height: 1.7;
}
.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #25D366;
  color: #fff;
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 500;
  padding: .875rem 2rem;
  border: none;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
}
.btn-wa:hover { background: #1ebe5c; }
.btn-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .025em;
  padding: 0 2rem;
  height: 3rem;
  background: var(--gold);
  color: #0d0d0d;
  border: none;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  margin-top: .5rem;
}
.btn-home:hover { background: var(--gold-dark); }

/* ─────────────────────────────────────
   AJUSTĂRI WORDPRESS (plugin)
───────────────────────────────────── */
body.admin-bar nav.ll-topnav { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar nav.ll-topnav { top: 46px; } }

@media (max-width: 768px) {
  .nav-back { min-height: 44px; }
  .ora-btn { min-height: 44px; }
  .btn-next, .btn-prev, .btn-submit, .btn-wa, .btn-home { min-height: 44px; }
  .step { min-height: 44px; display: flex; align-items: center; justify-content: center; }
  /* 16px în câmpuri: iOS nu mai face zoom automat la focus. */
  .form-input, .form-select, .form-textarea { font-size: 16px; }
}
