/* ==========================================================================
   Legal Pages Styles - Vagga.ai
   Estilos compartilhados para páginas: Termos, Privacidade, LGPD
   ========================================================================== */

/* Hero Section */
.legal-hero {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    padding: 100px 0 80px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 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='%23ffffff' 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");
    opacity: 0.5;
}

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

.legal-hero .section-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.legal-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 16px 0;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.legal-hero-description {
    font-size: 1.125rem;
    opacity: 0.95;
    margin: 0;
    font-weight: 500;
}

@media (min-width: 768px) {
    .legal-hero {
        padding: 120px 0 100px;
    }

    .legal-hero-title {
        font-size: 3.25rem;
    }
}

/* Content Layout */
.legal-content {
    padding: 60px 0 100px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.legal-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 1024px) {
    .legal-wrapper {
        grid-template-columns: 280px 1fr;
        gap: 60px;
        padding: 0 40px;
    }
}

/* Sidebar Navigation */
.legal-sidebar {
    order: 2;
}

@media (min-width: 1024px) {
    .legal-sidebar {
        position: sticky;
        top: 100px;
        height: fit-content;
        order: 1;
    }
}

.legal-nav {
    background: white;
    border-radius: 20px;
    padding: 28px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.legal-nav-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 20px 0;
    letter-spacing: 1px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.legal-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #475569;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    position: relative;
}

.legal-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 2px;
    transition: height 0.2s ease;
}

.legal-nav-link:hover {
    background: #f1f5f9;
    color: #6366f1;
    padding-left: 20px;
}

.legal-nav-link:hover::before {
    height: 24px;
}

.legal-nav-link.active {
    background: linear-gradient(135deg, #ede9fe, #fae8ff);
    color: #7c3aed;
}

.legal-nav-link.active::before {
    height: 24px;
}

/* Main Content */
.legal-main {
    background: white;
    border-radius: 24px;
    padding: 40px 32px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    order: 1;
}

@media (min-width: 768px) {
    .legal-main {
        padding: 56px 48px;
    }
}

@media (min-width: 1024px) {
    .legal-main {
        order: 2;
    }
}

/* Sections */
.legal-section {
    margin-bottom: 56px;
    scroll-margin-top: 120px;
}

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

.legal-section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-section-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 2px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .legal-section-title {
        font-size: 2rem;
    }
}

.legal-subsection-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 36px 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-subsection-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Text Styles */
.legal-text {
    font-size: 1rem;
    line-height: 1.85;
    color: #475569;
    margin: 0 0 16px 0;
}

.legal-text strong {
    color: #1e293b;
    font-weight: 600;
}

.legal-list {
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
}

.legal-list li {
    font-size: 1rem;
    line-height: 1.85;
    color: #475569;
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
}

.legal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
}

.legal-list li strong {
    color: #1e293b;
    font-weight: 600;
}

/* Nested list */
.legal-list .legal-list {
    margin: 12px 0 0 0;
}

.legal-list .legal-list li::before {
    width: 6px;
    height: 6px;
    background: #94a3b8;
}

/* Alerts */
.legal-alert {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 16px;
    margin: 28px 0;
    border-left: 4px solid;
    align-items: flex-start;
}

.legal-alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.legal-alert-content {
    flex: 1;
}

.legal-alert-info {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border-color: #3b82f6;
    color: #1e40af;
}

.legal-alert-info .legal-alert-icon {
    color: #3b82f6;
}

.legal-alert-warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #f59e0b;
    color: #92400e;
}

.legal-alert-warning .legal-alert-icon {
    color: #f59e0b;
}

.legal-alert-error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #ef4444;
    color: #991b1b;
}

.legal-alert-error .legal-alert-icon {
    color: #ef4444;
}

.legal-alert-success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #22c55e;
    color: #166534;
}

.legal-alert-success .legal-alert-icon {
    color: #22c55e;
}

.legal-alert strong {
    display: block;
    margin-bottom: 4px;
}

.legal-alert ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.legal-alert li {
    margin-bottom: 4px;
}

/* Cards Grid */
.legal-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 28px 0;
}

@media (min-width: 600px) {
    .legal-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.legal-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.legal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(99, 102, 241, 0.15);
    border-color: #c7d2fe;
}

.legal-card-icon {
    font-size: 2.75rem;
    margin-bottom: 16px;
    display: block;
}

.legal-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1e293b;
}

.legal-card p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #64748b;
    margin: 0;
}

.legal-card-highlight {
    background: linear-gradient(135deg, #ede9fe 0%, #fae8ff 100%);
    border: 2px solid #c4b5fd;
}

.legal-card-highlight:hover {
    border-color: #a78bfa;
}

/* Rights Grid (Privacidade) */
.legal-rights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 32px 0;
}

