/**
 * Asigura.ro - Foie de Stiluri Personalizată (style.css)
 * Optimizat pentru performanță: Fără @import, fără fonturi externe, sub 10KB.
 */

:root {
    --primary-color: #fb0303;
    --primary-hover: #d60303;
    --primary-subtle: #ffe6e6;
    --accent-color: #0dcaf0;
    --text-main: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --bg-light: #f8f9fa;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

/* 1. Reset și Setări Globale */
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    color: var(--text-main);
    background-color: #fcfcfd;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 2. Hero Section */
.hero-section {
    background: linear-gradient(135deg, #fb0303 0%, #a30202 100%);
    color: #ffffff;
    padding: 4.5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
}

/* 3. Cuprins Articol (Table of Contents - .toc) */
.toc {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color) !important;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 2rem 0;
}

/* Cuprinsul e pliat implicit: randul cu titlul este butonul de deschidere */
.toc .toc-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: left;
    color: #1a202c;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.toc .toc-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.toc .toc-chevron {
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.toc .toc-toggle[aria-expanded="true"] .toc-chevron {
    transform: rotate(180deg);
}

.toc ul.toc-list {
    list-style-type: none;
    padding-left: 0.5rem;
    margin: 1.25rem 0 0;
}

.toc ul.toc-sublist {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-top: 0.25rem;
}

.toc li {
    line-height: 1.6;
}

.toc li a {
    color: #c40404;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.toc li a:hover {
    color: var(--primary-hover);
    text-decoration: underline !important;
    transform: translateX(3px);
}

/* 4. Conținut Articol (.article-content) */
.article-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: #2d3748;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-left: 0.85rem;
    border-left: 4px solid var(--primary-color);
    scroll-margin-top: 90px;
}

.article-content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #2d3748;
    margin-top: 1.85rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--border-color);
    scroll-margin-top: 90px;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-color);
    background-color: var(--primary-subtle);
    padding: 1rem 1.5rem;
    margin: 1.75rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: #1f2937;
}

.article-content table {
    width: 100%;
    margin: 1.75rem 0;
    border-collapse: collapse;
}

.article-content table th, 
.article-content table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
}

.article-content table th {
    background-color: var(--bg-light);
    font-weight: 600;
}

/* 5. Casetă Autor (.author-box) */
.author-box {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 2.5rem 0;
    box-shadow: var(--card-shadow);
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--primary-subtle);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.author-info h6 {
    margin-bottom: 0.25rem;
    font-weight: 700;
    color: #1a202c;
}

.author-info p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* 6. Secțiune FAQ (.faq-section) */
.faq-section {
    margin: 2.5rem 0;
}

.faq-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--card-shadow);
}

.faq-question {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.faq-question i {
    color: var(--primary-color);
}

.faq-answer {
    color: #475569;
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* 7. Carduri Articole (.article-card) */
.article-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
    border-color: #bcc6cf;
}

.article-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card .card-title {
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.article-card:hover .card-title {
    color: var(--primary-color);
}

/* 8. Stiluri Subsol (Footer Links) */
.footer-links a {
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #ffffff !important;
    padding-left: 4px;
}

/* 9. Adaptabilitate Mobilă */
@media (max-width: 767.98px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .article-content {
        font-size: 1.02rem;
    }

    .article-content h2 {
        font-size: 1.45rem;
    }

    .article-content h3 {
        font-size: 1.2rem;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}

/* 10. Stiluri pentru Tipărire (Print) */
@media print {
    header, 
    footer, 
    .navbar, 
    .btn, 
    .breadcrumb,
    .toc {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 12pt;
    }

    .article-content h2 {
        border-left: 2px solid #000000 !important;
    }
}
