/*
 * AGRICRIS Family Group — GDPR / Politica de Confidențialitate
 * PHP: page-gdpr.php  |  JS: assets/js/page-noutati.js (shared reveal, .afg-reveal)
 * Design: editorial warm-cream (afg-), consistent cu despre-noi / contact.
 * Self-contained: tokeni --c-* scopati pe #afg-gdpr (home.css nu se incarca aici).
 * ========================================================================== */

/* ==========================================================================
   RESET ASTRA + FUNDAL CREAM (clasa pusa pe body din template)
   ========================================================================== */
body.afg-light-page .site,
body.afg-light-page .site-content,
body.afg-light-page .ast-container,
body.afg-light-page #primary,
body.afg-light-page #content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    background: #FAF6F1 !important;
}
body.afg-light-page .ast-container { display: block !important; }
body.afg-light-page { background: #FAF6F1 !important; }
body.afg-light-page .ast-post-title,
body.afg-light-page .entry-header,
body.afg-light-page .ast-single-post .post-thumb { display: none !important; }

/* ==========================================================================
   TOKENI + BAZA (scopate pe wrapper)
   ========================================================================== */
#afg-gdpr {
    --c-cream-50: #FDFBF7;
    --c-cream-100: #FAF6F1;
    --c-cream-200: #F1E9DC;
    --c-cream-300: #E8DCC8;
    --c-ink-900: #1F1812;
    --c-ink-700: #3D2C1F;
    --c-ink-500: #6E5A47;
    --c-ink-300: #A89684;
    --c-forest-700: #2D5016;
    --c-flame-900: #7C2D12;
    --c-flame-700: #9A3412;
    --c-flame-500: #C2410C;
    --c-amber-500: #D97706;
    --c-amber-400: #F59E0B;

    --f-display: 'Outfit', 'Times New Roman', serif;
    --f-text: 'Outfit', system-ui, sans-serif;
    --f-mono: 'JetBrains Mono', monospace;

    --r-md: 12px;
    --r-lg: 20px;

    --shadow-sm: 0 2px 6px rgba(31, 24, 18, 0.04), 0 1px 2px rgba(31, 24, 18, 0.06);
    --shadow-md: 0 10px 30px rgba(31, 24, 18, 0.08), 0 2px 6px rgba(31, 24, 18, 0.06);
    --shadow-lg: 0 30px 60px rgba(31, 24, 18, 0.18), 0 10px 20px rgba(31, 24, 18, 0.1);

    --t-fast: 0.25s ease;
    --t-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    font-family: var(--f-text);
    color: var(--c-ink-900);
    background: var(--c-cream-100);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    display: block;
}
#afg-gdpr *, #afg-gdpr *::before, #afg-gdpr *::after { box-sizing: border-box; }

#afg-gdpr .afg-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    width: 100%;
}

/* ==========================================================================
   TIPOGRAFIE COMUNI (clonat din sistemul despre-noi)
   ========================================================================== */
#afg-gdpr .afg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--f-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--c-flame-700);
    padding: 8px 16px;
    border: 1px solid var(--c-cream-300);
    border-radius: 100px;
    background: var(--c-cream-50);
    margin-bottom: 28px;
}
#afg-gdpr .afg-eyebrow::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--c-flame-500);
    box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.15);
}

#afg-gdpr .afg-display {
    font-family: var(--f-display);
    font-weight: 300;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--c-ink-900);
    margin-bottom: 24px;
}
#afg-gdpr .afg-mark {
    color: var(--c-flame-700);
    font-weight: 400;
    position: relative;
    white-space: nowrap;
}
#afg-gdpr .afg-mark::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 4px;
    height: 0.35em;
    background: rgba(217, 119, 6, 0.18);
    z-index: -1;
}

