/* ============================================================
   CRYSTALS MASTER PRO — Frontend Style
   The 432 Circle · Robert Dosa Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Jost:wght@300;400;500&display=swap');

/* ── Variabile ── */
:root {
    --ink:        #0c0b0a;
    --deep:       #13110f;
    --parchment:  #f0ebe3;
    --muted:      #7a736a;
    --dim:        #403a34;
    --gold:       #b89a60;
    --gold-light: #d4bc8d;
    --border:     rgba(184,154,96,0.18);
}

/* ── FULL PAGE OVERRIDE ──────────────────────────────────────
   Acoperă fundalul alb al temei pe paginile cu shortcode-ul
   ---------------------------------------------------------- */
body,
html {
    background-color: var(--ink) !important;
}

.site-content,
.site-main,
.entry-content,
.page-content,
.content-area,
#content,
#primary,
#main,
main,
.hentry,
.page,
article {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.entry-content,
.page-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* ── CONTAINER ── */
.cmp-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 56px 32px 100px;
    font-family: 'Jost', sans-serif;
    color: var(--parchment);
    background: var(--ink);
    border-radius: 0;
    box-shadow: none;
}

/* ── INTRO ── */
.cmp-intro {
    text-align: center;
    margin-bottom: 56px;
}
.cmp-intro-eyebrow {
    display: inline-block;
    font-size: 0.56rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 18px;
    font-family: 'Jost', sans-serif;
}
.cmp-intro h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 300;
    color: var(--parchment);
    margin: 0 0 14px;
    line-height: 1.15;
    background: none !important;
    -webkit-text-fill-color: var(--parchment) !important;
}
.cmp-intro h2 em { color: var(--gold); font-style: italic; }
.cmp-intro p {
    font-size: 0.87rem;
    color: var(--muted);
    line-height: 1.8;
    max-width: 500px;
    margin: 0 auto;
    font-family: 'Jost', sans-serif;
}
.cmp-sep {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 22px auto 28px;
}

/* ── FILTRE ── */
.cmp-filters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-bottom: 2px;
}

.cmp-filter-select {
    background-color: var(--deep);
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 12px 36px 12px 16px;
    font-family: 'Jost', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    outline: none;
    transition: border-color .25s, color .25s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23b89a60' opacity='.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0;
}
.cmp-filter-select option {
    background: #1a1713;
    color: var(--parchment);
}
.cmp-filter-select:hover,
.cmp-filter-select:focus {
    border-color: var(--gold);
    color: var(--parchment);
    box-shadow: none;
}

/* ── SEARCH ── */
.cmp-search-wrapper {
    position: relative;
    margin-top: 2px;
    margin-bottom: 48px;
}
.cmp-search-wrapper::before {
    content: '◎';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.82rem;
    color: var(--gold);
    opacity: .45;
    pointer-events: none;
    z-index: 1;
}

#cmp-search {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 20px 16px 44px;
    background: var(--deep);
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--parchment);
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    outline: none;
    transition: border-color .25s;
}
#cmp-search::placeholder { color: var(--dim); }
#cmp-search:focus {
    border-color: rgba(184,154,96,.5);
    box-shadow: none;
    background: var(--deep);
}

/* ── SUGGESTIONS ── */
.cmp-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1713;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0;
    z-index: 200;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    box-shadow: none;
}
.cmp-suggestions::-webkit-scrollbar { width: 4px; }
.cmp-suggestions::-webkit-scrollbar-track { background: transparent; }
.cmp-suggestions::-webkit-scrollbar-thumb { background: var(--dim); }

.cmp-suggestion-item {
    padding: 12px 20px;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 1px solid rgba(184,154,96,.05);
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: none !important;
}
.cmp-suggestion-item::before {
    content: '◇';
    font-family: 'Jost', sans-serif;
    font-style: normal;
    font-size: 0.52rem;
    color: rgba(184,154,96,.3);
    flex-shrink: 0;
}
.cmp-suggestion-item:hover {
    background: rgba(184,154,96,.05);
    color: var(--gold-light);
    padding-left: 26px;
    transform: none !important;
}
.cmp-suggestion-item:last-child { border-bottom: none; }

.cmp-no-results {
    padding: 20px;
    text-align: center;
    color: var(--dim);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    font-style: italic;
    font-family: 'Cormorant Garamond', serif;
}

/* ── CARD CRISTAL ── */
#cmp-crystal-card {
    animation: cmpFadeUp .45s ease-out;
}
@keyframes cmpFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── HEADER CARD ── */
.cmp-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    flex-wrap: wrap;
}

.cmp-title {
    font-family: 'Cormorant Garamond', serif !important;
    font-size: clamp(2rem, 5vw, 3rem) !important;
    font-weight: 300 !important;
    color: var(--parchment) !important;
    font-style: italic !important;
    line-height: 1.1 !important;
    /* Reset gradient din tema veche */
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: var(--parchment) !important;
    background-clip: unset !important;
}

