/**
 * SocialDataCharts Landing Page Styles
 * Uses the PugWorks Design System
 */

/* ============================================
   Landing Page Base
   ============================================ */
body.landing-page {
    margin: 0;
    padding: 0;
    margin-left: 0; /* No sidebar on landing page */
    background: var(--bg-primary);
}

/* Hide vertical sidebar on landing page */
body.landing-page .vertical-brand-sidebar {
    display: none;
}

/* ============================================
   Navigation
   ============================================ */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    padding: 16px 0;
    box-shadow: var(--shadow-md);
}

.landing-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 36px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #fff;
    text-decoration: none;
}

.btn-nav {
    padding: 10px 24px !important;
    font-size: 14px !important;
    background: #fff !important;
    color: var(--primary-color) !important;
    border: none !important;
}

.btn-nav:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--primary-color);
    padding: 20px;
    flex-direction: column;
    gap: 16px;
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.mobile-menu.show {
    display: flex;
}

.mobile-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    padding: 160px 0 100px;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    color: #fff;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-title .highlight {
    color: #FB923C;
}

.hero-subtitle {
    font-size: 20px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.hero-cta .btn-primary {
    background: #FB923C !important;
    border-color: #FB923C !important;
    color: #fff !important;
}

.hero-cta .btn-primary:hover {
    background: #EA580C !important;
    border-color: #EA580C !important;
}

.hero-cta .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
}

.hero-cta .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.hero-note {
    font-size: 14px;
    opacity: 0.7;
}

/* Dashboard Preview */
.hero-visual {
    display: flex;
    justify-content: center;
}

.dashboard-preview {
    background: var(--bg-elevated);
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    width: 100%;
    max-width: 480px;
}

.preview-header {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-dots {
    display: flex;
    gap: 6px;
}

.preview-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
}

.preview-dots span:first-child { background: #FF5F56; }
.preview-dots span:nth-child(2) { background: #FFBD2E; }
.preview-dots span:last-child { background: #27C93F; }

.preview-title {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 24px;
}

.preview-stat {
    text-align: center;
}

.preview-stat .stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.preview-stat .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.preview-chart {
    padding: 0 24px 24px;
}

.chart-svg {
    width: 100%;
    height: auto;
}

@media (max-width: 992px) {
    .hero-section .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-visual {
        order: 2;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-subtitle {
        max-width: none;
    }

    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 120px 0 60px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
    }
}

/* ============================================
   Features Section
   ============================================ */
.features-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.features-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--bg-elevated);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.feature-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 32px;
    color: #fff;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .features-section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Top Channels Section
   ============================================ */
.top-channels-section {
    padding: 100px 0;
    background: var(--bg-primary);
}

.top-channels-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.channels-table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    background: var(--bg-elevated);
    margin-bottom: 32px;
}

.channels-table {
    width: 100%;
    border-collapse: collapse;
}

.channels-table th,
.channels-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-default);
}

.channels-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.channels-table tbody tr:hover {
    background: var(--bg-secondary);
}

.channels-table tbody tr:last-child td {
    border-bottom: none;
}

.rank-col {
    width: 60px;
    text-align: center !important;
}

.channel-col {
    min-width: 250px;
}

.subscribers-col,
.views-col,
.videos-col {
    text-align: right !important;
    width: 130px;
}

.action-col {
    width: 100px;
    text-align: center !important;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #fff;
}

.rank-badge.silver {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    color: #fff;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
    color: #fff;
}

