/* ===== MATIVERA HOMEPAGE — COSMIC REDESIGN ===== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;}

html { overflow-x: hidden; background: var(--mv-bg);}

body {
    background: var(--mv-bg); color: var(--mv-text);
    font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;}

/* ── CSS Variables ── */
:root {
    --bg: var(--mv-bg);
    --bg-card: var(--mv-elev-1);
    --border: var(--mv-border-soft);
    --border-accent: rgba(110,193,255,0.25); --text: var(--mv-text); --muted: var(--mv-text-2);
    --accent: var(--mv-accent);
    --accent-dim: rgba(110,193,255,0.15);
    --accent-glow: var(--mv-glow);}

/* ── Starfield canvas ── */
#starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;}

/* ── Deep-space nebula layer ── */
.space-nebula {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 900px 600px at 15% 20%, rgba(28,48,130,0.18), transparent),
        radial-gradient(ellipse 700px 500px at 85% 65%, rgba(90,28,110,0.10), transparent),
        radial-gradient(ellipse 500px 400px at 50% 88%, rgba(18,80,110,0.07), transparent);}

/* ── Page content layer ── */
.page-content {
    position: relative;
    z-index: 2;}

/* ───────────────────────────────────────────────
   HERO
─────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 60px;
    overflow: hidden;}

/* Constellation ring behind hero text */
.hero-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(680px, 90vw);
    height: min(680px, 90vw);
    pointer-events: none;
    opacity: 0.35;}

.hero-inner {
    position: relative;
    text-align: center;
    max-width: 660px;
    z-index: 2;}

/* Small eyebrow label */
.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border: 1px solid var(--border-accent);
    border-radius: 100px;
    background: var(--accent-dim);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;}

.hero-label-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: blink 2s ease-in-out infinite; color: var(--mv-text-inverse);}

@keyframes blink {
    0%, 100% { opacity: 1;}
    50% { opacity: 0.3;}
}

.hero-title {
    font-size: clamp(2.6rem, 6vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--mv-text-soft);
    margin-bottom: 20px;}

/* The accent word in the title — solid color, no background-clip */
.hero-title .word-accent {
    color: var(--accent);}

.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--muted);
    line-height: 1.75;
    max-width: 520px;
    margin: 0 auto 40px;}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;}

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--accent); color: var(--mv-text-inverse);
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    transition: box-shadow 0.25s, transform 0.2s;}

.btn-primary:hover {}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 10px;
    border: 1px solid var(--border-accent);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;}

.btn-outline:hover {
    background: var(--accent-dim);
    border-color: var(--accent);}

/* Scroll cue */
.hero-scroll-cue {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px; color: var(--mv-text-2);
    font-size: 0.7rem;
    text-transform: uppercase;
    animation: floatCue 2.5s ease-in-out infinite;}

@keyframes floatCue {
    0%, 100% { transform: translateX(-50%) translateY(0);}
    50% { transform: translateX(-50%) translateY(6px);}
}

/* ───────────────────────────────────────────────
   SECTION COMMON
─────────────────────────────────────────────── */
.sec {
    position: relative;
    padding: 90px 20px;
    z-index: 2;}

.sec-inner {
    max-width: 1200px;
    margin: 0 auto;}

.sec-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 60px;}

.sec-tag {
    display: inline-block;
    padding: 5px 14px;
    background: var(--accent-dim);
    border: 1px solid var(--border-accent);
    border-radius: 100px;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 18px;}

.sec-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: var(--mv-text-soft);
    line-height: 1.15;
    margin-bottom: 14px;}

.sec-sub {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.7;}

/* Thin constellation divider between sections */
.constellation-divider {
    position: relative;
    height: 1px;
    max-width: 900px;
    margin: 0 auto;
    z-index: 2;
    overflow: visible;}

/* ───────────────────────────────────────────────
   SERVICES (6 cards — organic hexagonal grid)
─────────────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;}

@media (max-width: 1024px) { .services-grid { grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr;} }

.svc-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px 24px 24px;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    cursor: default;}

/* Organic SVG blob bg per card */
.svc-card-blob {
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 160px;
    height: 160px;
    opacity: 0.06;
    pointer-events: none;
    transition: opacity 0.3s;}

.svc-card:hover .svc-card-blob { opacity: 0.14;}

.svc-card:hover {
    border-color: var(--border-accent);}

/* Top accent line per card */
.svc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px; background: rgba(110,193,255,0.4);
    opacity: 0;
    transition: opacity 0.3s;}

.svc-card:hover::before { opacity: 1;}

.svc-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border-radius: 12px;
    margin-bottom: 16px;
    color: var(--accent);
    flex-shrink: 0;}

.svc-icon svg { width: 22px; height: 22px;}

.svc-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mv-text-soft);
    margin-bottom: 8px;}

.svc-desc {
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 14px;}