#afg-gdpr .afg-prose {
    font-size: 1.08rem;
    line-height: 1.78;
    color: var(--c-ink-700);
    margin-bottom: 18px;
    max-width: 58ch;
    font-weight: 400;
}
#afg-gdpr .afg-prose strong { color: var(--c-ink-900); font-weight: 600; }

/* ==========================================================================
   BUTOANE
   ========================================================================== */
#afg-gdpr .afg-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    font-family: var(--f-text);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 100px;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--t-smooth);
    letter-spacing: 0.01em;
}
#afg-gdpr .afg-btn--solid {
    background: var(--c-ink-900);
    color: var(--c-cream-50);
    border-color: var(--c-ink-900);
}
#afg-gdpr .afg-btn--solid:hover {
    background: var(--c-flame-700);
    border-color: var(--c-flame-700);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(154, 52, 18, 0.25);
}
#afg-gdpr .afg-btn--dark-ghost {
    background: transparent;
    color: var(--c-ink-900);
    border-color: var(--c-ink-300);
}
#afg-gdpr .afg-btn--dark-ghost:hover {
    background: var(--c-ink-900);
    color: var(--c-cream-50);
    border-color: var(--c-ink-900);
    transform: translateY(-2px);
}

/* ==========================================================================
   REVEAL (identic cu despre-noi, JS-ul comun targeteaza .afg-reveal)
   ========================================================================== */
#afg-gdpr .afg-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s var(--t-smooth), transform 0.9s var(--t-smooth);
}
#afg-gdpr .afg-reveal.is-visible { opacity: 1; transform: translateY(0); }
#afg-gdpr .afg-reveal--delay   { transition-delay: 0.15s; }
#afg-gdpr .afg-reveal--delay-2 { transition-delay: 0.3s; }
#afg-gdpr .afg-reveal--delay-3 { transition-delay: 0.45s; }
@media (prefers-reduced-motion: reduce) {
    #afg-gdpr .afg-reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   1. HERO LEGAL
   ========================================================================== */
#afg-gdpr .afg-gdpr-hero {
    padding: clamp(100px, 14vw, 160px) 0 clamp(60px, 8vw, 100px);
    background: var(--c-cream-50);
    border-bottom: 1px solid var(--c-cream-300);
    text-align: center;
}
#afg-gdpr .afg-gdpr-hero__inner {
    max-width: 760px;
    margin: 0 auto;
}
#afg-gdpr .afg-gdpr-hero .afg-eyebrow {
    margin-left: auto;
    margin-right: auto;
}
#afg-gdpr .afg-gdpr-hero__title {
    font-family: var(--f-display);
    font-weight: 300;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    color: var(--c-ink-900);
    margin-bottom: 28px;
}
#afg-gdpr .afg-gdpr-hero__title em {
    font-style: italic;
    font-weight: 300;
    color: var(--c-flame-700);
}
#afg-gdpr .afg-gdpr-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--f-mono);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-ink-500);
    padding: 10px 20px;
    background: var(--c-cream-100);
    border: 1px solid var(--c-cream-300);
    border-radius: 100px;
    margin-top: 8px;
}
#afg-gdpr .afg-gdpr-meta strong { color: var(--c-flame-700); font-weight: 600; letter-spacing: 0; }

/* ==========================================================================
   2. CUPRINS (table of contents — opțional, ascuns pe mobil mic)
   ========================================================================== */
#afg-gdpr .afg-gdpr-toc {
    background: var(--c-cream-100);
    border-top: 1px solid var(--c-cream-200);
    border-bottom: 1px solid var(--c-cream-200);
    padding: 48px 0;
}
#afg-gdpr .afg-gdpr-toc__inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 32px;
}
#afg-gdpr .afg-gdpr-toc__label {
    font-family: var(--f-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-ink-500);
    margin-bottom: 20px;
}
#afg-gdpr .afg-gdpr-toc__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
#afg-gdpr .afg-gdpr-toc__grid li {
    list-style: none;
    padding: 0;
    margin: 0;
}
#afg-gdpr .afg-gdpr-toc__grid a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--c-ink-700);
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: color var(--t-fast), border-color var(--t-fast);
    line-height: 1.45;
}
#afg-gdpr .afg-gdpr-toc__grid a .toc-num {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--c-flame-500);
    min-width: 18px;
    flex-shrink: 0;
}
#afg-gdpr .afg-gdpr-toc__grid a:hover {
    color: var(--c-flame-700);
    border-bottom-color: var(--c-flame-500);
}

