/* Madison Events - Clean, modern event calendar */

:root {
    --primary: #c41e3a;
    --primary-dark: #9a1830;
    --secondary: #1a1a2e;
    --bg: #fafafa;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-muted: #666;
    --border: #e0e0e0;
    --dot-isthmus: #e74c3c;
    --dot-overture: #3498db;
    --dot-uw-madison: #c5050c;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* Header */
.site-header {
    background: var(--secondary);
    color: white;
    padding: 0;
}
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 0;
}
.site-header h1 { font-size: 28px; font-weight: 800; }
.site-header h1 a { color: white; }
.site-header h1 a:hover { color: #ddd; }
.tagline { color: #aaa; margin: 4px 0 16px; font-size: 14px; }
.main-nav {
    display: flex;
    gap: 0;
    border-bottom: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.main-nav a {
    color: #ccc;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
    color: white;
    border-bottom-color: var(--primary);
}

/* Ad slots */
.ad-slot {
    text-align: center;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    border-radius: var(--radius);
    padding: 12px;
    margin: 12px 0;
}
.ad-header {
    background: #2a2a3e;
    border-color: #444;
    margin: 0;
    padding: 8px;
    border-radius: 0;
}
.ad-header .ad-label { color: #888; }
.ad-header .ad-placeholder { color: #666; }
.ad-label { font-size: 10px; text-transform: uppercase; color: #999; letter-spacing: 1px; }
.ad-placeholder { color: #aaa; font-size: 13px; padding: 8px; }
.ad-in-feed { margin: 16px 0; }

/* Page layout */
.page-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* Filter bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.filter-btn, .view-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover, .view-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active, .view-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Stats bar */
.stats-bar {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.stats-bar span { display: flex; align-items: center; gap: 4px; }

/* Date section */
.date-header {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    padding: 16px 0 8px;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 12px;
}

/* Event cards */
.event-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    position: relative;
}
.event-card:hover { box-shadow: var(--shadow-hover); }
.event-content {
    display: flex;
    padding: 16px;
    gap: 16px;
}
.event-info { flex: 1; }
.event-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.event-title a { color: var(--text); }
.event-title a:hover { color: var(--primary); }
.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.event-time::before { content: ""; }
.event-venue::before { content: ""; }
.event-source {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.badge-isthmus { background: #fde8eb; color: var(--dot-isthmus); }
.badge-overture { background: #e8f4fd; color: var(--dot-overture); }
.badge-uw_madison { background: #fde8e8; color: var(--dot-uw-madison); }
.badge-eventbrite { background: #fde8e3; color: #f05537; }
.badge-city_madison { background: #e3fde8; color: #27ae60; }
.badge-patch { background: #fdf3e3; color: #e67e22; }
.event-category {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #f0f0f0;
    color: #555;
}
.event-description { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.event-price {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}
.event-image {
    width: 120px;
    min-height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}
.event-image img { width: 100%; height: 100%; object-fit: cover; }
.featured-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 0 var(--radius) 0 var(--radius);
}

/* Calendar view */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.calendar-day {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    min-height: 120px;
}
.calendar-day-header { font-size: 20px; font-weight: 700; }
.calendar-day-name { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.calendar-event {
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.calendar-more { font-size: 11px; color: var(--primary); margin-top: 4px; font-weight: 600; }

/* Dots */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.dot-isthmus { background: var(--dot-isthmus); }
.dot-overture { background: var(--dot-overture); }
.dot-uw_madison { background: var(--dot-uw-madison); }
.dot-eventbrite { background: #f05537; }
.dot-city_madison { background: #2ecc71; }
.dot-patch { background: #f39c12; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.sidebar-widget h3 { font-size: 16px; margin-bottom: 10px; }
.sidebar-widget p { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }

/* Newsletter form */
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-form input[type="email"] {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}
.newsletter-form button, .newsletter-form-large button {
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.newsletter-form button:hover, .newsletter-form-large button:hover { background: var(--primary-dark); }
.newsletter-form-large {
    display: flex;
    gap: 8px;
    max-width: 500px;
    margin: 20px auto 0;
}
.newsletter-form-large input[type="email"] {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
}

/* Inline newsletter CTA */
.newsletter-inline-cta {
    background: linear-gradient(135deg, var(--secondary), #2a2a4e);
    color: white;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin: 16px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.newsletter-inline-cta a {
    color: white;
    background: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}
.newsletter-inline-cta a:hover { background: var(--primary-dark); }

/* Sponsors */
.sponsor-cta { font-size: 13px; }
.sponsor-placeholder {
    text-align: center;
    padding: 20px;
    border: 1px dashed var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
}
.source-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }

/* Sponsor page */
.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}
.sponsor-hero, .newsletter-hero {
    text-align: center;
    margin-bottom: 40px;
}
.sponsor-hero h2, .newsletter-hero h2 { font-size: 28px; margin-bottom: 12px; }
.sponsor-hero p, .newsletter-hero p { font-size: 16px; color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.tier-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 24px;
    text-align: center;
    border-top: 4px solid var(--border);
}
.tier-presenting { border-top-color: gold; }
.tier-supporting { border-top-color: silver; }
.tier-community { border-top-color: #cd7f32; }
.tier-card h3 { font-size: 20px; margin-bottom: 8px; }
.tier-price { font-size: 32px; font-weight: 800; color: var(--primary); margin: 12px 0; }
.tier-perks { list-style: none; margin: 16px 0; text-align: left; }
.tier-perks li { padding: 6px 0; font-size: 14px; border-bottom: 1px solid #f0f0f0; }
.tier-perks li::before { content: "\2713  "; color: var(--primary); font-weight: bold; }
.tier-cta {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}
.tier-cta:hover { background: var(--primary-dark); color: white; }
.stats-grid, .ad-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.stat-card, .ad-option-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    text-align: center;
}
.stat-number { font-size: 32px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.ad-option-card h3 { font-size: 16px; margin-bottom: 8px; }
.ad-option-card p { font-size: 14px; color: var(--text-muted); margin: 4px 0; }

/* Newsletter preview */
.newsletter-preview { margin-top: 40px; }
.newsletter-preview h2 { text-align: center; margin-bottom: 20px; }
.newsletter-preview-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
}

/* Footer */
.site-footer {
    background: var(--secondary);
    color: #ccc;
    margin-top: 40px;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}
.footer-col h4 { color: white; margin-bottom: 10px; }
.footer-col p { font-size: 14px; line-height: 1.6; }
.footer-col a { color: var(--primary); }
.footer-subscribe {
    text-align: center;
    padding: 12px 20px 0;
    font-size: 14px;
}
.footer-subscribe a {
    color: var(--primary);
    text-decoration: none;
}
.footer-subscribe a:hover { text-decoration: underline; }
.footer-sep { color: #555; margin: 0 8px; }
.footer-bottom {
    text-align: center;
    padding: 16px 20px;
    border-top: 1px solid #333;
    font-size: 12px;
}

/* Beehiiv newsletter embed */
.beehiiv-wrapper {
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
}
.beehiiv-wrapper iframe {
    width: 100% !important;
    max-width: 100%;
    min-height: 320px;
    height: 320px;
    border: none;
    background: transparent;
    display: block;
}
.beehiiv-fallback {
    text-align: center;
    margin-top: 8px;
    font-size: 13px;
    opacity: 0.7;
}
.beehiiv-fallback a { font-weight: 600; }
.sidebar-widget .beehiiv-wrapper { max-width: 100%; }

/* Find Your People section */
.find-your-people {
    margin-bottom: 32px;
    padding: 24px;
    background: #f0f4ff;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}
.fyp-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}
.fyp-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}
.fyp-see-all {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
}
.fyp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.fyp-card {
    background: white;
    border-radius: 8px;
    padding: 14px 16px;
    border: 1px solid #e8ecf0;
}
.fyp-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.fyp-card-link:hover h3 { color: var(--primary); }
.fyp-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.4;
}
.fyp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.fyp-meta span::after { content: " ·"; }
.fyp-meta span:last-child::after { content: ""; }
.fyp-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .event-content { flex-direction: column; }
    .event-image { width: 100%; height: 160px; }
    .calendar-grid { grid-template-columns: repeat(2, 1fr); }
    .main-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .newsletter-form-large { flex-direction: column; }
}
