/* ========================================
   FUTURISTIC SCI-FI PSYCHOLOGIST CARDS
   ======================================== */

/* Animated Background */
body, html { background: var(--mv-bg) !important;}

/* Footer opac, deasupra fundalului instelat (ca pe celelalte pagini) */
html body footer.site-footer,
html body.has-fixed-footer footer.site-footer {
    position: relative !important;
    z-index: 2 !important; background: var(--mv-bg);}

.psychologists-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, var(--mv-bg) 0%, var(--mv-bg) 30%, var(--mv-bg) 60%, var(--mv-bg) 100%);
    overflow: hidden;}

.psychologists-bg .star {
    position: absolute;
    border-radius: 50%;
    background: var(--mv-text);}

.psychologists-bg .star--sm { width: 1px; height: 1px; opacity: 0.3; animation: psTwinkle 3s ease-in-out infinite;}
.psychologists-bg .star--md { width: 1.5px; height: 1.5px; opacity: 0.5; animation: psTwinkle 4s ease-in-out infinite;}
.psychologists-bg .star--lg { width: 2.5px; height: 2.5px; opacity: 0.75; animation: psTwinkle 5s ease-in-out infinite; box-shadow: 0 0 6px rgba(150,220,255,0.6);}

@keyframes psTwinkle {
    0%, 100% { opacity: 0.15; transform: scale(0.8);}
    50% { opacity: 1; transform: scale(1.3);}
}

.psychologists-bg .nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: psNebula 20s ease-in-out infinite;}

@keyframes psNebula {
    0%, 100% { transform: scale(1); opacity: 0.8;}
    50% { transform: scale(1.12); opacity: 1;}
}

.ps-stars-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;}

/* Banner full-width lipit de navbar — titlu colț dreapta-sus, căutare în centru, fără frame/efecte */
.psy-banner {
    position: relative;
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;                    /* full-bleed: edge-to-edge */
    max-width: none;                 /* anulează max-width: 100% global care limita lățimea */
    margin-top: 60px;                /* lipit de navbar (top exact la baza navbar-ului) */
    min-height: 300px;               /* mai mult spațiu vertical → estompare mai lungă, mai topită */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px 28px 42px;
    background: transparent;          /* imaginea trece pe: :before, mascată spre transparent */
    overflow: hidden;
    margin-bottom: 30px;}
/* titlu + căutare mereu deasupra fade-ului */
.psy-banner > * { position: relative; z-index: 2;}
.psy-banner-title { z-index: 2;}
.psy-banner-title {
    position: absolute;
    top: 18px;
    left: 32px;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);}
.psy-banner .search-container-spectacular { margin: 0;}
/* Pe mobil, main.container.page primește deja padding-top (60px ≤768 / 56px ≤480,
   din mobile-universal.css) ca să nu intre sub navbar. Banner-ul NU mai adaugă
   încă 60px peste — altfel apare un GOL între navbar și banner. */
@media (max-width: 768px) {
    .psy-banner { margin-top: 0;}          /* 60(padding) + 0 = 60 = baza navbar-ului */
}
@media (max-width: 600px) {
    .psy-banner { min-height: 240px; padding: 46px 16px 32px;}
    .psy-banner-title { top: 14px; left: 16px; font-size: 1.05rem;}
}
@media (max-width: 480px) {
    .psy-banner { margin-top: 4px;}        /* 56(padding) + 4 = 60 = baza navbar-ului */
}

/* Hero Header Section */
.psychologists-hero {
    position: relative;
    padding: 60px 0 40px;
    margin-bottom: 30px;
    text-align: center;}

.hero-title-spectacular {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 15px; color: var(--mv-text);}

@keyframes shimmer {
    0% { background-position: 0% center;}
    100% { background-position: 200% center;}
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px);}
    to { opacity: 1; transform: translateY(0);}
}

/* Search Section */
.search-section-spectacular {
    position: relative;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;}

.search-container-spectacular {
    position: relative;
    background: var(--glass);
    border: 2px solid var(--border);
    border-radius: 25px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;}

.search-container-spectacular:focus-within {
    border-color: var(--primary);}

.search-icon-spectacular {
    font-size: 1.2rem;
    color: var(--primary);}

.search-input-spectacular {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;}