@media (min-width: 500px) {
    .legal-rights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .legal-rights-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.legal-right-card {
    background: white;
    padding: 28px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.legal-right-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px -8px rgba(99, 102, 241, 0.15);
}

.legal-right-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.legal-right-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1e293b;
}

.legal-right-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #64748b;
    margin: 0;
}

/* Sharing Grid (Privacidade) */
.legal-sharing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 28px 0;
}

@media (min-width: 600px) {
    .legal-sharing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.legal-sharing-item {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.legal-sharing-item:hover {
    border-color: #c7d2fe;
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.1);
}

.legal-sharing-item h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1e293b;
}

.legal-sharing-item p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #64748b;
    margin: 0;
}

/* Numbered List */
.legal-numbered-list {
    margin: 28px 0;
    counter-reset: legal-counter;
}

.legal-numbered-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 14px;
    margin-bottom: 14px;
    border: 1px solid #e2e8f0;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.legal-numbered-item:hover {
    border-color: #c7d2fe;
    transform: translateX(4px);
}

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

.legal-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.legal-numbered-content h4 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #1e293b;
}

.legal-numbered-content p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #64748b;
    margin: 0;
}

/* Badge List (Timeline) */
.legal-badge-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 14px;
    margin-bottom: 14px;
    border: 1px solid #e2e8f0;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.legal-badge-item:hover {
    border-color: #c7d2fe;
}

.legal-badge {
    flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Contact Card */
.legal-contact-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 36px;
    margin: 28px 0;
    border: 1px solid #e2e8f0;
}

.legal-contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}

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

.legal-contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ede9fe, #fae8ff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c3aed;
}

.legal-contact-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.legal-contact-info p {
    font-size: 1rem;
    color: #475569;
    margin: 0;
    line-height: 1.6;
}

.legal-contact-info a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s;
}

.legal-contact-info a:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Contact Highlight */
.legal-contact-highlight {
    background: linear-gradient(135deg, #ede9fe, #fae8ff);
    border-left: 4px solid #7c3aed;
    padding: 20px 24px;
    border-radius: 12px;
    margin: 20px 0;
    font-size: 1rem;
    line-height: 1.8;
    color: #5b21b6;
}

.legal-contact-highlight strong {
    color: #4c1d95;
}

/* DPO Card */
.legal-dpo-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #c7d2fe;
    border-radius: 20px;
    padding: 32px;
    margin: 28px 0;
}

.legal-dpo-header {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.legal-dpo-avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.legal-dpo-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #1e293b;
}

.legal-dpo-info p {
    margin: 4px 0;
    font-size: 0.9375rem;
    color: #475569;
}

.legal-dpo-credentials {
    color: #7c3aed !important;
    font-weight: 600;
    font-size: 0.875rem !important;
}

.legal-dpo-card h4 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 24px 0 12px 0;
    color: #1e293b;
}

.legal-dpo-card ul {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.legal-dpo-card li {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 8px;
}

/* FAQ */
.legal-faq {
    margin: 28px 0;
}

.legal-faq-item {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.legal-faq-item:hover {
    border-color: #c7d2fe;
}

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

.legal-faq-item h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1e293b;
}

.legal-faq-item p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #64748b;
}

/* Box Destaque */
.legal-box {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    color: white;
    padding: 28px;
    border-radius: 16px;
    margin: 28px 0;
    position: relative;
    overflow: hidden;
}

.legal-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}

.legal-box > * {
    position: relative;
    z-index: 1;
}

.legal-box h3,
.legal-box h4 {
    color: white;
    margin-top: 0;
}

.legal-box p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 12px;
}

.legal-box ul {
    margin-bottom: 12px;
}

.legal-box li {
    color: rgba(255, 255, 255, 0.95);
}

.legal-box a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

/* Footer Note */
.legal-footer-note {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 2px solid #e2e8f0;
}

.legal-footer-note .legal-text {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Security Cards */
.legal-security-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 28px 0;
}

@media (min-width: 700px) {
    .legal-security-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.legal-security-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.legal-security-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-security-card ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.legal-security-card li {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
}

.legal-security-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 700;
}

/* Back to Top Button */
.legal-back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    z-index: 100;
}

.legal-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.legal-back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

/* Print Styles */
@media print {
    .legal-hero {
        background: #6366f1 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .legal-sidebar {
        display: none;
    }

    .legal-wrapper {
        grid-template-columns: 1fr;
    }

    .legal-back-to-top {
        display: none;
    }
}
