/*
 * Prima pagină (`templates/pages/home.html.twig`) — stilurile paginii, fișier separat (nu `<style>` în Twig).
 *
 * Prima parte: regulile vechi ale paginii (formular, reCAPTCHA, ancora #contact), mutate neschimbate din Twig.
 * A doua parte: designul Validator (2026-10-05) — telefonul din hero, „ce face”, pașii, verdictele, funcționalitățile,
 * tipurile de evenimente. Culorile, hero-ul de bază, butoanele și titlurile de secțiune sunt în `site.css` (comun). Culorile: indigo → turcoaz (ca fotografia bannerului) și culorile
 * verdictelor (verde / galben / roșu) din ecranul de scanare.
 */

/* ───────────── Regulile vechi ale paginii (din Twig) ───────────── */

/* Flexbox: containerul formularului poate fi mai îngust decât conținutul lui. */
.rounded.bg-white.shadow-xs.d-flex > div {
    min-width: 0;
    width: 100%;
}

/* Câmpurile nu depășesc niciodată lățimea ecranului. */
form input, form textarea, form .form-control {
    max-width: 100% !important;
    box-sizing: border-box;
}

/* reCAPTCHA v2 are lățime fixă (302px): pe telefoane înguste se scalează proporțional. Fără cheie, elementul nu
   există în pagină, deci regula nu atinge nimic. */
@media (max-width: 400px) {
    .recaptcha-outer-wrapper {
        height: 65px;
        overflow: hidden;
    }

    .recaptcha-outer-wrapper .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
    }
}

/* Header-ul e sticky: ancora #contact aterizează SUB el. */
#contact {
    scroll-margin-top: 120px;
}

/* La click pe Contact (aceeași pagină), bara de limbă rămâne vizibilă cât aterizăm (vezi `home.js`). */
body.ycm-force-topbar #header {
    margin-top: 0 !important;
}

/* Fostele atribute `style=` din pagină. */
.vh-empty-stars { font-size: 2.5rem; line-height: 1; }
.vh-empty-cta { color: var(--color-principal, #001672); }
.vh-app-disabled { cursor: default; }
.vh-map { height: 433px; }
.vh-message { min-height: 120px; }


/* ── Telefonul din hero ── */
.vh-phone {
    position: relative;
    width: 270px;
    max-width: 100%;
    aspect-ratio: 9 / 18.5;
    border-radius: 40px;
    padding: 12px;
    background: linear-gradient(160deg, #1f2937, #0b1220);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
    transform: rotate(-4deg);
}

.vh-phone-notch {
    position: absolute;
    top: 16px;
    left: 50%;
    width: 90px;
    height: 20px;
    margin-left: -45px;
    border-radius: 0 0 14px 14px;
    background: #0b1220;
    z-index: 2;
}

.vh-phone-screen {
    position: relative;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.6rem 1rem 1rem;
}

.vh-phone-bar {
    font-weight: 700;
    color: var(--vh-ink);
    margin-bottom: 1rem;
}

.vh-viewfinder {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 0.75;
    border-radius: 14px;
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Codul de bare: dungi de lățimi diferite, desenate din gradient. */
.vh-barcode {
    width: 72%;
    height: 48%;
    background:
        repeating-linear-gradient(90deg, #fff 0 3px, transparent 3px 6px, #fff 6px 7px, transparent 7px 10px, #fff 10px 14px, transparent 14px 16px);
    opacity: 0.92;
    border-radius: 2px;
}

.vh-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: #5eead4;
    border-style: solid;
    border-width: 0;
}

.vh-corner-tl { top: 12px; left: 12px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 6px; }
.vh-corner-tr { top: 12px; right: 12px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 6px; }
.vh-corner-bl { bottom: 12px; left: 12px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 6px; }
.vh-corner-br { bottom: 12px; right: 12px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 6px; }

.vh-scanline {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 3px;
    border-radius: 3px;
    background: #5eead4;
    box-shadow: 0 0 16px 4px rgba(94, 234, 212, 0.65);
    animation: vh-scan 5s ease-in-out infinite;
}

/* Verdictul apare după scanare, stă, apoi dispare — buclă de 5 s, sincronizată cu linia. */
.vh-verdict {
    width: 100%;
    margin-top: 1rem;
    padding: 0.9rem 0.75rem;
    border-radius: 14px;
    background: var(--vh-green);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-align: center;
    animation: vh-verdict 5s ease-in-out infinite;
}

.vh-verdict-icon {
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 800;
}

.vh-verdict small { opacity: 0.88; }

.vh-phone-recent {
    list-style: none;
    width: 100%;
    padding: 0;
    margin: auto 0 0;
}

.vh-phone-recent li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.2rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.72rem;
    color: var(--vh-muted);
}

.vh-phone-recent li:last-child { border-bottom: 0; }
.vh-phone-recent code { color: var(--vh-ink); font-size: 0.72rem; }
.vh-phone-recent time { margin-left: auto; font-variant-numeric: tabular-nums; }

.vh-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.vh-dot-ok { background: var(--vh-green); }
.vh-dot-no { background: var(--vh-red); }

@keyframes vh-scan {
    0% { top: 14%; opacity: 1; }
    40% { top: 82%; opacity: 1; }
    45%, 100% { top: 82%; opacity: 0; }
}

@keyframes vh-verdict {
    0%, 42% { opacity: 0; transform: translateY(10px) scale(0.96); }
    50%, 88% { opacity: 1; transform: none; }
    96%, 100% { opacity: 0; transform: translateY(10px) scale(0.96); }
}

/* ── „Ce face” ── */
.vh-facts {
    position: relative;
    margin-top: -3rem;
    z-index: 2;
}

.vh-fact {
    height: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.vh-fact-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--vh-indigo), var(--vh-teal));
    margin-bottom: 0.5rem;
}

.vh-fact strong { color: var(--vh-ink); font-size: 1.05rem; }
.vh-fact span:last-child { color: var(--vh-muted); font-size: 0.92rem; }


/* ── Pașii ── */
.vh-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    position: relative;
}

