* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --accent: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --white: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --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);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px; /* Increased from 800px */
    margin: 0 auto;
    padding: 2rem 1.5rem;
}


/* Header Styles */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

header h1 {
  color: white;
  -webkit-text-fill-color: white;
  background: none;
  font-size: 2.25rem; /* Slightly smaller */
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Search Section */
.search-section {
    margin-bottom: 3rem;
}

/* Wider Search Box */
.search-box {
  position: relative;
  max-width: 700px; /* Wider */
  margin: 0 auto 1.5rem; /* Less bottom margin */
}

.search-box input {
  padding: 1.1rem 1.5rem 1.1rem 3rem;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 1rem;
  width: 100%; /* Full width of container */
  background: white url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2364748b" width="20px" height="20px"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') no-repeat left 1.2rem center;
  background-size: 18px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-box input:focus {
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  padding: 0 1.5rem;
  background: #7C3AED;
  border: none;
  border-radius: 50px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-box button:hover {
  background: #6D28D9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.search-divider {
    text-align: center;
    position: relative;
    margin: 2.5rem 0;
}

.search-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border) 50%, transparent 100%);
}

.search-divider span {
    background: var(--white);
    padding: 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Categories Section */
.categories-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.category-card {
    background: var(--white);
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.category-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Results Section */
.results-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.results-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.results-container {
    margin-bottom: 2rem;
}

.result-item {
    background: var(--white);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
}

.result-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.result-item h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.result-item p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.result-item .category {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.no-results h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.no-results p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.back-button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-button:hover {
    background: var(--primary-light);
    transform: translateX(-2px);
}

/* FAQ Detail Section */
.faq-detail-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.faq-detail {
    margin-bottom: 2rem;
}

.faq-detail h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.faq-detail .content {
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

/* Make sure the FAQ actions are centered */
.faq-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Registration Form */
.registration-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.registration-section h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.registration-section p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.0625rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
    font-family: inherit;
}

.form-group input:valid {
    border-color: var(--admin-success);
}

.form-group input:invalid {
    border-color: var(--admin-error);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Buttons */
.primary-button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.secondary-button {
    background: var(--white);
    color: var(--text-secondary);
    border: 2px solid var(--border);
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.secondary-button:hover {
    background: var(--accent);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

/* Confirmation Section */
.confirmation-section {
    text-align: center;
    background: var(--white);
    padding: 4rem 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.confirmation-message h2 {
    color: #059669;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.confirmation-message p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    header h1 {
        font-size: 2.25rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .results-section,
    .faq-detail-section,
    .registration-section {
        padding: 2rem 1.5rem;
    }
    
    .faq-actions,
    .form-actions {
        flex-direction: column;
    }
    
    .primary-button,
    .secondary-button {
        width: 100%;
        text-align: center;
    }
}

/* Animation for section transitions */
section {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add to existing CSS */

/* Category Detail Section */
.category-detail-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.category-layout {
    display: grid;
    grid-template-columns: 300px 1fr; /* Wider sidebar */
    gap: 3rem; /* More spacing */
    margin-bottom: 2rem;
}

/* Sidebar Styles */
.category-sidebar {
    background: var(--accent);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.category-sidebar h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-light);
}

.sidebar-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-category {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-weight: 500;
    border: 1px solid transparent;
    margin-bottom: 0.5rem;
}

.sidebar-category:hover {
    background: var(--white);
    color: var(--primary);
    border-color: var(--primary-light);
}

.sidebar-category.active {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

/* Main Content Area */
.category-main {
    min-height: 400px;
    max-width: none; /* Remove any max-width constraints */
}

.category-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.category-header h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.category-header p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

.articles-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.article-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
}

.article-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.article-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.article-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
            line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Others Category Styles */
.others-category {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
}

.others-category h3 {
    color: var(--primary-dark);
}

.others-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.others-modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.others-modal h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.others-categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.others-category-item {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    background: var(--white);
}

.others-category-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateX(4px);
}

.others-category-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.others-category-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.close-modal {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* External Links Bar - TOP POSITION (Recommended) */
.external-links {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.external-links-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.external-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.external-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateY(-1px);
}

/* Make search section always visible but context-aware */
.search-section.compact {
    margin-bottom: 2rem;
}

.search-section.compact .search-divider {
    display: none;
}

.search-section.compact .search-box {
    max-width: 700px;
    margin: 0 auto;
}

/* Markdown Content Styles */
.markdown-content {
  line-height: 1.7;
  color: var(--text-secondary);
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  color: var(--text-primary);
  margin: 1.5em 0 0.75em 0;
  font-weight: 600;
}

.markdown-content h1 {
  font-size: 1.75rem;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
}

.markdown-content h2 {
  font-size: 1.5rem;
  color: var(--primary);
}

.markdown-content h3 {
  font-size: 1.25rem;
}

.markdown-content h4 {
  font-size: 1.125rem;
}

.markdown-content p {
  margin-bottom: 1rem;
}

.markdown-content ul,
.markdown-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.markdown-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.markdown-content ul li {
  list-style-type: disc;
}

.markdown-content ol li {
  list-style-type: decimal;
}

.markdown-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.markdown-content em {
  color: var(--text-secondary);
  font-style: italic;
}

.markdown-content code {
  background: var(--accent);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  color: var(--primary);
}

.markdown-content pre {
  background: var(--accent);
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
}

.markdown-content pre code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
}

.markdown-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.markdown-content th,
.markdown-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.markdown-content th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

.markdown-content tr:hover {
  background: var(--accent);
}

.markdown-content a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.markdown-content a:hover {
  border-bottom-color: var(--primary);
}

/* Disclaimer Styles */
.article-disclaimer {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffd43b;
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-top: 2rem;
    position: relative;
}

.article-disclaimer::before {
    content: '💡';
    position: absolute;
    top: -12px;
    left: 20px;
    background: white;
    padding: 0 8px;
    font-size: 1.25rem;
}

.disclaimer-title {
    color: #856404;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.disclaimer-content {
    color: #856404;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* Contact Options Styles */
.contact-options {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin-top: 2rem;
}

.contact-options h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.contact-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-option {
    background: var(--accent);
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.contact-option:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.contact-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.contact-option h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.contact-option p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.contact-option .primary-button {
    width: 100%;
    margin-top: auto;
}

.contact-back-button {
    text-align: center;
    margin-top: 1.5rem;
}

/*pagination*/

.show-more-container {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.show-more-container p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.text-button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    margin-left: 1rem;
}

.text-button:hover {
    color: var(--primary-dark);
}

.results-count {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}


/* Updated CSS - Tags are More compact and inline */
.popular-tags {
    text-align: center;
    margin: 0.5rem auto 1rem; /* Reduced margin */
    max-width: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tags-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0; /* Remove margin */
    white-space: nowrap;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.tag-pill {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.35rem 0.8rem;
    border-radius: 16px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.tag-pill:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.search-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0.5rem auto 0;
    max-width: 700px;
    line-height: 1.4;
}

.validation-message {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.validation-message.valid {
    color: var(--admin-success);
}

.validation-message.invalid {
    color: var(--admin-error);
}


/* Business Hours Modal Styles */
.business-hours-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.business-hours-modal .modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    animation: fadeInUp 0.3s ease;
}

.business-hours-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.business-hours-modal .modal-body {
    padding: 2rem;
    text-align: center;
}

.business-hours-modal .alternative-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.business-hours-modal .close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

/* Compact Contact Options Styles */
.compact-contact-options {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin-top: 2rem;
    text-align: center;
}

.compact-contact-options h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.contact-buttons-grid {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-button {
    padding: 0.75rem 1.5rem;
    border: 2px solid;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.contact-button.ticket {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.contact-button.ticket:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.contact-button.whatsapp {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.contact-button.whatsapp:hover {
    background: #128C7E;
    border-color: #128C7E;
    transform: translateY(-2px);
}

.contact-button.office {
    background: #8B5CF6;
    color: white;
    border-color: #8B5CF6;
}

.contact-button.office:hover {
    background: #7C3AED;
    border-color: #7C3AED;
    transform: translateY(-2px);
}

.contact-button-icon {
    font-size: 1.1rem;
}

.readonly-field {
    background-color: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.8;
}

.readonly-field:focus {
    outline: none;
    border-color: #e2e8f0;
    box-shadow: none;
}

/* Ticket Confirmation Styles */
.confirmation-message {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ticket-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    text-align: center;
}

.ticket-header h2 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    color: white;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ticket-subtitle {
    display: none; /* Hide the subtitle */
}

.ticket-content {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
}

.ticket-main {
    max-width: 400px;
    margin: 0 auto;
}

.queue-number {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px dashed #e2e8f0;
}

.queue-label {
    display: block;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.queue-value {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #dc2626;
}

.ticket-details {
    space-y: 0.5rem;
}

.detail-row {
    display: grid;
    grid-template-columns: 140px 1fr; /* Fixed label, flexible value */
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #475569;
}

.detail-value {
    color: #1e293b;
    text-align: right;
}

.ticket-qr {
    text-align: center;
}

.ticket-qr canvas {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

.qr-caption {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Simple QR Code Replacement */
.simple-qr {
    width: 120px;
    height: 120px;
    background: #1e293b;
    color: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: monospace;
}

.qr-text {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.qr-subtext {
    font-size: 0.7rem;
    opacity: 0.8;
    text-align: center;
}

/* Verification Badge */
.verification-badge {
    text-align: center;
    padding: 1rem;
}

.badge-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.badge-text {
    font-weight: bold;
    color: #059669;
    margin-bottom: 0.25rem;
}

.badge-id {
    font-size: 0.8rem;
    color: #64748b;
    font-family: monospace;
}

.ticket-notice {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notice-icon {
    font-size: 1.5rem;
}

.notice-text {
    flex: 1;
    text-align: center;
    line-height: 1.4;
}

.ticket-actions {
    padding: 0 2rem 2rem 2rem;
    display: flex;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .ticket-actions {
        flex-direction: column;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    
    .detail-value {
        text-align: center;
    }
}

/* Add to style.css */
/* Compact Feedback Row */
.feedback-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.feedback-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.feedback-buttons {
    display: flex;
    gap: 0.5rem;
}

.feedback-btn {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.feedback-btn:hover {
    transform: scale(1.1);
    border-color: var(--text-muted);
}

.feedback-btn.helpful:hover {
    background: #d1fae5;
    border-color: var(--admin-success);
}

.feedback-btn.neutral:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.feedback-btn.not-helpful:hover {
    background: #fef2f2;
    border-color: var(--admin-error);
}

.feedback-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.feedback-btn.selected {
    transform: scale(1.15);
}

.feedback-btn.helpful.selected {
    background: var(--admin-success);
    color: white;
    border-color: var(--admin-success);
}

.feedback-btn.neutral.selected {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.feedback-btn.not-helpful.selected {
    background: var(--admin-error);
    color: white;
    border-color: var(--admin-error);
}

.feedback-message {
    font-size: 0.8rem;
    color: var(--admin-success);
    font-weight: 500;
    margin-left: auto;
}

.feedback-message.error {
    color: var(--admin-error);
}

/* Feedback stats in admin */
.feedback-stats {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.feedback-stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.feedback-helpful { color: var(--admin-success); }
.feedback-neutral { color: #f59e0b; }
.feedback-not-helpful { color: var(--admin-error); }

/* Header Button Group */
.header-button-group {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
    align-items: flex-end;
}

/* Queue Monitor Button (updated) */
.queue-monitor-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    width: fit-content;
}

.queue-monitor-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Download Format Button */
.download-format-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    width: fit-content;
}

.download-format-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Footer Styles */
.gratification-footer {
    background: #1e293b;
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 4px solid #3b82f6;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.gratification-message {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.gratification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.gratification-message p {
    margin: 0;
    line-height: 1.5;
    color: #f1f5f9;
}

.gratification-message strong {
    color: #f87171;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #60a5fa;
}

.separator {
    color: #475569;
}

.copyright {
    color: #64748b;
}

/* Gratification Popup */
.gratification-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 350px;
    z-index: 9999;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.popup-content {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #3b82f6;
    position: relative;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #64748b;
    padding: 5px;
    line-height: 1;
}

.popup-close:hover {
    color: #ef4444;
}

.popup-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.popup-content h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 1.2rem;
}

.popup-content p {
    color: #475569;
    margin-bottom: 1rem;
    line-height: 1.5;
    text-align: center;
}

.popup-content .small {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.popup-button {
    width: 100%;
    padding: 0.75rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.popup-button:hover {
    background: #2563eb;
}

/* Mobile popo up gratifikasi*/
@media (max-width: 768px) {
    .gratification-popup {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Mobile responsive footer */
@media (max-width: 768px) {
    .gratification-message {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .separator {
        display: none;
    }
}

/* For tablets */
@media (max-width: 1024px) {
    .header-button-group {
        top: 15px;
        right: 15px;
    }
    
    .queue-monitor-btn,
    .download-format-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* For mobile phones */
@media (max-width: 768px) {
    .header-button-group {
        position: static;
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        margin-top: 1.5rem;
        flex-wrap: wrap;
    }
    
    .queue-monitor-btn,
    .download-format-btn {
        backdrop-filter: none;
        margin-top: 0;
    }
    
    header {
        padding-top: 2.5rem;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .header-button-group {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .queue-monitor-btn,
    .download-format-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Responsive Design for Category Layout */
@media (max-width: 968px) {
    .category-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .category-sidebar {
        position: static;
        order: 2;
    }
    
    .category-main {
        order: 1;
    }
    
    .sidebar-categories {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .sidebar-category {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .sidebar-categories {
        flex-direction: column;
    }
    
    .others-modal-content {
        padding: 2rem 1.5rem;
    }
}