/* SportsCal League Pages - Shared Styles
 * Extracted for browser caching & improved Core Web Vitals
 * Version: 1.0 - January 2026
 */

/* CSS Variables */
:root {
    --primary: hsl(142, 71%, 45%);
    --primary-foreground: hsl(0, 0%, 100%);
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(0, 0%, 0%);
    --muted: hsl(0, 0%, 96%);
    --muted-foreground: hsl(0, 0%, 45%);
    --border-width: 2px;
    --border-width-thick: 3px;
    --border-color: #000000;
    --shadow-sm: 3px 3px 0px var(--border-color);
    --shadow-md: 4px 4px 0px var(--border-color);
    --shadow-lg: 5px 5px 0px var(--border-color);
    --hover-translate: translate(-2px, -2px);
    --hover-shadow: 6px 6px 0px var(--border-color);
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-overflow-scrolling: touch; }
body { font-family: 'Inter', sans-serif; line-height: 1.6; color: var(--foreground); background: var(--background); overflow-x: hidden; }

/* Header */
.header {
    background: #fff;
    border-bottom: var(--border-width-thick) solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #000;
    font-weight: 900;
    font-size: 1.5rem;
}
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav a:hover {
    color: var(--primary);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: #000;
    padding: 0.6rem 1.25rem;
    border: 2px solid #000;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 3px 3px 0 #000;
    transition: all 0.15s;
}
.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #000;
}
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: var(--border-width-thick) solid var(--border-color);
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    width: 100%;
    text-align: center;
}
.btn:hover { transform: var(--hover-translate); box-shadow: var(--hover-shadow); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-secondary { background: var(--background); color: var(--foreground); }

/* Layout */
.container { max-width: 900px; margin: 0 auto; padding: 0 2rem; }

/* Hero Section */
.league-hero {
    padding: 3rem 0 2rem;
    text-align: center;
}
.league-logo-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border: var(--border-width-thick) solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 1rem;
    box-shadow: var(--shadow-md);
}
.league-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.league-title { font-size: 2.5rem; font-weight: 900; margin-bottom: 0.5rem; }
.league-subtitle { font-size: 1.125rem; color: var(--muted-foreground); margin-bottom: 2rem; }

/* CTA Cards */
.cta-card {
    background: var(--muted);
    border: var(--border-width-thick) solid var(--border-color);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}
.cta-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; }