/* ───────────────────────────────────────────────
   JOURNEY — horizontal 3-step layout
─────────────────────────────────────────────── */
.journey-steps {
    display: grid;
    grid-template-columns: 1fr 40px 1fr 40px 1fr;
    align-items: start;
    gap: 0;
    max-width: 960px;
    margin: 0 auto;}

@media (max-width: 768px) {
    .journey-steps {
        grid-template-columns: 1fr;
        gap: 12px;}
    .journey-connector { display: none;}
}

.journey-connector {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 28px;}

.journey-step {
    padding: 28px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s;}

.journey-step:hover { border-color: var(--border-accent);}

.journey-num {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;}

.journey-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--mv-text-soft);
    margin-bottom: 8px;
    line-height: 1.3;}

.journey-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 14px;}

/* SVG arrow connector */
.connector-arrow { color: var(--mv-text-2);}

/* ───────────────────────────────────────────────
   PSYCHOLOGISTS CAROUSEL
─────────────────────────────────────────────── */
/* ───────────────────────────────────────────────
   FAQ
─────────────────────────────────────────────── */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s;}

.faq-item:hover { border-color: rgba(110,193,255,0.2);}
.faq-item.active { border-color: var(--border-accent);}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    color: var(--mv-text-soft);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: inherit;}

.faq-question:hover { color: var(--accent);}

.faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-accent);
    color: var(--accent);
    transition: transform 0.3s, background 0.2s;}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    background: var(--accent-dim);}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25,1,0.5,1);}

.faq-item.active .faq-answer { max-height: 260px;}

.faq-answer-content {
    padding: 0 24px 20px;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.8;}

/* ───────────────────────────────────────────────
   CTA SECTION
─────────────────────────────────────────────── */
.cta-sec {
    padding: 80px 20px;
    z-index: 2;
    position: relative;}

.cta-box {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    border: 1px solid var(--border-accent);
    border-radius: 24px;
    padding: 64px 48px;
    text-align: center;
    overflow: hidden; background: rgba(110,193,255,0.08);}

/* CTA: subtle SVG constellation overlay */
.cta-box-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.3;}

.cta-title {
    position: relative;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--mv-text-soft);
    margin-bottom: 14px;}

.cta-sub {
    position: relative;
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto 36px;}

.cta-actions {
    position: relative;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;}

/* ───────────────────────────────────────────────
   TRUST BANNER
─────────────────────────────────────────────── */
.trust-sec {
    position: relative;
    z-index: 2;
    padding: 40px 20px 56px;
    border-top: 1px solid var(--border);}

.trust-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 36px;}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px; color: var(--mv-text-2);
    font-size: 0.88rem;
    transition: color 0.2s;}

.trust-item:hover { color: var(--mv-text-soft);}

.trust-item svg { flex-shrink: 0; color: var(--accent);}

/* ───────────────────────────────────────────────
   SCROLL REVEAL
─────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.25,1,0.5,1), transform 0.7s cubic-bezier(0.25,1,0.5,1);}

.reveal.visible { opacity: 1; transform: none;}

.reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.7s cubic-bezier(0.25,1,0.5,1), transform 0.7s cubic-bezier(0.25,1,0.5,1);}

.reveal-left.visible { opacity: 1; transform: none;}

.stagger > *:nth-child(1) { transition-delay: 0.05s;}
.stagger > *:nth-child(2) { transition-delay: 0.12s;}
.stagger > *:nth-child(3) { transition-delay: 0.19s;}
.stagger > *:nth-child(4) { transition-delay: 0.26s;}
.stagger > *:nth-child(5) { transition-delay: 0.33s;}
.stagger > *:nth-child(6) { transition-delay: 0.40s;}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sec { padding: 60px 16px;}
    .hero { padding: 70px 16px 50px; min-height: auto;}
    .cta-box { padding: 40px 24px;}
    .hero-title { font-size: 2.6rem !important; line-height: 1.15;}
    .hero-scroll-cue { display: none;}
    .services-grid { gap: 14px;}
    .svc-card { padding: 22px 18px 18px;}

    /* FIX bug mobil „fâșie la scroll": scoatem TOATE straturile position:fixed de fundal
       (canvas animat + nebula locală + fundalul global .mtv-spacebg). Fundalul spațial
       vine de pe <body> (setat global în space-bg.php) — element normal, derulează cu
       pagina, fără layer separat de compositing → nu clipește și nu apare alb. */
    #starfield, .space-nebula, .mtv-spacebg { display: none !important;}
}

@media (max-width: 480px) {
    .sec { padding: 48px 14px;}
    .sec-header { margin-bottom: 36px;}
    .hero-actions { flex-direction: column; align-items: stretch;}
    .btn-primary, .btn-outline { justify-content: center;}
    .trust-inner { gap: 20px;}
    .trust-item { font-size: 0.82rem;}
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;}
    #starfield { display: none;}
}
