/* ===================================
   Aviva Market Analysis - Styles
   Brand Colors: #ffd900 (Yellow), #003366 (Navy Blue)
   =================================== */

/* CSS Variables */
:root {
    --aviva-yellow: #ffd900;
    --aviva-navy: #003366;
    --aviva-dark: #001a33;
    --aviva-light-yellow: #fff4cc;
    --aviva-gray: #f5f5f5;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --white: #ffffff;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border-color: #e5e5e5;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--aviva-navy);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--aviva-navy);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--aviva-yellow);
}

/* Navigation */
.navbar {
    background: var(--aviva-navy);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--aviva-yellow);
}

.nav-brand svg {
    width: 24px;
    height: 24px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--white);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--aviva-yellow);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--aviva-navy) 0%, var(--aviva-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 3.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--aviva-yellow);
    margin-bottom: 3rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 217, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(255, 217, 0, 0.2);
}

.stat-card svg {
    width: 40px;
    height: 40px;
    color: var(--aviva-yellow);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--aviva-yellow);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--white);
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-alt {
    background-color: var(--aviva-gray);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--aviva-navy);
}

.section-title svg {
    width: 40px;
    height: 40px;
    color: var(--aviva-yellow);
}

/* Content Blocks */
.content-block {
    margin-bottom: 3rem;
}

.content-block h3 {
    color: var(--aviva-navy);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.content-block p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Grids */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.summary-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--aviva-navy);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.summary-card.highlight {
    border-left-color: var(--aviva-yellow);
    background: linear-gradient(135deg, var(--aviva-light-yellow) 0%, var(--white) 100%);
}

.summary-card h3 {
    color: var(--aviva-navy);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.summary-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.metric-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-icon {
    width: 60px;
    height: 60px;
    background: var(--aviva-light-yellow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon svg {
    width: 32px;
    height: 32px;
    color: var(--aviva-navy);
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--aviva-navy);
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.metric-change {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

.metric-change.positive {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 3rem;
    margin: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--aviva-yellow);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -3.5rem;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--aviva-yellow);
    border: 3px solid var(--aviva-navy);
    border-radius: 50%;
}

.timeline-content h4 {
    color: var(--aviva-navy);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Charts */
.chart-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 3rem 0;
}

.chart-container h3 {
    color: var(--aviva-navy);
    margin-bottom: 2rem;
    text-align: center;
}

.chart-container canvas {
    max-height: 400px;
}

/* Competitor Cards */
.competitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.competitor-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--aviva-navy);
    transition: transform 0.3s ease;
}

.competitor-card:hover {
    transform: translateY(-5px);
}

.competitor-card.aviva-card {
    border-top-color: var(--aviva-yellow);
    background: linear-gradient(135deg, var(--aviva-light-yellow) 0%, var(--white) 100%);
}

.competitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.competitor-header h3 {
    color: var(--aviva-navy);
    margin: 0;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--aviva-gray);
    color: var(--text-dark);
}

.badge-leader {
    background: var(--aviva-yellow);
    color: var(--aviva-navy);
}

.competitor-stats {
    margin-bottom: 1.5rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-row:last-child {
    border-bottom: none;
}

.competitor-strengths h4 {
    color: var(--aviva-navy);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.competitor-strengths ul {
    list-style: none;
    padding: 0;
}

.competitor-strengths li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    font-size: 0.9rem;
}

.competitor-strengths li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--aviva-yellow);
    font-weight: 700;
}

/* Sentiment */
.sentiment-overview {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.sentiment-score {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--aviva-yellow) 0%, #ffed4e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(255, 217, 0, 0.3);
}

.score-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--aviva-navy);
}

.score-max {
    font-size: 1.5rem;
    color: var(--aviva-navy);
    opacity: 0.7;
}

.score-details h3 {
    color: var(--aviva-navy);
    margin-bottom: 0.5rem;
}

.score-details p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.rating-stars {
    font-size: 1.5rem;
    color: var(--aviva-yellow);
}

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

.sentiment-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.sentiment-card.positive {
    border-left: 4px solid var(--success);
}

.sentiment-card.negative {
    border-left: 4px solid var(--warning);
}

.sentiment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sentiment-header svg {
    width: 32px;
    height: 32px;
}

.sentiment-card.positive .sentiment-header svg {
    color: var(--success);
}

.sentiment-card.negative .sentiment-header svg {
    color: var(--warning);
}

.sentiment-header h3 {
    color: var(--aviva-navy);
    margin: 0;
}

.sentiment-list {
    list-style: none;
    padding: 0;
}

.sentiment-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
    line-height: 1.6;
}

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

.sentiment-list strong {
    color: var(--aviva-navy);
}

/* Insight Box */
.insight-box {
    background: linear-gradient(135deg, var(--aviva-light-yellow) 0%, var(--white) 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--aviva-yellow);
    margin: 3rem 0;
}