/* Fara "patrat" interior la focus: inelul global de :focus-visible (base.css)
   e mutat pe pilula intreaga prin :focus-within de mai sus. Input-ul insusi
   ramane curat, doar text. */
.search-input-spectacular:focus,
.search-input-spectacular:focus-visible {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;}

/* Scoate butonul nativ de clear/decoratie din input[type=search] (WebKit) */
.search-input-spectacular::-webkit-search-cancel-button,
.search-input-spectacular::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;}

.search-input-spectacular::placeholder { color: var(--muted);}

.search-clear-btn {
    padding: 8px 16px;
    background: rgba(110, 193, 255, 0.15);
    border: 1px solid var(--primary);
    border-radius: 15px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;}

.search-clear-btn:hover {
    background: rgba(110, 193, 255, 0.25);}

/* Grid — 2 columns desktop, 1 column mobile */
.psychologists-grid-spectacular {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;}

@media (max-width: 1100px) {
    .psychologists-grid-spectacular {
        grid-template-columns: 1fr;
        gap: 22px;}
}

/* =============================================
   FUTURISTIC CARD
   ============================================= */
.psy-card {
    position: relative;
    display: flex;
    flex-direction: column; background: rgba(8, 14, 30, 0.95);
    border: 1px solid rgba(110, 193, 255, 0.18);
    border-radius: 22px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.23,1,0.32,1), box-shadow 0.35s ease, border-color 0.35s ease;
    min-height: 260px;}

/* Professional card background */
.psy-card-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;}

.psy-card-bg::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(110, 193, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    transition: opacity 0.5s ease;}

.psy-card:hover .psy-card-bg::before {
    opacity: 1.5;}

.psy-card-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(110, 193, 255, 0.04) 0%, transparent 70%);
    border-radius: 50%;}

/* Main Body (horizontal layout) */
.psy-card-main {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 24px;
    padding: 22px 24px 0;
    flex: 1;
    align-items: flex-end;}

/* Photo Frame */
.psy-card-photo-wrap {
    position: relative;
    flex-shrink: 0;
    width: 180px;
    height: 220px;}

.psy-card-photo-frame {
    width: 100%;
    height: 100%;
    border-radius: 16px 16px 0 0;
    border: none;
    overflow: hidden;
    position: relative;}


.psy-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover; object-position: center top;
    display: block;
    transition: transform 0.5s cubic-bezier(0.23,1,0.32,1), filter 0.4s ease;
    filter: brightness(0.95) saturate(0.9);}

.psy-card:hover .psy-card-photo {
    filter: brightness(1) saturate(1);}

/* Specializations Section */
.psy-card-specs {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 4px;
    padding-bottom: 14px;
    min-width: 0;
    align-self: flex-start;}

.psy-card-specs-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;}

.psy-card-spec-list {
    display: flex;
    flex-direction: column;
    gap: 10px;}

.psy-card-spec-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(110, 193, 255, 0.06);
    border: 1px solid rgba(110, 193, 255, 0.2);
    border-radius: 14px;
    transition: all 0.3s ease;}

.psy-card:hover .psy-card-spec-item {
    border-color: rgba(110, 193, 255, 0.35);
    background: rgba(110, 193, 255, 0.1);}

.psy-card-spec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0; color: var(--mv-text-inverse);}

.psy-card-spec-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;}


/* Footer Bar */
.psy-card-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border-top: 1px solid rgba(110, 193, 255, 0.12);
    background: rgba(0, 0, 0, 0.15);}

.psy-card-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    flex-shrink: 1;
    min-width: 0;}

.psy-card-cert {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);}

.psy-card-cert-check {
    width: 20px;
    height: 20px;
    border-radius: 50%; background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--mv-text-inverse);
    font-weight: 900;}

.psy-card-price {
    margin-left: auto;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;}

.psy-card-price-unit { font-size: 0.7em; font-weight: 700; color: var(--muted); margin-left: 1px;}
.psy-card-book {
    flex-shrink: 0;
    padding: 10px 24px; background: var(--mv-accent);
    color: var(--mv-text-inverse);
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23,1,0.32,1);
    position: relative;
    overflow: hidden;}

.psy-card-book::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--mv-elev-4);
    border-radius: 50%; transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;}