/* ==========================================================================
   3. DOCUMENT PRINCIPAL
   ========================================================================== */
#afg-gdpr .afg-gdpr-body {
    padding: clamp(60px, 8vw, 100px) 0 clamp(80px, 10vw, 130px);
    background: var(--c-cream-100);
}
#afg-gdpr .afg-gdpr-layout {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Document card */
#afg-gdpr .afg-gdpr-doc {
    background: var(--c-cream-50);
    border: 1px solid var(--c-cream-300);
    border-radius: var(--r-lg);
    padding: clamp(40px, 6vw, 72px) clamp(32px, 5vw, 64px);
    box-shadow: var(--shadow-md);
}

/* --- Headings --- */
#afg-gdpr .afg-gdpr-doc h2 {
    font-family: var(--f-display);
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    font-weight: 400;
    color: var(--c-ink-900);
    margin: 56px 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--c-cream-300);
    display: flex;
    align-items: center;
    gap: 14px;
    line-height: 1.3;
    scroll-margin-top: 80px;
}
#afg-gdpr .afg-gdpr-doc h2::before {
    content: '';
    display: block;
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--c-flame-700), var(--c-flame-500));
    border-radius: 4px;
    flex-shrink: 0;
}
#afg-gdpr .afg-gdpr-doc h2:first-of-type { margin-top: 0; }

#afg-gdpr .afg-gdpr-doc h3 {
    font-family: var(--f-display);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--c-ink-700);
    margin: 32px 0 12px;
    scroll-margin-top: 80px;
}

/* --- Paragraf --- */
#afg-gdpr .afg-gdpr-doc p {
    font-size: 1rem;
    line-height: 1.78;
    color: var(--c-ink-700);
    margin-bottom: 18px;
}
#afg-gdpr .afg-gdpr-doc p strong { color: var(--c-ink-900); font-weight: 600; }
#afg-gdpr .afg-gdpr-doc p em { color: var(--c-ink-500); font-style: italic; }

/* --- Linkuri --- */
#afg-gdpr .afg-gdpr-doc a {
    color: var(--c-flame-700);
    text-decoration: none;
    border-bottom: 1px solid rgba(154, 52, 18, 0.25);
    transition: color var(--t-fast), border-color var(--t-fast);
}
#afg-gdpr .afg-gdpr-doc a:hover {
    color: var(--c-flame-900);
    border-bottom-color: var(--c-flame-700);
}

/* --- Liste (bullets vizibili — critice pentru doc legal) --- */
#afg-gdpr .afg-gdpr-doc ul {
    list-style: disc;
    padding-left: 28px;
    margin: 0 0 20px 0;
}
#afg-gdpr .afg-gdpr-doc ol {
    list-style: decimal;
    padding-left: 28px;
    margin: 0 0 20px 0;
}
#afg-gdpr .afg-gdpr-doc li {
    font-size: 1rem;
    line-height: 1.72;
    color: var(--c-ink-700);
    margin-bottom: 10px;
    list-style: inherit;
    padding-left: 4px;
}
#afg-gdpr .afg-gdpr-doc li::marker {
    color: var(--c-flame-500);
}
#afg-gdpr .afg-gdpr-doc li strong { color: var(--c-ink-900); font-weight: 600; }

