/* VPN Comparison - Main Styles */
/* Version 3.0.0 - Production */

/* Skip to main link */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-600);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 var(--radius-lg) 0;
    font-weight: 600;
}

.skip-to-main:focus {
    top: 0;
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

/* Hero Content */
.hero__content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
    font-weight: 400;
    line-height: 1.75;
}

/* Controls Bar */
.controls-bar {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin: calc(-1 * var(--spacing-xl)) auto var(--spacing-xl);
    max-width: 1200px;
    position: sticky;
    top: var(--spacing-md);
    z-index: 100;
    border: 1px solid #e5e5e5;
}

@media (max-width: 768px) {
    .controls-bar {
        margin: calc(-1 * var(--spacing-lg)) auto var(--spacing-lg);
        top: 0;
        border-radius: 0;
        padding: var(--spacing-sm);
    }
}

.controls__inner {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    background: var(--neutral-50);
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    border: 1px solid #e5e5e5;
}

.view-toggle__button {
    background: none;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--neutral-600);
}

.view-toggle__button.active {
    background: white;
    color: var(--primary-600);
    box-shadow: var(--shadow-lg);
}

.filters {
    display: flex;
    gap: var(--spacing-sm);
    flex: 1;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.625rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: var(--radius-lg);
    background: white;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-800);
    cursor: pointer;
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.quick-wizard-btn {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #000;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all var(--transition-base);
}

.quick-wizard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

/* Wizard Modal */
.wizard-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.wizard-modal.active {
    display: flex;
}

.wizard-content {
    background: white;
    border-radius: var(--radius-2xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

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

.wizard-header {
    padding: var(--spacing-xl);
    border-bottom: 1px solid #e5e5e5;
}

.wizard-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

.wizard-header p {
    color: var(--neutral-600);
    font-size: 0.875rem;
}

.wizard-step {
    padding: var(--spacing-xl);
    display: none;
}

.wizard-step.active {
    display: block;
}

.wizard-question {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    color: var(--neutral-900);
}

.wizard-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.wizard-option {
    padding: var(--spacing-lg);
    border: 2px solid #e5e5e5;
    border-radius: var(--radius-xl);
    background: none;
    cursor: pointer;
    text-align: left;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

.wizard-option:hover {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.wizard-option.active {
    border-color: var(--primary-600);
    background: var(--primary-50);
    color: var(--primary-600);
}

.wizard-footer {
    padding: var(--spacing-xl);
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.wizard-progress {
    height: 4px;
    background: #e5e5e5;
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
}

.wizard-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
    width: 0%;
    transition: width 0.3s ease;
}

.wizard-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-base);
}

.wizard-btn--primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
}

.wizard-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

.wizard-btn--secondary {
    background: transparent;
    border-color: #e5e5e5;
    color: var(--neutral-600);
}

.wizard-btn--secondary:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
}

.wizard-results {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.wizard-result-card {
    padding: var(--spacing-lg);
    border: 2px solid #e5e5e5;
    border-radius: var(--radius-xl);
    background: white;
    transition: all var(--transition-base);
}

.wizard-result-card:hover {
    border-color: var(--primary-500);
    transform: translateY(-2px);
}

.wizard-result-card--gold {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, white 100%);
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    border-bottom: 1px dotted var(--neutral-600);
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 300px;
    background: var(--neutral-900);
    color: white;
    text-align: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    pointer-events: none;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--neutral-900) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Comparison Table */
.comparison-table {
    display: none;
    width: 100%;
    background: white;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid #e5e5e5;
}

.comparison-table.active {
    display: block;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.comparison-table th {
    background: var(--neutral-50);
    padding: var(--spacing-lg);
    text-align: left;
    font-weight: 600;
    color: var(--neutral-900);
    border-bottom: 2px solid #e5e5e5;
    position: sticky;
    top: 0;
}

.comparison-table th:first-child {
    position: sticky;
    left: 0;
    background: var(--neutral-50);
    z-index: 10;
}

.comparison-table td {
    padding: var(--spacing-lg);
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
    vertical-align: middle;
}

.comparison-table td:first-child {
    position: sticky;
    left: 0;
    background: white;
    font-weight: 500;
    z-index: 5;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.table-vpn-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.table-vpn-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--neutral-900);
}

.table-discount {
    background: var(--danger-500);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.table-feature-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-check {
    color: var(--success-600);
    font-weight: bold;
}

/* VPN Card Tiers - Visual Hierarchy */
.vpn-card {
    background: white;
    border-radius: var(--radius-2xl);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    position: relative;
    border: 2px solid transparent;
    overflow: visible;
    opacity: 0;
    transform: translateY(20px);
}

.vpn-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Gold Tier (Best Choice) */
.vpn-card--gold {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 255, 255, 1) 100%);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.25);
}

.vpn-card--gold::before {
    content: '🏆 Best Choice';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #000;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    z-index: 10;
}

