/* =========================================================
   Design nou – rama site-ului (header, mesaje, footer, chat)
   Toate clasele noi încep cu "x-" ca să nu se bată cu style.css vechi.
   ========================================================= */

:root {
	--x-ink: #0f1b2d;
	--x-ink-2: #1c2b42;
	--x-gold: #c8a45c;
	--x-gold-2: #dcbd7e;
	--x-paper: #f7f5f0;
	--x-text: #1f2937;
	--x-muted: #6b7280;
	--x-line: rgba(15, 27, 45, .1);
	--x-ok: #2e9e6a;
	--x-err: #d64545;
	--x-radius: 14px;
	--x-ease: cubic-bezier(.22, 1, .36, 1);
	--x-head-h: 88px;
	--x-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--x-serif: 'Fraunces', Georgia, serif;
}

html { scroll-behavior: smooth; }
body.x-body {
	margin: 0;
	font-family: var(--x-sans);
	color: var(--x-text);
	background: var(--x-paper);
	-webkit-font-smoothing: antialiased;
}

.x-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.x-wrap--fixed { max-width: 1010px; }

/* ---------- Butoane ---------- */
.x-btn {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 13px 24px; border-radius: 999px;
	font: 600 14.5px/1 var(--x-sans); text-decoration: none; cursor: pointer; border: 0;
	transition: transform .35s var(--x-ease), box-shadow .35s var(--x-ease), background .25s, color .25s, border-color .25s;
}
.x-btn span { transition: transform .35s var(--x-ease); }
.x-btn:hover span { transform: translateX(4px); }
.x-btn--gold { background: var(--x-gold); color: var(--x-ink); }
.x-btn--gold:hover { background: var(--x-gold-2); transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(200, 164, 92, .7); }
.x-btn--dark { background: var(--x-ink); color: #fff; }
.x-btn--dark:hover { background: var(--x-ink-2); transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(15, 27, 45, .6); }
.x-btn--ghost { border: 1px solid rgba(255, 255, 255, .25); color: #fff; background: transparent; }
.x-btn--ghost:hover { border-color: var(--x-gold); color: var(--x-gold); }

/* ---------- Header ---------- */
.x-header {
	position: relative; z-index: 50;
	background: rgba(15, 27, 45, .9);
	-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
	color: #fff;
	transition: box-shadow .4s var(--x-ease), background .4s;
	animation: x-drop .9s var(--x-ease) backwards;
}
.x-header--sticky { position: sticky; top: 0; }
.x-header.is-scrolled { background: rgba(15, 27, 45, .97); box-shadow: 0 12px 32px -14px rgba(0, 0, 0, .5); }
.x-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--x-head-h); transition: height .45s var(--x-ease); }
.x-header.is-scrolled .x-header__inner { height: 70px; }

.x-logo { display: flex; align-items: center; color: #fff; text-decoration: none; font-family: var(--x-serif); font-size: 24px; }
.x-logo img { display: block; max-height: 54px; width: auto; transition: max-height .45s var(--x-ease); }
.x-header.is-scrolled .x-logo img { max-height: 44px; }

.x-nav { display: flex; align-items: center; gap: 2px; }
.x-nav a {
	position: relative; color: rgba(255, 255, 255, .75); text-decoration: none;
	font-size: 14.5px; font-weight: 500; letter-spacing: .01em;
	padding: 10px 15px; transition: color .25s;
}
.x-nav a::after {
	content: ""; position: absolute; left: 15px; right: 15px; bottom: 3px; height: 2px;
	background: var(--x-gold); border-radius: 2px;
	transform: scaleX(0); transform-origin: right; transition: transform .5s var(--x-ease);
}
.x-nav a:hover, .x-nav a.is-active { color: #fff; }
.x-nav a:hover::after, .x-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.x-nav a.x-nav__cta {
	margin-left: 12px; padding: 12px 22px; border-radius: 999px;
	background: var(--x-gold); color: var(--x-ink); font-weight: 600;
	transition: background .25s, transform .35s var(--x-ease), box-shadow .35s var(--x-ease);
}
.x-nav a.x-nav__cta::after { display: none; }
.x-nav a.x-nav__cta:hover { background: var(--x-gold-2); transform: translateY(-2px); box-shadow: 0 10px 22px -8px rgba(200, 164, 92, .7); }

.x-burger {
	display: none; position: relative; z-index: 60;
	width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
	flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.x-burger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: transform .4s var(--x-ease), opacity .25s; }
body.x-menu-open .x-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.x-menu-open .x-burger span:nth-child(2) { opacity: 0; }
body.x-menu-open .x-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 960px) {
	.x-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--x-ink); }
	.x-burger { display: flex; }
	.x-nav {
		position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 55;
		flex-direction: column; justify-content: center; gap: 6px;
		background: var(--x-ink);
		opacity: 0; visibility: hidden; transition: opacity .4s var(--x-ease), visibility .4s;
	}
	.x-nav a { font-family: var(--x-serif); font-size: 30px; font-weight: 400; opacity: 0; transform: translateY(18px); transition: opacity .5s var(--x-ease), transform .5s var(--x-ease), color .25s; }
	.x-nav a::after { bottom: 0; }
	.x-nav a.x-nav__cta { margin: 18px 0 0; font-family: var(--x-sans); font-size: 16px; }
	body.x-menu-open { overflow: hidden; }
	body.x-menu-open .x-nav { opacity: 1; visibility: visible; }
	body.x-menu-open .x-nav a { opacity: 1; transform: none; }
	body.x-menu-open .x-nav a:nth-child(1) { transition-delay: .06s; }
	body.x-menu-open .x-nav a:nth-child(2) { transition-delay: .11s; }
	body.x-menu-open .x-nav a:nth-child(3) { transition-delay: .16s; }
	body.x-menu-open .x-nav a:nth-child(4) { transition-delay: .21s; }
	body.x-menu-open .x-nav a:nth-child(5) { transition-delay: .26s; }
	body.x-menu-open .x-nav a:nth-child(6) { transition-delay: .31s; }
}

