/**
 * TandoPay Custom Styles
 * Additional styles and overrides
 */

/* Blog Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.blog-card-image {
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 24px;
}

.blog-card-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    color: var(--gray-color);
}

.blog-card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.blog-card-title a {
    color: var(--dark-color);
}

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

.blog-card-excerpt {
    color: var(--gray-color);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.blog-card-link {
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-card-link:hover {
    gap: 10px;
}

/* Single Post */
.single-post-content {
    max-width: 800px;
    margin: 0 auto;
}

.single-post-header {
    text-align: center;
    padding: 60px 0;
}

.single-post-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--gray-color);
}

.single-post-featured {
    margin-bottom: 40px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.single-post-body {
    font-size: 1.125rem;
    line-height: 1.8;
}

.single-post-body h2,
.single-post-body h3,
.single-post-body h4 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.single-post-body p {
    margin-bottom: 1.5rem;
}

.single-post-body ul,
.single-post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 30px;
}

.single-post-body li {
    margin-bottom: 8px;
}

.single-post-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px 30px;
    margin: 30px 0;
    background: var(--light-gray);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
}

/* Knowledge Base Single Article */
.kb-article {
    max-width: 900px;
    margin: 0 auto;
}

.kb-article-sidebar {
    background: var(--light-gray);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    position: sticky;
    top: 100px;
}

.kb-article-toc h4 {
    margin-bottom: 16px;
}

.kb-article-toc ul {
    margin: 0;
}

.kb-article-toc li {
    padding: 8px 0;
    border-bottom: 1px solid var(--white);
}

.kb-article-toc a {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.kb-article-toc a:hover {
    color: var(--primary-color);
}

/* Compliance Guides */
.compliance-card {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    transition: var(--transition);
}

.compliance-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.compliance-card h3 {
    margin-bottom: 12px;
}

.compliance-card p {
    margin-bottom: 16px;
}

.compliance-tag {
    display: inline-block;
    background: var(--light-gray);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--gray-color);
    margin-right: 8px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.pagination ul {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.pagination li a:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
}

.pagination li span.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Search Results */
.search-results-header {
    text-align: center;
    padding: 40px 0;
    background: var(--light-gray);
}

.search-result-item {
    padding: 30px 0;
    border-bottom: 1px solid var(--light-gray);
}

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

.search-result-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.search-result-title a {
    color: var(--dark-color);
}

.search-result-title a:hover {
    color: var(--primary-color);
}

.search-result-excerpt {
    color: var(--gray-color);
    margin-bottom: 12px;
}

.search-result-meta {
    font-size: 0.875rem;
    color: var(--gray-color);
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 100px 20px;
}

.error-404 h1 {
    font-size: 8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.error-404 h2 {
    margin-bottom: 16px;
}

.error-404 p {
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--light-gray);
    clip: auto !important;
    clip-path: none;
    color: var(--dark-color);
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .demo-section,
    .mobile-menu-toggle,
    .header-cta,
    .btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: underline;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tooltips */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--dark-color);
    color: var(--white);
    font-size: 0.75rem;
    border-radius: var(--border-radius);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
}

.badge-primary {
    background: var(--primary-color);
    color: var(--white);
}

.badge-success {
    background: var(--success-color);
    color: var(--white);
}

.badge-warning {
    background: var(--warning-color);
    color: var(--dark-color);
}

.badge-error {
    background: var(--error-color);
    color: var(--white);
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .single-post-body {
        font-size: 1rem;
    }
}
