/* Legal Hub Page Styles - Following UI/UX Style Guide */
/* ===================================================== */
/* Neutral palette with teal accent, Ma & Wa principles */

/* Note: CSS variables from legal_base.html are available */

/* Container */
.legal-hub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Hero Section */
.legal-hub-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.hub-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.hub-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Policy Cards Grid */
.policy-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Individual Policy Card */
.policy-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.policy-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    border-color: #10B981; /* Teal accent on hover */
}

/* Card Link (wrapper for entire card) */
.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 2rem;
    height: 100%;
}

.card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Icon Wrapper */
.card-icon-wrapper {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #10B981, #0B956C);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.policy-card:hover .card-icon-wrapper {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
}

.card-icon-wrapper i {
    font-size: 1.75rem;
    color: #ffffff;
}

/* Card Content */
.card-content {
    display: flex;
    flex-direction: column;
    height: calc(100% - 80px); /* Account for icon height */
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

/* TL;DR Bullet List */
.card-tldr {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

.card-tldr li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.card-tldr li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10B981; /* Teal checkmark */
    font-weight: bold;
    font-size: 1rem;
}

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.last-updated {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.card-action {
    font-size: 0.875rem;
    color: #10B981; /* Teal accent */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.policy-card:hover .card-action {
    color: #0B956C; /* Darker teal on hover */
}

.card-action i {
    transition: transform 0.2s ease;
}

.policy-card:hover .card-action i {
    transform: translateX(4px);
}

/* Contact Section */
.contact-section {
    margin-top: 3rem;
    padding: 2rem;
    text-align: center;
    background-color: var(--background-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.contact-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-section p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.contact-links {
    margin-top: 1rem;
}

.contact-section a {
    color: #10B981; /* Teal accent */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-section a:hover {
    color: #0B956C; /* Darker teal on hover */
    text-decoration: underline;
}

/* Breadcrumb Styling */
.breadcrumb {
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    background-color: transparent;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    font-size: 0.875rem;
}

.breadcrumb li + li::before {
    content: "/";
    padding: 0 0.5rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: #10B981; /* Teal accent */
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #0B956C; /* Darker teal on hover */
    text-decoration: underline;
}

/* Responsive Design - Tablet */
@media (max-width: 992px) {
    .policy-cards-grid {
        gap: 1.5rem;
    }

    .card-link {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.375rem;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    .legal-hub-container {
        padding: 1rem 0.75rem;
    }

    .legal-hub-hero {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .hub-title {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hub-subtitle {
        font-size: 1.0625rem; /* Increased from 1rem for better readability */
        line-height: 1.6;
    }

    /* Single column on mobile */
    .policy-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    /* Enhanced card touch targets */
    .card-link {
        padding: 1.5rem;
        min-height: 200px; /* Ensure cards are easy to tap */
    }

    .card-icon-wrapper {
        width: 56px;
        height: 56px;
        margin-bottom: 1.25rem;
    }

    .card-icon-wrapper i {
        font-size: 1.5rem;
    }

    .card-title {
        font-size: 1.375rem; /* Increased from 1.25rem */
        line-height: 1.4;
    }

    .card-tldr li {
        font-size: 1rem; /* Increased from 0.9rem for better readability */
        margin-bottom: 0.75rem;
        line-height: 1.6;
    }

    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
    }

    .last-updated {
        font-size: 0.875rem; /* Increased from 0.8rem */
    }

    .card-action {
        font-size: 0.9375rem; /* Increased from 0.8rem */
        padding: 0.375rem 0;
        min-height: 32px;
    }

    .contact-section {
        padding: 1.5rem 1rem;
    }

    .contact-section h3 {
        font-size: 1.375rem; /* Increased from 1.25rem */
    }

    .contact-section p {
        font-size: 1rem;
    }

    /* Enhanced link touch targets */
    .contact-section a {
        display: inline-block;
        padding: 0.25rem 0;
        min-height: 28px;
    }

    /* Breadcrumb enhancement */
    .breadcrumb li {
        font-size: 0.9375rem; /* Increased from 0.875rem */
    }

    .breadcrumb a {
        padding: 0.25rem 0;
        min-height: 28px;
    }
}

/* Responsive Design - Small Mobile */
@media (max-width: 480px) {
    .legal-hub-container {
        padding: 1rem 0.625rem;
    }

    .hub-title {
        font-size: 1.875rem; /* Increased from 1.75rem */
    }

    .hub-subtitle {
        font-size: 1rem;
    }

    /* Maintain adequate touch targets on small screens */
    .card-link {
        padding: 1.25rem;
        min-height: 180px;
    }

    .card-icon-wrapper {
        width: 52px;
        height: 52px;
    }

    .card-icon-wrapper i {
        font-size: 1.375rem; /* Increased from 1.25rem */
    }

    .card-title {
        font-size: 1.25rem; /* Increased from 1.125rem */
        line-height: 1.4;
    }

    .card-tldr li {
        font-size: 0.9375rem;
        line-height: 1.5;
    }

    .contact-section {
        padding: 1.25rem 1rem;
    }

    .contact-section h3 {
        font-size: 1.25rem;
    }

    .contact-section p {
        font-size: 0.9375rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .policy-card {
        border: 2px solid var(--border-color);
    }

    .card-icon-wrapper {
        border: 2px solid #0B956C;
    }

    .card-footer {
        border-top: 2px solid var(--border-color);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .policy-card,
    .card-icon-wrapper,
    .card-action i {
        transition: none;
    }

    .policy-card:hover,
    .policy-card:hover .card-icon-wrapper,
    .policy-card:hover .card-action i {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .policy-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        margin-bottom: 1rem;
    }

    .policy-card:hover {
        transform: none;
        box-shadow: none;
    }

    .card-icon-wrapper {
        background: #f5f5f5 !important;
        box-shadow: none;
    }

    .card-icon-wrapper i {
        color: #333 !important;
    }

    .contact-section {
        background-color: transparent;
        border: 1px solid #ccc;
    }

    .breadcrumb {
        border-bottom: 1px solid #ccc;
        margin-bottom: 1rem;
    }
}

/* Dark Mode Adjustments */
[data-theme="dark"] .hub-title {
    color: var(--text-primary);
}

[data-theme="dark"] .hub-subtitle {
    color: var(--text-secondary);
}

[data-theme="dark"] .policy-card {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .card-title {
    color: var(--text-primary);
}

[data-theme="dark"] .card-tldr li {
    color: var(--text-secondary);
}

[data-theme="dark"] .card-tldr li::before {
    color: #10B981; /* Keep teal accent in dark mode */
}

[data-theme="dark"] .card-footer {
    border-top-color: var(--border-color);
}

[data-theme="dark"] .last-updated {
    color: var(--text-secondary);
}

[data-theme="dark"] .card-action {
    color: #10B981; /* Keep teal accent in dark mode */
}

[data-theme="dark"] .card-action:hover {
    color: #34D399; /* Lighter teal on hover in dark mode */
}

[data-theme="dark"] .contact-section {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .contact-section h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .contact-section p {
    color: var(--text-secondary);
}

[data-theme="dark"] .breadcrumb li {
    color: var(--text-secondary);
}

[data-theme="dark"] .breadcrumb a {
    color: #10B981;
}

[data-theme="dark"] .breadcrumb a:hover {
    color: #34D399;
}

[data-theme="dark"] .contact-section a {
    color: #10B981;
}

[data-theme="dark"] .contact-section a:hover {
    color: #34D399;
}
