/* Enhanced FAQ UI/UX Styles - Production Ready */

/* Search and Filter Section */
.faq-search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 0 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-box {
    margin-bottom: 25px;
}

.search-box .input-group-lg .form-control {
    height: 56px;
    font-size: 18px;
    border-radius: 28px 0 0 28px;
    border: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    padding-left: 50px;
}

.search-box .input-group-addon {
    background: white;
    border: none;
    border-radius: 28px 0 0 28px;
    padding-left: 20px;
    color: #667eea;
}

.search-box .btn-primary {
    border-radius: 0 28px 28px 0;
    background: #28a745;
    border: none;
    padding: 0 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.search-box .btn-primary:hover {
    background: #218838;
    transform: translateX(2px);
}

.search-suggestions {
    background: white;
    border-radius: 10px;
    margin-top: 10px;
    display: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-suggestions.show {
    display: block;
}

.search-suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.search-suggestion-item:hover {
    background: #f8f9fa;
    padding-left: 25px;
}

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

/* Category Filter Pills */
.category-filter-pills {
    margin-top: 20px;
}

.filter-pill {
    background: white;
    border: 2px solid transparent;
    border-radius: 25px;
    padding: 10px 20px;
    margin: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    cursor: pointer;
    outline: none;
}

.filter-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.filter-pill.active {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.filter-pill i {
    margin-right: 5px;
}

/* Enhanced Alert */
.alert-enhanced {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.alert-icon-wrapper {
    flex: 0 0 80px;
    text-align: center;
    color: #ffc107;
}

.alert-content {
    flex: 1;
    padding-left: 20px;
}

.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Interactive FAQ Items */
.faq-interactive {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-interactive:hover {
    background: #f8f9fa;
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.question-icon {
    color: #667eea;
    margin-right: 10px;
    transition: transform 0.3s;
}

.faq-interactive.active .question-icon {
    transform: rotate(45deg);
    color: #28a745;
}

.question-text {
    flex: 1;
}

/* Progress Indicator */
.faq-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #f0f0f0;
    z-index: 1000;
}

.faq-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0;
    transition: width 0.3s;
}

/* Sticky Sidebar */
.sticky-sidebar {
    position: sticky;
    top: 20px;
}

/* Enhanced Contact Card */
.contact-card-enhanced {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.3s;
}

.contact-card-enhanced:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.contact-card-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.contact-card-header h3 {
    margin: 10px 0 0;
    font-size: 1.3em;
}

.contact-card-body {
    padding: 20px;
}

.btn-call-action {
    font-size: 1.2em;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.btn-call-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-call-action:hover::before {
    width: 300px;
    height: 300px;
}

.phone-number {
    font-weight: 700;
    font-size: 1.1em;
}

.contact-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-options .btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    border: none;
}

.btn-whatsapp:hover {
    background: #1da851;
    color: white;
}

.btn-email {
    background: #007bff;
    color: white;
    border: none;
}

.btn-email:hover {
    background: #0056b3;
    color: white;
}

.working-hours {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

/* Category Cards with Icons */
.category-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--category-color) 0%, var(--category-color-end) 100%);
}

.category-card.legal { --category-color: #dc3545; --category-color-end: #c82333; }
.category-card.technical { --category-color: #17a2b8; --category-color-end: #138496; }
.category-card.service { --category-color: #ffc107; --category-color-end: #e0a800; }
.category-card.general { --category-color: #28a745; --category-color-end: #218838; }

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: white;
}

.category-card.legal .category-icon { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); }
.category-card.technical .category-icon { background: linear-gradient(135deg, #17a2b8 0%, #138496 100%); }
.category-card.service .category-icon { background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%); }
.category-card.general .category-icon { background: linear-gradient(135deg, #28a745 0%, #218838 100%); }

.category-title {
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
}

.category-count {
    text-align: center;
    color: #999;
    font-size: 0.9em;
}

/* Loading States */
.faq-loading {
    text-align: center;
    padding: 40px;
}

.faq-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Enhancements */
@media (max-width: 768px) {
    .faq-search-section {
        padding: 20px 0;
    }
    
    .search-box .input-group-lg .form-control {
        height: 48px;
        font-size: 16px;
    }
    
    .filter-pill {
        padding: 8px 15px;
        font-size: 12px;
        margin: 3px;
    }
    
    .sticky-sidebar {
        position: static;
    }
    
    .contact-card-enhanced {
        position: fixed;
        bottom: 20px;
        right: 20px;
        left: 20px;
        z-index: 999;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .alert-enhanced {
        flex-direction: column;
        text-align: center;
    }
    
    .alert-icon-wrapper {
        margin-bottom: 15px;
    }
    
    .category-card {
        margin-bottom: 15px;
    }
}

/* Floating Action Button for Mobile */
@media (max-width: 768px) {
    .fab-container {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1000;
    }
    
    .fab-button {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: #28a745;
        color: white;
        border: none;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        font-size: 24px;
        transition: all 0.3s;
    }
    
    .fab-button:hover {
        transform: scale(1.1);
    }
    
    .fab-menu {
        position: absolute;
        bottom: 70px;
        right: 0;
        display: none;
    }
    
    .fab-menu.show {
        display: block;
    }
    
    .fab-menu-item {
        display: block;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: white;
        color: #333;
        border: 2px solid #f0f0f0;
        margin-bottom: 10px;
        text-align: center;
        line-height: 46px;
        font-size: 20px;
        transition: all 0.3s;
    }
    
    .fab-menu-item:hover {
        transform: scale(1.1);
        box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    }
}

/* Semantic Content Blocks for AI Parsing */
.ai-parseable-section {
    border: 1px solid transparent;
    padding: 20px;
    margin-bottom: 30px;
}

.ai-parseable-section[data-ai-context] {
    position: relative;
}

/* Entity Highlighting for AI Recognition */
.business-entity {
    font-weight: 600;
    color: #2c3e50;
}

.location-entity {
    color: #16a085;
    font-weight: 500;
}

.service-entity {
    color: #2980b9;
    border-bottom: 1px dotted #2980b9;
}

.brand-entity {
    color: #8e44ad;
    font-weight: 600;
}

/* Quotable Content Blocks */
.ai-quotable {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin: 20px 0;
    position: relative;
    font-size: 1.1em;
}

.ai-quotable::before {
    content: attr(data-quote-context);
    position: absolute;
    top: -10px;
    left: 20px;
    background: white;
    padding: 0 10px;
    font-size: 0.85em;
    color: #7f8c8d;
    font-weight: 600;
}

/* Authority Signals */
.authority-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 2px solid #27ae60;
    border-radius: 25px;
    padding: 5px 15px;
    margin: 5px;
    font-weight: 600;
}

.authority-badge .badge-icon {
    color: #27ae60;
    font-size: 1.2em;
}

/* Fact Boxes for AI Extraction */
.ai-fact-box {
    background: #ecf0f1;
    border: 2px solid #34495e;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.ai-fact-box h4 {
    color: #2c3e50;
    margin-top: 0;
    font-size: 1.2em;
}

.ai-fact-box .fact-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #bdc3c7;
}

.ai-fact-box .fact-item:last-child {
    border-bottom: none;
}

.ai-fact-box .fact-label {
    flex: 0 0 40%;
    font-weight: 600;
    color: #34495e;
}

.ai-fact-box .fact-value {
    flex: 1;
    color: #2c3e50;
    font-size: 1.1em;
}

/* Definition Lists for AI Understanding */
.ai-definition-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.ai-definition-list dt {
    color: #495057;
    font-weight: 700;
    margin-top: 15px;
    font-size: 1.05em;
}

.ai-definition-list dd {
    margin-left: 0;
    padding-left: 20px;
    color: #212529;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* AI-Friendly FAQ Styles */
.faq-category-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    margin: 0;
}

.faq-item-enhanced {
    background: white;
    border: 1px solid #dee2e6;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item-enhanced:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.faq-question-enhanced {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    margin: 0;
    font-size: 1.15em;
    color: #2c3e50;
}

.faq-answer-enhanced {
    padding: 20px;
    background: white;
    line-height: 1.8;
    color: #495057;
}

/* Citation-Ready Content */
.citation-ready {
    position: relative;
    padding: 20px;
    background: #fff;
    border: 2px solid #3498db;
    border-radius: 8px;
    margin: 20px 0;
}

.citation-ready::after {
    content: "źródło: GetComp Kasy Fiskalne Cieszyn";
    position: absolute;
    bottom: -12px;
    right: 20px;
    background: white;
    padding: 0 10px;
    font-size: 0.8em;
    color: #7f8c8d;
    font-style: italic;
}

/* Knowledge Graph Optimization */
.kg-optimized {
    background: linear-gradient(to right, #f5f7fa, #c3cfe2);
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
}

.kg-property {
    display: flex;
    align-items: baseline;
    margin: 10px 0;
    padding: 10px;
    background: rgba(255,255,255,0.7);
    border-radius: 5px;
}

.kg-property-name {
    font-weight: 700;
    color: #34495e;
    min-width: 150px;
    margin-right: 15px;
}

.kg-property-value {
    color: #2c3e50;
    flex: 1;
}

/* Trust Signal Grid */
.trust-signal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.trust-signal-item {
    background: white;
    border: 2px solid #27ae60;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.trust-signal-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(39, 174, 96, 0.2);
}

.trust-signal-icon {
    font-size: 2.5em;
    color: #27ae60;
    margin-bottom: 10px;
}

.trust-signal-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #2c3e50;
    margin: 10px 0;
}

.trust-signal-label {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Speakable Content Markers */
.speakable-content {
    position: relative;
    padding-left: 30px;
}

.speakable-content::before {
    content: "🔊";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2em;
}

/* Quick Answer Cards */
.quick-answer-card {
    background: white;
    border: 3px solid #3498db;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
}

.quick-answer-card::before {
    content: "ODPOWIEDŹ";
    position: absolute;
    top: -15px;
    left: 20px;
    background: #3498db;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8em;
}

/* Semantic Breadcrumb Enhancement */
.semantic-breadcrumb {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.semantic-breadcrumb ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.semantic-breadcrumb li {
    display: flex;
    align-items: center;
}

.semantic-breadcrumb li::after {
    content: "›";
    margin: 0 10px;
    color: #6c757d;
}

.semantic-breadcrumb li:last-child::after {
    display: none;
}

/* AI Context Attributes */
[data-ai-priority="high"] {
    outline: 2px dashed #e74c3c;
    outline-offset: 5px;
}

[data-ai-intent] {
    position: relative;
}

[data-ai-intent]::after {
    content: attr(data-ai-intent);
    position: absolute;
    top: -25px;
    left: 0;
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75em;
    opacity: 0;
    transition: opacity 0.3s;
}

[data-ai-intent]:hover::after {
    opacity: 1;
}

/* Mobile Optimization for AI Crawlers */
@media (max-width: 768px) {
    .ai-parseable-section {
        padding: 15px;
    }
    
    .trust-signal-grid {
        grid-template-columns: 1fr;
    }
    
    .kg-property {
        flex-direction: column;
    }
    
    .kg-property-name {
        margin-bottom: 5px;
    }
    
    .faq-question-enhanced {
        font-size: 1em;
        padding: 15px;
    }
    
    .ai-fact-box .fact-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ai-fact-box .fact-label {
        margin-bottom: 5px;
    }
}

/* Print Styles for AI Document Analysis */
@media print {
    .ai-parseable-section,
    .ai-quotable,
    .citation-ready,
    .kg-optimized {
        page-break-inside: avoid;
    }
    
    .trust-signal-grid {
        display: block;
    }
    
    .trust-signal-item {
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
}

/* Accessibility Enhancements for AI Voice Interfaces */
.visually-hidden-ai-context {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .ai-quotable,
    .citation-ready,
    .kg-optimized {
        border-width: 3px;
    }
    
    .trust-signal-item {
        border-width: 3px;
    }
}

/* Animation for Interactive Elements */
@keyframes pulseHighlight {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.ai-interactive {
    animation: pulseHighlight 2s infinite;
}

/* Schema.org Visual Indicators */
[itemscope] {
    position: relative;
}

[itemscope][itemtype*="LocalBusiness"],
[itemscope][itemtype*="Organization"] {
    padding: 20px;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
}

[itemscope][itemtype*="Question"] {
    padding: 15px;
    background: rgba(155, 89, 182, 0.05);
    border-radius: 8px;
    margin-bottom: 15px;
}