:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --bg-body: #ffffff;
    --bg-section: #f9fafb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.header-subtitle {
    font-size: 1.125rem;
    opacity: 0.95;
    font-weight: 400;
}

/* Main Content */
.main-content {
    padding: 0 2rem 4rem;
}

section {
    margin-bottom: 4rem;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-light));
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--primary);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.timeline-item.highlight .timeline-marker {
    background-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.timeline-item.highlight .timeline-content {
    border-left-color: var(--danger);
    background: #fef2f2;
}

.timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.timeline-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.timeline-item.highlight .timeline-date {
    color: var(--danger);
}

.timeline-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.timeline-description {
    font-size: 0.938rem;
    color: var(--gray-600);
}

/* Question Section */
.question-section {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
}

.question-header {
    margin-bottom: 2rem;
}

.question-number {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Answer Block */
.answer-block {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 6px solid var(--success);
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2.5rem;
}

.answer-block.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: var(--warning);
}

.verdict-badge {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.verdict-badge.warning {
    background: var(--warning);
}

.answer-summary {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--gray-800);
    line-height: 1.8;
}

/* Legal Analysis */
.legal-analysis {
    margin-bottom: 2.5rem;
}

.law-reference {
    background: var(--bg-section);
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.law-reference:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.law-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.law-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary);
    color: white;
    border-radius: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.law-reference p {
    font-size: 0.938rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.law-conclusion {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
    margin-top: 1rem;
}

.violation {
    background: #fef2f2;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--danger);
    color: var(--danger);
    font-weight: 600;
    margin-top: 1rem;
}

/* Important Note */
.important-note {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid var(--primary-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.important-note h4 {
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.important-note p {
    font-size: 0.938rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.important-note ul {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.important-note li {
    font-size: 0.938rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.important-note ol {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.important-note ol li {
    font-size: 0.938rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

/* Timeline Violations */
.timeline-violations {
    background: #fef2f2;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.timeline-violations h4 {
    color: var(--danger);
    margin-bottom: 1.5rem;
}

.violation-item {
    background: white;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--danger);
}

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

.violation-period {
    font-weight: 700;
    color: var(--danger);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.violation-description {
    font-size: 0.938rem;
    color: var(--gray-700);
}

.violation-law {
    font-size: 0.813rem;
    color: var(--gray-500);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Action Steps */
.action-steps {
    margin-top: 2.5rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-section);
    border-radius: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.step:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.step-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.step-content h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.step-content p {
    font-size: 0.938rem;
    color: var(--gray-700);
    line-height: 1.7;
}

/* Summary Section */
.summary-section {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 3rem 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.summary-card {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.summary-card.critical {
    border-top-color: var(--danger);
}

.summary-card.warning {
    border-top-color: var(--warning);
}

.summary-card.info {
    border-top-color: var(--primary);
}

.summary-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.summary-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.summary-card p {
    font-size: 0.938rem;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.summary-action {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1.5rem;
}

.summary-card.critical .summary-action {
    background: var(--danger);
}

.summary-card.warning .summary-action {
    background: var(--warning);
}

/* Legal Grounds */
.legal-grounds {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}

.grounds-list {
    display: grid;
    gap: 1rem;
}

.ground-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-section);
    border-radius: 0.5rem;
    border-left: 4px solid var(--danger);
}

.ground-item strong {
    color: var(--primary);
    font-weight: 700;
}

.ground-item span {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Additional Info */
.additional-info {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.info-blocks {
    display: grid;
    gap: 2rem;
}

.info-block {
    padding: 1.5rem;
    background: var(--bg-section);
    border-radius: 0.75rem;
}

.info-block h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.statute-info {
    background: white;
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
}

.statute-info:last-child {
    margin-bottom: 0;
}

.statute-info h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.statute-info p {
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 0.25rem;
}

.info-block ul {
    margin-left: 1.5rem;
}

.info-block li {
    font-size: 0.938rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.contact-item {
    background: white;
    padding: 1.25rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
}

.contact-item strong {
    display: block;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contact-item p {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.disclaimer {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--warning);
}

.disclaimer h3 {
    color: var(--warning);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.disclaimer p {
    font-size: 0.938rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.footer-meta {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.footer-meta p {
    margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 3rem 1.5rem;
    }

    .header h1 {
        font-size: 1.875rem;
    }

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

    .main-content {
        padding: 0 1.5rem 3rem;
    }

    .question-section {
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
        gap: 1rem;
    }

    .ground-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline-marker {
        left: -1.75rem;
    }
}

/* Print Styles */
@media print {
    .header {
        background: none;
        color: black;
        box-shadow: none;
    }

    .summary-card,
    .question-section,
    .law-reference {
        break-inside: avoid;
    }

    .step:hover,
    .summary-card:hover,
    .timeline-content:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-section,
.timeline-item,
.summary-card {
    animation: fadeIn 0.6s ease-out;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
