/* Legal Pages (Terms, Privacy, etc.) - Premium Redesign */

:root {
    /* Recalibrated Fluid Typography (Exact User Specs) */
    --fs-xs: clamp(12px, 1vw, 13px);
    --fs-sm: clamp(13px, 1vw, 15px);
    --fs-base: clamp(14px, 1.2vw, 16px);
    --fs-lg: clamp(16px, 1.8vw, 20px);
    --fs-xl: clamp(22px, 2.5vw, 32px);
    --fs-hero: clamp(28px, 4vw, 48px);

    /* Fluid Spacing (Exact User Specs) */
    --space-xs: clamp(8px, 1vw, 12px);
    --space-sm: clamp(12px, 1.5vw, 20px);
    --space-md: clamp(16px, 2vw, 24px);
    --space-lg: clamp(32px, 4vw, 64px);
    --space-xl: clamp(40px, 6vw, 80px);

    --legal-bg: #f8fbf9;
    --legal-card-bg: #ffffff;
    --legal-text-main: #1a2e26;
    --legal-text-muted: #4a5d55;
    --legal-accent-gold: #d4af37;
    --legal-accent-green: #064e3b;
    --legal-accent-soft: #ecf3f0;
    --legal-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    --legal-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.legal-page-body {
    background-color: var(--legal-bg);
}

.legal-hero {
    background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
    padding: var(--space-xl) 0 var(--space-lg);
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
}

.legal-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(109, 191, 62, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.15) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236dbf3e' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.legal-hero .hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.legal-hero .breadcrumb {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--space-sm);
    font-size: var(--fs-xs);
}

.legal-hero .breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
}

.legal-hero .hero-compact-title {
    font-size: var(--fs-hero);
    font-weight: 800;
    margin-bottom: var(--space-sm);
    color: white;
    line-height: 1.2;
}

.legal-hero .hero-compact-desc {
    font-size: var(--fs-base);
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.last-updated-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.25rem;
    border-radius: 100px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: white;
}

.trust-badge-hero {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(109, 191, 62, 0.15);
    border: 1px solid rgba(109, 191, 62, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: #6dbf3e;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}



.legal-content-wrapper {
    padding: var(--space-xl) 0 var(--space-lg);
    margin-top: calc(-1 * clamp(20px, 3vw, 48px));
    position: relative;
    z-index: 10;
}

.legal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .legal-grid {
        grid-template-columns: 260px 1fr;
        align-items: start;
    }
}

/* Sidebar Navigation */
.legal-sidebar-container {
    display: none;
    position: sticky;
    top: 100px;
}

@media (min-width: 768px) {
    .legal-sidebar-container {
        display: block;
    }
}

.mobile-legal-nav {
    display: none !important;
}

.legal-sidebar {
    background: var(--legal-card-bg);
    padding: var(--space-md);
    border-radius: clamp(12px, 1.5vw, 20px);
    box-shadow: var(--legal-shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.legal-sidebar h4 {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--legal-text-muted);
    margin-bottom: var(--space-sm);
    padding-left: 1rem;
}

.legal-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legal-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.875rem 1rem;
    color: var(--legal-text-muted);
    text-decoration: none;
    font-size: var(--fs-sm);
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.25s ease;
}

.legal-nav-link:hover {
    background: var(--legal-accent-soft);
    color: var(--legal-accent-green);
}

.legal-nav-link.active {
    background: var(--legal-accent-green);
    color: white;
    box-shadow: 0 8px 20px rgba(6, 78, 59, 0.25);
}

.btn-download-pdf {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem;
    background: var(--legal-accent-soft);
    color: var(--legal-accent-green);
    text-decoration: none;
    font-size: var(--fs-xs);
    font-weight: 700;
    border-radius: 10px;
    border: 1px solid rgba(6, 78, 59, 0.1);
    transition: all 0.3s ease;
}

.btn-download-pdf:hover {
    background: var(--legal-accent-green);
    color: white;
    transform: translateY(-2px);
}

/* Content Article */
.legal-article {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.legal-card {
    background: var(--legal-card-bg);
    border-radius: 16px;
    padding: var(--space-lg);
    box-shadow: var(--legal-shadow);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease;
    margin-bottom: var(--space-md);
}

.legal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--legal-shadow-hover);
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.card-icon {
    width: clamp(40px, 4vw, 56px);
    height: clamp(40px, 4vw, 56px);
    background: var(--legal-accent-soft);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--legal-accent-green);
    flex-shrink: 0;
}

.card-icon svg {
    width: clamp(16px, 1.5vw, 20px);
    height: clamp(16px, 1.5vw, 20px);
}

