/* ================================================================
   ghiduri.css — Pagina de Ghiduri dordemare.ro
   Design language: sejururi/index reference
   ================================================================ */

/* ── PAGE ────────────────────────────────────────────────────── */
.guide-page {
  background: var(--c-bg, #FAFAFA);
  min-height: 100vh;
}

/* ── HERO ────────────────────────────────────────────────────── */
.guide-hero {
  background: #F7F7F7;
  position: relative;
  overflow: hidden;
  padding-top: 72px; /* navbar height */
}

[data-theme="dark"] .guide-hero {
  background: var(--c-bg, #0D1117);
}

/* Decorative SVG wave lines — like sejururi */
.guide-deco {
  position: absolute;
  top: -20px;
  right: -40px;
  width: 560px;
  height: 520px;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}
.guide-deco path {
  fill: none;
  stroke: rgba(0, 130, 181, 0.12);
  stroke-width: 1.5;
  stroke-linecap: round;
}
[data-theme="dark"] .guide-deco path {
  stroke: rgba(0, 130, 181, 0.08);
}

.guide-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 52px 48px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ── Hero text ─────────────────────────────────────────────── */

.guide-hero h1 {
  font-family: var(--font, 'Inter', sans-serif);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #000;
  margin: 0 0 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

[data-theme="dark"] .guide-hero h1 {
  color: var(--c-text, #E6EDF3);
  text-shadow: none;
}

.guide-hero h1 em {
  font-style: italic;
  color: var(--c-primary, #0082B5);
}

.guide-hero-script {
  font-family: 'Dancing Script', cursive;
  font-style: normal;
  font-weight: 700;
  color: #F97316;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .guide-hero-script {
  color: #FB923C;
}

.guide-hero-sub {
  font-size: clamp(0.8rem, 1vw, 0.88rem);
  font-weight: 400;
  color: rgba(0, 0, 0, 0.5);
  line-height: 1.6;
  max-width: 500px;
  margin: 0;
}

[data-theme="dark"] .guide-hero-sub {
  color: var(--c-text-secondary, #6b7280);
}

/* ── Carousel control (arrows + dots) — hidden on desktop ── */
.carousel-ctrl {
  display: none; /* shown only on mobile via media query */
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  width: 100%;
  max-width: 860px;
}

.carousel-arr {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--c-border, #E8ECF1);
  background: var(--c-surface, #fff);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.carousel-arr:hover {
  border-color: var(--c-primary, #0082B5);
  background: rgba(0, 130, 181, 0.05);
  transform: scale(1.06);
}

[data-theme="dark"] .carousel-arr {
  background: rgba(22,27,34,0.8);
  border-color: rgba(255,255,255,0.12);
}

.carousel-arr svg {
  width: 18px;
  height: 18px;
  stroke: var(--c-text, #111827);
}

[data-theme="dark"] .carousel-arr svg {
  stroke: var(--c-text, #E6EDF3);
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-border, #E8ECF1);
  transition: background 0.2s, transform 0.2s, width 0.2s;
  cursor: pointer;
}

.carousel-dot.active {
  background: var(--c-primary, #0082B5);
  transform: scale(1.3);
}

/* ── Role Cards grid ──────────────────────────────────────── */
.guide-role-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 860px;
  margin-top: 48px;
}

.role-card {
  background: var(--c-surface, #fff);
  border: 1.5px solid var(--c-border, #E8ECF1);
  border-radius: 20px;
  padding: 32px 22px 28px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  user-select: none;
}

[data-theme="dark"] .role-card {
  background: rgba(22, 27, 34, 0.8);
  border-color: rgba(255,255,255,0.08);
}

.role-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  transform: translateY(-4px);
  border-color: var(--role-color, var(--c-primary));
}

.role-card.active {
  border-color: var(--role-color, var(--c-primary));
  box-shadow: 0 0 0 1px var(--role-color), 0 4px 20px rgba(0,0,0,0.08);
}

.role-card[data-role="client"]     { --role-color: #0082B5; }
.role-card[data-role="proprietar"] { --role-color: #F97316; }
.role-card[data-role="admin"]      { --role-color: #D4AF37; }

.role-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 18px;
  transition: background 0.18s, transform 0.2s;
}

.role-card:hover .role-icon {
  transform: scale(1.06);
}

.role-card[data-role="client"]     .role-icon { background: #E9F2F6; }
.role-card[data-role="proprietar"] .role-icon { background: #FEF3E8; }
.role-card[data-role="admin"]      .role-icon { background: #FDF7E0; }

.role-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--role-color, #0082B5);
}

.role-card[data-role="client"].active     .role-icon { background: rgba(0, 130, 181, 0.12); }
.role-card[data-role="proprietar"].active .role-icon { background: rgba(249, 115, 22, 0.12); }
.role-card[data-role="admin"].active      .role-icon { background: rgba(212, 175, 55, 0.15); }

.role-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-text, #111827);
  margin-bottom: 7px;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .role-label {
  color: var(--c-text, #E6EDF3);
}

.role-desc {
  font-size: 0.78rem;
  color: rgba(0,0,0,0.44);
  line-height: 1.45;
}

[data-theme="dark"] .role-desc {
  color: var(--c-text-secondary, #6b7280);
}


/* ── Panels ──────────────────────────────────────────────── */
.guide-panels {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 48px 96px;
}

.guide-panel {
  display: none;
}

.guide-panel.active {
  display: block;
}

/* ── Section label ────────────────────────────────────────── */
.guide-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.guide-section-label-line {
  flex: 1;
  height: 1px;
  background: var(--c-border, #E8ECF1);
}

.guide-section-label-text {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-tertiary, #9CA3AF);
  white-space: nowrap;
}

/* ── Steps: all visible on desktop ───────────────────────── */
.guide-steps {
  display: block;
  margin-bottom: 64px;
}

/* Stepper hidden on desktop — only used on mobile */
.guide-stepper {
  display: none;
}

/* Mobile stepper node styles (used when stepper is re-shown) */
.stepper-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 64px;
  cursor: pointer;
  position: relative;
}

.stepper-node::after {
  content: '';
  position: absolute;
  top: 19px;
  left: calc(50% + 20px);
  width: calc(100% - 40px);
  height: 1.5px;
  background: var(--c-border, #E8ECF1);
  pointer-events: none;
}

.stepper-node:last-child::after { display: none; }

.stepper-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--c-border, #E8ECF1);
  background: var(--c-surface, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--c-text-tertiary, #9CA3AF);
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

[data-theme="dark"] .stepper-circle {
  background: var(--c-surface, #161B22);
}

.stepper-node.active .stepper-circle {
  border-color: var(--role-color, #0082B5);
  background: var(--role-color, #0082B5);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.stepper-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--c-text-tertiary, #9CA3AF);
  text-align: left;
  margin-top: 11px;
  line-height: 1.3;
  max-width: none;
  transition: color 0.2s;
}

.stepper-node.active .stepper-title {
  color: var(--c-text, #111827);
}

[data-theme="dark"] .stepper-node.active .stepper-title {
  color: var(--c-text, #E6EDF3);
}

/* Active line segment */
.stepper-node.done::after {
  background: var(--role-color, #0082B5);
  opacity: 0.4;
}

/* Step detail card — desktop: all visible, number left + content right */
.step-detail {
  background: var(--c-surface, #fff);
  border: 1px solid var(--c-border, #E8ECF1);
  border-radius: 20px;
  padding: 26px 32px;
  display: grid;
  grid-template-columns: 76px 1fr;
  grid-template-rows: auto auto;
  gap: 0 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

[data-theme="dark"] .step-detail {
  background: var(--c-surface, #161B22);
}

.step-detail.visible {
  /* on desktop all are visible; on mobile JS adds this */
}

.step-detail-num {
  grid-column: 1;
  grid-row: 1 / 3;
  position: static;
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--role-color, #0082B5);
  opacity: 0.18;
  line-height: 1;
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
  align-self: center;
  text-align: center;
}

.step-detail-head {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.step-detail-badge {
  display: none;
}

.step-detail h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-text, #111827);
  letter-spacing: -0.02em;
  margin: 0;
  padding-top: 0;
  line-height: 1.3;
}

[data-theme="dark"] .step-detail h3 {
  color: var(--c-text, #E6EDF3);
}

.step-detail p {
  grid-column: 2;
  grid-row: 2;
  font-size: 0.875rem;
  color: var(--c-text-secondary, #4B5563);
  line-height: 1.7;
  margin: 0;
}

/* Nav hidden on desktop — shown only on mobile */
.step-nav {
  display: none;
}

.step-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-text-secondary, #4B5563);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: var(--font, 'Inter', sans-serif);
  transition: color 0.15s, background 0.15s;
}

.step-nav-btn:hover {
  color: var(--role-color, #0082B5);
  background: var(--c-bg, #FAFAFA);
}

.step-nav-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.step-nav-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}

.step-nav-count {
  font-size: 0.78rem;
  color: var(--c-text-tertiary, #9CA3AF);
  font-weight: 500;
}

/* Role color CSS vars per panel */
#panel-client    { --role-color: #0082B5; }
#panel-proprietar{ --role-color: #F97316; }
#panel-admin     { --role-color: #D4AF37; }

/* ── FAQ ─────────────────────────────────────────────────── */
.guide-faq {
  margin-bottom: 64px;
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid var(--c-border, #E8ECF1);
}

.faq-item:first-child {
  border-top: 1px solid var(--c-border, #E8ECF1);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-text, #111827);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font, 'Inter', sans-serif);
  transition: color 0.15s;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .faq-q {
  color: var(--c-text, #E6EDF3);
}

.faq-q:hover {
  color: var(--role-color, #0082B5);
}

.faq-chevron {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
  transition: transform 0.24s var(--ease, cubic-bezier(0.4,0,0.2,1));
  opacity: 0.5;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease;
  font-size: 0.875rem;
  color: var(--c-text-secondary, #4B5563);
  line-height: 1.7;
  padding: 0;
}

.faq-a-inner {
  padding: 0 0 20px;
  border-left: 2px solid var(--role-color, #0082B5);
  padding-left: 16px;
  margin-left: 2px;
}

.faq-item.open .faq-a {
  max-height: 400px;
}

/* ── Tips ────────────────────────────────────────────────── */
.guide-tips {
  margin-bottom: 0;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* First card spans full width */
.tips-grid .tip-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 20px;
  align-items: start;
}

.tips-grid .tip-card:first-child .tip-icon {
  grid-row: 1 / 3;
}

.tip-card {
  background: var(--c-surface, #fff);
  border: 1px solid var(--c-border, #E8ECF1);
  border-radius: 16px;
  padding: 22px;
  transition: box-shadow 0.18s, transform 0.18s;
}

[data-theme="dark"] .tip-card {
  background: var(--c-surface, #161B22);
}

.tip-card:hover {
  box-shadow: var(--s, 0 2px 8px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04));
  transform: translateY(-2px);
}

.tip-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 14px;
}

.tips-grid .tip-card:first-child .tip-icon {
  margin-bottom: 0;
}

.tip-icon svg {
  width: 20px;
  height: 20px;
}

/* Color tints per role */
#panel-client .tip-icon     { background: rgba(0,130,181,0.08); }
#panel-client .tip-icon svg { stroke: #0082B5; }
#panel-proprietar .tip-icon     { background: rgba(249,115,22,0.08); }
#panel-proprietar .tip-icon svg { stroke: #F97316; }
#panel-admin .tip-icon     { background: rgba(212,175,55,0.1); }
#panel-admin .tip-icon svg { stroke: #B8922A; }

.tip-card h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c-text, #111827);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .tip-card h3 {
  color: var(--c-text, #E6EDF3);
}

.tip-card p {
  font-size: 0.83rem;
  color: var(--c-text-secondary, #4B5563);
  margin: 0;
  line-height: 1.6;
}

/* ── Section divider ─────────────────────────────────────── */
.guide-section-divider {
  border: none;
  border-top: 1px solid var(--c-border, #E8ECF1);
  margin: 48px 0;
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes guideFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.guide-hero-inner h1,
.guide-hero-inner .guide-hero-sub { animation: guideFadeUp 0.5s cubic-bezier(0.22,1,0.36,1) 0.05s both; }
.guide-role-cards { animation: guideFadeUp 0.55s cubic-bezier(0.22,1,0.36,1) 0.2s both; }

@media (prefers-reduced-motion: reduce) {
  .guide-hero-inner h1,
  .guide-hero-inner .guide-hero-sub,
  .guide-role-cards { animation: none; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .guide-hero-inner {
    padding: 44px 32px 52px;
  }

  .guide-role-cards {
    max-width: 100%;
  }

  .guide-panels {
    padding: 44px 32px 72px;
  }
}

@media (max-width: 768px) {
  .guide-deco { display: none; }

  .guide-hero {
    padding-top: 60px;
  }

  .guide-hero-inner {
    padding: 36px 20px 44px;
  }

  .guide-hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .guide-hero-sub {
    font-size: 0.82rem;
  }

  /* Carousel for role cards on mobile */
  .guide-role-cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px;
    margin-top: 36px;
    padding: 4px 4px 16px;
    /* overflow beyond container */
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .guide-role-cards::-webkit-scrollbar { display: none; }

  .role-card {
    flex: 0 0 calc(75vw);
    scroll-snap-align: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px 24px;
    border-radius: 18px;
  }

  .role-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
    flex-shrink: 0;
  }

  /* Carousel ctrl — show on mobile */
  .carousel-ctrl {
    display: flex;
    margin-top: 24px;
  }

  /* Steps: stepper visible on mobile, one card at a time */
  .guide-stepper {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    margin-bottom: 24px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .guide-stepper::-webkit-scrollbar { display: none; }

  .stepper-node {
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 64px;
    gap: 0;
  }

  .stepper-title {
    text-align: center;
    margin-top: 8px;
  }

  /* On mobile: hide all steps by default, show only .visible */
  .step-detail {
    display: none;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 22px 20px;
    margin-bottom: 0;
  }

  .step-detail.visible {
    display: block;
  }

  .step-detail-num {
    position: absolute;
    top: -8px;
    right: 20px;
    font-size: 5rem;
    opacity: 0.05;
    grid-column: unset;
    grid-row: unset;
    align-self: auto;
    text-align: right;
  }

  .step-detail-head {
    grid-column: unset;
    grid-row: unset;
    margin-bottom: 10px;
    gap: 12px;
  }

  .step-detail-badge {
    display: flex;
    width: 32px;
    height: 32px;
    font-size: 0.78rem;
    border-radius: 9px;
  }

  .step-detail h3 {
    font-size: 1rem;
    padding-top: 4px;
  }

  .step-detail p {
    grid-column: unset;
    grid-row: unset;
    font-size: 0.875rem;
  }

  .step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--c-border, #E8ECF1);
  }

  .guide-panels {
    padding: 36px 20px 64px;
  }

  .tips-grid {
    grid-template-columns: 1fr;
  }

  .tips-grid .tip-card:first-child {
    grid-template-columns: auto 1fr;
  }

}

@media (max-width: 480px) {
  .guide-hero-inner {
    padding: 28px 16px 36px;
  }

  .guide-role-cards {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .role-card {
    flex: 0 0 calc(82vw);
  }

  .role-icon {
    width: 52px;
    height: 52px;
  }


  .stepper-circle {
    width: 34px;
    height: 34px;
    font-size: 0.76rem;
  }

  .stepper-title {
    font-size: 0.64rem;
  }

  .stepper-node::after {
    top: 16px;
  }

  .step-detail {
    padding: 20px;
    border-radius: 16px;
  }
}