/* Silver Tier */
.vpn-card--silver {
    border-color: var(--silver);
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.vpn-card--silver::before {
    content: '⭐ Great Value';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--silver) 0%, var(--silver-dark) 100%);
    color: #000;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    z-index: 10;
}

/* Bronze Tier */
.vpn-card--bronze {
    border-color: var(--bronze);
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.04) 0%, rgba(255, 255, 255, 1) 100%);
}

.vpn-card--bronze::before {
    content: '💎 Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--bronze) 0%, var(--bronze-dark) 100%);
    color: #fff;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    z-index: 10;
}

@media (max-width: 480px) {
    .vpn-card--gold::before,
    .vpn-card--silver::before,
    .vpn-card--bronze::before {
        font-size: 0.6875rem;
        padding: 0.375rem 0.625rem;
    }
}

.vpn-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.vpn-card--gold:hover {
    box-shadow: 0 25px 50px rgba(255, 215, 0, 0.35);
}

/* Card Header */
.vpn-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
    gap: var(--spacing-sm);
    margin-top: 0.5rem;
}

.vpn-card__info {
    flex: 1;
    min-width: 0;
}

.vpn-card__logo {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    font-weight: 800;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.vpn-card__rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.stars {
    color: #fbbf24;
    font-size: 1rem;
    letter-spacing: 1px;
}

.rating-text {
    font-size: 0.8125rem;
    color: var(--neutral-600);
}

.discount-badge {
    background: linear-gradient(135deg, var(--danger-500), #dc2626);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
    flex-shrink: 0;
}

/* Features Grid */
.vpn-card__features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    background: var(--neutral-50);
    border-radius: var(--radius-xl);
}

@media (max-width: 480px) {
    .vpn-card__features {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: var(--spacing-sm);
    }
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.feature__icon {
    width: 18px;
    height: 18px;
    color: var(--success-600);
    flex-shrink: 0;
    margin-top: 2px;
}

/* Specs */
.vpn-card__specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
}

.spec {
    text-align: center;
    padding: var(--spacing-md) var(--spacing-sm);
    background: white;
    border-radius: var(--radius-lg);
    border: 2px solid #e5e5e5;
    transition: all var(--transition-base);
}

.spec:hover {
    border-color: var(--primary-500);
    transform: translateY(-2px);
}

.spec__value {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    font-weight: 700;
    color: var(--primary-600);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.spec__label {
    font-size: 0.6875rem;
    color: var(--neutral-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Price Section */
.vpn-card__price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 2px solid #e5e5e5;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .vpn-card__price-section {
        flex-direction: column;
        align-items: stretch;
    }
}

.price-info {
    flex: 1;
    min-width: 0;
}

.price {
    font-size: clamp(1.5rem, 3.5vw, 1.875rem);
    font-weight: 800;
    color: var(--neutral-900);
    line-height: 1;
}

.price__old {
    font-size: 1rem;
    color: var(--neutral-600);
    text-decoration: line-through;
    margin-right: var(--spacing-sm);
}

.price__currency {
    font-size: 1rem;
    font-weight: 600;
}

.price__period {
    font-size: 0.8125rem;
    color: var(--neutral-600);
    display: block;
    margin-top: var(--spacing-sm);
}

/* Enhanced CTA Button */
.cta-button {
    background: linear-gradient(135deg, #0ea5e9 0%, #7dd3fc 100%);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
    min-height: 48px;
    min-width: 44px;
}

/* Pulsing animation for top-3 */
.cta-button--pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
    }
    50% {
        box-shadow: 0 10px 35px rgba(14, 165, 233, 0.5), 0 0 0 4px rgba(14, 165, 233, 0.2);
    }
}

/* Gold tier CTA */
.cta-button--gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #000;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}

@keyframes pulsegold {
    0%, 100% {
        box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 10px 35px rgba(255, 215, 0, 0.6), 0 0 0 4px rgba(255, 215, 0, 0.3);
    }
}

.cta-button--gold.cta-button--pulse {
    animation: pulsegold 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Shimmer effect on hover */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.5);
}

.cta-button--gold:hover {
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.6);
}

@media (max-width: 640px) {
    .cta-button {
        width: 100%;
    }
}

/* Section styling */
.comparison-section {
    padding: clamp(2.5rem, 6vw, 4rem) var(--spacing-lg);
    background: linear-gradient(135deg, #f0f9ff 0%, #fdf4ff 100%);
}

.section-header {
    text-align: center;
    margin-bottom: clamp(2rem, 5vw, 3rem);
}

.section-header__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    margin-bottom: var(--spacing-md);
    color: var(--neutral-900);
    letter-spacing: -0.02em;
}

.section-header__subtitle {
    font-size: 1rem;
    color: var(--neutral-600);
    max-width: 600px;
    margin: 0 auto;
}

.vpn-grid {
    display: grid;
    gap: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: 3rem;
}

/* Focus states */
*:focus-visible {
    outline: 3px solid var(--primary-500);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

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

/* Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}