/* ============================================
   JobSetu Legal Pages — Premium Dark Theme
   Designed with Google Stitch MCP
   ============================================ */

/* ============================================
   Legal Body & Base Overrides
   ============================================ */
.legal-body {
    background: #0a0e1a;
    color: #f1f5f9;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================
   Legal Navbar
   ============================================ */
.legal-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}

/* ============================================
   Legal Hero Section
   ============================================ */
.legal-hero {
    position: relative;
    padding: 120px 0 60px;
    overflow: hidden;
    background: #0a0e1a;
}

.terms-hero {
    background: linear-gradient(180deg, #0d0a1e 0%, #0a0e1a 100%);
}

.legal-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.indigo-glow {
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
}

.purple-glow {
    width: 350px;
    height: 250px;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    bottom: -50px;
    right: 10%;
}

.purple-glow-l {
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
}

.violet-glow {
    width: 350px;
    height: 250px;
    background: radial-gradient(ellipse, rgba(167, 139, 250, 0.1) 0%, transparent 70%);
    bottom: -50px;
    left: 10%;
}

.legal-hero-container {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Breadcrumb */
.legal-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    font-size: 0.875rem;
    color: #64748b;
}

.legal-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-breadcrumb a:hover {
    color: #6366f1;
}

.breadcrumb-sep {
    color: #334155;
    font-size: 1rem;
}

.legal-breadcrumb span:last-child {
    color: #94a3b8;
}

/* Badge */
.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #818cf8;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.terms-badge {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.25);
    color: #a78bfa;
}

.badge-icon {
    font-size: 1rem;
}