/* Linia care leagă pașii (doar pe ecran lat). */
.vh-steps::before {
    content: "";
    position: absolute;
    top: 28px;
    left: 16%;
    right: 16%;
    height: 2px;
    background: linear-gradient(90deg, var(--vh-indigo), var(--vh-teal));
    opacity: 0.35;
}

.vh-step {
    position: relative;
    text-align: center;
    padding: 0 0.75rem;
}

.vh-step-number {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, var(--vh-indigo), var(--vh-teal));
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
    margin-bottom: 1rem;
}

.vh-step h3 { font-size: 1.15rem; font-weight: 700; color: var(--vh-ink); }
.vh-step p { color: var(--vh-muted); margin: 0; }

/* ── Verdictele ── */
.vh-verdict-card {
    height: 100%;
    border-radius: 18px;
    padding: 1.75rem;
    background: #fff;
    border-top: 6px solid;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease;
}

.vh-verdict-card:hover { transform: translateY(-4px); }

.vh-verdict-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
}

.vh-verdict-card h3 { font-size: 1.2rem; font-weight: 700; color: var(--vh-ink); }
.vh-verdict-card p { color: var(--vh-muted); margin: 0; }

.vh-verdict-accepted { border-color: var(--vh-green); }
.vh-verdict-accepted .vh-verdict-card-icon { background: var(--vh-green); }
.vh-verdict-action { border-color: var(--vh-yellow); }
.vh-verdict-action .vh-verdict-card-icon { background: var(--vh-yellow); color: var(--vh-ink); }
.vh-verdict-rejected { border-color: var(--vh-red); }
.vh-verdict-rejected .vh-verdict-card-icon { background: var(--vh-red); }

/* ── Funcționalitățile ── */
.vh-feature {
    height: 100%;
    border: 1px solid #e6e9f2;
    border-radius: 16px;
    padding: 1.5rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vh-feature:hover {
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.1);
}

.vh-feature h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--vh-ink);
    padding-left: 0.9rem;
    border-left: 3px solid var(--vh-teal);
}

.vh-feature p { color: var(--vh-muted); margin: 0; }

