/**
 * FILE: assets/css/global.css
 * VERSION: 1.3.3 | 2026-01-16 03:35 Europe/Berlin
 * CHANGELOG:
 *  - FIX mobil (index/submeniu): info (titlu+descriere) nu mai intră sub header (align-items flex-start + spacing)
 *  - FIX mobil: header chiar transparent (fără blur/backdrop-filter, fără shadow)
 *  - FIX landscape: info mai lat + mai puține rânduri (line-clamp)
 */

/* ===========================
   RESET & BAZĂ
   =========================== */

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

:root {
  --header-h: 72px;
  --header-gap: 24px; /* spațiu extra sub header */
}

html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e5e7eb;
  background: radial-gradient(circle at top left, #0f172a 0, #020617 55%, #000 100%);
}

/* Linkuri generice */
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

/* ===========================
   HEADER (site-header)
   =========================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  height: var(--header-h);

  /* safe area pt notch + un pic de aer */
  padding-top: env(safe-area-inset-top);
  padding-left: 2.5rem;
  padding-right: 2.5rem;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: linear-gradient(to right, rgba(15,23,42,0.98), rgba(15,23,42,0.9));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.85);
  z-index: 1000;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #f9fafb;
  min-width: 0;
}

/* Titlu + subtitlu */
.site-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.site-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: normal;
}

.site-subtitle {
  font-size: 0.72rem;
  color: #9ca3af;
  line-height: 1.2;
}

/* NAVBAR */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.7rem;
}

.main-nav a {
  position: relative;
  font-size: 0.9rem;
  color: #e5e7eb;
  padding-bottom: 2px;
  cursor: pointer;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(to right, #38bdf8, #a855f7);
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: center;
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

.main-nav a:hover::after {
  opacity: 0.7;
  transform: scaleX(1);
}

.main-nav a.active {
  color: #f9fafb;
  font-weight: 600;
}

.main-nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* === Selector limbă: doar font inheritance aici.
   Aspectul (pill) e în assets/css/header.css === */
.lang-select,
.lang-select select {
  font-family: inherit;
}

/* Badge notificări în meniu (Panou Admin / Panou Client) */
.main-nav a .notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: #ef4444;
  color: #f9fafb;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid rgba(248, 250, 252, 0.85);
  min-width: 1.3rem;
}

@media (max-width: 768px) {
  .main-nav a .notif-badge {
    padding: 0.03rem 0.45rem;
    font-size: 0.68rem;
  }
}

/* ===========================
   SECTIUNI GENERALE
   =========================== */

.section {
  /* IMPORTANT: aici e fixul care îți scotea textul de sub header */
  min-height: calc(100vh - var(--header-h));
  padding: calc(var(--header-h) + var(--header-gap)) 2rem 40px;
}

/* Pagini cu slider 3D (index + submeniu) */
.home-page .section,
.submeniu-page .section {
  display: flex;
  justify-content: center;
  align-items: center;

  /* la slider nu vrem să fie “lipit” sub header */
  padding-top: calc(var(--header-h) + 16px);
}

/* Pagini cu panouri */
.assistenta-page .section,
.dashboard-page .section,
.admin-page .section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Wrapper carduri */
.panel-wrapper {
  width: min(1400px, 100% - 40px);
  margin: 0 auto;
}

/* Card mare */
.panel-card {
  width: 100%;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.97), rgba(15,23,42,0.94));
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 26px 70px rgba(15,23,42,0.95);
  padding: 26px 32px 28px;
}

.panel-title {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.panel-subtitle {
  font-size: 0.95rem;
  color: #9ca3af;
  margin-bottom: 1.4rem;
}

/* ===========================
   BUTOANE
   =========================== */

.btn {
  border-radius: 999px;
  padding: 0.4rem 1rem;
  border: none;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, opacity 0.15s ease-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(to right, #38bdf8, #a855f7);
  color: #f9fafb;
  box-shadow: 0 10px 30px rgba(56,189,248,0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(56,189,248,0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(148,163,184,0.8);
  color: #e5e7eb;
}

.btn-outline:hover {
  background: rgba(15,23,42,0.9);
}

.btn-danger {
  background: linear-gradient(to right, #f97373, #ef4444);
  color: #f9fafb;
  border: none;
  box-shadow: 0 10px 30px rgba(248,113,113,0.5);
}

.btn-danger:hover {
  box-shadow: 0 14px 36px rgba(248,113,113,0.6);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.25rem 0.8rem;
  font-size: 0.78rem;
}

/* ===========================
   FORMURI (bază)
   =========================== */

.form-card {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.97), rgba(15,23,42,0.94));
  border-radius: 24px;
  border: 1px solid rgba(148,163,184,0.55);
  box-shadow: 0 26px 70px rgba(15,23,42,0.95);
  padding: 24px 28px 26px;
}

.form-group { margin-bottom: 0.85rem; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.7);
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
  font-size: 0.9rem;
}

.form-control:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.6);
}