/* ---------- Mesaje (eroare / succes) ---------- */
.x-toasts {
	position: fixed; top: 100px; right: 24px; z-index: 100;
	display: flex; flex-direction: column; gap: 12px;
	width: min(420px, calc(100vw - 32px));
}
.x-toast {
	display: flex; align-items: flex-start; gap: 14px;
	background: #fff; color: var(--x-text);
	padding: 16px 16px 16px 18px; border-radius: 12px;
	box-shadow: 0 20px 40px -18px rgba(15, 27, 45, .45), 0 0 0 1px var(--x-line);
	font-size: 14.5px; line-height: 1.5;
	animation: x-toast-in .7s var(--x-ease) both;
}
.x-toast.is-leaving { animation: x-toast-out .4s var(--x-ease) forwards; }
.x-toast__icon { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.x-toast--error .x-toast__icon { background: var(--x-err); }
.x-toast--success .x-toast__icon { background: var(--x-ok); }
.x-toast__text { flex: 1; padding-top: 2px; }
.x-toast__close { flex: none; border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--x-muted); cursor: pointer; padding: 0 4px; transition: color .2s, transform .3s var(--x-ease); }
.x-toast__close:hover { color: var(--x-ink); transform: rotate(90deg); }

/* ---------- Conținut ---------- */
.x-main { position: relative; z-index: 1; animation: x-fade-up 1s .1s var(--x-ease) backwards; }

/* Componente pregătite pentru paginile refăcute (content.php) */
.x-hero {
	position: relative; overflow: hidden; color: #fff;
	min-height: 70vh; display: flex; align-items: flex-end;
	padding: 120px 0 90px;
	background: linear-gradient(180deg, rgba(15, 27, 45, .15), rgba(15, 27, 45, .85)), var(--x-hero-img, var(--x-ink)) center/cover;
}
.x-eyebrow { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--x-gold); margin-bottom: 18px; }
.x-hero h1 { font-family: var(--x-serif); font-weight: 400; font-size: clamp(38px, 6vw, 72px); line-height: 1.05; margin: 0 0 20px; max-width: 14ch; }
.x-hero p { font-size: 18px; line-height: 1.6; color: rgba(255, 255, 255, .8); max-width: 52ch; margin: 0 0 32px; }
.x-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.x-section { padding: 96px 0; }
.x-section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.x-section h2 { font-family: var(--x-serif); font-weight: 400; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; margin: 0; color: var(--x-ink); }

