/**
 * SEO Optimization CSS for Amadeya Theme
 * Implements visual enhancements for SEO without changing structure
 * Based on comprehensive 25-phase analysis
 */

/* Entity Optimization Styles */
[data-entity] {
    position: relative;
}

[data-entity]::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px dashed rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    pointer-events: none;
    z-index: 1;
}

[data-entity-prop] {
    position: relative;
}

[data-entity-prop]::after {
    content: attr(data-entity-prop);
    position: absolute;
    top: -20px;
    left: 0;
    background: rgba(255, 215, 0, 0.9);
    color: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-entity-prop]:hover::after {
    opacity: 1;
}

/* AI Optimization Styles */
[data-ai-answerable] {
    position: relative;
}

[data-ai-answerable]::before {
    content: '🤖 AI-Ready';
    position: absolute;
    top: -25px;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    opacity: 0.8;
}

[data-citation-priority="high"] {
    border-left: 4px solid #ff6b6b;
    padding-left: 12px;
}

[data-citation-priority="medium"] {
    border-left: 4px solid #ffd93d;
    padding-left: 12px;
}

[data-citation-priority="low"] {
    border-left: 4px solid #6bcf7f;
    padding-left: 12px;
}

/* Voice of Customer Styles */
[data-voc-problem] {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    position: relative;
}

[data-voc-problem]::before {
    content: '🎯 VOC: ' attr(data-voc-problem);
    position: absolute;
    top: -12px;
    left: 16px;
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

[data-voc-objection] {
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.1) 0%, rgba(255, 217, 61, 0.05) 100%);
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    position: relative;
}

[data-voc-objection]::before {
    content: '⚠️ VOC: ' attr(data-voc-objection);
    position: absolute;
    top: -12px;
    left: 16px;
    background: #ffd93d;
    color: #000;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

/* Format Optimization Styles */
[data-content-format="problem-solving-guide"] {
    background: linear-gradient(135deg, rgba(107, 207, 127, 0.05) 0%, rgba(107, 207, 127, 0.02) 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 1px solid rgba(107, 207, 127, 0.2);
}

[data-seo-priority="high"] {
    position: relative;
}

[data-seo-priority="high"]::after {
    content: '🔥 High Priority';
    position: absolute;
    top: -30px;
    right: 0;
    background: #ff6b6b;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
    animation: pulse 2s infinite;
}

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

/* Trust Signals Styles */
[data-expert-reviewed="true"] {
    position: relative;
}

[data-expert-reviewed="true"]::before {
    content: '✅ Expert Reviewed';
    position: absolute;
    top: -25px;
    left: 0;
    background: #6bcf7f;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
}

[data-fact-checked="true"] {
    position: relative;
}

[data-fact-checked="true"]::after {
    content: '🔍 Fact Checked';
    position: absolute;
    top: -25px;
    right: 0;
    background: #4dabf7;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
}

[data-transparency="true"] {
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.1) 0%, rgba(77, 171, 247, 0.05) 100%);
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
}

