/* KPass Documentation Styles */
.kpass-tech-doc {
    padding-top: 6rem;
    padding-bottom: 4rem;
}

.kpass-tech-doc .doc-section {
    scroll-margin-top: 5.5rem;
    margin-bottom: 3rem;
}

.kpass-tech-doc .doc-lead {
    font-size: 1.1rem;
    color: #374151;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.kpass-tech-doc .doc-section h2 {
    font-size: 1.5rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.kpass-tech-doc .doc-section h3 {
    font-size: 1.2rem;
    margin: 2.5rem 0 1rem;
    color: #1f2937;
}

.kpass-tech-doc .doc-section h4 {
    font-size: 1.05rem;
    margin: 2rem 0 0.75rem;
    color: #374151;
}

.kpass-tech-doc .doc-section p {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.kpass-tech-doc .doc-section ul,
.kpass-tech-doc .doc-section ol {
    margin: 0 0 1rem 1.5rem;
    line-height: 1.7;
}

.kpass-tech-doc .doc-section li {
    margin-bottom: 0.35rem;
}

/* Added modifier for extra spacing */
.kpass-tech-doc .doc-section .guide-section-spacing-large {
    margin-top: 4rem;
}

.doc-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.kpass-tech-doc .doc-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.95rem;
}

.kpass-tech-doc .doc-table th,
.kpass-tech-doc .doc-table td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    text-align: left;
}

.kpass-tech-doc .doc-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.kpass-tech-doc .doc-table tr:nth-child(even) {
    background: #fafafa;
}

.kpass-tech-doc .doc-figure {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.kpass-tech-doc .doc-figure img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.kpass-tech-doc .doc-figure figcaption {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.75rem;
}

.kpass-tech-doc .doc-ref {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5rem;
    display: none !important; /* Hidden as per request */
}

.kpass-tech-doc .doc-nav {
    background: #f1f5f9;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2.5rem;
}

.kpass-tech-doc .doc-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.kpass-tech-doc .doc-nav li {
    margin: 0.35rem 0;
}

/* Breadcrumb Navigation */
.doc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
    flex-wrap: wrap;
}

.doc-breadcrumb a {
    color: #0284c7;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.doc-breadcrumb a:hover {
    color: #0369a1;
    text-decoration: underline;
}

.doc-breadcrumb .sep {
    color: #cbd5e1;
    font-weight: 300;
}

.doc-breadcrumb .current {
    color: #334155;
    font-weight: 500;
}

/* Modern Document Header */
.doc-header-modern {
    margin-bottom: 6rem;
    border-bottom: 1px solid #f1f5f9;
}

.doc-header-modern .doc-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.doc-header-modern h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.doc-header-modern .doc-nav-list {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    list-style: none;
    padding: 0;
}

.doc-header-modern .doc-nav-list li {
    margin: 0;
}

.doc-header-modern .doc-nav-list a {
    font-size: 0.95rem;
    color: #0284c7;
    text-decoration: none;
    font-weight: 500;
}

.doc-header-modern .doc-nav-list a:hover {
    text-decoration: underline;
}

