/**
 * Waterford Chamber of Commerce - Membership Styles
 * SEO-Optimized for 2025: Mobile-first, fast loading, accessible
 * Colors: #3EA2BE (primary), #8DB63F (secondary)
 * Font: Manrope (Google Fonts)
 */

/* ===================================
   MEMBERSHIP PAGE SPECIFIC STYLES
   =================================== */

/* Page Header Section */
.page-header {
    background: linear-gradient(135deg, #3EA2BE 0%, #2c8ba3 100%);
    color: white;
    padding: 4rem 0 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.page-header-content {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-header p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 0;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Membership Section */
.membership-section {
    padding: 3rem 0;
    background: #f8fafb;
}

/* Nonprofit Toggle */
.nonprofit-toggle-container {
    max-width: 500px;
    margin: 0 auto 3rem;
    text-align: center;
    padding: 0 1rem;
}

.nonprofit-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    margin-bottom: 1rem;
}

.nonprofit-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 26px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nonprofit-toggle input:checked + .toggle-slider {
    background: #8DB63F;
}

.nonprofit-toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.nonprofit-toggle input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(139, 182, 63, 0.3);
}

.nonprofit-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #856404;
    text-align: left;
}

.nonprofit-disclaimer i {
    margin-top: 0.1rem;
    flex-shrink: 0;
}

/* Membership Grid */
.membership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Membership Cards */
.membership-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

.membership-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3EA2BE, #8DB63F);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.membership-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.membership-card:hover::before {
    transform: scaleX(1);
}

.membership-card.selected {
    border-color: #3EA2BE;
    box-shadow: 0 8px 32px rgba(62, 162, 190, 0.2);
    transform: translateY(-4px);
}

.membership-card.selected::before {
    transform: scaleX(1);
}

/* Popular Badge */
.card-badge {
    position: absolute;
    top: -1px;
    right: 20px;
    background: linear-gradient(135deg, #8DB63F, #7ba035);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 0 12px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sponsor Card Styling */
.card-sponsor {
    background: linear-gradient(135deg, rgba(62, 162, 190, 0.03), rgba(139, 182, 63, 0.03));
    border-color: rgba(62, 162, 190, 0.2);
}

.card-sponsor .card-header {
    background: linear-gradient(135deg, rgba(62, 162, 190, 0.1), rgba(139, 182, 63, 0.1));
    margin: -2rem -2rem 1.5rem -2rem;
    padding: 2rem 2rem 1.5rem 2rem;
    border-radius: 16px 16px 0 0;
}

/* Card Header */
.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3EA2BE, #2c8ba3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 4px 12px rgba(62, 162, 190, 0.3);
}

/* Sponsor Icon Variations */
.sponsor-icon.bronze-sponsor {
    background: linear-gradient(135deg, #cd7f32, #b8691c);
}

.sponsor-icon.silver-sponsor {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
}

.sponsor-icon.gold-sponsor {
    background: linear-gradient(135deg, #ffd700, #ffcc00);
}

.sponsor-icon.presidents-circle {
    background: linear-gradient(135deg, #9932cc, #7b68ee);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.price-currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: #3EA2BE;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1;
}

.price-period {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

/* Card Body */
.card-body {
    flex: 1;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #333;
}

.benefits-list li i {
    color: #8DB63F;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Card Footer */
.card-footer {
    margin-top: 2rem;
    text-align: center;
}

.card-selector {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: white;
}

.card-selector i {
    font-size: 0.8rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.membership-card.selected .card-selector {
    background: #3EA2BE;
    border-color: #3EA2BE;
}

.membership-card.selected .card-selector i {
    opacity: 1;
}

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e1e5e9;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sticky-cta.visible {
    transform: translateY(0);
}

.cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.cta-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #1a1a1a;
}

.cta-text p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #3EA2BE, #2c8ba3);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 200px;
    justify-content: center;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2c8ba3, #236b7a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(62, 162, 190, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Benefits Comparison Section */
.benefits-comparison {
    padding: 4rem 0;
    background: white;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.comparison-table-wrapper {
    overflow-x: auto;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.comparison-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #f1f3f4;
}

.comparison-table th {
    background: #f8fafb;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
}

.comparison-table th.sponsor-column {
    background: linear-gradient(135deg, rgba(62, 162, 190, 0.1), rgba(139, 182, 63, 0.1));
}

.comparison-table td.benefit-name {
    text-align: left;
    font-weight: 500;
    background: #fafbfc;
    min-width: 200px;
}

.comparison-table i {
    font-size: 1.2rem;
}

.text-success {
    color: #8DB63F;
}

.text-warning {
    color: #ffc107;
}

.text-muted {
    color: #999;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 0.6s ease forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.4s ease forwards;
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    .page-header {
        padding: 3rem 0 1.5rem;
    }
    
    .membership-section {
        padding: 2rem 0;
    }
    
    .membership-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .membership-card {
        padding: 1.5rem;
    }
    
    .card-sponsor .card-header {
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .cta-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cta-text {
        order: 2;
    }
    
    .btn-primary {
        order: 1;
        width: 100%;
        max-width: 300px;
    }
    
    .benefits-comparison {
        padding: 3rem 0;
    }
    
    .nonprofit-toggle {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .nonprofit-disclaimer {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .membership-card {
        padding: 1.25rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    .sticky-cta {
        padding: 0.75rem 0;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .membership-card {
        border-color: #000;
    }
    
    .card-selector {
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .membership-card {
        transform: none !important;
    }
}

/* Print styles */
@media print {
    .sticky-cta,
    .nonprofit-toggle-container {
        display: none;
    }
    
    .membership-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .page-header {
        background: none;
        color: #000;
    }
}

.membership-card .benefits-list li::before {
    content: none;
}