/* ===========================
   SCROLLBAR (doar vertical)
   =========================== */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #020617; }
::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #6b7280; }

/* ===========================
   MENIU ACTIUNI (ADMIN) – bază
   =========================== */

.actions-wrapper { position: relative; display: inline-block; }

.btn-actions-toggle { font-size: 0.82rem; padding: 0.3rem 0.9rem; }

.actions-menu {
  position: absolute;
  right: 0;
  top: 115%;
  min-width: 260px;
  background: #020617;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.6);
  box-shadow: 0 18px 45px rgba(15,23,42,0.96);
  padding: 0.5rem 0.7rem 0.45rem;
  display: none;
  z-index: 1200;
}

.actions-wrapper.open .actions-menu { display: block; }

.actions-menu-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.actions-menu-row:last-child { margin-bottom: 0; }

.actions-label {
  font-size: 0.78rem;
  color: #9ca3af;
  white-space: nowrap;
}

.status-select {
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.9);
  background: rgba(15,23,42,0.95);
  color: #e5e7eb;
  font-size: 0.8rem;
  padding: 0.25rem 0.7rem;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 1024px) {
  :root {
    --header-h: 86px; /* titlul îți rupe pe 2 rânduri => header mai înalt */
    --header-gap: 18px;
  }

  .site-header {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .site-subtitle { display: none; }

  .main-nav { gap: 1.1rem; font-size: 0.85rem; }

  .panel-card { padding: 22px 18px 24px; }

  /* === FIX: header transparent REAL pe mobil (fără blur, fără shadow) === */
  .site-header {
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* === FIX: pe index/submeniu nu mai centrăm vertical (aia îți bagă info sub header) === */
  .home-page .section,
  .submeniu-page .section {
    align-items: flex-start;
    padding-top: calc(var(--header-h) + 14px);
  }

  /* === FIX: info (titlu+descriere) – îl împingem clar sub header === */
  .home-page .coverflow-wrapper .info,
  .submeniu-page .coverflow-wrapper .info {
    margin-top: 6px;
    padding-top: 2px;
    max-width: min(980px, 92vw);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    position: relative;
    z-index: 3;
  }

  .home-page .coverflow-wrapper .info h2,
  .submeniu-page .coverflow-wrapper .info h2 {
    font-size: clamp(1.35rem, 5.2vw, 2.05rem);
    line-height: 1.12;
    letter-spacing: 0.01em;
    margin-bottom: 10px;
    text-shadow: 0 10px 26px rgba(0,0,0,0.55);
  }

  .home-page .coverflow-wrapper .info p,
  .submeniu-page .coverflow-wrapper .info p {
    font-size: clamp(0.95rem, 3.6vw, 1.1rem);
    line-height: 1.35;
    opacity: 0.96;
    text-shadow: 0 10px 26px rgba(0,0,0,0.50);
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 92px; /* pe telefoane e și mai sigur */
    --header-gap: 14px;
  }
}

/* Landscape pe mobil: păstrăm header mai compact */
@media (max-width: 1024px) and (orientation: landscape) {
  :root {
    --header-h: 72px;
    --header-gap: 12px;
  }

  /* Index/submeniu: tot sus, nu centrat */
  .home-page .section,
  .submeniu-page .section {
    align-items: flex-start;
    padding-top: calc(var(--header-h) + 10px);
  }

  /* Info: mai lat, mai puține rânduri (ca să nu se calce peste carduri) */
  .home-page .coverflow-wrapper .info,
  .submeniu-page .coverflow-wrapper .info {
    max-width: min(1100px, 94vw);
    margin-left: auto;
    margin-right: auto;
  }

  .home-page .coverflow-wrapper .info h2,
  .submeniu-page .coverflow-wrapper .info h2 {
    font-size: clamp(1.2rem, 3.6vw, 1.7rem);
    line-height: 1.08;
    margin-bottom: 8px;
  }

  .home-page .coverflow-wrapper .info p,
  .submeniu-page .coverflow-wrapper .info p {
    font-size: 0.92rem;
    line-height: 1.22;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}