/* ============================================
   Zesec FAQ - Professional Stylesheet
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.2s ease-in-out;
}

/* ---------- Base Styles ---------- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-primary);
    background-color: var(--light-bg);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* ---------- Navbar Styles ---------- */
.navbar {
    box-shadow: var(--shadow);
    padding: 0.75rem 1rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

/* ---------- Card Styles ---------- */
.card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* ---------- Table Styles ---------- */
.table {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.table thead {
    background: var(--dark-color);
    color: #fff;
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    border: none;
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-color: var(--border-color);
}

.table tbody tr {
    transition: var(--transition);
}

.table-hover tbody tr:hover {
    background-color: var(--light-bg);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- Form Styles ---------- */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ---------- Button Styles ---------- */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 0.9375rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn-outline-secondary {
    color: var(--secondary-color);
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    background-color: var(--light-bg);
    border-color: var(--secondary-color);
    color: var(--text-primary);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ---------- Accordion Styles ---------- */
.accordion {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-item {
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-button {
    font-weight: 500;
    padding: 1rem 1.25rem;
    background: #fff;
    color: var(--text-primary);
    display: flex;
    align-items: flex-start;
}

.accordion-button:not(.collapsed) {
    background: var(--light-bg);
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--border-color);
}

.accordion-button::after {
    margin-left: auto;
    flex-shrink: 0;
}

.accordion-body {
    padding: 1.25rem;
    background: #fff;
    border-top: 1px solid var(--border-color);
    line-height: 1.7;
}

/* ---------- Alert Styles ---------- */
.alert {
    border: none;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
}

/* ---------- Badge Styles ---------- */
.badge {
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
}

/* ---------- Page Header Styles ---------- */
.page-header {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.page-header h1 {
    margin-bottom: 0.25rem;
}

.page-header .lead {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ---------- Content Container ---------- */
.content-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* ---------- Action Bar ---------- */
.action-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ---------- Category Section ---------- */
.category-section {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.category-section h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 1rem;
}

.subcategory-card {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.subcategory-card h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* ---------- Login Page ---------- */
.login-container {
    max-width: 400px;
    margin: 3rem auto;
}

.login-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.login-card h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.login-card .form-group {
    margin-bottom: 1.25rem;
}

.login-card .btn-primary {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

/* ---------- WYSIWYG Editor ---------- */
.wysiwyg-editor {
    min-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    background: #fff;
}

.wysiwyg-editor:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.wysiwyg-toolbar .btn {
    min-width: 44px;
    padding: 0.375rem 0.5rem;
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* ---------- FAQ Answer Content ---------- */
.faq-answer {
    line-height: 1.8;
}

.faq-answer p {
    margin-bottom: 1rem;
}

.faq-answer ul, .faq-answer ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

/* ---------- Utility Classes ---------- */
.text-muted {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.fw-semibold {
    font-weight: 600;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

/* ---------- Cookie Footer ---------- */
#cookie-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-color);
    color: #fff;
    padding: 1rem;
    box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
    z-index: 1000;
}

#cookie-footer a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }

    .page-header {
        padding: 1rem 1.25rem;
    }

    .content-card {
        padding: 1rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem;
    }

    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .action-bar .btn {
        width: 100%;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .navbar, .btn, #cookie-footer {
        display: none !important;
    }

    .content-card, .card, .category-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

