/* Local SEO Section - Unique Styling */

.local-seo-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.local-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.local-score-badge {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-weight: 700;
    padding: 12px 20px;
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    border-radius: 8px;
}

.local-score-num {
    font-size: 32px;
}

.local-score-sep {
    font-size: 20px;
    opacity: 0.7;
}

.local-score-max {
    font-size: 20px;
    opacity: 0.7;
}

.local-score-grade {
    font-size: 20px;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.local-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.local-title p {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: #6b7280;
}

.local-section {
    margin-top: 24px;
}

.local-section-heading {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.local-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.local-metric-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.local-metric-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.local-metric-header i {
    font-size: 18px;
}

.local-metric-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.local-metric-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.local-metric-label {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.local-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.local-status-badge.local-success {
    background: #dcfce7;
    color: #166534;
}

.local-status-badge.local-neutral {
    background: #f3f4f6;
    color: #6b7280;
}

.local-metric-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.local-metric-detail i {
    color: #059669;
    font-size: 14px;
}

.local-link {
    color: #059669;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.local-link:hover {
    color: #047857;
    text-decoration: underline;
}

.local-recommendations {
    background: #fef3c7;
    border: 2px solid #fcd34d;
    border-radius: 8px;
    padding: 16px;
}

.local-recommendations.local-success-box {
    background: #dcfce7;
    border-color: #86efac;
}

.local-rec-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 8px;
    font-size: 15px;
}

.local-recommendations.local-success-box p {
    margin: 0;
    color: #166534;
    font-size: 14px;
}

.local-rec-group {
    margin-bottom: 16px;
}

.local-rec-group:last-child {
    margin-bottom: 0;
}

.local-rec-priority {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.local-rec-priority.local-critical {
    background: #fee;
    color: #dc2626;
}

.local-rec-priority.local-high {
    background: #ffedd5;
    color: #ea580c;
}

.local-rec-priority.local-medium {
    background: #dbeafe;
    color: #1d4ed8;
}

.local-rec-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.local-rec-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.local-rec-item i {
    color: #059669;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .local-metric-grid {
        grid-template-columns: 1fr;
    }
    
    .local-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.local-expandable-card .local-card-clickable,
.local-expandable-card .local-section-heading-wrapper {
    cursor: pointer;
    transition: background 0.2s ease;
}

.local-section-heading-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.local-section-heading-wrapper .local-section-heading {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.local-expandable-card .local-card-clickable:hover,
.local-expandable-card .local-section-heading-wrapper:hover {
    background: linear-gradient(145deg, rgba(5, 150, 105, 0.05) 0%, rgba(4, 120, 87, 0.05) 100%);
    border-radius: 8px;
    padding: 8px;
    margin: -8px;
}

.local-card-info-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.local-card-hint {
    font-size: 0.75em;
    color: #059669;
    font-weight: 500;
    opacity: 1;
    transition: opacity 0.5s ease;
    white-space: nowrap;
    animation: localHintPulse 2s ease-in-out infinite;
}

.local-card-hint.local-hint-fade {
    opacity: 0;
    pointer-events: none;
}

@keyframes localHintPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.local-card-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.local-card-info-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.local-card-info-icon.local-info-active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    transform: scale(1.1);
}

.local-card-info-icon span {
    font-style: normal;
    line-height: 1;
}

.local-card-explanation-panel {
    padding: 20px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    margin-top: 16px;
    margin-bottom: 16px;
    animation: localPanelSlide 0.3s ease forwards;
}

@keyframes localPanelSlide {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.local-explanation-header {
    margin-bottom: 12px;
}

.local-explanation-importance {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.local-explanation-desc {
    color: #2c3e50;
    font-size: 0.95em;
    line-height: 1.7;
    margin: 0 0 15px 0;
}

.local-explanation-impact {
    padding: 12px 15px;
    background: linear-gradient(145deg, #fff3cd 0%, #fffbf0 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #856404;
    line-height: 1.6;
}

.local-explanation-metrics {
    padding: 12px 15px;
    background: linear-gradient(145deg, #d1ecf1 0%, #e8f4f8 100%);
    border-left: 4px solid #17a2b8;
    border-radius: 0 8px 8px 0;
    font-size: 0.9em;
    color: #0c5460;
}

.local-explanation-metrics ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.local-explanation-metrics li {
    margin: 8px 0;
    line-height: 1.5;
}