/* Hero Title */
.legal-hero-title {
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #f1f5f9 30%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.terms-hero .legal-hero-title {
    background: linear-gradient(135deg, #f1f5f9 30%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.legal-hero-sub {
    font-size: 1.05rem;
    color: #94a3b8;
    max-width: 620px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

/* Meta info bar */
.legal-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #64748b;
    flex-wrap: wrap;
    justify-content: center;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-item svg {
    color: #6366f1;
}

.meta-divider {
    color: #1e293b;
    font-size: 1rem;
}

/* ============================================
   Legal Layout: Sidebar + Content
   ============================================ */
.legal-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding-top: 48px;
    padding-bottom: 80px;
    align-items: start;
}

/* ============================================
   Sidebar TOC
   ============================================ */
.legal-sidebar {
    position: sticky;
    top: 84px;
}

.glass-panel-legal {
    background: rgba(26, 31, 53, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.toc-card {
    padding: 24px;
}

.toc-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.toc-title svg {
    color: #6366f1;
    flex-shrink: 0;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 0.835rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    line-height: 1.4;
}

.toc-link::before {
    counter-increment: toc-counter;
    content: counter(toc-counter, decimal-leading-zero);
    font-size: 0.7rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.02em;
    min-width: 20px;
    flex-shrink: 0;
}

.toc-link:hover {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.1);
}

.toc-link.active-toc {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
    font-weight: 600;
}

.toc-link.active-toc::before {
    color: #6366f1;
}

.toc-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.toc-related-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.toc-related-link:hover {
    color: #818cf8;
}

/* ============================================
   Legal Content / Sections
   ============================================ */
.legal-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Callout Box */
.legal-callout {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 14px;
    align-items: flex-start;
}

.indigo-callout {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.warning-callout {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.compact-callout {
    margin-bottom: 16px;
}

.callout-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.callout-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 6px;
}

.callout-text p {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.65;
    margin: 0;
}

/* Section Card */
.legal-section {
    scroll-margin-top: 100px;
}

.legal-section-card {
    padding: 32px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.legal-section-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
}

.contact-card {
    background: linear-gradient(135deg, rgba(26, 31, 53, 0.9) 0%, rgba(20, 25, 45, 0.9) 100%);
}

/* Section Header */
.section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-indigo { background: rgba(99, 102, 241, 0.12); color: #818cf8; }
.icon-blue   { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.icon-purple { background: rgba(139, 92, 246, 0.12); color: #a78bfa; }
.icon-green  { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.icon-yellow { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.icon-orange { background: rgba(249, 115, 22, 0.12); color: #fb923c; }
.icon-red    { background: rgba(239, 68, 68, 0.12);  color: #f87171; }
.icon-cyan   { background: rgba(6, 182, 212, 0.12);  color: #22d3ee; }
.icon-pink   { background: rgba(236, 72, 153, 0.12); color: #f472b6; }

.section-number {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.01em;
    margin: 0;
}

/* Section Body */
.section-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-body > p {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.7;
}

/* Highlight Box */
.highlight-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(99, 102, 241, 0.06);
    border-left: 3px solid #6366f1;
    padding: 14px 16px;
    border-radius: 0 10px 10px 0;
}

.highlight-box svg {
    color: #6366f1;
    flex-shrink: 0;
    margin-top: 2px;
}

.highlight-box p {
    font-size: 0.85rem;
    color: #c7d2fe;
    margin: 0;
    line-height: 1.6;
}

/* Legal List */
.legal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 0;
    list-style: none;
}

.legal-list li {
    display: flex;
    gap: 12px;
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.65;
    padding-left: 16px;
    position: relative;
}

.legal-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #6366f1;
    font-weight: 600;
}

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

/* Legal Link */
.legal-link {
    color: #818cf8;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(129, 140, 248, 0.3);
    transition: all 0.2s ease;
}

.legal-link:hover {
    color: #6366f1;
    border-bottom-color: #6366f1;
}

/* ============================================
   Privacy Policy Specific: Info Grid
   ============================================ */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 8px;
}

.info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s ease;
}

.info-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
}

.info-card h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 8px;
}

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

/* ============================================
   Security Grid
   ============================================ */
.security-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.security-item {
    background: rgba(16, 185, 129, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: 12px;
    padding: 20px;
}

.security-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 10px;
}

.security-item h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #34d399;
    margin-bottom: 6px;
}

.security-item p {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   Rights List
   ============================================ */
.rights-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.right-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px 16px;
}

.right-item p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.right-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    width: fit-content;
}

.tag-blue   { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.tag-green  { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.tag-red    { background: rgba(239, 68, 68, 0.12);  color: #f87171; }
.tag-purple { background: rgba(139, 92, 246, 0.12); color: #a78bfa; }
.tag-yellow { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.tag-indigo { background: rgba(99, 102, 241, 0.12); color: #818cf8; }

/* ============================================
   Cookie Types
   ============================================ */
.cookie-types {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-type {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 20px;
}

.cookie-type-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.78rem;
    color: #64748b;
}

.cookie-type p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

.cookie-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.cookie-badge.essential   { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.cookie-badge.analytics   { background: rgba(99, 102, 241, 0.12); color: #818cf8; }
.cookie-badge.preferences { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }

/* ============================================
   Contact Grid
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 8px;
}

.contact-method {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s ease;
}

.contact-method:hover {
    border-color: rgba(99, 102, 241, 0.2);
}

.contact-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: block;
}

.contact-method h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.contact-method a {
    font-size: 0.85rem;
    color: #818cf8;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.contact-method a:hover {
    color: #6366f1;
}

.contact-method address {
    font-style: normal;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.7;
}

.contact-method p {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.5;
}

/* ============================================
   Terms Specific: IP Grid
   ============================================ */
.ip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 8px;
}

.ip-card {
    border-radius: 12px;
    padding: 20px;
}

.you-own {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.we-own {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.ip-card h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 12px;
}

.ip-card ul {
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ip-card li {
    font-size: 0.8rem;
    color: #64748b;
    padding-left: 14px;
    position: relative;
    line-height: 1.5;
}

.you-own li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #34d399;
    font-weight: 700;
}

.we-own li::before {
    content: '◉';
    position: absolute;
    left: 0;
    color: #60a5fa;
    font-weight: 700;
}

/* ============================================
   Prohibited Grid
   ============================================ */
.prohibited-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.prohibited-item {
    font-size: 0.835rem;
    color: #94a3b8;
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: 10px;
    padding: 12px 14px;
    line-height: 1.5;
}

/* ============================================
   Dispute Steps
   ============================================ */
.dispute-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dispute-step {
    display: flex;
    gap: 20px;
    position: relative;
    padding-bottom: 24px;
}

.dispute-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 19px;
    top: 44px;
    bottom: 0;
    width: 2px;
    background: rgba(99, 102, 241, 0.2);
}

.step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.12);
    border: 2px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 6px;
}

.step-content p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
}

/* ============================================
   Legal Footer
   ============================================ */
.legal-footer {
    background: #06080f;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    padding-top: 48px;
}

.active-footer-link {
    color: #818cf8 !important;
}

/* ============================================
   Scroll Progress Indicator
   ============================================ */
.legal-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    z-index: 9999;
    transition: width 0.1s ease;
    border-radius: 0 3px 3px 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .legal-layout {
        grid-template-columns: 240px 1fr;
        gap: 28px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .info-grid,
    .security-grid,
    .rights-list,
    .ip-grid,
    .prohibited-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }
    
    .legal-sidebar {
        position: static;
        top: auto;
    }
    
    .legal-hero {
        padding: 60px 0 40px;
    }
    
    .legal-hero-meta {
        flex-direction: column;
        gap: 6px;
    }
    
    .meta-divider {
        display: none;
    }
    
    .contact-grid,
    .info-grid,
    .security-grid,
    .rights-list,
    .ip-grid,
    .prohibited-grid {
        grid-template-columns: 1fr;
    }
    
    .legal-section-card {
        padding: 24px 20px;
    }
}
