/* ========================================
   LEGAL PAGES STYLES (Terms & Privacy)
   ======================================== */

/* ---------------------------------------- 1. PAGE CANVAS OVERRIDES ---------------------------------------- */
.page-header,
.entry-header {
    display: none !important;
}

#content-wrap,
#primary,
.content-area,
.entry-content {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

#primary {
    border: 0 !important;
}

.safebox2u-legal-page {
    background: #f8faf9;
    font-family: var(--font-body);
    overflow: hidden;
    padding-bottom: 80px;
}

.safebox2u-legal-page *,
.safebox2u-legal-page *::before,
.safebox2u-legal-page *::after {
    box-sizing: border-box;
}

/* ----------------------------------------
   ANIMATION KEYFRAMES
   ---------------------------------------- */
@keyframes legal-fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes legal-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---------------------------------------- 2. HERO HEADER ---------------------------------------- */
.safebox2u-legal-hero {
    background: linear-gradient(135deg, #0f261a 0%, #1e4030 40%, #3F6A54 100%);
    color: #ffffff;
    padding: 80px 30px 100px; /* Extra bottom padding so main content can overlap */
    position: relative;
    text-align: center;
}

.safebox2u-legal-hero::after {
    animation: legal-fade-in 0.8s 0.8s ease 1 both;
    background: linear-gradient(90deg, #FFD700, rgba(255, 215, 0, 0.2), transparent);
    bottom: 0;
    content: "";
    height: 5px;
    left: 0;
    position: absolute;
    right: 0;
}

.safebox2u-legal-hero h1 {
    animation: legal-fade-up 0.7s 0.2s ease both;
    color: #ffffff;
    font-size: 42px;
    font-weight: 800;
    margin: 0 auto 16px;
    max-width: 800px;
    line-height: 1.15;
}

.safebox2u-legal-lede {
    animation: legal-fade-up 0.7s 0.4s ease both;
    color: rgba(255, 255, 255, 0.88);
    font-size: 16px;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 680px;
}

/* ---------------------------------------- 3. MAIN CONTENT (Document Reader) ---------------------------------------- */
.safebox2u-legal-content {
    animation: legal-fade-up 0.8s 0.6s ease both;
    background: #ffffff;
    border: 1px solid #e8ede9;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(15, 38, 26, 0.05);
    max-width: 860px;
    margin: -40px auto 0; /* Pulls up over the hero */
    padding: 50px 60px;
    position: relative;
    z-index: 10;
}

/* Typography rules for the legal text body */
.safebox2u-legal-text {
    color: #4a5a51;
    font-size: 15.5px;
    line-height: 1.8;
}

.safebox2u-legal-text h2 {
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 800;
    margin: 40px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f5f2;
}

.safebox2u-legal-text h2:first-child {
    margin-top: 0;
}

.safebox2u-legal-text h3 {
    color: #2a3a30;
    font-size: 18px;
    font-weight: 700;
    margin: 24px 0 12px 0;
}

.safebox2u-legal-text p {
    margin-bottom: 16px;
}

.safebox2u-legal-text ul,
.safebox2u-legal-text ol {
    margin: 0 0 20px 0;
    padding-left: 20px;
}

.safebox2u-legal-text li {
    margin-bottom: 8px;
}

.safebox2u-legal-text a {
    color: #3F6A54;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    transition: color 0.2s;
}

.safebox2u-legal-text a:hover {
    color: #1e4030;
}

/* Last updated date */
.safebox2u-legal-updated {
    font-size: 14px;
    color: #8a9a90;
    margin-bottom: 30px;
    font-weight: 600;
}

/* ---------------------------------------- 4. RESPONSIVE ---------------------------------------- */
@media (max-width: 768px) {
    .safebox2u-legal-hero {
        padding: 60px 20px 80px;
    }
    
    .safebox2u-legal-hero h1 {
        font-size: 32px;
    }
    
    .safebox2u-legal-content {
        margin: -30px 20px 0;
        padding: 30px 24px;
    }

    .safebox2u-legal-text h2 {
        font-size: 20px;
    }
}