.doc-footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-doc-back {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-doc-back:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* KPass Documentation Archive */
.kpass-doc-archive {
    padding-top: 6rem;
    padding-bottom: 4rem;
}

.kpass-doc-archive .doc-back {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #0369a1;
    text-decoration: none;
    font-weight: 500;
}

.kpass-doc-archive .doc-back:hover {
    text-decoration: underline;
}

.kpass-doc-archive .doc-archive-lead {
    margin-bottom: 2rem;
    color: #374151;
}

.kpass-doc-archive .doc-archive-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kpass-doc-archive .doc-archive-list li {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.kpass-doc-archive .doc-archive-list a {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0369a1;
    text-decoration: none;
}

.kpass-doc-archive .doc-archive-list a:hover {
    text-decoration: underline;
}

.kpass-doc-archive .doc-archive-excerpt {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
}

/* Responsive for Docs */
@media (max-width: 768px) {
    .kpass-tech-doc .doc-section h2 {
        font-size: 1.35rem;
    }
    .doc-header-modern h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .kpass-tech-doc {
        padding-top: 4.5rem;
    }
    .kpass-tech-doc .doc-table {
        min-width: 600px;
    }
    .doc-header-modern .doc-nav-list {
        flex-direction: column;
        gap: 0.5rem;
    }
    .doc-header-modern .doc-nav-list li {
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 0.5rem;
    }
}



/* Security Grid & Feature Box */
.security-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 640px) {
    .security-features-grid {
        grid-template-columns: 1fr;
    }
}

.security-feature {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
}

.security-feature .feature-icon {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.security-feature h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 700;
}

.security-feature p {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.7;
}

/* Info Text (Simple) */
.info-box {
    margin: 2.5rem 0;
    padding: 0;
    border: none;
    background: transparent;
}

.info-box.success {
    background: transparent;
    border: none;
}

.info-box.notice {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.info-box .info-title {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #166534;
    font-size: 1.3rem;
    font-weight: 600;
}

.info-box.notice h4 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #334155;
    margin-bottom: 0.5rem;
}

.info-box p {
    margin-bottom: 0;
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.9;
}

.info-box.notice p {
    margin-bottom: 0;
}

/* FAQ Components */
.faq-item {
    margin-bottom: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
}

.faq-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.faq-item h4::before {
    content: "Q";
    background: #e2e8f0;
    color: #64748b;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 0.9rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* Marketing Call to Action - Premium Look */
.doc-cta-section {
    margin-top: 5rem;
    padding: 3.5rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.doc-cta-section h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.doc-cta-section p {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.btn-cta-appstore {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-cta-appstore:hover {
    transform: scale(1.05);
}

.btn-cta-appstore img {
    height: 48px;
    width: auto;
    display: block;
}

/* Document Check List */
.doc-check-list {
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

.doc-check-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #334155;
    line-height: 1.6;
}

.doc-check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #16a34a; /* Green */
    font-weight: 900;
    font-size: 1.1rem;
}

/* Compact Marketing CTA */
.doc-cta-compact {
    margin-top: 4rem;
    padding: 3rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.cta-text-content {
    flex: 1;
}

.doc-cta-compact h2 {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 0 0.5rem 0 !important;
    border: none !important;
    padding: 0 !important;
}

.doc-cta-compact p {
    font-size: 0.95rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

.cta-action-area {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .doc-cta-compact {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.25rem;
        gap: 1.25rem;
    }
    
    .doc-cta-compact p {
        margin-bottom: 0 !important;
    }
}

/* Annotation */
.doc-annotation {
    font-size: 0.85rem !important;
    color: #94a3b8 !important;
    margin-top: 1.5rem;
}

/* Simple and Stylish Link Button (Shared) */
.kpass-link-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    background: #f3f4f6;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.kpass-link-button:hover {
    background: #ffffff;
    color: #111827;
    border-color: #d1d5db;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.kpass-link-button svg {
    transition: transform 0.2s ease;
}

.kpass-link-button:hover svg {
    transform: translateX(3px);
}

/* Data Collection & Marketing Section */
.data-collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.data-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.data-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.data-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.data-card-header .data-icon {
    font-size: 1.5rem;
    background: #f1f5f9;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.data-card h4 {
    margin: 0 !important;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.data-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.data-list li {
    font-size: 0.95rem;
    color: #475569;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.5;
}

.data-list li:last-child {
    border-bottom: none;
}

.data-list li strong {
    color: #1e293b;
    font-weight: 600;
    display: block;
    margin-bottom: 0.1rem;
}

.data-list li .data-desc {
    font-size: 0.85rem;
    color: #64748b;
}

.marketing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.marketing-item {
    background: #f8fafc;
    border-left: 4px solid #0284c7;
    padding: 1.25rem;
    border-radius: 0 8px 8px 0;
}

.marketing-item h4 {
    margin: 0 0 0.5rem 0 !important;
    font-size: 1rem;
    color: #0369a1;
}

.marketing-item p {
    margin: 0 !important;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .data-collection-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   Doc Archive & Filtering UI
   ========================================= */

/* Filter Navigation */
.doc-filter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.doc-filter-btn {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-filter-btn:hover {
    border-color: #cbd5e1;
    color: #334155;
    background: #f8fafc;
}

.doc-filter-btn.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

/* Grid Layout */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

/* Doc Card */
.doc-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.doc-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    padding: 1.25rem;
}

.doc-card-content {
    flex: 1;
}

.doc-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.doc-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.doc-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 4px;
    font-weight: 600;
}

.doc-card-excerpt {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    
    /* Line clamp for consistent height */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doc-card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

.doc-card-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0284c7;
    transition: transform 0.2s ease;
}

.doc-card:hover .doc-card-more {
    transform: translateX(3px);
}

/* Empty State */
.doc-empty-state {
    text-align: center;
    padding: 4rem 0;
    color: #64748b;
}

@media (max-width: 640px) {
    .doc-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .doc-card-link {
        padding: 1rem;
    }
    
    .doc-filter-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1.5rem;
        gap: 0.5rem;
    }
    
    .doc-filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
}