.rank-badge.default {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.channel-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.channel-name {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.channel-handle {
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.btn-track {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
}

.loading-row {
    text-align: center;
    padding: 40px !important;
    color: var(--text-secondary);
}

.channels-cta {
    text-align: center;
}

@media (max-width: 768px) {
    .top-channels-section {
        padding: 60px 0;
    }

    .subscribers-col,
    .views-col,
    .videos-col {
        display: none;
    }

    .channels-table th,
    .channels-table td {
        padding: 12px 16px;
    }
}

/* ============================================
   Pricing Section
   ============================================ */
.pricing-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.pricing-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Billing Period Toggle */
.billing-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    background: var(--bg-tertiary);
    padding: 6px;
    border-radius: 12px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.billing-option {
    padding: 12px 24px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.billing-option:hover {
    color: var(--text-primary);
}

.billing-option.active {
    background: var(--bg-elevated);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.discount-badge {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.billing-note {
    font-size: 12px;
    color: var(--text-secondary);
    min-height: 18px;
    margin-bottom: 8px;
}

.billing-note.show {
    color: #16a34a;
    font-weight: 500;
}

@media (max-width: 576px) {
    .billing-toggle {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
    }

    .billing-option {
        justify-content: center;
    }
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    align-items: start;
}

.pricing-grid.pricing-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.pricing-grid.pricing-grid-4 .pricing-card {
    padding: 32px 24px;
}

.pricing-grid.pricing-grid-4 .plan-name {
    font-size: 20px;
}

.pricing-grid.pricing-grid-4 .plan-price .amount {
    font-size: 44px;
}

.pricing-grid.pricing-grid-4 .plan-features li {
    font-size: 14px;
    padding: 8px 0;
}

.pricing-card {
    background: var(--bg-elevated);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: all 0.3s ease;
}

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

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #fff;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.popular-badge.educator-badge {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.pricing-card.educator {
    border: 2px solid #16a34a;
}

.plan-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    min-height: 36px;
}

.plan-name {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.plan-price {
    margin-bottom: 32px;
}

.plan-price .currency {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-secondary);
    vertical-align: top;
}

.plan-price .amount {
    font-size: 56px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.plan-price .period {
    font-size: 16px;
    color: var(--text-secondary);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    text-align: left;
}

.plan-features li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 15px;
    border-bottom: 1px solid var(--border-subtle);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li i {
    color: var(--success-text);
    font-size: 18px;
}

.btn-block {
    width: 100%;
}

@media (max-width: 1200px) {
    .pricing-grid.pricing-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        margin: 0 auto;
    }

    .pricing-card.featured {
        transform: none;
    }

    .pricing-card.featured:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 992px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .pricing-grid.pricing-grid-4 {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .pricing-card.featured {
        transform: none;
        order: -1;
    }

    .pricing-card.featured:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 576px) {
    .pricing-section {
        padding: 60px 0;
    }

    .pricing-card {
        padding: 32px 24px;
    }

    .plan-price .amount {
        font-size: 48px;
    }
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    padding: 80px 0;
    text-align: center;
    color: #fff;
}

.cta-section .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.cta-section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}

.cta-section p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    color: #fff;
}

.cta-section .btn-primary {
    background: #FB923C !important;
    border-color: #FB923C !important;
}

.cta-section .btn-primary:hover {
    background: #EA580C !important;
    border-color: #EA580C !important;
}

@media (max-width: 576px) {
    .cta-section {
        padding: 60px 0;
    }

    .cta-section h2 {
        font-size: 28px;
    }
}

/* ============================================
   Footer
   ============================================ */
.landing-footer {
    background: var(--bg-tertiary);
    padding: 60px 0 24px;
    color: var(--text-primary);
}

.landing-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-default);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    height: 32px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-brand {
        max-width: none;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: repeat(3, 1fr);
        text-align: center;
    }
}

@media (max-width: 576px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ============================================
   Dark Mode Overrides for Landing
   ============================================ */
[data-theme="dark"] .dashboard-preview,
.dark-mode .dashboard-preview {
    background: var(--bg-elevated);
}

[data-theme="dark"] .preview-header,
.dark-mode .preview-header {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .channels-table-wrapper,
.dark-mode .channels-table-wrapper {
    background: var(--bg-elevated);
}

[data-theme="dark"] .pricing-card,
.dark-mode .pricing-card {
    background: var(--bg-elevated);
}

[data-theme="dark"] .feature-card,
.dark-mode .feature-card {
    background: var(--bg-elevated);
}