.insight-box h3 {
    color: var(--aviva-navy);
    margin-bottom: 1rem;
}

.insight-box p {
    color: var(--text-light);
    line-height: 1.8;
}

/* AI Initiatives */
.ai-initiatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.ai-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--aviva-yellow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.ai-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.ai-card-header svg {
    width: 32px;
    height: 32px;
    color: var(--aviva-yellow);
}

.ai-card-header h3 {
    flex: 1;
    margin: 0 1rem 0 0;
    font-size: 1.25rem;
}

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

.badge-pilot {
    background: var(--aviva-yellow);
    color: var(--aviva-navy);
}

.ai-card p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.ai-impact {
    background: var(--aviva-light-yellow);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.ai-impact strong {
    color: var(--aviva-navy);
}

/* Recommendations */
.recommendations-section {
    margin: 4rem 0;
}

.recommendations-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2rem;
    color: var(--aviva-navy);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--aviva-yellow);
}

.recommendations-title svg {
    width: 36px;
    height: 36px;
    color: var(--aviva-yellow);
}

.recommendation-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    transition: transform 0.3s ease;
}

.recommendation-card:hover {
    transform: translateX(10px);
}

.recommendation-number {
    width: 60px;
    height: 60px;
    background: var(--aviva-yellow);
    color: var(--aviva-navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.recommendation-content {
    flex: 1;
}

.recommendation-content h4 {
    color: var(--aviva-navy);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.recommendation-content > p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.recommendation-details {
    background: var(--aviva-gray);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.recommendation-details h5 {
    color: var(--aviva-navy);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.recommendation-details ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.recommendation-details li {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Implementation Roadmap */
.implementation-roadmap {
    margin: 4rem 0;
}

.implementation-roadmap h3 {
    color: var(--aviva-navy);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.roadmap-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.roadmap-phase {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--aviva-yellow);
}

.roadmap-phase h4 {
    color: var(--aviva-navy);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.roadmap-phase ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.roadmap-phase li {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.phase-impact {
    background: var(--aviva-light-yellow);
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--aviva-navy);
}

/* Investment Requirements */
.investment-requirements {
    margin: 4rem 0;
}

.investment-requirements h3 {
    color: var(--aviva-navy);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.investment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.investment-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--aviva-yellow);
}

.investment-card h4 {
    color: var(--aviva-navy);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.investment-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--aviva-yellow);
    margin-bottom: 0.5rem;
}

.investment-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Success Factors */
.success-factors {
    margin: 4rem 0;
}

.success-factors h3 {
    color: var(--aviva-navy);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.factors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.factor-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.factor-card svg {
    width: 48px;
    height: 48px;
    color: var(--aviva-yellow);
    margin-bottom: 1rem;
}

.factor-card h4 {
    color: var(--aviva-navy);
    margin-bottom: 1rem;
}

.factor-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Conclusion Box */
.conclusion-box {
    background: linear-gradient(135deg, var(--aviva-navy) 0%, var(--aviva-dark) 100%);
    color: var(--white);
    padding: 3rem;
    border-radius: 12px;
    margin: 4rem 0;
    box-shadow: var(--shadow-lg);
}

.conclusion-box h3 {
    color: var(--aviva-yellow);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.conclusion-box p {
    color: var(--white);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.conclusion-box ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.conclusion-box li {
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.conclusion-box strong {
    color: var(--aviva-yellow);
}

/* Sources */
.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin: 3rem 0;
}

.source-category {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.source-category h3 {
    color: var(--aviva-navy);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--aviva-yellow);
}

.sources-list {
    padding-left: 1.5rem;
}

.sources-list li {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.7;
}

.sources-list strong {
    color: var(--aviva-navy);
    display: block;
    margin-bottom: 0.25rem;
}

.sources-list a {
    color: var(--aviva-navy);
    word-break: break-all;
}

.sources-list a:hover {
    color: var(--aviva-yellow);
}

.sources-list em {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.methodology-box,
.disclaimer-box {
    background: var(--aviva-light-yellow);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--aviva-yellow);
    margin: 3rem 0;
}

.methodology-box h3,
.disclaimer-box h3 {
    color: var(--aviva-navy);
    margin-bottom: 1rem;
}

.methodology-box p,
.disclaimer-box p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--aviva-navy);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--aviva-yellow);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--aviva-yellow);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .content-grid,
    .metrics-grid,
    .competitor-grid,
    .sentiment-grid,
    .ai-initiatives-grid,
    .sources-grid {
        grid-template-columns: 1fr;
    }
    
    .recommendation-card {
        flex-direction: column;
    }
    
    .roadmap-timeline,
    .investment-grid,
    .factors-grid {
        grid-template-columns: 1fr;
    }
    
    .sentiment-score {
        flex-direction: column;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    .chart-container {
        page-break-inside: avoid;
    }
}