/* ==========================================================================
   AAM GOOD SHOPPING - GDPR (STANDALONE CSS & ASTRA NUCLEAR FIX)
   ========================================================================== */

/* --- 1. THE NUCLEAR FIX: FORȚĂM FUNDALUL DARK ȘI ANULĂM ASTRA --- */
body.aam-dark-page {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1629;
    --bg-card: #141b2d;
    --bg-card-hover: #1a2340;
    --blue-main: #3B82F6;
    --blue-light: #60A5FA;
    --blue-deep: #1E3A8A;
    --green-accent: #10B981;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border-subtle: rgba(59, 130, 246, 0.12);
    --border-active: rgba(59, 130, 246, 0.35);
    --gradient-blue: linear-gradient(135deg, #1E3A8A, #3B82F6);
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body.aam-dark-page,
body.aam-dark-page .site,
body.aam-dark-page .site-content,
body.aam-dark-page .ast-container,
body.aam-dark-page #primary,
body.aam-dark-page #content,
body.aam-dark-page .ast-plain-container {
    background-color: var(--bg-primary) !important;
    background-image: none !important;
    color: var(--text-primary) !important;
    font-family: var(--font-main) !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    line-height: 1.7 !important;
}

/* Ascundem Titlurile de pagină și Header/Footer meta generate de Astra */
body.aam-dark-page .ast-post-title,
body.aam-dark-page .ast-breadcrumbs-wrapper,
body.aam-dark-page .entry-header {
    display: none !important;
}

/* --- 2. GLOBAL UTILITIES PENTRU PAGINA GDPR --- */
#aam-gdpr-page {
    position: relative;
    width: 100%;
    overflow: hidden;
    z-index: 10;
}

body.aam-dark-page .container {
    max-width: 1240px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    width: 100% !important;
    display: block !important;
}

/* Container special mai ingust pentru citire documente lungi */
body.aam-dark-page .container--legal {
    max-width: 860px !important;
}

body.aam-dark-page .text-center { text-align: center; }

body.aam-dark-page .section-label {
    font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
    letter-spacing: 3px; text-transform: uppercase; color: var(--blue-light);
    margin-bottom: 16px; display: inline-flex; align-items: center; gap: 10px;
    justify-content: center;
}
body.aam-dark-page .section-label::before {
    content: ''; width: 24px; height: 1px; background: var(--blue-main);
}
body.aam-dark-page .section-title {
    font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.2;
    margin-bottom: 16px; letter-spacing: -0.02em; color: var(--text-primary);
}
body.aam-dark-page .gradient-text {
    background: var(--gradient-blue); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}

/* --- ANIMATII REVEAL --- */
body.aam-dark-page .reveal {
    opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease;
}
body.aam-dark-page .reveal.visible { opacity: 1; transform: translateY(0); }
body.aam-dark-page .reveal-delay-1 { transition-delay: 0.1s; }
body.aam-dark-page .reveal-delay-2 { transition-delay: 0.2s; }
body.aam-dark-page .reveal-delay-3 { transition-delay: 0.3s; }

/* --- BACKGROUND EFFECTS --- */
body.aam-dark-page .bg-grid {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
    background-image: linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}
body.aam-dark-page .bg-orb {
    position: fixed; border-radius: 50%; filter: blur(100px); pointer-events: none; z-index: 0;
}
body.aam-dark-page .bg-orb--1 {
    width: 500px; height: 500px; background: rgba(59,130,246,0.06); top: -100px; right: -100px;
}
body.aam-dark-page .bg-orb--3 {
    width: 400px; height: 400px; background: rgba(16,185,129,0.04); bottom: 10%; left: -100px;
}

/* --- 3. SECTIUNEA HERO LEGAL --- */
.legal-hero {
    position: relative; z-index: 1; padding: 160px 0 60px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(to bottom, transparent, rgba(10, 14, 26, 0.8));
}
.legal-meta {
    font-size: 0.95rem; color: var(--text-muted); font-family: var(--font-mono);
    margin-top: 10px; display: inline-block; padding: 8px 16px;
    background: rgba(59, 130, 246, 0.05); border-radius: 100px; border: 1px solid var(--border-subtle);
}

/* --- 4. FORMATĂRI DOCUMENT LEGAL --- */
.legal-content-section {
    position: relative; z-index: 1; padding: 60px 0 100px;
}

/* FIX CRITIC: Previne ascunderea documentului din cauza bug-ului IntersectionObserver pe elemente foarte înalte */
body.aam-dark-page .legal-content-section.reveal {
    opacity: 1 !important;
    transform: translateY(0) !important;
    animation: fadeUpDocument 1s ease 0.4s both;
}

@keyframes fadeUpDocument {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.legal-document {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 60px 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Tipografie Text */
.legal-document p {
    font-size: 1.05rem; color: var(--text-secondary); line-height: 1.75;
    margin-bottom: 20px;
}
.legal-document a {
    color: var(--blue-light); text-decoration: none; border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}
.legal-document a:hover {
    color: var(--blue-main); border-bottom-color: var(--blue-main);
}
.legal-document strong {
    color: var(--text-primary); font-weight: 600;
}
.legal-document em {
    color: var(--text-muted); font-style: italic;
}

/* Headings (h2) */
.legal-document h2 {
    font-size: 1.4rem; color: var(--text-primary); font-weight: 700;
    margin: 48px 0 20px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex; align-items: center; gap: 12px;
}
.legal-document h2::before {
    content: ''; display: block; width: 6px; height: 24px;
    background: var(--gradient-blue); border-radius: 4px;
}
/* Primul h2 nu are nevoie de margine asa mare sus */
.legal-document h2:first-of-type { margin-top: 0; }

/* Liste */
.legal-document ul {
    margin: 0 0 24px 0; padding-left: 0; list-style: none;
}
.legal-document li {
    font-size: 1.05rem; color: var(--text-secondary); line-height: 1.7;
    margin-bottom: 12px; position: relative; padding-left: 28px;
}
.legal-document li::before {
    content: '◆'; position: absolute; left: 0; top: 2px;
    color: var(--blue-main); font-size: 0.8rem;
}

/* Box Informatii */
.legal-info-box {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-md);
    padding: 24px 30px; margin: 24px 0;
}
.legal-info-box p:last-child, .legal-info-box ul:last-child { margin-bottom: 0; }
.legal-info-box li { margin-bottom: 8px; }

/* --- 5. TABEL RESPONSIV GDPR --- */
.table-responsive {
    width: 100%; overflow-x: auto; margin: 32px 0;
    border-radius: var(--radius-md); border: 1px solid var(--border-subtle);
    background: var(--bg-card-hover);
}

.legal-table {
    width: 100%; min-width: 600px; border-collapse: collapse; text-align: left;
}
.legal-table th, .legal-table td {
    padding: 16px 20px; border-bottom: 1px solid var(--border-subtle);
}
.legal-table th {
    background: rgba(10, 14, 26, 0.5); color: var(--blue-light);
    font-family: var(--font-mono); font-size: 0.85rem; text-transform: uppercase;
    letter-spacing: 1px; font-weight: 600;
}
.legal-table td {
    font-size: 0.95rem; color: var(--text-secondary); vertical-align: top;
    line-height: 1.6; border-right: 1px solid rgba(255,255,255,0.02);
}
.legal-table td:last-child { border-right: none; }
.legal-table tbody tr:hover td {
    background: rgba(59, 130, 246, 0.03); color: var(--text-primary);
}
.legal-table tbody tr:last-child td { border-bottom: none; }

/* --- 6. RESPONSIVE --- */
@media (max-width: 768px) {
    .legal-document { padding: 40px 24px; }
    .legal-hero { padding: 140px 0 40px; }
    .legal-info-box { padding: 20px; }
    
    .legal-document h2 { font-size: 1.25rem; }
    .legal-document p, .legal-document li { font-size: 0.95rem; }
}

@media (max-width: 480px) {
    .legal-document { padding: 30px 16px; border-radius: 0; border-left: none; border-right: none; }
    .legal-table th, .legal-table td { padding: 12px 14px; font-size: 0.85rem; }
}