.legal-card h2 {
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--legal-text-main);
    margin: 0;
    line-height: 1.3;
    max-width: 700px; /* Text content width control */
}

.legal-card h3 {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--legal-text-main);
    margin: var(--space-md) 0 var(--space-sm);
    line-height: 1.3;
    max-width: 700px;
}

.legal-list-styled {
    list-style: none;
    counter-reset: legal-counter;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.legal-list-styled li {
    position: relative;
    padding-left: clamp(48px, 5vw, 64px);
    color: var(--legal-text-muted);
    font-size: var(--fs-base);
    line-height: 1.6;
}

.legal-list-styled li::before {
    content: counter(legal-counter);
    counter-increment: legal-counter;
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background: var(--legal-accent-soft);
    color: var(--legal-accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
}

.legal-card p {
    color: var(--legal-text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: var(--fs-base);
    max-width: 700px;
    width: 100%;
}

.legal-card ul {
    margin-bottom: var(--space-sm);
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.legal-card li {
    position: relative;
    color: var(--legal-text-muted);
    padding-left: 1.75rem;
    font-size: var(--fs-base);
    line-height: 1.7;
    margin-bottom: 6px;
    max-width: 700px;
    width: 100%;
}

.legal-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background: var(--legal-accent-gold);
    border-radius: 50%;
}

.card-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(0,0,0,0.05) 0%, transparent 100%);
    margin-bottom: 1.5rem;
}

.disclaimer-box {
    background: #fffbef;
    border-left: 4px solid var(--legal-accent-gold);
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: clamp(8px, 1.5vw, 16px);
    margin: var(--space-md) 0;
}

.disclaimer-box h4 {
    color: #856404;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.disclaimer-box p {
    color: #856404;
    margin-bottom: 0;
    font-weight: 500;
}

/* Highlight Cards */
.highlight-box {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    background: var(--legal-accent-soft);
    border-radius: clamp(12px, 2vw, 20px);
    padding: clamp(16px, 3vw, 32px);
    margin: var(--space-md) 0;
    border-left: 5px solid var(--legal-accent-green);
}

.highlight-box.secure {
    background: #f0fdf4;
    border-left-color: #16a34a;
}

.highlight-box .hb-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.highlight-box .hb-content h4 {
    color: var(--legal-accent-green);
    font-size: var(--fs-base);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.highlight-box .hb-content p {
    margin-bottom: 0;
    font-size: var(--fs-sm);
    color: var(--legal-text-main);
    opacity: 0.9;
}

/* CTA Card */
.contact-cta-card {
    background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
    border-radius: clamp(12px, 1.5vw, 24px);
    padding: var(--space-lg);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-cta-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.2), transparent 60%);
}

.contact-cta-card h3 {
    font-size: var(--fs-lg);
    font-weight: 800;
    margin-bottom: var(--space-sm);
    position: relative;
}

.contact-cta-card p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    margin: 0 auto var(--space-md);
    position: relative;
}

.btn-cta {
    display: inline-block;
    background: var(--legal-accent-gold);
    color: #000;
    padding: clamp(12px, 1.5vw, 16px) clamp(24px, 2.5vw, 32px);
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

@media (min-width: 768px) {
    .legal-article {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .legal-card {
        padding: 20px;
    }
    
    .legal-hero {
        padding: 60px 0 40px;
    }
}

@media (max-width: 480px) {
    .legal-hero .hero-compact-title {
        font-size: var(--fs-hero);
    }
    
    .legal-card h2 {
        font-size: var(--fs-xl);
    }
    
    .legal-card p, 
    .legal-card li {
        font-size: var(--fs-base);
    }

    .legal-hero .hero-compact-desc {
        font-size: var(--fs-base);
    }
}

/* FAQ Accordion */
.faq-section {
    margin: var(--space-xl) 0;
}

.faq-title {
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--legal-text-main);
    margin-bottom: var(--space-md);
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.faq-item {
    background: var(--legal-card-bg);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    text-align: left;
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--legal-text-main);
    cursor: pointer;
}

.faq-question::after {
    content: "+";
    font-size: 1.25rem;
    color: var(--legal-accent-green);
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    padding: 0 1.5rem;
    background: var(--legal-bg);
}

.faq-answer p {
    padding: 1rem 0 1.5rem;
    margin: 0;
    color: var(--legal-text-muted);
    font-size: var(--fs-base);
    line-height: 1.7;
    word-break: break-word;
}

.faq-item.active {
    border-color: var(--legal-accent-green);
    box-shadow: 0 10px 30px rgba(6, 78, 59, 0.05);
}

.faq-item.active .faq-question::after {
    content: "−";
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-bottom: 0;
}
