/**
 * PWS-989: Shared CSS for public pages
 * Used by: product.html, about.html, features.html, pricing.html, product_profile.html
 * 
 * This file consolidates ~200 lines of duplicated CSS from each public page template.
 */

/* ============================================================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================================================ */
:root {
    /* Primary brand colors */
    --pws-primary: #818cf8;
    --pws-primary-dark: #6366f1;
    --pws-primary-darker: #764ba2;
    
    /* Gradient definitions */
    --pws-gradient-primary: linear-gradient(135deg, #818cf8 0%, #6366f1 50%, #764ba2 100%);
    --pws-gradient-hero: linear-gradient(135deg, #818cf8 0%, #6366f1 50%, #764ba2 100%);
    --pws-gradient-bg: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #f0f9ff 100%);
    
    /* Profile-specific colors */
    --pws-family: #667eea;
    --pws-personal: #20c997;
    --pws-homeschool: #fd7e14;
    --pws-classroom: #32cd32;
    --pws-therapy: #e83e8c;
    --pws-sports: #ffa500;
    --pws-program: #764ba2;
    --pws-camp: #fd7e14;
    --pws-workplace: #ff69b4;
    
    /* Semantic colors */
    --pws-success: #28a745;
    --pws-warning: #ffc107;
    --pws-danger: #dc3545;
    --pws-info: #17a2b8;
    
    /* Text colors */
    --pws-text-primary: #333;
    --pws-text-secondary: #555;
    --pws-text-muted: #666;
    --pws-text-light: #999;
    
    /* Background colors */
    --pws-bg-card: rgba(255,255,255,0.85);
    --pws-bg-feature: rgba(245,243,255,0.6);
    --pws-bg-light: #f8f9fa;
    
    /* Spacing */
    --pws-container-max: 1200px;
    --pws-section-padding: 40px;
    --pws-section-padding-mobile: 20px;
    
    /* Border radius */
    --pws-radius-sm: 10px;
    --pws-radius-md: 14px;
    --pws-radius-lg: 20px;
    
    /* Shadows */
    --pws-shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --pws-shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --pws-shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
    --pws-shadow-hover: 0 8px 25px rgba(129,140,248,0.2);
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--pws-gradient-bg);
    min-height: 100vh;
}

/* ============================================================================
   NAVIGATION
   ============================================================================ */
.nav {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    box-shadow: var(--pws-shadow-sm);
    border-bottom: 1px solid rgba(255,255,255,0.6);
}

.nav-container {
    max-width: var(--pws-container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--pws-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--pws-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 4px;
    transition: color 0.2s;
}

.nav-link:hover {
    text-decoration: underline;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--pws-primary);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */
.hero {
    background: var(--pws-gradient-hero);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3em;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    margin-top: 15px;
}

/* ============================================================================
   CONTAINER & LAYOUT
   ============================================================================ */
.container {
    max-width: var(--pws-container-max);
    margin: 0 auto;
    padding: 40px 20px;
}

/* ============================================================================
   SECTIONS
   ============================================================================ */
.section {
    background: var(--pws-bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: var(--pws-radius-lg);
    padding: var(--pws-section-padding);
    margin-bottom: 30px;
    box-shadow: var(--pws-shadow-lg);
    scroll-margin-top: 20px;
}

.section:target {
    box-shadow: 0 0 0 3px var(--pws-primary), var(--pws-shadow-lg);
}

.section h2 {
    color: var(--pws-primary);
    font-size: 2em;
    margin-bottom: 20px;
}

.section h3 {
    color: var(--pws-text-primary);
    font-size: 1.5em;
    margin: 30px 0 15px 0;
}

.section p {
    color: var(--pws-text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.1em;
}

/* ============================================================================
   FEATURE GRID & CARDS
   ============================================================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.feature-card {
    background: var(--pws-bg-feature);
    padding: 25px;
    border-radius: var(--pws-radius-md);
    border-left: 4px solid var(--pws-primary);
    display: block;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-card h4 {
    color: var(--pws-primary);
    font-size: 1.3em;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--pws-text-muted);
    margin: 0;
    line-height: 1.6;
    font-size: 1em;
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

/* ============================================================================
   HIGHLIGHT BOX (CTA sections)
   ============================================================================ */
.highlight {
    background: var(--pws-gradient-primary);
    color: white;
    padding: 30px;
    border-radius: var(--pws-radius-lg);
    margin: 30px 0;
    text-align: center;
}

.highlight h3 {
    color: white;
    font-size: 2em;
    margin-bottom: 15px;
}

.highlight p {
    color: white;
    font-size: 1.2em;
    opacity: 0.95;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.cta-button {
    display: inline-block;
    background: var(--pws-gradient-primary);
    color: white;
    padding: 15px 40px;
    border-radius: var(--pws-radius-md);
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(129,140,248,0.3);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(129,140,248,0.4);
}

.cta-button-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.cta-button-outline:hover {
    background: white;
    color: var(--pws-primary);
}

.cta-button-white {
    background: white;
    color: var(--pws-primary);
}

.back-btn {
    display: inline-block;
    background: white;
    color: var(--pws-primary);
    padding: 10px 20px;
    border-radius: var(--pws-radius-md);
    text-decoration: none;
    margin-bottom: 30px;
    font-weight: 600;
    transition: background 0.2s;
}

.back-btn:hover {
    background: #f0f0f0;
}

/* ============================================================================
   JUMP LINKS / TABLE OF CONTENTS
   ============================================================================ */
.jump-links {
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: var(--pws-radius-md);
    margin-bottom: 30px;
}

.jump-links h3 {
    color: var(--pws-text-primary);
    margin-bottom: 15px;
    font-size: 1.1em;
}

.jump-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.jump-link {
    display: inline-block;
    background: #f5f3ff;
    color: var(--pws-primary);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s;
}

.jump-link:hover {
    background: var(--pws-primary);
    color: white;
}

/* ============================================================================
   USE CASE CARDS (Featured sections on product page)
   ============================================================================ */
.use-case-featured {
    padding: 35px;
    border-radius: var(--pws-radius-lg);
    color: white;
    position: relative;
    overflow: hidden;
}

.use-case-featured.family {
    background: linear-gradient(135deg, #818cf8 0%, #764ba2 100%);
}

.use-case-featured.personal {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
}

.use-case-featured.homeschool {
    background: linear-gradient(135deg, #fd7e14 0%, #e65100 100%);
}

.use-case-badge {
    position: absolute;
    top: 15px;
    right: 20px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
}

.use-case-badge.popular {
    background: #ffd700;
    color: #333;
}

.use-case-badge.trending {
    background: #ff6b6b;
    color: white;
}

.use-case-icon {
    font-size: 3.5em;
    margin-bottom: 15px;
}

.use-case-featured h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: white;
}

.use-case-featured p {
    font-size: 1.15em;
    opacity: 0.95;
    margin-bottom: 20px;
    line-height: 1.6;
    color: white;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.use-case-item {
    background: rgba(255,255,255,0.15);
    padding: 15px;
    border-radius: var(--pws-radius-md);
}

.use-case-tags {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.use-case-tag {
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: var(--pws-radius-md);
    font-size: 0.85em;
}

/* Compact use case cards */
.use-case-compact {
    background: var(--pws-bg-light);
    padding: 22px;
    border-radius: var(--pws-radius-md);
    border-left: 4px solid var(--pws-primary);
}

.use-case-compact h4 {
    margin-bottom: 10px;
    font-size: 1.15em;
}

.use-case-compact p {
    color: var(--pws-text-secondary);
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0;
}

/* ============================================================================
   FOOTER
   ============================================================================ */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--pws-text-light);
    font-size: 0.9em;
    background: var(--pws-bg-card);
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--pws-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-dark {
    background: #2c3e50;
    color: white;
}

.footer-dark .footer-link {
    color: white;
    opacity: 0.8;
}

.footer-dark .footer-link:hover {
    opacity: 1;
}

/* ============================================================================
   RESPONSIVE - TABLET (max-width: 768px)
   ============================================================================ */
@media (max-width: 768px) {
    .hero {
        padding: 40px 15px;
    }
    
    .hero h1 {
        font-size: 2em;
    }
    
    .hero p {
        font-size: 1.1em;
    }
    
    .section {
        padding: 25px 20px;
    }
    
    .section h2 {
        font-size: 1.6em;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-container {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .nav-links {
        gap: 12px;
        font-size: 0.9em;
    }
    
    .nav-link {
        padding: 8px 4px;
    }
    
    .container {
        padding: 25px 15px;
    }
    
    .cta-button {
        padding: 16px 30px;
        font-size: 1.1em;
        min-height: 48px;
    }
    
    .use-case-featured {
        padding: 25px 20px;
    }
    
    .use-case-featured h3 {
        font-size: 1.5em;
    }
    
    .use-case-icon {
        font-size: 2.5em;
    }
}

/* ============================================================================
   RESPONSIVE - MOBILE (max-width: 480px)
   ============================================================================ */
@media (max-width: 480px) {
    .nav {
        padding: 12px 15px;
    }
    
    .nav-container {
        justify-content: center;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .nav-link {
        padding: 10px 8px;
        font-size: 0.95em;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .hero {
        padding: 30px 15px;
    }
    
    .hero h1 {
        font-size: 1.6em;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 1em;
    }
    
    .section {
        padding: var(--pws-section-padding-mobile) 15px;
        margin-bottom: 20px;
    }
    
    .section h2 {
        font-size: 1.4em;
    }
    
    .section h3 {
        font-size: 1.2em;
    }
    
    .section p {
        font-size: 1em;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
    
    .feature-card h4 {
        font-size: 1.15em;
    }
    
    .feature-icon {
        font-size: 2em;
    }
    
    .highlight {
        padding: 20px 15px;
    }
    
    .highlight h3 {
        font-size: 1.5em;
    }
    
    .highlight p {
        font-size: 1.05em;
    }
    
    .cta-button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 18px 20px;
        font-size: 1.1em;
        min-height: 52px;
    }
    
    .cta-button + .cta-button {
        margin-left: 0;
        margin-top: 15px;
    }
    
    .footer {
        padding: 20px 15px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
    
    .jump-links-grid {
        gap: 8px;
    }
    
    .jump-link {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .use-case-featured {
        padding: 20px 15px;
    }
    
    .use-case-badge {
        position: static;
        display: inline-block;
        margin-bottom: 15px;
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */
/* Focus styles for keyboard navigation */
a:focus,
button:focus,
.cta-button:focus {
    outline: 3px solid var(--pws-primary);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .feature-card {
        border: 2px solid var(--pws-primary);
    }
    
    .section {
        border: 2px solid var(--pws-text-primary);
    }
}
