/**
 * Registration Section CSS
 * Styles for the registration form section
 * 
 * @author Gli Amici di Colombo
 * @version 2.0.0
 */

/* =================================
   SECTION CONTAINER
================================= */

.registration-section {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
}

.registration-section:last-child {
    margin-bottom: 0;
}

/* =================================
   SECTION HEADER
================================= */

.section-header {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--color-primary-100);
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.section-subtitle {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
}

/* =================================
   SECTION CONTENT
================================= */

/* =================================
   ENHANCED RACE OPTIONS
================================= */

/* Race Types Section */
.race-types-section {
    background: var(--color-surface-variant);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    border: 2px solid var(--color-primary-light);
}

.race-types-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
}

.race-types-title i {
    color: var(--color-primary);
    margin-right: var(--spacing-sm);
}

/* Race Options Container */
.race-options {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: 1fr 1fr;
}

/* Individual Race Option */
.race-option {
    background: white;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.race-option:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* =================================
   CLICKABLE RACE CARDS STYLING
================================= */

/* Clickable race cards in registration section - consistent with hero section */
.registration-section .clickable-race-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.registration-section .clickable-race-card::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.registration-section .clickable-race-card::after {
    content: '→';
    color: white;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
}

.registration-section .clickable-race-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.registration-section .clickable-race-card:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.registration-section .clickable-race-card:active {
    transform: scale(0.98) translateY(-2px);
    transition: transform 0.1s ease;
}

/* Add subtle pulse animation for better UX feedback */
@keyframes pulse-click-registration {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.registration-section .clickable-race-card:active {
    animation: pulse-click-registration 0.2s ease;
}

/* Make the arrow more visible for different race card backgrounds */
.registration-section .competitive-race.clickable-race-card::after {
    background: rgba(245, 158, 11, 0.3); /* Orange background for 10km cards */
    color: white;
}

.registration-section .family-race.clickable-race-card::after {
    background: rgba(16, 185, 129, 0.3); /* Green background for 5km cards */
    color: white;
}

/* For modular pricing tiers */
.registration-section .race-card.clickable-race-card::after {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.race-option.competitive-race {
    border-left: 4px solid #ff6b35;
}

.race-option.family-race {
    border-left: 4px solid #4caf50;
}

/* Race Icon */
.race-option .race-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
    color: white;
}

.competitive-race .race-icon {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.family-race .race-icon {
    background: linear-gradient(135deg, #4caf50, #8bc34a);
}

/* Race Content */
.race-content {
    flex: 1;
}

.race-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.race-name {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    line-height: 1.2;
}

.race-badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.race-badge.competitive {
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.race-badge.family {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.race-details {
    margin-bottom: var(--spacing-md);
}

.race-description {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.race-features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}

.race-features i {
    width: 16px;
    margin-right: var(--spacing-xs);
    color: var(--color-primary);
}

.race-price {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
}

/* Race Selection Note */
.race-selection-note {
    background: var(--color-info-surface);
    border: 1px solid var(--color-info);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    margin-top: var(--spacing-lg);
    display: flex;
    align-items: center;
    font-size: var(--font-size-sm);
    color: var(--color-info-dark);
}

.race-selection-note i {
    color: var(--color-info);
    margin-right: var(--spacing-sm);
}

/* =================================
   RESPONSIVE DESIGN
================================= */

@media (max-width: 768px) {
    .race-options {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .race-option {
        padding: var(--spacing-md);
    }
    
    .race-option .race-icon {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-md);
        margin-bottom: var(--spacing-sm);
    }
    
    .race-name {
        font-size: var(--font-size-md);
    }
    
    .race-price {
        position: static;
        margin-top: var(--spacing-sm);
        font-size: var(--font-size-lg);
    }
    
    .race-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .race-features {
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .race-types-section {
        padding: var(--spacing-md);
        margin-top: var(--spacing-md);
    }
    
    .race-option {
        padding: var(--spacing-sm);
    }
    
    .race-option .race-icon {
        width: 36px;
        height: 36px;
        font-size: var(--font-size-sm);
    }
    
    .race-name {
        font-size: var(--font-size-sm);
    }
    
    .race-description {
        font-size: var(--font-size-xs);
    }
    
    .race-features {
        font-size: 10px;
    }
    
    .race-selection-note {
        padding: var(--spacing-sm);
        font-size: var(--font-size-xs);
    }
}

.section-content {
    display: grid;
    gap: var(--space-6);
}

/* Field groups */
.field-group {
    display: grid;
    gap: var(--space-4);
}

.field-group--columns {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.field-group--full {
    grid-column: 1 / -1;
}

/* Field layout */
.field-row {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
}

.field-col {
    flex: 1;
}

.field-col--auto {
    flex: 0 0 auto;
}

/* Field hints */
.field-hint {
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
    margin-top: var(--space-1);
}

/* Required fields */
.required-hint {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.required-hint::before {
    content: '*';
    color: var(--color-error);
    margin-right: var(--space-1);
}

/* =================================
   SECTION FOOTER
================================= */

.section-footer {
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-footer--center {
    justify-content: center;
}

.section-footer--end {
    justify-content: flex-end;
}

/* Navigation buttons */
.section-nav {
    display: flex;
    gap: var(--space-4);
}

.section-nav .btn {
    min-width: 120px;
}

/* Progress indicator */
.section-progress {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--color-primary);
    transition: width var(--animation-duration-normal) var(--animation-easing-ease-out);
}

.progress-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    white-space: nowrap;
}

/* =================================
   VALIDATION STATES
================================= */

/* Valid section */
.registration-section.is-valid {
    border-left: 4px solid var(--color-success);
}

.registration-section.is-valid .section-header {
    color: var(--color-success);
}

/* Invalid section */
.registration-section.is-invalid {
    border-left: 4px solid var(--color-error);
}

.registration-section.is-invalid .section-header {
    color: var(--color-error);
}

/* Section error message */
.section-error {
    background: var(--color-error-light);
    color: var(--color-error);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.section-error i {
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

/* =================================
   ANIMATIONS
================================= */

@keyframes sectionSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.registration-section {
    animation: sectionSlideDown var(--animation-duration-normal) var(--animation-easing-ease-out);
}

/* =================================
   RESPONSIVE DESIGN
================================= */

@media (max-width: 768px) {
    .registration-section {
        padding: var(--space-4);
    }

    .section-header {
        margin-bottom: var(--space-4);
        padding-bottom: var(--space-3);
    }

    .section-title {
        font-size: var(--font-size-xl);
    }

    .field-group--columns {
        grid-template-columns: 1fr;
    }

    .field-row {
        flex-direction: column;
        gap: var(--space-3);
    }

    .section-footer {
        flex-direction: column-reverse;
        gap: var(--space-4);
    }

    .section-nav {
        width: 100%;
    }

    .section-nav .btn {
        flex: 1;
    }
}

/* =================================
   ACCESSIBILITY
================================= */

@media (prefers-reduced-motion: reduce) {
    .registration-section {
        animation: none;
    }

    .progress-fill {
        transition: none;
    }
}

@media (prefers-contrast: high) {
    .registration-section {
        border: 2px solid var(--color-primary);
    }

    .section-header {
        border-bottom-width: 3px;
    }

    .section-footer {
        border-top-width: 2px;
    }

    .progress-bar {
        border: 1px solid currentColor;
    }
}

/* =================================
   PRICING DISPLAY (Event Detail)
================================= */

.registration-section .price-amount {
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
}

.registration-section .price-amount .currency {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
}

.registration-section .price-amount .amount {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
}

.registration-section .price-option.featured .price-amount .amount {
    color: #1f2937;
}

.registration-section .price-option.featured {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 10px;
    padding: 1rem;
}

.registration-section .price-option {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.registration-section .price-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.registration-section .price-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.registration-section .price-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

.registration-section .price-badge.active {
    background: #d1fae5;
    color: #059669;
}

.registration-section .price-badge.inactive {
    background: #f3f4f6;
    color: #9ca3af;
}

.registration-section .price-savings {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #059669;
    font-weight: 600;
    margin-top: 0.25rem;
}

.registration-section .price-deadline,
.registration-section .price-note {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

/* Registration card */
.registration-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.registration-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
    padding: 1.25rem 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reg-header-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: rgba(255,255,255,.18);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0 0 .1rem;
    line-height: 1.25;
}

.header-subtitle {
    font-size: .8rem;
    color: rgba(255,255,255,.75);
    margin: 0;
}

.registration-details {
    padding: 1.5rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.detail-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.detail-item .icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    flex-shrink: 0;
}

.detail-item .content h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.25rem;
}

.detail-item .content p {
    font-size: 0.9rem;
    color: #1f2937;
    margin: 0;
    font-weight: 500;
}

.pricing-section {
    padding: 0 1.5rem 1.5rem;
}

.registration-section .registration-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Race cards grid in registration section */
.registration-section .race-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

/* Force 2 columns from medium, 3 columns from large screens */
@media (min-width: 768px) {
    .registration-section .race-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .registration-section .race-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .registration-section .registration-container {
        max-width: 1200px;
    }
}

.registration-section .race-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.registration-section .race-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.race-header-enhanced {
    overflow: hidden;
}

.race-header-background {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: white;
}

.race-header-background .race-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.race-header-background .race-info {
    flex: 1;
    min-width: 0;
}

.race-header-background .race-name {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.race-header-background .race-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    display: inline-block;
    margin-top: 0.15rem;
}

.registration-section .race-card .race-description {
    padding: 0.75rem 1.25rem 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.registration-section .race-card .race-features {
    padding: 0.5rem 1.25rem;
}

.registration-section .race-card .feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #4b5563;
    padding: 0.2rem 0;
}

.registration-section .race-card .feature-item i {
    color: #22c55e;
    font-size: 0.85rem;
}

.registration-section .race-card .pricing-options {
    padding: 0.75rem 1.25rem 1.25rem;
    display: grid;
    gap: 0.5rem;
}

.registration-section .race-card .tier-notes {
    padding: 0 1.25rem 1rem;
}

.registration-section .race-card .tier-notes .price-note {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #f59e0b;
}

/* Early Bird Notice */
.early-bird-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
}

.early-bird-notice .notice-icon {
    color: #f59e0b;
    font-size: 1.2rem;
}

.early-bird-notice .notice-content {
    font-size: 0.85rem;
    color: #92400e;
}

/* Registration Action */
.registration-action-inline {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn-register {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    background: #2563eb;
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-register:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    color: white;
}

.action-info-inline {
    margin-top: 0.75rem;
}

.spots-info {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

/* Pricing Included (collapsible) */
.pricing-included {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    margin-top: 1.25rem;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.pricing-included[open] {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pricing-included__trigger {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: #f8fafc;
}
.pricing-included__trigger::-webkit-details-marker { display: none; }
.pricing-included__trigger:hover { background: #f1f5f9; }
.pricing-included__chev {
    margin-left: auto;
    font-size: 0.7rem;
    color: #94a3b8;
    transition: transform 0.2s;
}
.pricing-included[open] .pricing-included__chev { transform: rotate(180deg); }

/* Benefit chips inside the collapsible */
.pricing-included .pricing-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.7rem 1rem 0.8rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.benefit-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #374151;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.22rem 0.65rem;
    white-space: nowrap;
    line-height: 1.4;
}

.benefit-chip i { font-size: 0.78rem; opacity: 0.75; }

/* Registration closed */
.registration-closed {
    text-align: center;
    padding: 3rem 2rem;
}

.closed-icon {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 767px) {
    .details-grid {
        grid-template-columns: 1fr;
    }

    .registration-section .race-cards-grid {
        grid-template-columns: 1fr;
    }

    .benefit-row {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* =================================
   REFERRAL CTA BANNER
================================= */

.referral-cta-banner {
    display: flex;
    align-items: center;
    gap: var(--space-4, 1rem);
    margin-top: var(--space-6, 1.5rem);
    padding: var(--space-4, 1rem) var(--space-5, 1.25rem);
    background: #f0f9ff;
    border: 1.5px solid #bfdbfe;
    border-radius: var(--radius-lg, 0.75rem);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.referral-cta-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.referral-cta-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    border-radius: var(--radius-lg, 0.75rem);
    color: white;
    font-size: 1.4rem;
}

.referral-cta-content {
    flex: 1;
}

.referral-cta-content h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1e3a5f;
}

.referral-cta-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.4;
}

.referral-cta-action {
    flex-shrink: 0;
}

.referral-cta-desc {
    margin: 0 0 0.4rem;
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.4;
}

.referral-cta-benefits {
    margin-top: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.referral-benefit-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.referral-benefit-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.benefit-chip--green {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #15803d;
}

.benefit-chip--blue {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

@media (max-width: 768px) {
    .referral-cta-banner {
        gap: var(--space-3, 0.75rem);
        padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
    }
    .referral-cta-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 640px) {
    .referral-cta-banner {
        flex-direction: column;
        text-align: center;
        gap: var(--space-3, 0.75rem);
    }
}

/* Dark mode - prefers-color-scheme */
@media (prefers-color-scheme: dark) {
    .referral-cta-banner {
        background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
        border-color: #6d28d9;
    }
    .referral-cta-content h4 {
        color: #c4b5fd;
    }
    .referral-cta-content p {
        color: #9ca3af;
    }
}

/* Dark mode - data-theme attribute */
[data-theme="dark"] .referral-cta-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-color: #6d28d9;
}

[data-theme="dark"] .referral-cta-content h4 {
    color: #c4b5fd;
}

[data-theme="dark"] .referral-cta-content p {
    color: #9ca3af;
}

/* =================================
   TASK-22 CARD REDESIGN
================================= */

/* Route description: inline italic, no wrapper box */
.registration-section .race-card .race-desc-inline {
    padding: 0.5rem 1.25rem 0;
    font-style: italic;
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

/* Feature list: no individual borders */
.registration-section .race-card .race-features-list {
    list-style: none;
    padding: 0.75rem 1.25rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: #374151;
}

.registration-section .race-card .race-features-list li {
    display: flex;
    align-items: center;
}

/* Active price block: prominent current price */
.registration-section .race-card .active-price-block {
    margin: 0.5rem 1rem 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1.5px solid;
    text-align: center;
}

.active-price-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #374151;
    margin-bottom: 0.25rem;
}

.active-price-deadline {
    font-weight: 400;
    color: #6b7280;
    font-size: 0.7rem;
}

.active-price-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.15rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.active-price-amount .currency {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

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

/* Per-card CTA button inside active price block */
.btn-register-card {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-register-card:hover {
    background: #1d4ed8;
    color: #fff;
}

/* Future prices: compact horizontal pill strip */
.future-prices-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.25rem 1.25rem 1rem;
    font-size: 0.75rem;
    color: #9ca3af;
    min-height: 2rem;
}

.future-prices-strip .future-label {
    font-weight: 600;
    margin-right: 0.25rem;
    white-space: nowrap;
}

.future-price-pill {
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    white-space: nowrap;
}

/* Mobile: horizontal scroll snap for race cards */
@media (max-width: 767px) {
    .registration-section .race-cards-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 0.75rem;
        padding-bottom: 1rem;
        /* override the existing grid-template-columns: 1fr */
        grid-template-columns: unset;
    }

    .registration-section .race-cards-grid .race-card {
        min-width: 85vw;
        scroll-snap-align: start;
        flex-shrink: 0;
    }
}

/* =================================
   PRICING TAB INTERFACE (mobile modular pricing)
================================= */

/* Wrapper */
.pricing-tabs-wrapper {
    margin-top: 0.65rem;
}

/* Micro-copy: clarifies that multiple race types are tappable */
.pricing-tab-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0 0 0.55rem;
    padding: 0 0.25rem;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #64748b;
    text-align: center;
    line-height: 1.35;
}

.pricing-tab-hint i {
    font-size: 0.95rem;
    color: #94a3b8;
}

/* Segmented-control tab bar — all tabs always visible, equal width */
.pricing-tab-bar {
    display: flex;
    gap: 4px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 1.25rem;
    overflow: visible; /* never scroll */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 1px 2px rgba(15, 23, 42, 0.05);
}

.pricing-tab {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    position: relative;
    padding: 0.62rem 0.45rem 0.72rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

.pricing-tab:not(.is-active):hover {
    background: rgba(255, 255, 255, 0.65);
    color: #334155;
    border-color: rgba(148, 163, 184, 0.35);
}

.pricing-tab:not(.is-active):active {
    transform: scale(0.98);
}

.pricing-tab:focus-visible {
    outline: 2px solid var(--tier-color, #2563eb);
    outline-offset: 2px;
}

.pricing-tab.is-active {
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    border-color: rgba(148, 163, 184, 0.45);
    box-shadow:
        0 2px 10px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.9) inset;
}

/* Tier accent strip — shows which distance is selected */
.pricing-tab.is-active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: min(36px, 55%);
    height: 3px;
    border-radius: 999px;
    background: var(--tier-color, #2563eb);
    opacity: 0.92;
}

.pricing-tab__icon {
    font-size: 1.12rem;
    color: #94a3b8;
    display: block;
    transition: color 0.2s ease, transform 0.15s ease;
}

.pricing-tab:not(.is-active):hover .pricing-tab__icon {
    color: #64748b;
}

.pricing-tab.is-active .pricing-tab__icon {
    color: var(--tier-color, #2563eb);
    transform: scale(1.05);
}

.pricing-tab__label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

@media (max-width: 480px) {
    .pricing-tab__label {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: 0.65rem;
        line-height: 1.2;
        max-height: 2.5em;
    }
}

/* Panel: hidden by default, shown via .is-active */
.pricing-panel {
    display: none;
}

.pricing-panel.is-active {
    display: block;
    animation: ppFadeIn 0.2s ease;
}

@keyframes ppFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Panel body */
.pricing-panel__body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.25rem 0 1rem;
}

@media (min-width: 600px) {
    .pricing-panel__body {
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 1.5rem;
    }
}

@media (max-width: 599px) {
    .pricing-panel__price-col { order: -1; }
}

/* Features */
.pricing-panel__desc {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: #64748b;
    font-style: italic;
    margin: 0 0 0.75rem;
    line-height: 1.45;
}

.pricing-panel__features {
    background: #f8fafc;
    border-radius: 10px;
    padding: 0.85rem 1rem;
}

.pricing-panel__feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.pricing-panel__feature-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #334155;
}

.pricing-panel__feature-list li i {
    color: #22c55e;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Price column */
.pricing-panel__price-col {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* Price block: clean neutral card */
.pricing-panel__price-block {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 1.25rem 1.25rem 1.1rem;
    text-align: center;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.pricing-panel__phase-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tier-color, #2563eb);
    margin-bottom: 0.3rem;
}

.pricing-panel__deadline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 400;
    color: #94a3b8;
    text-transform: none;
    letter-spacing: 0;
}

.pricing-panel__amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.1rem;
    margin: 0.5rem 0 0.9rem;
    line-height: 1;
}

.pricing-panel__currency {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
}

.pricing-panel__price {
    font-size: 3.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.02em;
}

.pricing-panel__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    background: var(--tier-color, #2563eb);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: filter 0.18s ease, transform 0.15s ease;
}

.pricing-panel__cta:hover {
    filter: brightness(0.88);
    color: #fff;
    transform: translateY(-1px);
}

.pricing-panel__spots {
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

/* Future prices accordion */
.future-prices-accordion {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

.future-prices-accordion__toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.future-prices-accordion__toggle::-webkit-details-marker { display: none; }

.future-prices-accordion__toggle::after {
    content: '▾';
    margin-left: auto;
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.future-prices-accordion[open] .future-prices-accordion__toggle::after {
    transform: rotate(180deg);
}

.future-prices-accordion__body {
    padding-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.future-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.84rem;
    color: #94a3b8;
    padding: 0.25rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.future-price-row:last-child { border-bottom: none; }

.future-price-row__amt {
    font-weight: 600;
    color: #64748b;
}

/* Special notes */
.pricing-panel__notes {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid #e2e8f0;
}

.pricing-panel__note {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #f59e0b;
    margin: 0 0 0.3rem;
}

/* Redundant inner bar: section title is in _section_header; hide if cached/old HTML */
.registration-section .registration-card > .registration-header {
    display: none !important;
}

/* =================================
   PRICING CARD GRID (desktop modular pricing)
================================= */

/**
 * Mobile: only tab panels; desktop (768+): show grid.
 * Rules are scoped under .pricing-section so selector specificity beats any
 * stray `.pc-grid { display: none }` and so a missing `.pc-grid-shell` wrapper
 * (stale deploy) still shows the grid on large viewports.
 */
.pricing-section .pc-grid {
    display: none;
}

.pc-grid-shell {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .pricing-section .pc-grid-shell {
        display: none;
    }
}

@media (min-width: 768px) {
    .pricing-section .pc-grid-shell {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .pricing-section .pc-grid {
        display: grid !important;
        width: min(100%, 1000px);
        max-width: 1000px;
        margin: 1rem auto 0;
        box-sizing: border-box;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.25rem;
        align-items: stretch;
    }

    .pricing-tabs-wrapper {
        display: none !important;
    }
}

/* ── Card shell ── */
.pc-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--tier-color, #2563eb);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.pc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
    border-color: color-mix(in srgb, var(--tier-color, #2563eb) 40%, #e2e8f0);
    border-top-color: var(--tier-color, #2563eb);
}

/* ── Card header: neutral, professional ── */
.pc-card__header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.1rem 1.25rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.pc-card__icon-wrap {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--tier-color, #2563eb) 12%, #fff);
    color: var(--tier-color, #2563eb);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.pc-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.15rem;
    line-height: 1.25;
}

.pc-card__badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

/* ── Price hero (under title, desktop) ── */
.pc-card__price-hero {
    padding: 1rem 1.25rem 1.1rem;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.pc-card__price-hero .pc-card__phase-badge {
    align-self: center;
}

.pc-card__price-hero .pc-card__deadline {
    justify-content: center;
}

.pc-card__price-hero .pc-card__main-price {
    margin-top: 0.35rem;
}

/* ── Middle: expandable percorso; grows so CTAs align across cards ── */
.pc-card__mid {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 1.25rem;
}

.pc-card__mid .pc-card__details--percorso {
    margin-top: 0.75rem;
}

.pc-card__details-inner {
    padding: 0 0.85rem 0.85rem;
}

.pc-card__rules--in-details {
    margin-top: 0;
    padding-top: 0.5rem;
    border-top: none;
}

.pc-card__desc {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    font-size: 0.83rem;
    color: #64748b;
    font-style: italic;
    margin: 0 0 0.65rem;
    line-height: 1.45;
}

.pc-card__feat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pc-card__feat-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #334155;
}

.pc-card__feat-list li i {
    color: #22c55e;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ── Pricing block (tariffe + CTA) pinned to bottom of card ── */
.pc-card__pricing {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: auto;
}

.pc-card__pricing > .pc-card__details:first-of-type {
    margin-top: 0;
}

.pc-card__phase-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tier-color, #2563eb);
    align-self: flex-start;
    margin-bottom: 0.1rem;
}

.pc-card__deadline {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0;
}

/* Big price display */
.pc-card__main-price {
    display: flex;
    align-items: baseline;
    gap: 0.1rem;
    margin: 0.3rem 0 0;
    line-height: 1;
}

.pc-card__currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0f172a;
}

.pc-card__amount {
    font-size: 3rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.02em;
}

/* ── Price ladder: soft rows + clear current tier ── */
.pc-price-ladder {
    border-top: 1px solid #f1f5f9;
    padding-top: 0.65rem;
    margin: 0.75rem 0 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pc-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: #64748b;
    padding: 0.42rem 0.65rem;
    gap: 0.55rem;
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.65);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.pc-price-row:not(.is-current):hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.pc-price-row.is-current {
    color: #0f172a;
    font-weight: 600;
    background: color-mix(in srgb, var(--tier-color, #2563eb) 11%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--tier-color, #2563eb) 26%, #e2e8f0);
    box-shadow:
        inset 3px 0 0 0 var(--tier-color, #2563eb),
        0 1px 2px rgba(15, 23, 42, 0.05);
}

/* Avoid stacking a glyph with the inset bar */
.pc-price-row.is-current .pc-price-row__name::before {
    content: none;
}

/* Mobile price ladder (inside tab panel) */
.pc-price-ladder--mobile {
    border-top: 1px solid #f1f5f9;
    padding-top: 0.6rem;
    margin: 0.6rem 0 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pc-price-row__name {
    flex: 1;
}

.pc-price-row__val {
    font-weight: 600;
    white-space: nowrap;
    color: inherit;
    letter-spacing: -0.01em;
}

.pc-price-row.is-current .pc-price-row__val {
    font-weight: 800;
    font-size: 0.88rem;
    color: color-mix(in srgb, var(--tier-color, #2563eb) 72%, #0f172a);
}

/* ── CTA button ── */
.pc-card__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    background: var(--tier-color, #2563eb);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    margin-top: 0.6rem;
    letter-spacing: 0.01em;
    transition: filter 0.18s ease, transform 0.15s ease;
}

.pc-card__cta:hover {
    filter: brightness(0.88);
    color: #fff;
    transform: translateY(-1px);
}

.pc-card__kit-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
    font-size: 0.78rem;
    color: #64748b;
    text-decoration: none;
    margin-top: 0.45rem;
    transition: color 0.15s ease;
}

.pc-card__kit-link:hover {
    color: var(--tier-color, #2563eb);
    text-decoration: none;
}

.pc-card__spots {
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0.4rem 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.pc-card__note {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: #f59e0b;
    margin: 0.1rem 0 0;
}

/* ── Event meta bar ── */
.reg-info-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.8rem;
    padding: 0.65rem 1.5rem 0.7rem;
    font-size: 0.85rem;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.reg-info-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.reg-info-sep {
    color: #cbd5e1;
}

.reg-info-deadline {
    font-weight: 600;
    color: #f59e0b;
}

/* =================================
   ACTIVE PHASE BANNER
================================= */

.reg-phase-banner {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1rem 0 .5rem;
    padding: .75rem 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: .86rem;
    color: #334155;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.reg-phase-banner__text strong {
    color: #0f172a;
    font-weight: 700;
}

@keyframes rpb-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: .55; }
}

.reg-phase-pulse {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
    animation: rpb-pulse 1.6s ease-in-out infinite;
}

.reg-phase-banner__text {
    flex: 1;
    line-height: 1.45;
    min-width: 0;
}

.reg-phase-banner__tag {
    flex-shrink: 0;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: #0f172a;
    color: #f8fafc;
    border-radius: 999px;
    padding: .28rem .7rem;
    display: inline-flex;
    align-items: center;
    border: 1px solid #1e293b;
}

@media (prefers-color-scheme: dark) {
    .reg-phase-banner {
        background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
        border-color: #334155;
        color: #cbd5e1;
        box-shadow: none;
    }
    .reg-phase-banner__text strong {
        color: #f1f5f9;
    }
    .reg-phase-pulse {
        background: #38bdf8;
        box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3);
    }
    .reg-phase-banner__tag {
        background: #334155;
        color: #f8fafc;
        border-color: #475569;
    }
}

[data-theme="dark"] .reg-phase-banner {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
    color: #cbd5e1;
    box-shadow: none;
}

[data-theme="dark"] .reg-phase-banner__text strong {
    color: #f1f5f9;
}

[data-theme="dark"] .reg-phase-pulse {
    background: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3);
}

[data-theme="dark"] .reg-phase-banner__tag {
    background: #334155;
    color: #f8fafc;
    border-color: #475569;
}

@media (max-width: 420px) {
    .reg-phase-banner {
        flex-wrap: wrap;
    }
    .reg-phase-banner__tag {
        width: 100%;
        justify-content: center;
        margin-top: 0.15rem;
    }
}

/* =================================
   PRICE LADDER — DATES
================================= */

/* Override pc-price-row to support stacked name + date */
.pc-price-row {
    align-items: center; /* keep vertical center */
}

.pc-price-row__left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .05rem;
    min-width: 0;
}

.pc-price-row__name {
    line-height: 1.3;
}

.pc-price-row__date {
    font-size: .7rem;
    color: #94a3b8;
    font-weight: 400;
    white-space: nowrap;
    letter-spacing: .01em;
}

.pc-price-row.is-current .pc-price-row__date {
    color: color-mix(in srgb, var(--tier-color, #2563eb) 48%, #64748b);
    font-weight: 600;
}

/* Highlight active card on desktop */
.pc-card--active {
    box-shadow: 0 0 0 2px var(--tier-color, #2563eb), 0 8px 24px rgba(15,23,42,.1);
}

/* =================================
   PRINT STYLES
================================= */

@media print {
    .registration-section {
        box-shadow: none;
        border: 1px solid var(--color-gray-300);
        break-inside: avoid;
    }

    .section-footer {
        display: none;
    }
} 
/* =================================
   RULE BADGES (age, medical, timing)
================================= */

.pc-card__rules {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,.07);
}

.pc-rule-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25em 0.6em;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: .01em;
}

.pc-rule-badge--info {
    background: #eff6ff;
    color: #1d4ed8;
}

.pc-rule-badge--age {
    background: #fef3c7;
    color: #92400e;
}

.pc-rule-badge--cert {
    background: #fee2e2;
    color: #991b1b;
}

.pc-rule-badge--cutoff {
    background: #f0fdf4;
    color: #166534;
}

/* Mobile: percorso / partenza inside same accordion pattern as tariffe */
.pricing-panel__route-details {
    margin: 0.75rem 0 0;
}

.pricing-panel__details-inner {
    padding: 0 0.85rem 0.85rem;
}

.pricing-panel__details-inner .pc-card__rules--panel {
    margin-top: 0;
    padding-top: 0.5rem;
    border-top: none;
}

.pricing-panel__details-inner .pricing-panel__desc {
    margin-top: 0.65rem;
}

.pricing-panel__details-inner .pricing-panel__feature-list {
    margin-top: 0.5rem;
}

/* ─── Discount summary (collapsible) ──────────────────── */
.reg-discount-summary {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.reg-discount-summary__trigger {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.reg-discount-summary__trigger::-webkit-details-marker { display: none; }
.reg-discount-summary__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.7rem;
    font-weight: 700;
}
.reg-discount-summary__chev {
    margin-left: auto;
    font-size: 0.7rem;
    color: #9ca3af;
    transition: transform 0.2s;
}
.reg-discount-summary[open] .reg-discount-summary__chev { transform: rotate(180deg); }
.reg-discount-summary__list {
    padding: 0.4rem 0.85rem 0.65rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.reg-discount-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.77rem;
    color: #374151;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    transition: background 0.15s;
}
.reg-discount-row:hover { background: #f8fafc; }
.reg-discount-row__icon { color: #64748b; flex-shrink: 0; font-size: 0.85rem; }
.reg-discount-row__name { font-weight: 600; flex: 1; min-width: 80px; }
.reg-discount-row__cond { color: #94a3b8; font-size: 0.7rem; white-space: nowrap; }
.reg-discount-row__value {
    font-weight: 700;
    font-size: 0.7rem;
    white-space: nowrap;
    margin-left: auto;
    background: #dcfce7;
    color: #16a34a;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
}
.reg-discount-row__code {
    background: #eff6ff;
    color: #1d4ed8;
    font-family: 'Courier New', monospace;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid #bfdbfe;
}

/* ─── Medical cert disclosure (inside pricing card) ───── */
.pc-cert-details {
    margin-top: 0.3rem;
}
.pc-cert-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #991b1b;
    background: #fee2e2;
    padding: 0.22em 0.6em;
    border-radius: 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    white-space: nowrap;
}
.pc-cert-summary::-webkit-details-marker { display: none; }
.pc-cert-chev {
    font-size: 0.65rem;
    transition: transform 0.15s;
}
.pc-cert-details[open] .pc-cert-chev { transform: rotate(180deg); }
.pc-cert-body {
    margin: 0.4rem 0 0;
    font-size: 0.73rem;
    color: #7f1d1d;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 0.45rem 0.7rem;
    line-height: 1.5;
}

/* ─── Compact 2026 registration cleanup ───────────────── */
.registration-section .section-header {
    margin-bottom: 1.25rem;
}

.registration-section .section-title {
    font-size: clamp(1.65rem, 3vw, 2.15rem);
}

.registration-card {
    border-radius: 10px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
}

.registration-header,
.reg-phase-banner,
.early-bird-notice,
.referral-cta-banner {
    border-radius: 8px;
}

.pc-card {
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
}

.pc-card__desc,
.pricing-panel__desc,
.pc-card__feat-list,
.pricing-panel__feature-list {
    font-size: 0.88rem;
    line-height: 1.45;
}

.pc-card__details,
.race-detail-accordion {
    margin: 0.8rem 0 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.pc-card__details > summary,
.race-detail-accordion > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    cursor: pointer;
    list-style: none;
    color: #374151;
    font-weight: 700;
    font-size: 0.84rem;
}

.pc-card__details > summary::-webkit-details-marker,
.race-detail-accordion > summary::-webkit-details-marker {
    display: none;
}

.pc-card__details[open] > summary i,
.race-detail-accordion[open] > summary i {
    transform: rotate(180deg);
}

.pc-card__details i,
.race-detail-accordion i {
    transition: transform 0.15s ease;
}

.pc-card__details .pc-price-ladder {
    margin: 0;
    padding: 0 0.85rem 0.85rem;
}

.race-detail-accordion p {
    margin: 0;
    padding: 0 0.85rem 0.85rem;
    color: #4b5563;
    font-size: 0.84rem;
    line-height: 1.5;
}

.reg-discount-summary {
    margin: 1rem 0 0;
    border-color: #e5e7eb;
    background: #fafafa;
}

.reg-discount-summary__trigger {
    font-size: 0.86rem;
}

.reg-discount-row__icon {
    color: #374151;
}

.reg-discount-row__code {
    background: #f3f4f6;
    color: #111827;
    border-color: #e5e7eb;
}

@media (max-width: 768px) {
    .registration-card {
        border-radius: 8px;
    }

    .pc-card__details--mobile {
        margin: 0.75rem 0;
    }

    .pricing-panel__route-details,
    .pricing-panel__notes {
        margin-top: 0.75rem;
    }
}