/* Click Defense Styles */
.click-defense-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 24px 0;
    text-align: center;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.click-defense-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.click-defense-cta p {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.click-defense-cta .btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.click-defense-cta .btn:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

.value-proposition {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.value-proposition h4 {
    color: #d4af37;
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
}

.value-proposition ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.value-proposition ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    font-weight: 500;
}

.value-proposition ul li:last-child {
    border-bottom: none;
}

/* Structured Answer Styles */
.structured-answer {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(102, 126, 234, 0.02) 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.answer-summary {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin: 0 0 16px 0;
    border-left: 4px solid #667eea;
    font-weight: 600;
}

.answer-summary::before {
    content: '📋 Краткий ответ:';
    display: block;
    margin-bottom: 8px;
    color: #667eea;
    font-weight: 700;
}

.detailed-answer {
    margin-top: 16px;
}

/* FAQ Styles */
[data-faq-question="true"] {
    background: linear-gradient(135deg, rgba(107, 207, 127, 0.1) 0%, rgba(107, 207, 127, 0.05) 100%);
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    border-left: 4px solid #6bcf7f;
    position: relative;
}

[data-faq-question="true"]::before {
    content: '❓ Вопрос:';
    position: absolute;
    top: -12px;
    left: 16px;
    background: #6bcf7f;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

[data-faq-answer="true"] {
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.1) 0%, rgba(77, 171, 247, 0.05) 100%);
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    border-left: 4px solid #4dabf7;
}

[data-faq-answer="true"]::before {
    content: '💬 Ответ:';
    position: absolute;
    top: -12px;
    left: 16px;
    background: #4dabf7;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

/* Related Entities Styles */
.related-entities {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(255, 107, 107, 0.02) 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.related-entities h4 {
    color: #ff6b6b;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 700;
}

.related-topics {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.related-topics li {
    background: rgba(255, 107, 107, 0.1);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.related-topics li:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: scale(1.05);
}

.related-topics a {
    color: #ff6b6b;
    text-decoration: none;
}

/* Comparison Summary Styles */
.comparison-summary {
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.1) 0%, rgba(255, 217, 61, 0.05) 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 2px solid rgba(255, 217, 61, 0.3);
}

.comparison-summary h3 {
    color: #d4af37;
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.comparison-factors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.factor {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.factor:hover {
    transform: translateY(-2px);
}

.factor-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: block;
}

.factor-value {
    color: #666;
    font-size: 14px;
}

/* References Styles */
.references {
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.05) 0%, rgba(77, 171, 247, 0.02) 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(77, 171, 247, 0.2);
}

.references h4 {
    color: #4dabf7;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 700;
}

.references ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.references ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(77, 171, 247, 0.1);
}

.references ul li:last-child {
    border-bottom: none;
}

.references ul li a {
    color: #4dabf7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.references ul li a:hover {
    color: #2c5aa0;
    text-decoration: underline;
}

/* Common Questions Styles */
.common-questions {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(102, 126, 234, 0.02) 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.common-questions h3 {
    color: #667eea;
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.qa-pair {
    margin: 16px 0;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.qa-pair .question {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
    position: relative;
}

.qa-pair .question[data-voice-search="true"]::after {
    content: '🎤';
    margin-left: 8px;
    font-size: 14px;
}

.qa-pair .answer {
    color: #666;
    line-height: 1.6;
}

/* Citation Styles */
[data-citation-needed="true"] {
    position: relative;
    border-bottom: 2px dotted #ffd93d;
}

[data-citation-needed="true"]::after {
    content: '📚';
    position: absolute;
    bottom: -20px;
    right: 0;
    background: #ffd93d;
    color: #000;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
}

[data-citation-type="expert-opinion"] {
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.1) 0%, rgba(255, 217, 61, 0.05) 100%);
    border-radius: 6px;
    padding: 4px 8px;
    margin: 0 4px;
}

/* Conversational SEO Styles */
[data-conversational="true"] {
    position: relative;
}

[data-conversational="true"]::before {
    content: '💬 Conversational';
    position: absolute;
    top: -25px;
    right: 0;
    background: linear-gradient(135deg, #6bcf7f 0%, #4dabf7 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
}

[data-voice-search-ready="true"] {
    position: relative;
}

[data-voice-search-ready="true"]::after {
    content: '🎤 Voice Ready';
    position: absolute;
    top: -45px;
    right: 0;
    background: #4dabf7;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comparison-factors {
        grid-template-columns: 1fr;
    }
    
    .related-topics {
        flex-direction: column;
        gap: 4px;
    }
    
    .click-defense-cta {
        padding: 16px;
    }
    
    .structured-answer {
        padding: 16px;
    }
    
    .common-questions {
        padding: 16px;
    }
    
    .qa-pair {
        padding: 12px;
    }
}

/* Print Styles */
@media print {
    [data-entity]::before,
    [data-entity-prop]::after,
    [data-ai-answerable]::before,
    [data-citation-priority]::before,
    [data-voc-problem]::before,
    [data-voc-objection]::before,
    [data-seo-priority]::after,
    [data-expert-reviewed="true"]::before,
    [data-fact-checked="true"]::after,
    [data-conversational="true"]::before,
    [data-voice-search-ready="true"]::after {
        display: none;
    }
    
    .click-defense-cta,
    .value-proposition,
    .structured-answer,
    .related-entities,
    .comparison-summary,
    .references,
    .common-questions {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