.x-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.x-card {
	background: #fff; border-radius: var(--x-radius); overflow: hidden;
	box-shadow: 0 1px 0 var(--x-line), 0 20px 40px -30px rgba(15, 27, 45, .35);
	transition: transform .5s var(--x-ease), box-shadow .5s var(--x-ease);
	text-decoration: none; color: inherit; display: block;
}
.x-card:hover { transform: translateY(-6px); box-shadow: 0 1px 0 var(--x-line), 0 30px 50px -28px rgba(15, 27, 45, .45); }
.x-card__img { aspect-ratio: 4 / 3; overflow: hidden; background: #ddd; }
.x-card__img > img, .x-card__img > .x-card__ph { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s var(--x-ease); }
.x-card:hover .x-card__img > img { transform: scale(1.06); }
.x-card__body { padding: 22px 24px 26px; }
.x-card__price { font-family: var(--x-serif); font-size: 24px; color: var(--x-ink); }
.x-card__title { margin: 6px 0 12px; font-weight: 500; }
.x-card__meta { display: flex; gap: 16px; font-size: 13.5px; color: var(--x-muted); border-top: 1px solid var(--x-line); padding-top: 14px; }

/* ---------- Footer ---------- */
.x-footer { position: relative; z-index: 1; background: var(--x-ink); color: rgba(255, 255, 255, .68); font-size: 14.5px; }
.x-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--x-gold), transparent); }
.x-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 44px; padding: 80px 0 60px; }
.x-footer h6 { font-family: var(--x-serif); font-weight: 500; font-size: 19px; color: #fff; margin: 0 0 20px; }
.x-footer__links a { display: block; color: inherit; text-decoration: none; padding: 6px 0; transition: color .25s, transform .35s var(--x-ease); }
.x-footer__links a:hover { color: var(--x-gold); transform: translateX(5px); }
.x-footer__contact p { margin: 0 0 14px; line-height: 1.8; }
.x-footer__contact a:not(.x-btn) { color: #fff; text-decoration: none; }
.x-footer__contact .x-btn { margin-top: 6px; }
.x-label { display: inline-block; min-width: 52px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--x-gold); }

.x-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.x-badges a { display: flex; align-items: center; justify-content: center; height: 58px; padding: 8px; background: #fff; border-radius: 10px; transition: transform .4s var(--x-ease), box-shadow .4s; }
.x-badges a:hover { transform: translateY(-3px); box-shadow: 0 12px 20px -12px rgba(0, 0, 0, .6); }
.x-badges img { max-width: 100%; max-height: 40px; }

.x-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; color: rgba(255, 255, 255, .5); }
.x-footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 22px; padding-bottom: 22px; }
.x-footer__bottom a { color: inherit; }
.x-powered { margin: 0; }
.x-powered img { height: 18px; vertical-align: middle; opacity: .7; transition: opacity .25s; }
.x-powered a:hover img { opacity: 1; }

/* ---------- Chat ---------- */
.x-chat { position: fixed; right: 24px; bottom: 24px; z-index: 90; }
.x-chat__btn {
	position: relative; width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--x-gold); color: var(--x-ink); display: grid; place-items: center;
	box-shadow: 0 14px 30px -10px rgba(15, 27, 45, .55);
	transition: transform .4s var(--x-ease), background .25s;
	animation: x-pop .8s 1.2s var(--x-ease) both;
}
.x-chat__btn::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%; border: 2px solid var(--x-gold); animation: x-pulse 2.6s 2s ease-out infinite; }
.x-chat__btn:hover { transform: scale(1.07); background: var(--x-gold-2); }
.x-chat__panel {
	position: absolute; right: 0; bottom: 78px; width: 250px;
	background: #fff; color: var(--x-text); border-radius: 16px; padding: 20px;
	box-shadow: 0 24px 48px -20px rgba(15, 27, 45, .5), 0 0 0 1px var(--x-line);
	transform-origin: bottom right; transform: translateY(10px) scale(.92); opacity: 0; visibility: hidden;
	transition: transform .45s var(--x-ease), opacity .3s, visibility .3s;
}
.x-chat.is-open .x-chat__panel { transform: none; opacity: 1; visibility: visible; }
.x-chat__panel strong { font-family: var(--x-serif); font-size: 19px; font-weight: 500; color: var(--x-ink); }
.x-chat__panel p { margin: 6px 0 16px; color: var(--x-muted); font-size: 14px; line-height: 1.5; }

/* ---------- Loader (#p, folosit de js.js) ---------- */
#p.x-loader { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 200; display: none; background: rgba(15, 27, 45, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.x-loader__box { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: #fff; }
.x-loader__box p { margin: 16px 0 0; font-size: 14px; letter-spacing: .04em; }
.x-spinner { display: inline-block; width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--x-gold); animation: x-spin .8s linear infinite; }

/* ---------- Animații la scroll ---------- */
.x-js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--x-ease), transform 1s var(--x-ease); transition-delay: var(--d, 0s); }
.x-js [data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes x-drop { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes x-fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes x-toast-in { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes x-toast-out { to { opacity: 0; transform: translateX(40px) scale(.96); } }
@keyframes x-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes x-pulse { 0% { transform: scale(1); opacity: .8; } 70%, 100% { transform: scale(1.6); opacity: 0; } }
@keyframes x-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
	.x-wrap { padding: 0 16px; }
	.x-toasts { top: 84px; right: 16px; }
	.x-chat { right: 16px; bottom: 16px; }
	.x-footer__grid { padding: 60px 0 44px; gap: 36px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.x-js [data-reveal] { opacity: 1; transform: none; }
}

/* Meniul: textul nu se rupe pe două rânduri, iar pe ecrane medii se strânge */
.x-nav a { white-space: nowrap; }
@media (max-width: 1280px) and (min-width: 961px) {
	.x-nav a { padding-left: 11px; padding-right: 11px; font-size: 13.5px; }
	.x-nav a.x-nav__cta { padding-left: 18px; padding-right: 18px; }
}
