/* ==========================================================================
   Premium Legal Pages (Privacy Policy, Terms, etc.)
   ========================================================================== */

/* Overrides for Astra default gap */
body.page-template-page-privacy-policy .ast-container,
body.page-template-page-terms-conditions .ast-container,
body.page-template-page-refund-cancellation .ast-container,
body.page-template-page-shipping-policy .ast-container {
    max-width: 100% !important;
    padding: 0 !important;
}

body.page-template-page-privacy-policy .site-content,
body.page-template-page-terms-conditions .site-content,
body.page-template-page-refund-cancellation .site-content,
body.page-template-page-shipping-policy .site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.rassoireet-legal-page {
    background-color: var(--color-bg-cream, #fdfbf7);
    padding-bottom: 5rem;
}

/* 1. 3D HERO HEADER SECTION */
.legal-hero-header {
    background: linear-gradient(135deg, var(--color-primary-green, #045c2f) 0%, #034523 100%);
    padding: 6rem 1rem 8rem 1rem; /* Extra bottom padding for overlap */
    position: relative;
    text-align: center;
}

/* Subtle overlay pattern/gradient if desired */
.legal-hero-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.legal-hero-content {
    position: relative;
    z-index: 2;
    animation: floatUpSoft 1s ease-out forwards;
}

.legal-hero-content h1 {
    color: #ffffff;
    font-weight: 800;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.legal-hero-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

@keyframes floatUpSoft {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 2. PREMIUM CONTENT CARD */
.legal-content-container {
    padding: 0 1rem;
}

.legal-content-card {
    max-width: 800px;
    margin: -80px auto 4rem auto; /* Negative margin to overlap the header */
    background: #ffffff;
    border-radius: 16px;
    padding: 3.5rem 4rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    z-index: 10;
}

/* Typography & Content Styling */
.legal-section {
    margin-bottom: 3rem;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section p, 
.legal-section ul {
    color: var(--color-text-dark, #1a1a1a);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.legal-section ul {
    padding-left: 1.5rem;
    list-style-type: disc;
}

.legal-section li {
    margin-bottom: 0.8rem;
}

.legal-section h2 {
    color: var(--color-primary-green, #045c2f);
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1.2rem;
    padding-left: 1rem;
    border-left: 4px solid var(--color-secondary-yellow, #f7b731);
    line-height: 1.3;
}

.legal-section strong {
    font-weight: 700;
    color: #000;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .legal-hero-header {
        padding: 5rem 1rem 6rem 1rem;
    }
    .legal-hero-content h1 {
        font-size: 2.2rem;
    }
    .legal-content-card {
        padding: 2rem 1.5rem;
        margin-top: -50px;
    }
    .legal-section h2 {
        font-size: 1.3rem;
        padding-left: 0.75rem;
    }
    .legal-section p, .legal-section ul {
        font-size: 1rem;
    }
}
