/* ============================================
   REFORM UK TRACKER - Cool Britannia Theme
   Neo-Britpop with neon Reform cyan accents
   ============================================ */

/* Reform Page Header */
.reform-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 1rem 1.5rem;
}

.title-reform {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: 0;
}

.reform-header .subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* SEO Intro Section */
.seo-intro {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border) !important;
    border-left: 4px solid var(--neon-cyan) !important;
    border-radius: 16px !important;
    padding: 1.5rem !important;
    margin-bottom: 2rem !important;
}

.seo-intro p {
    color: var(--text-secondary) !important;
    font-family: var(--font-body);
    line-height: 1.7;
    margin: 0;
}

.seo-intro strong {
    color: var(--text-primary);
}

/* Main Membership Card */
.membership-card {
    background: linear-gradient(
        135deg,
        rgba(0, 245, 255, 0.15) 0%,
        rgba(18, 182, 207, 0.1) 50%,
        rgba(0, 180, 216, 0.05) 100%
    );
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 245, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.membership-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--neon-cyan) 20%, 
        var(--neon-cyan) 80%, 
        transparent 100%
    );
    box-shadow: 0 0 20px var(--neon-cyan);
}

.membership-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.membership-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.count-value {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--neon-cyan);
    text-shadow: 
        0 0 20px rgba(0, 245, 255, 0.5),
        0 0 40px rgba(0, 245, 255, 0.3);
    letter-spacing: -2px;
    line-height: 1;
}

.count-label {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.membership-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.change-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.change-indicator.positive {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.change-indicator.negative {
    background: rgba(255, 45, 146, 0.15);
    color: var(--neon-pink);
    border: 1px solid rgba(255, 45, 146, 0.3);
}

/* Stats Grid - Quad Pack */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 4px 20px rgba(0, 245, 255, 0.15);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
    line-height: 1.2;
}

.stat-value.positive {
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.stat-value.negative {
    color: var(--neon-pink);
    text-shadow: 0 0 10px rgba(255, 45, 146, 0.3);
}

.stat-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Chart Section */
.chart-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

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

.section-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0;
}

/* Time Filter Buttons */
.time-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-body);
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(0, 245, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--text-primary);
}

.filter-btn.active {
    background: rgba(0, 245, 255, 0.2);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.2);
}

/* Chart Controls */
.chart-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.chart-toolbar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.25rem;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: rgba(0, 245, 255, 0.1);
    color: var(--text-primary);
}

.toolbar-btn.active {
    background: rgba(0, 245, 255, 0.15);
    color: var(--neon-cyan);
}

.toolbar-btn svg {
    flex-shrink: 0;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
    margin: 0 0.25rem;
}