/* ── Pentru orice eveniment ── */
.vh-usecases {
    padding: 2.5rem 0;
    background: linear-gradient(90deg, var(--vh-navy), #312e81);
    text-align: center;
}

.vh-usecases-title {
    color: #c7d2fe;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.vh-usecases-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.vh-usecases-list li {
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ── Telefon / ecrane înguste ── */
@media (max-width: 991.98px) {
    .vh-hero { padding: 5rem 0 6rem; text-align: center; }
    .vh-hero-lead { margin-left: auto; margin-right: auto; }
    .vh-hero-actions, .vh-hero-points { justify-content: center; }
    .vh-phone { width: 230px; transform: none; }
}

@media (max-width: 767.98px) {
    .vh-steps { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .vh-steps::before { display: none; }
    .vh-section { padding: 4rem 0; }
}

/* Fără animații pentru cine le-a oprit din sistem: verdictul stă afișat, linia de scanare nu se mișcă. */
@media (prefers-reduced-motion: reduce) {
    .vh-scanline { animation: none; top: 50%; }
    .vh-verdict { animation: none; opacity: 1; transform: none; }
    .vh-btn-primary:hover, .vh-verdict-card:hover { transform: none; }
}

/* ───────────── Culoare pe secțiuni (pagina era prea albă) ───────────── */

/* „Ce face”: cardurile plutesc peste marginea hero-ului, iar dedesubt începe fundalul colorat al pașilor. */
.vh-facts {
    /* transparent doar pe porțiunea care urcă peste hero (marginea negativă), apoi nuanța secțiunii de dedesubt */
    background: linear-gradient(to bottom, transparent 0, transparent 3.5rem, #f3f4ff 3.5rem, #f3f4ff 100%);
    padding-bottom: 1rem;
}

/* „Cum funcționează”: indigo foarte deschis, cu două pete de culoare. */
#how {
    background:
        radial-gradient(circle at 8% 25%, rgba(79, 70, 229, 0.12), transparent 38%),
        radial-gradient(circle at 92% 75%, rgba(20, 184, 166, 0.14), transparent 40%),
        #f3f4ff;
}

/* Verdictele: turcoaz deschis spre indigo. */
.vh-section-tint {
    background: linear-gradient(135deg, #ecfeff 0%, #eef2ff 100%);
}

/* Funcționalitățile: alb spre indigo deschis, iar fiecare card are culoarea lui. */
.vh-section:not(#how):not(.vh-section-tint) {
    background: linear-gradient(180deg, #ffffff 0%, #eef0ff 100%);
}

.vh-feature {
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.07);
}

.vh-section .col-12:nth-child(6n + 1) .vh-feature h3 { border-left-color: #4f46e5; }
.vh-section .col-12:nth-child(6n + 2) .vh-feature h3 { border-left-color: #14b8a6; }
.vh-section .col-12:nth-child(6n + 3) .vh-feature h3 { border-left-color: #8b5cf6; }
.vh-section .col-12:nth-child(6n + 4) .vh-feature h3 { border-left-color: #10b981; }
.vh-section .col-12:nth-child(6n + 5) .vh-feature h3 { border-left-color: #f59e0b; }
.vh-section .col-12:nth-child(6n + 6) .vh-feature h3 { border-left-color: #ec4899; }

.vh-section .col-12:nth-child(6n + 1) .vh-feature { background: linear-gradient(180deg, #ffffff, #f5f5ff); }
.vh-section .col-12:nth-child(6n + 2) .vh-feature { background: linear-gradient(180deg, #ffffff, #f0fdfa); }
.vh-section .col-12:nth-child(6n + 3) .vh-feature { background: linear-gradient(180deg, #ffffff, #f5f3ff); }
.vh-section .col-12:nth-child(6n + 4) .vh-feature { background: linear-gradient(180deg, #ffffff, #ecfdf5); }
.vh-section .col-12:nth-child(6n + 5) .vh-feature { background: linear-gradient(180deg, #ffffff, #fffbeb); }
.vh-section .col-12:nth-child(6n + 6) .vh-feature { background: linear-gradient(180deg, #ffffff, #fdf2f8); }

/* Testimonialele și contactul (secțiunile temei de dedesubt): aceeași nuanță, ca pagina să curgă. */
#testimonials.bg-light,
#contact.bg-light {
    background: linear-gradient(180deg, #f3f4ff 0%, #f8fafc 100%) !important;
}

/* Tema pune spațiu implicit pe `section`: cardurile „ce face” urcă peste marginea hero-ului, fără fâșie albă. */
section.vh-facts {
    margin-top: -3.5rem;
    /* `!important`: regula temei pentru `section` (100px) câștiga altfel, iar cardurile coborau sub hero. */
    padding-top: 0 !important;
}

section.vh-hero {
    padding-bottom: 7rem;
}

/* ═══════════ Scena telefonului din hero (2026-10-05): fără gol în primele secunde ═══════════ */

/* Ciclu de 4 s: scanare (≈1,3 s, „Se verifică…” în zona de rezultat) → verdict (≈2 s) → din nou. Definițiile de mai jos
   înlocuiesc keyframe-urile de 5 s de mai sus (în CSS câștigă ultima definiție cu același nume). */
.vh-scanline { animation-duration: 4s; }

@keyframes vh-scan {
    0% { top: 14%; opacity: 1; }
    32% { top: 82%; opacity: 1; }
    36%, 100% { top: 82%; opacity: 0; }
}

.vh-result-slot {
    position: relative;
    width: 100%;
    min-height: 98px;
    margin-top: 1rem;
}

.vh-result-slot .vh-verdict {
    position: absolute;
    inset: 0;
    margin-top: 0;
    justify-content: center;
    animation: vh-verdict 4s ease-in-out infinite;
}

@keyframes vh-verdict {
    0%, 34% { opacity: 0; transform: translateY(8px) scale(0.96); }
    40%, 90% { opacity: 1; transform: none; }
    97%, 100% { opacity: 0; transform: translateY(8px) scale(0.96); }
}

.vh-checking {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border-radius: 14px;
    background: #eef2ff;
    color: #4338ca;
    font-weight: 600;
    font-size: 0.9rem;
    animation: vh-checking 4s ease-in-out infinite;
}

@keyframes vh-checking {
    0%, 32% { opacity: 1; }
    38%, 94% { opacity: 0; }
    100% { opacity: 1; }
}

.vh-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(67, 56, 202, 0.25);
    border-top-color: #4338ca;
    animation: vh-spin 0.8s linear infinite;
}

@keyframes vh-spin { to { transform: rotate(1turn); } }

/* Scena: lumina din spate, etichetele plutitoare, intrarea animată. */
.vh-phone-stage {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 1.5rem 2.5rem;
    animation: vh-stage-in 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.15) 0.2s both;
}

@keyframes vh-stage-in {
    from { opacity: 0; transform: translateY(36px) scale(0.94); }
    to { opacity: 1; transform: none; }
}

.vh-phone-glow {
    position: absolute;
    inset: 8% 10%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(94, 234, 212, 0.45), rgba(99, 102, 241, 0.35) 45%, transparent 70%);
    filter: blur(40px);
    animation: vh-glow 4s ease-in-out infinite;
}

@keyframes vh-glow { 50% { transform: scale(1.12); opacity: 0.75; } }

.vh-phone { position: relative; z-index: 1; }

.vh-float {
    position: absolute;
    z-index: 2;
    padding: 0.55rem 0.95rem;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    opacity: 0;
    animation: vh-float-in 0.6s ease-out forwards, vh-bob 5s ease-in-out infinite;
}

.vh-float-1 {
    top: 18%;
    left: -6%;
    color: #fff;
    background: var(--vh-green);
    animation-delay: 1s, 1.6s;
}

.vh-float-2 {
    bottom: 16%;
    right: -8%;
    color: var(--vh-ink);
    background: #fff;
    animation-delay: 1.3s, 1.9s;
}

@keyframes vh-float-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes vh-bob { 50% { transform: translateY(-8px); } }

@media (max-width: 575.98px) {
    .vh-float-1 { left: 0; }
    .vh-float-2 { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .vh-phone-stage, .vh-float { animation: none; opacity: 1; transform: none; }
    .vh-phone-glow, .vh-spinner { animation: none; }
    .vh-checking { display: none; }
    .vh-result-slot .vh-verdict { animation: none; opacity: 1; transform: none; }
}

/* ═══════════ Fundalul hero-ului (2026-10-05): fotografia direct, lumini, rețea de puncte ═══════════ */

/* Fotografia vine odată cu stilurile (calea e relativă la acest fișier: /project/pages → /project/images). */
.vh-hero-home {
    background: var(--vh-navy) url("../images/banner-home.jpg") center / cover no-repeat;
}

/* Stratul peste fotografie: mai subțire decât cel comun, ca imaginea să se vadă, dar textul rămâne lizibil. */
.vh-hero-home::before {
    background: linear-gradient(115deg, rgba(11, 21, 48, 0.9) 0%, rgba(49, 46, 129, 0.72) 50%, rgba(15, 118, 110, 0.45) 100%);
}

.vh-aurora {
    position: absolute;
    width: 46vw;
    height: 46vw;
    max-width: 640px;
    max-height: 640px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
    pointer-events: none;
}

.vh-aurora-1 {
    top: -20%;
    left: -12%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.9), transparent 65%);
    animation: vh-drift-1 14s ease-in-out infinite alternate;
}

.vh-aurora-2 {
    bottom: -28%;
    right: -10%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.85), transparent 65%);
    animation: vh-drift-2 16s ease-in-out infinite alternate;
}

@keyframes vh-drift-1 { to { transform: translate(18%, 22%) scale(1.15); } }
@keyframes vh-drift-2 { to { transform: translate(-20%, -15%) scale(1.2); } }

/* Rețea fină de puncte, estompată spre margini — dă adâncime fundalului. */
.vh-hero-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.4px);
    background-size: 26px 26px;
    -webkit-mask: radial-gradient(ellipse at 40% 45%, #000 20%, transparent 75%);
    mask: radial-gradient(ellipse at 40% 45%, #000 20%, transparent 75%);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .vh-aurora { animation: none; }
}