.cmp-lang-toggle {
    font-family: 'Jost', sans-serif;
    font-size: 0.54rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 8px 18px;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--border);
    border-radius: 0;
    cursor: pointer;
    transition: background .25s, border-color .25s, color .25s;
    flex-shrink: 0;
    margin-top: 8px;
    font-weight: 400;
}
.cmp-lang-toggle:hover {
    background: rgba(184,154,96,.08);
    border-color: var(--gold);
    transform: none !important;
    color: var(--gold-light);
}

/* ── GALERIE IMAGINI ── */
.cmp-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2px;
    margin-bottom: 32px;
}
.cmp-gallery-item {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0;
    cursor: zoom-in;
    transition: border-color .25s, transform .3s;
    box-shadow: none;
}
.cmp-gallery-item:hover {
    border-color: rgba(184,154,96,.4);
    transform: none !important;
    box-shadow: none !important;
}
.cmp-gallery-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    border-radius: 0;
    transition: opacity .35s, transform .45s;
}
.cmp-gallery-item img:not(.loaded) { opacity: .35; }
.cmp-gallery-item img.loaded { opacity: 1; }
.cmp-gallery-item:hover img { transform: scale(1.03); }

/* ── LIGHTBOX ── */
.cmp-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.97);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.cmp-lightbox-content {
    position: relative;
    max-width: 92%;
    max-height: 92%;
}
.cmp-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
}
.cmp-lightbox-close {
    position: absolute;
    top: -36px;
    right: 0;
    color: var(--muted);
    font-size: 1.6rem;
    font-weight: 300;
    cursor: pointer;
    font-family: 'Jost', sans-serif;
    line-height: 1;
    transition: color .2s;
}
.cmp-lightbox-close:hover { color: var(--gold); }

/* ── GRID DATE ── */
.cmp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-bottom: 32px;
}
.cmp-data-box {
    background: var(--deep);
    padding: 16px 18px;
    border: 1px solid rgba(184,154,96,.07);
    border-radius: 0;
    transition: border-color .2s;
    transform: none !important;
}
.cmp-data-box:hover {
    background: var(--deep);
    border-color: rgba(184,154,96,.2);
    transform: none !important;
}

.cmp-label {
    display: block;
    font-family: 'Jost', sans-serif;
    font-size: 0.48rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 7px;
    font-weight: 500;
}
.cmp-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    color: var(--parchment);
    font-weight: 300;
    line-height: 1.3;
}

/* ── FRECVENȚĂ (stil inline override) ── */
/* frontend-script.js injectează style inline — le resetăm */
#cmp-crystal-card [style*="color:#03dac6"],
#cmp-crystal-card [style*="font-size:16px"] {
    color: var(--gold-light) !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 1.8rem !important;
    font-style: italic !important;
    font-weight: 300 !important;
}
#cmp-crystal-card [style*="text-align:center"],
#cmp-crystal-card div[style*="margin: 20px 0"] {
    padding: 22px 20px;
    background: var(--deep);
    border: 1px solid var(--border);
    margin-bottom: 32px !important;
    position: relative;
}

/* ── AFIRMAȚIE ── */
.cmp-affirmation {
    text-align: center;
    padding: 32px 40px;
    border: 1px solid var(--border);
    border-radius: 0;
    margin: 0 0 32px;
    background: rgba(184,154,96,.02);
    position: relative;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 300;
    font-style: italic;
    color: var(--gold-light);
    line-height: 1.55;
}
.cmp-affirmation::before {
    content: '◈';
    display: block;
    font-size: 1.6rem;
    color: rgba(184,154,96,.18);
    margin-bottom: 14px;
    line-height: 1;
    font-style: normal;
}
.cmp-affirmation::after {
    content: '';
    position: absolute;
    bottom: 0; left: 40px; right: 40px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(184,154,96,.25), transparent);
}

/* ── SECȚIUNI TEXT ── */
.cmp-text-section {
    background: var(--deep);
    border: 1px solid rgba(184,154,96,.07);
    padding: 22px 24px;
    margin-bottom: 2px;
    line-height: 1.75;
    color: var(--muted);
    font-size: 0.87rem;
    font-family: 'Jost', sans-serif;
}
.cmp-section-title {
    display: block;
    font-family: 'Jost', sans-serif;
    font-size: 0.5rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
    padding-left: 0;
    padding-bottom: 10px;
    border-left: none;
    border-bottom: 1px solid rgba(184,154,96,.1);
    font-weight: 500;
}

/* ── LOADING ── */
.cmp-loading {
    text-align: center;
    padding: 60px 20px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: var(--muted);
    animation: none;
    letter-spacing: 0.06em;
}
.cmp-loading::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 16px auto 0;
    animation: cmpPulse 2s ease-in-out infinite;
}
@keyframes cmpPulse {
    0%, 100% { opacity: .2; width: 40px; }
    50%       { opacity: 1; width: 100px; }
}

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
    .cmp-filters-grid   { grid-template-columns: 1fr; }
    .cmp-grid           { grid-template-columns: repeat(2, 1fr); }
    .cmp-images-gallery { grid-template-columns: 1fr; }
    .cmp-container      { padding: 32px 16px 60px; }
    .cmp-affirmation    { padding: 24px 20px; }
    .cmp-affirmation::after { left: 20px; right: 20px; }
}
@media (max-width: 480px) {
    .cmp-grid { grid-template-columns: 1fr 1fr; }
}