/* Chart Help Text */
.chart-help {
    display: flex;
    justify-content: center;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-help span {
    opacity: 0.7;
}

/* Fullscreen Mode */
.chart-section.chart-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chart-section.chart-fullscreen .chart-header {
    flex-shrink: 0;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.chart-section.chart-fullscreen .chart-container {
    flex: 1;
    min-height: 0;
    padding: 1rem 2rem;
}

.chart-section.chart-fullscreen .chart-container canvas {
    height: 100% !important;
}

.chart-section.chart-fullscreen .chart-help {
    flex-shrink: 0;
    padding: 0.75rem 2rem;
    margin-top: 0;
    border-top: 1px solid var(--glass-border);
}

.chart-section.chart-fullscreen .events-legend {
    display: none;
}

/* Chart Container */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 450px;
    margin-bottom: 1rem;
}

.chart-container canvas {
    width: 100% !important;
    height: 450px !important;
    cursor: grab;
}

.chart-container canvas:active {
    cursor: grabbing;
}

/* Events Legend */
.events-legend {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.events-legend h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.events-table th,
.events-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.events-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.events-table td {
    color: var(--text-secondary);
}

.event-marker {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Article / Context Section */
.article.reform-article {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.article-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.article-section {
    margin-bottom: 1.5rem;
}

.article-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--neon-cyan);
    margin-bottom: 0.75rem;
}

.article-section p {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.article-section a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-section a:hover {
    color: var(--neon-pink);
}

.article-section strong {
    color: var(--text-primary);
}

/* Data Note / Footer */
.data-note {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    margin-top: 1rem;
}

.data-note a {
    color: var(--neon-cyan);
    text-decoration: none;
}

.data-note a:hover {
    text-decoration: underline;
}

/* Loading State */
.loading-reform {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.loading-reform::before {
    content: '';
    width: 48px;
    height: 48px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Large screens - taller chart */
@media (min-width: 1200px) {
    .chart-container {
        min-height: 500px;
    }
    
    .chart-container canvas {
        height: 500px !important;
    }
}

@media (min-width: 1600px) {
    .chart-container {
        min-height: 550px;
    }
    
    .chart-container canvas {
        height: 550px !important;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .reform-header {
        margin-bottom: 1.5rem;
    }
    
    .membership-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .count-value {
        font-size: 3rem;
    }
    
    .membership-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .chart-section {
        padding: 1rem;
    }
    
    .chart-container {
        min-height: 280px;
    }
    
    .chart-container canvas {
        height: 280px !important;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-controls {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .chart-toolbar {
        order: 2;
    }
    
    .time-filter {
        order: 1;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .time-filter {
        width: 100%;
        justify-content: flex-start;
    }
    
    .article.reform-article {
        padding: 1.5rem;
    }
    
    .events-table {
        font-size: 0.8rem;
    }
    
    .chart-help {
        font-size: 0.7rem;
    }
    
    .chart-section.chart-fullscreen .chart-header {
        padding: 0.75rem 1rem;
    }
    
    .chart-section.chart-fullscreen .chart-container {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.875rem;
    }
    
    .stat-icon {
        font-size: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
    
    .title-reform {
        font-size: 2rem;
    }
    
    .count-value {
        font-size: 2.5rem;
    }
    
    .chart-container {
        min-height: 250px;
    }
    
    .chart-container canvas {
        height: 250px !important;
    }
    
    .filter-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .toolbar-btn {
        width: 40px;
        height: 40px;
    }
    
    .chart-help span {
        text-align: center;
    }
}

/* ============================================
   CTA CARD - Promotional Link Card
   Eye-catching, clickable, urgent
   ============================================ */
.cta-card-link {
    display: block;
    text-decoration: none;
    margin: 1.5rem 0 2rem;
}

.cta-card {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(200, 16, 46, 0.15) 0%,
        rgba(255, 45, 146, 0.1) 50%,
        rgba(200, 16, 46, 0.05) 100%
    );
    border: 2px solid var(--brit-red);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.cta-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: var(--brit-red-bright);
    box-shadow: 
        0 12px 40px rgba(200, 16, 46, 0.4),
        0 0 0 1px rgba(200, 16, 46, 0.2);
}

.cta-card--urgent {
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(200, 16, 46, 0.2);
    }
    50% {
        box-shadow: 0 4px 30px rgba(200, 16, 46, 0.4), 0 0 20px rgba(200, 16, 46, 0.2);
    }
}

.cta-card-badge {
    display: inline-block;
    background: var(--brit-red);
    color: white;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.75rem;
}

.cta-card-content {
    position: relative;
    z-index: 2;
}

.cta-card-title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.cta-card-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1rem;
    max-width: none;
}

.cta-card-text strong {
    color: var(--neon-yellow);
}

.cta-card-text em {
    color: var(--brit-red-bright);
    font-style: normal;
    font-weight: 600;
}

.cta-card-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brit-red-bright);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.cta-card:hover .cta-card-action {
    gap: 0.75rem;
    color: var(--neon-yellow);
}

.cta-card-glow {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(200, 16, 46, 0.3) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cta-card:hover .cta-card-glow {
    opacity: 1;
}

/* ============================================
   Dual CTA Grid — Two side-by-side CTAs
   ============================================ */
.dual-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.dual-cta-grid .cta-card-link {
    margin: 0;
}

/* Restore Britain variant styling */
.cta-card--restore {
    background: linear-gradient(
        135deg,
        rgba(37, 99, 235, 0.12) 0%,
        rgba(59, 130, 246, 0.08) 50%,
        rgba(37, 99, 235, 0.04) 100%
    );
    border-color: #2563eb;
}

.cta-card--restore:hover {
    border-color: #3b82f6;
    box-shadow: 
        0 12px 40px rgba(37, 99, 235, 0.35),
        0 0 0 1px rgba(37, 99, 235, 0.2);
}

.cta-card--restore .cta-card-badge {
    background: #2563eb;
}

.cta-card--restore .cta-card-action {
    color: #3b82f6;
}

.cta-card--restore:hover .cta-card-action {
    color: var(--neon-yellow);
}

.cta-card-glow--restore {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
}

/* Responsive: stack on smaller screens */
@media (max-width: 900px) {
    .dual-cta-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Mobile adjustments for CTA card */
@media (max-width: 600px) {
    .cta-card {
        padding: 1.25rem 1rem;
    }
    
    .cta-card-title {
        font-size: 1.1rem;
    }
    
    .cta-card-text {
        font-size: 0.875rem;
    }
}

/* Estimation Disclaimer */
.stat-asterisk {
    color: #f59e0b;
    font-size: 0.7em;
    vertical-align: super;
    margin-left: 3px;
    font-weight: 700;
}

.estimation-disclaimer {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-left: 4px solid #f59e0b;
}

.disclaimer-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
}

.disclaimer-marker {
    color: #f59e0b;
    font-weight: 700;
    font-size: 1rem;
}

.disclaimer-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

@media (max-width: 600px) {
    .estimation-disclaimer {
        padding: 1rem 1.25rem;
    }
    
    .disclaimer-text {
        font-size: 0.8rem;
    }
    
    .disclaimer-note {
        font-size: 0.75rem;
    }
}