.psy-card-book:hover::before {
    width: 160px;
    height: 160px;}

.psy-card-book:hover {}

/* Loading Animation */
.loading-spectacular {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;}

@keyframes spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 900px) {
    .hero-title-spectacular { font-size: 2.2rem;}
    .psychologists-hero { padding: 40px 0 30px;}
}

@media (max-width: 768px) {
    .hero-title-spectacular {
        font-size: 1.8rem;
        animation: none !important;
        filter: none !important; color: var(--mv-text);}
    .hero-subtitle {
        font-size: 1rem;
        opacity: 1;
        animation: none !important;}
    .psychologists-hero {
        padding: 30px 0 20px;
        margin-bottom: 20px;}
    .search-section-spectacular {
        margin-bottom: 25px;
        opacity: 1;
        animation: none !important;}
    .search-container-spectacular {
        background: rgba(20, 30, 50, 0.92) !important;}
    .psychologists-bg { display: none !important;}

    .psy-card-main { gap: 16px; padding: 16px 16px 0;}
    .psy-card-photo-wrap { width: 140px; height: 170px;}
    .psy-card-specs-title { font-size: 1.15rem; margin-bottom: 12px;}
    .psy-card-spec-item { padding: 8px 12px;}
    .psy-card-spec-text { font-size: 0.85rem;}
    .psy-card-footer { padding: 12px 16px; gap: 10px; flex-wrap: wrap;}
    .psy-card-name { font-size: 0.95rem;}
    .psy-card-price { font-size: 1rem;}
    .psy-card-book { padding: 8px 18px; font-size: 0.85rem;}
    .psy-card-techbg svg { width: 180px; height: 160px;}
}

@media (max-width: 600px) {
    .psychologists-grid-spectacular { gap: 16px; grid-template-columns: 1fr !important;}
    .psy-card { min-height: auto;}
    .psy-card-main { flex-direction: row; gap: 12px; padding: 14px 14px 0; align-items: flex-end;}
    .psy-card-photo-wrap { width: 104px; height: 140px; flex-shrink: 0;} .psy-card-photo-frame { border-radius: 12px 12px 0 0;}
    .psy-card-specs-title { font-size: 1.05rem; margin-bottom: 10px;}
    .psy-card-spec-item { padding: 7px 10px;}
    .psy-card-spec-text { font-size: 0.82rem;}
    .psy-card-footer { position: static; z-index: 5; flex-wrap: wrap; justify-content: space-between; gap: 10px 8px; padding: 12px 16px 14px; align-items: center;}
    .psy-card-name { order: 1; width: 100%; text-align: center; font-size: 1rem;}
    .psy-card-cert { position: absolute; top: 12px; right: 12px; z-index: 6; padding: 0; gap: 4px; background: none; border: none; border-radius: 0; box-shadow: none; font-size: 0.68rem;}
    .psy-card-cert-check { width: 15px; height: 15px; font-size: 0.55rem;}
    .psy-card-price { order: 2; font-size: 1.05rem; text-align: left; margin: 0;}
    .psy-card-book { order: 3; width: auto; padding: 9px 20px; font-size: 0.85rem;}
    .container { padding: 0 12px;}
    .hero-title-spectacular { font-size: 1.5rem;}
    .hero-subtitle { font-size: 0.85rem; padding: 0 10px;}
}

@media (max-width: 380px) {
    .psy-card-photo-wrap { width: 86px; height: 118px;}
    .psy-card-spec-item { padding: 6px 10px; gap: 8px;}
    .psy-card-spec-text { font-size: 0.78rem;}
    .psy-card-spec-icon { font-size: 0.85rem;}
    .psy-card-footer { padding: 12px; gap: 8px;}
    .psy-card-name { font-size: 0.92rem;}
    .psy-card-price { font-size: 1rem;}
    .psy-card-book { padding: 10px; font-size: 0.85rem;}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .psychologists-bg, .psychologists-bg .star { display: none !important;}
    .hero-title-spectacular, .hero-subtitle, .search-section-spectacular {
        animation: none !important;
        opacity: 1 !important;}
    .hero-title-spectacular {
        filter: none !important; color: var(--mv-text);}
    .psy-card-techbg::after { animation: none !important;}
}