/* Liste imbricate */
#afg-gdpr .afg-gdpr-doc ul ul,
#afg-gdpr .afg-gdpr-doc ol ol,
#afg-gdpr .afg-gdpr-doc ul ol,
#afg-gdpr .afg-gdpr-doc ol ul {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* --- Box informații operator / contact --- */
#afg-gdpr .afg-gdpr-infobox {
    background: var(--c-cream-100);
    border: 1px solid var(--c-cream-300);
    border-left: 4px solid var(--c-flame-500);
    border-radius: var(--r-md);
    padding: 24px 28px;
    margin: 24px 0;
}
#afg-gdpr .afg-gdpr-infobox p:last-child,
#afg-gdpr .afg-gdpr-infobox ul:last-child { margin-bottom: 0; }

/* --- Tabel GDPR --- */
#afg-gdpr .afg-gdpr-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 28px 0;
    border-radius: var(--r-md);
    border: 1px solid var(--c-cream-300);
    box-shadow: var(--shadow-sm);
}
#afg-gdpr .afg-gdpr-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    text-align: left;
}
#afg-gdpr .afg-gdpr-table thead tr {
    background: var(--c-cream-200);
}
#afg-gdpr .afg-gdpr-table th {
    padding: 14px 18px;
    font-family: var(--f-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--c-flame-700);
    border-bottom: 1px solid var(--c-cream-300);
    white-space: nowrap;
}
#afg-gdpr .afg-gdpr-table td {
    padding: 14px 18px;
    font-size: 0.92rem;
    color: var(--c-ink-700);
    vertical-align: top;
    line-height: 1.6;
    border-bottom: 1px solid var(--c-cream-200);
    border-right: 1px solid var(--c-cream-200);
}
#afg-gdpr .afg-gdpr-table td:last-child { border-right: none; }
#afg-gdpr .afg-gdpr-table tbody tr:last-child td { border-bottom: none; }
#afg-gdpr .afg-gdpr-table tbody tr:hover td {
    background: var(--c-cream-200);
    color: var(--c-ink-900);
}

/* ==========================================================================
   4. BAND BOTTOM — CTA contact
   ========================================================================== */
#afg-gdpr .afg-gdpr-cta {
    padding: 80px 0;
    background: var(--c-cream-50);
    border-top: 1px solid var(--c-cream-300);
    text-align: center;
}
#afg-gdpr .afg-gdpr-cta__inner {
    max-width: 600px;
    margin: 0 auto;
}
#afg-gdpr .afg-gdpr-cta .afg-eyebrow {
    margin-left: auto;
    margin-right: auto;
}
#afg-gdpr .afg-gdpr-cta__title {
    font-family: var(--f-display);
    font-weight: 300;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--c-ink-900);
    margin-bottom: 16px;
    line-height: 1.2;
}
#afg-gdpr .afg-gdpr-cta__sub {
    font-size: 1rem;
    color: var(--c-ink-500);
    line-height: 1.7;
    margin-bottom: 32px;
}
#afg-gdpr .afg-gdpr-cta__actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    #afg-gdpr .afg-wrap { padding: 0 20px; }
    #afg-gdpr .afg-gdpr-layout { padding: 0 20px; }
    #afg-gdpr .afg-gdpr-toc__inner { padding: 0 20px; }
    #afg-gdpr .afg-gdpr-toc__grid { grid-template-columns: 1fr 1fr; gap: 4px 16px; }
    #afg-gdpr .afg-gdpr-doc { padding: 36px 24px; }
    #afg-gdpr .afg-gdpr-doc h2 { font-size: 1.15rem; margin-top: 44px; }
    #afg-gdpr .afg-gdpr-table th,
    #afg-gdpr .afg-gdpr-table td { padding: 11px 13px; font-size: 0.85rem; }
}
@media (max-width: 480px) {
    #afg-gdpr .afg-gdpr-toc { display: none; }
    #afg-gdpr .afg-gdpr-doc { padding: 28px 16px; border-radius: var(--r-md); }
    #afg-gdpr .afg-gdpr-infobox { padding: 18px 16px; }
}
