/* ============================================================
   HONESTIA CONNECT — TERMINOS-CONDICIONES-PROFESORES.CSS
   Deep Dark Apple Pro Standard Theme & Responsive Styles
   ============================================================ */

:root {
    --tc-bg: #fcfcfd;
    --tc-surface: #ffffff;
    --tc-surface-card: #f8fafc;
    --tc-surface-hover: #f1f5f9;
    --tc-border: #f1f5f9;
    --tc-border-subtle: #e2e8f0;
    --tc-border-highlight: #2563eb;
    --tc-text-primary: #0f172a;
    --tc-text-secondary: #475569;
    --tc-text-muted: #94a3b8;
    --tc-accent: #2563eb;
    --tc-accent-soft: #eff6ff;
    --tc-code-bg: #f1f5f9;
    --tc-code-text: #1e293b;
    --tc-support-bg: #0f172a;
    --tc-support-text: #ffffff;
    --tc-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.05);
    --tc-logo-filter: none;
}

:root.dark,
html.dark {
    --tc-bg: #080808;
    --tc-surface: #121214;
    --tc-surface-card: #161619;
    --tc-surface-hover: #1c1c20;
    --tc-border: #27272a;
    --tc-border-subtle: #202023;
    --tc-border-highlight: #3b82f6;
    --tc-text-primary: #f5f5f7;
    --tc-text-secondary: #a1a1aa;
    --tc-text-muted: #71717a;
    --tc-accent: #3b82f6;
    --tc-accent-soft: rgba(59, 130, 246, 0.12);
    --tc-code-bg: #1e1e24;
    --tc-code-text: #60a5fa;
    --tc-support-bg: #141416;
    --tc-support-text: #f5f5f7;
    --tc-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5);
    --tc-logo-filter: brightness(0) invert(1);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    scroll-behavior: smooth;
    background-color: var(--tc-bg);
    color: var(--tc-text-primary);
    transition: background-color 0.25s ease, color 0.25s ease;
    overflow-x: hidden;
}

/* Legal Content Box */
.legal-box {
    background: var(--tc-surface);
    border-radius: 32px;
    border: 1px solid var(--tc-border);
    padding: 3.5rem;
    box-shadow: var(--tc-shadow);
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .legal-box {
        padding: 1.5rem 1.25rem;
        border-radius: 20px;
    }
}

/* Logo */
.logo-img {
    filter: var(--tc-logo-filter);
    transition: filter 0.25s ease;
}

/* Table of Contents */
.toc-link {
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    color: var(--tc-text-muted);
}

.toc-link:hover {
    border-left-color: var(--tc-border-highlight);
    color: var(--tc-accent);
    background: var(--tc-surface-card);
    border-radius: 0 8px 8px 0;
}

.toc-link.active {
    border-left-color: var(--tc-border-highlight);
    color: var(--tc-accent);
    font-weight: 700;
    background: var(--tc-accent-soft);
    border-radius: 0 8px 8px 0;
}

/* Headings */
h1 {
    color: var(--tc-text-primary);
    letter-spacing: -0.03em;
}

h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--tc-text-primary);
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    border-bottom: 1px solid var(--tc-border);
    padding-bottom: 0.75rem;
    transition: color 0.25s ease, border-color 0.25s ease;
}

h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tc-text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h4 {
    color: var(--tc-text-primary);
}

p {
    color: var(--tc-text-secondary);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

li {
    color: var(--tc-text-secondary);
    line-height: 1.7;
}

b, strong {
    color: var(--tc-text-primary);
}

code {
    background: var(--tc-code-bg);
    color: var(--tc-code-text);
    border: 1px solid var(--tc-border-subtle);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85em;
}

/* Cards and Callouts */
.highlight-card {
    background: var(--tc-surface-card);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--tc-border-subtle);
    margin: 2rem 0;
}

/* Tables Responsive Wrap */
.bc-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
}

.bc-table {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.bc-table th {
    background: var(--tc-surface-card);
    font-weight: 700;
    color: var(--tc-text-primary);
    padding: 1rem;
    border-bottom: 2px solid var(--tc-border-subtle);
}

.bc-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--tc-border);
    color: var(--tc-text-secondary);
}

.bc-table tr:hover td {
    background: var(--tc-surface-hover);
}

.bc-table tr:last-child td {
    font-weight: 700;
    color: var(--tc-accent);
}

/* FAQs */
details.faq-item summary::-webkit-details-marker {
    display: none;
}

details.faq-item summary {
    list-style: none;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--tc-border-subtle);
    background: var(--tc-surface);
    color: var(--tc-text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: var(--tc-surface-hover);
    border-color: var(--tc-accent);
    transform: translateY(-1px);
}

.theme-toggle-btn:active {
    transform: translateY(1px);
}

/* Sun/Moon Icons Visibility */
#sunIcon {
    display: none;
}

#moonIcon {
    display: block;
}

html.dark #sunIcon,
.dark #sunIcon {
    display: block !important;
}

html.dark #moonIcon,
.dark #moonIcon {
    display: none !important;
}

/* Support Card */
.support-card {
    background-color: var(--tc-support-bg);
    color: var(--tc-support-text);
    border: 1px solid var(--tc-border);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

/* Deep Dark Tailored Overrides for Tailwind classes */
html.dark .bg-\[\#fcfcfd\],
.dark .bg-\[\#fcfcfd\] {
    background-color: var(--tc-bg) !important;
}

html.dark .text-slate-900,
.dark .text-slate-900 {
    color: var(--tc-text-primary) !important;
}

html.dark .text-slate-800,
.dark .text-slate-800 {
    color: var(--tc-text-primary) !important;
}

html.dark .text-slate-700,
.dark .text-slate-700 {
    color: var(--tc-text-primary) !important;
}

html.dark .text-slate-600,
.dark .text-slate-600 {
    color: var(--tc-text-secondary) !important;
}

html.dark .text-slate-500,
.dark .text-slate-500 {
    color: var(--tc-text-muted) !important;
}

html.dark .text-slate-400,
.dark .text-slate-400 {
    color: var(--tc-text-muted) !important;
}

html.dark .text-slate-300,
.dark .text-slate-300 {
    color: #52525b !important;
}

html.dark .bg-slate-50,
.dark .bg-slate-50,
html.dark .bg-slate-50\/50,
.dark .bg-slate-50\/50 {
    background-color: var(--tc-surface-card) !important;
}

html.dark .hover\:bg-slate-50:hover,
.dark .hover\:bg-slate-50:hover {
    background-color: var(--tc-surface-hover) !important;
}

html.dark .border-slate-100,
.dark .border-slate-100,
html.dark .border-slate-200,
.dark .border-slate-200 {
    border-color: var(--tc-border) !important;
}

html.dark .border-slate-200\/50,
.dark .border-slate-200\/50 {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .border-slate-900,
.dark .border-slate-900 {
    border-color: var(--tc-accent) !important;
}

html.dark .bg-slate-200\/60,
.dark .bg-slate-200\/60 {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--tc-text-primary) !important;
}

html.dark .bg-blue-50,
.dark .bg-blue-50 {
    background-color: rgba(37, 99, 235, 0.15) !important;
}

html.dark .text-blue-600,
.dark .text-blue-600 {
    color: #60a5fa !important;
}

html.dark .bg-slate-900,
.dark .bg-slate-900 {
    background-color: var(--tc-support-bg) !important;
    border: 1px solid var(--tc-border) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}

html.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

html.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}