/* Yasal Sayfalar CSS */

/* Banner stilleri */
.legal-banner {
    background: var(--color-primary, #dc2626);
    min-height: 300px;
}

/* Görsel yoksa tema rengi arka plan */
.hero-section.bg-primary {
    background: var(--color-primary, #dc2626) !important;
}

/* Karanlık modda da primary rengi koru — dynamic_styles.php'nin hero-section override'ını iptal et */
html.dark-mode .legal-banner,
html.dark-mode .hero-section.legal-banner {
    background: var(--color-primary-dark, #991b1b) !important;
    background-color: var(--color-primary-dark, #991b1b) !important;
}

/* Banner text renkleri */
.legal-banner h1,
.legal-banner p {
    color: #ffffff !important;
}

/* Hero section yazıları her zaman beyaz */
.hero-section h1,
.hero-section p {
    color: #ffffff !important;
}

/* İçerik stilleri */
.legal-content h2 { 
    margin-top: 2rem; 
    margin-bottom: 1rem; 
}

.legal-content h3 { 
    margin-top: 1.5rem; 
    margin-bottom: 0.75rem; 
}

.legal-content p { 
    margin-bottom: 1rem; 
    line-height: 1.7; 
}

.legal-content ul { 
    margin-bottom: 1rem; 
}

.legal-content section { 
    margin-bottom: 2.5rem; 
}

.legal-content code { 
    background: rgb(241 245 249); 
    padding: 0.25rem 0.5rem; 
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
}

html.dark-mode .legal-content code {
    background: rgb(30 41 59);
    color: rgb(226 232 240);
}

.legal-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0 0 1px #e2e8f0;
}

.legal-content table thead,
.legal-content.prose table thead {
    background-color: var(--color-primary, #dc2626) !important;
    background: var(--color-primary, #dc2626) !important;
}

.legal-content table thead th,
.legal-content table thead td,
.legal-content.prose table thead th,
.legal-content.prose table thead td {
    color: var(--color-primary, #dc2626) !important;
    padding: 0.875rem 1.125rem;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-right: 1px solid rgba(255,255,255,0.15);
}

.legal-content table thead th:last-child,
.legal-content.prose table thead th:last-child {
    border-right: none;
}

.legal-content table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.15s ease;
}

.legal-content table tbody tr:last-child {
    border-bottom: none;
}

.legal-content table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.legal-content table tbody tr:hover {
    background: #eff6ff;
}

.legal-content table tbody td {
    padding: 0.875rem 1.125rem;
    border-right: 1px solid #e2e8f0;
    vertical-align: middle;
}

.legal-content table tbody td:last-child {
    border-right: none;
}

.legal-content table tbody td:first-child {
    font-weight: 600;
}

/* Dark mode */
html.dark-mode .legal-content table {
    box-shadow: 0 0 0 1px #334155;
}

html.dark-mode .legal-content table thead,
html.dark-mode .legal-content.prose table thead {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

html.dark-mode .legal-content table thead th,
html.dark-mode .legal-content table thead td {
    color: #0f172a !important;
    border-right-color: rgba(0,0,0,0.1) !important;
}

html.dark-mode .legal-content table tbody tr:nth-child(even) {
    background: #1e293b;
}

html.dark-mode .legal-content table tbody tr:hover {
    background: #1e3a5f;
}

html.dark-mode .legal-content table tbody td {
    border-color: #334155;
}

.legal-content a {
    color: var(--color-primary, #dc2626);
    text-decoration: underline;
}

.legal-content a:hover {
    opacity: 0.8;
}

/* Yasal kart stilleri */
.legal-card-icon {
    background: var(--color-primary-alpha, rgba(220, 38, 38, 0.08));
    color: var(--color-primary, #dc2626);
}

.legal-card-link {
    color: var(--color-primary, #dc2626);
}

.legal-card-bg-icon {
    color: var(--color-primary, #dc2626);
}

/* Mobil optimizasyonlar */
@media (max-width: 768px) {
    .legal-content { 
        font-size: 0.9375rem; 
    }
    
    .legal-content h2 { 
        font-size: 1.5rem; 
    }
    
    .legal-content h3 { 
        font-size: 1.25rem; 
    }
}

/* Banner arka plan ikonu */
.legal-banner-bg-icon {
    font-size: 16rem;
    opacity: 0.08;
    color: #ffffff;
    line-height: 1;
}

@media (max-width: 768px) {
    .legal-banner-bg-icon {
        font-size: 8rem;
        opacity: 0.06;
        position: absolute;
        right: 1rem;
    }
}