/* Preview Games */
.preview-section { margin: 3rem 0; }
.section-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 1.5rem; text-align: center; }
.game-card {
    background: white;
    border: var(--border-width) solid var(--border-color);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.game-teams { flex: 1; }
.game-team { font-weight: 700; font-size: 1rem; }
.game-date { font-size: 0.875rem; color: var(--muted-foreground); text-align: right; }
.blur-overlay {
    position: relative;
    filter: blur(4px);
    opacity: 0.6;
    pointer-events: none;
}
.unlock-banner {
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 1.5rem;
    text-align: center;
    border: var(--border-width-thick) solid var(--border-color);
    box-shadow: var(--shadow-md);
    margin: -1rem 0 2rem;
}

/* Benefits */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.benefit-card {
    background: #f0fdf4;
    border: var(--border-width) solid #22c55e;
    padding: 1.25rem;
    text-align: center;
}
.benefit-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.benefit-text { font-size: 0.875rem; font-weight: 600; color: #166534; }

/* Schedule Type Toggle */
.schedule-toggle {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.5rem;
    border: var(--border-width-thick) solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.schedule-toggle-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--background);
    border: none;
    border-right: var(--border-width) solid var(--border-color);
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--foreground);
    position: relative;
}
.schedule-toggle-btn:last-child { border-right: none; }
.schedule-toggle-btn:hover:not(.disabled) { background: var(--muted); }
.schedule-toggle-btn.active { background: var(--primary); color: var(--primary-foreground); }
.schedule-toggle-btn.disabled { opacity: 0.5; cursor: not-allowed; background: #f5f5f5; color: #999; }
.schedule-toggle-btn.disabled:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 4px;
    margin-bottom: 8px;
    z-index: 100;
}
.schedule-toggle-btn.disabled:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    margin-bottom: -4px;
    z-index: 100;
}
.schedule-type-label {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* League About Section */
.league-about {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: var(--border-width-thick) solid var(--border-color);
    padding: 2.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}
.league-about h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 1rem; }
.league-about p { font-size: 1.1rem; line-height: 1.8; color: #374151; margin-bottom: 1rem; }
.league-about p:last-child { margin-bottom: 0; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}
.stat-card {
    background: white;
    border: var(--border-width-thick) solid var(--border-color);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.stat-number { font-size: 2rem; font-weight: 900; color: var(--primary); display: block; }
.stat-label { font-size: 0.85rem; color: var(--muted-foreground); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Why Subscribe Section */
.why-subscribe {
    background: #fefce8;
    border: var(--border-width-thick) solid var(--border-color);
    padding: 2.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}
.why-subscribe h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 1.5rem; }
.reason-list { display: grid; gap: 1rem; }
.reason-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem; background: white; border: 2px solid #000; }
.reason-icon { font-size: 1.5rem; flex-shrink: 0; }
.reason-text h4 { font-weight: 700; margin-bottom: 0.25rem; }
.reason-text p { font-size: 0.95rem; color: #4b5563; margin: 0; }

/* FAQ Section */
.faq-section { margin: 3rem 0; }
.faq-item {
    background: white;
    border: var(--border-width-thick) solid var(--border-color);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}
.faq-question {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question:hover { background: #f9fafb; }
.faq-answer {
    padding: 0 1.25rem 1.25rem;
    color: #4b5563;
    line-height: 1.7;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

/* FAQ Accordion */
.faq-accordion-item.open .faq-accordion-content { max-height: 200px; }
.faq-accordion-item.open .faq-icon { transform: rotate(45deg); }
.faq-accordion-toggle:hover { background: #f9fafb !important; }

/* Final CTA */
.final-cta {
    background: var(--primary);
    border: var(--border-width-thick) solid var(--border-color);
    padding: 3rem 2rem;
    text-align: center;
    margin: 3rem 0;
    box-shadow: var(--shadow-lg);
}
.final-cta h2 { font-size: 2rem; font-weight: 900; margin-bottom: 1rem; }
.final-cta p { font-size: 1.1rem; margin-bottom: 1.5rem; opacity: 0.9; }
.final-cta .btn { background: #000; color: #fff; max-width: 400px; margin: 0 auto; }

/* SEO Content Styles */
.seo-section { background: var(--background); padding: 3rem 0; margin-top: 2rem; }
.seo-content h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 1.5rem; }
.seo-content h3 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 1rem; }
.seo-content p { color: var(--muted-foreground); margin-bottom: 1rem; line-height: 1.7; }
.seo-content ul { margin: 1rem 0 1.5rem 1.5rem; color: var(--muted-foreground); }
.seo-content li { margin-bottom: 0.5rem; }
.faq-q { font-weight: 700; font-size: 1rem; margin-bottom: 0.5rem; cursor: pointer; }
.faq-a { color: var(--muted-foreground); font-size: 0.9375rem; line-height: 1.6; }
.team-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}
.team-link {
    background: white;
    border: 1px solid #e5e5e5;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--foreground);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
}
.team-link:hover { background: var(--primary); color: white; border-color: var(--primary); }
.related-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.related-link {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    border: var(--border-width) solid var(--border-color);
}

/* Payment Success Modal Animation */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-number { font-size: 1.5rem; }
    
    /* Hide desktop nav on mobile */
    .nav { display: none !important; }
    .header-content { padding: 0 1rem; justify-content: space-between; align-items: center; }
    .logo { font-size: 1.25rem; gap: 0.5rem; }
    .logo-icon { width: 32px; height: 32px; }
    .container { padding: 0 1rem; }
    
    /* Hero Section */
    .league-hero { padding: 2rem 0 1.5rem; }
    .league-logo-container { width: 80px; height: 80px; margin: 0 auto 1rem; }
    .league-title { font-size: 2rem; line-height: 1.2; margin-bottom: 0.75rem; }
    .league-subtitle { font-size: 1rem; margin-bottom: 1.5rem; }
    
    /* CTA Cards */
    .cta-card { padding: 1.5rem 1rem; margin: 1.5rem 0; }
    .cta-title { font-size: 1.25rem; margin-bottom: 0.75rem; }
    .btn { font-size: 1rem; padding: 0.875rem 1.5rem; }
    .btn-primary[onclick*="subscribeToCalendar"] { font-size: 1.125rem !important; padding: 1rem 1.5rem !important; }
    
    /* Game Preview */
    .section-title { font-size: 1.5rem; margin-bottom: 1.25rem; }
    .game-card { flex-direction: column; text-align: center; padding: 1rem; gap: 0.75rem; }
    .game-team { font-size: 0.9375rem; }
    .game-date { text-align: center; font-size: 0.875rem; }
    
    /* Benefits Grid */
    .benefits-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .benefit-card { padding: 1rem; }
    .benefit-icon { font-size: 1.75rem; }
    .benefit-text { font-size: 0.8125rem; }
    
    /* Unlock Banner */
    .unlock-banner { padding: 1.25rem 1rem; font-size: 0.9375rem; }
    
    /* Details/Dropdown */
    details summary { font-size: 0.8125rem !important; padding: 0.75rem 0.5rem !important; }
    details > div { padding: 0.875rem !important; }
    details p { font-size: 0.75rem !important; }
    
    /* SEO Section */
    .seo-section { padding: 2rem 0; }
    .seo-content h2 { font-size: 1.5rem; }
    .team-links { grid-template-columns: repeat(2, 1fr); }
}

/* Small Mobile */
@media (max-width: 480px) {
    .header-content { padding: 0 0.75rem; }
    .logo { font-size: 1.125rem; }
    .logo-icon { width: 28px; height: 28px; }
    .container { padding: 0 0.75rem; }
    
    .league-hero { padding: 1.5rem 0 1rem; }
    .league-logo-container { width: 70px; height: 70px; }
    .league-title { font-size: 1.75rem; }
    .league-subtitle { font-size: 0.9375rem; }
    
    .cta-card { padding: 1.25rem 0.75rem; }
    .cta-title { font-size: 1.125rem; }
    .section-title { font-size: 1.25rem; }
    .game-card { padding: 0.875rem; }
    .benefits-grid { grid-template-columns: 1fr; }
    .benefit-card { padding: 0.875rem; }
}

/* Touch-Friendly */
@media (max-width: 768px) and (pointer: coarse) {
    .btn { min-height: 44px; padding: 0.875rem 1.5rem; }
    details summary { min-height: 44px; display: flex; align-items: center; justify-content: center; }
    .game-card { min-height: 100px; }
}
