/* Prop Firms Display - Improved Stylesheet v3.0.0 
 * Inspired by modern design systems with enhanced UX
 */

:root {
    /* Updated Color Palette - More sophisticated and modern */
    --pfd-primary: #f59e0b; /* Amber-500 */
    --pfd-primary-hover: #d97706; /* Amber-600 */
    --pfd-primary-light: #fef3c7; /* Amber-50 */
    
    /* Semantic colors */
    --pfd-success: #10b981; /* Emerald-500 */
    --pfd-success-light: #d1fae5;
    --pfd-danger: #ef4444; /* Red-500 */
    --pfd-danger-light: #fee2e2;
    --pfd-warning: #f59e0b;
    --pfd-info: #3b82f6;
    
    /* Neutral palette - Slate based */
    --pfd-gray-50: #f8fafc;
    --pfd-gray-100: #f1f5f9;
    --pfd-gray-200: #e2e8f0;
    --pfd-gray-300: #cbd5e1;
    --pfd-gray-400: #94a3b8;
    --pfd-gray-500: #64748b;
    --pfd-gray-600: #475569;
    --pfd-gray-700: #334155;
    --pfd-gray-800: #1e293b;
    --pfd-gray-900: #0f172a;
    
    /* Dark theme colors */
    --pfd-dark-bg: #0f172a;
    --pfd-dark-card: #1e293b;
    --pfd-dark-border: #334155;
    
    /* Text colors */
    --pfd-text-primary: #0f172a;
    --pfd-text-secondary: #64748b;
    --pfd-text-tertiary: #94a3b8;
    --pfd-text-light: #cbd5e1;
    
    /* Backgrounds */
    --pfd-bg-primary: #ffffff;
    --pfd-bg-secondary: #f8fafc;
    --pfd-bg-tertiary: #f1f5f9;
    
    /* Borders */
    --pfd-border-light: #e2e8f0;
    --pfd-border-medium: #cbd5e1;
    
    /* Shadows - Layered depth */
    --pfd-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --pfd-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --pfd-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --pfd-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border radius */
    --pfd-radius-sm: 0.375rem; /* 6px */
    --pfd-radius-md: 0.5rem; /* 8px */
    --pfd-radius-lg: 0.75rem; /* 12px */
    --pfd-radius-xl: 1rem; /* 16px */
    --pfd-radius-2xl: 1.5rem; /* 24px */
    
    /* Spacing scale */
    --pfd-space-xs: 0.5rem; /* 8px */
    --pfd-space-sm: 0.75rem; /* 12px */
    --pfd-space-md: 1rem; /* 16px */
    --pfd-space-lg: 1.5rem; /* 24px */
    --pfd-space-xl: 2rem; /* 32px */
    --pfd-space-2xl: 2.5rem; /* 40px */
    --pfd-space-3xl: 3rem; /* 48px */
    
    /* Typography scale */
    --pfd-text-xs: 0.75rem; /* 12px */
    --pfd-text-sm: 0.875rem; /* 14px */
    --pfd-text-base: 1rem; /* 16px */
    --pfd-text-lg: 1.125rem; /* 18px */
    --pfd-text-xl: 1.25rem; /* 20px */
    --pfd-text-2xl: 1.5rem; /* 24px */
    --pfd-text-3xl: 1.875rem; /* 30px */
    --pfd-text-4xl: 2.25rem; /* 36px */
    
    /* Transitions */
    --pfd-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --pfd-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base reset and improvements */
.pfd-container * {
    box-sizing: border-box;
}

/* Container */
.pfd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--pfd-space-md);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--pfd-text-primary);
    line-height: 1.6;
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.pfd-breadcrumbs {
    margin-bottom: var(--pfd-space-lg);
    padding: 0;
}

.pfd-breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--pfd-space-xs);
    list-style: none;
    margin: 0;
    padding: 0;
}

.pfd-breadcrumb-item {
    display: flex;
    align-items: center;
}

.pfd-breadcrumb-link {
    color: var(--pfd-text-secondary);
    text-decoration: none;
    font-size: var(--pfd-text-sm);
    transition: var(--pfd-transition);
    font-weight: 500;
}

.pfd-breadcrumb-link:hover {
    color: var(--pfd-primary);
    text-decoration: underline;
}

.pfd-breadcrumb-separator {
    color: var(--pfd-text-tertiary);
    font-size: var(--pfd-text-sm);
    user-select: none;
}

.pfd-breadcrumb-current {
    color: var(--pfd-text-primary);
    font-size: var(--pfd-text-sm);
    font-weight: 600;
}

.pfd-breadcrumb-current span {
    cursor: default;
}

/* Responsive breadcrumbs */
@media (max-width: 480px) {
    .pfd-breadcrumb-link,
    .pfd-breadcrumb-separator,
    .pfd-breadcrumb-current {
        font-size: var(--pfd-text-xs);
    }
}

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

.pfd-firm-header {
    background: var(--pfd-bg-primary);
    border: 1px solid var(--pfd-border-light);
    border-radius: var(--pfd-radius-xl);
    padding: var(--pfd-space-2xl);
    margin-bottom: var(--pfd-space-xl);
    box-shadow: var(--pfd-shadow-md);
    transition: var(--pfd-transition);
}

.pfd-firm-header:hover {
    box-shadow: var(--pfd-shadow-lg);
}

.pfd-header-content {
    display: flex;
    align-items: flex-start;
    gap: var(--pfd-space-xl);
    flex-wrap: wrap;
}

/* Logo */
.pfd-logo-container {
    flex-shrink: 0;
}

.pfd-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: var(--pfd-bg-primary);
    border-radius: var(--pfd-radius-xl);
    padding: var(--pfd-space-md);
    box-shadow: var(--pfd-shadow-md);
    transition: var(--pfd-transition);
}

.pfd-logo:hover {
    transform: scale(1.02);
    box-shadow: var(--pfd-shadow-lg);
}

/* Header Info */
.pfd-header-info {
    flex: 1;
    min-width: 320px;
}

.pfd-header-top {
    display: flex;
    align-items: center;
    gap: var(--pfd-space-lg);
    margin-bottom: var(--pfd-space-sm);
    flex-wrap: wrap;
}

.pfd-firm-name {
    font-size: var(--pfd-text-4xl);
    font-weight: 600;
    color: var(--pfd-text-primary);
    margin: 0;
    letter-spacing: -0.025em;
    line-height: 1.2;
    position: relative;
    top: 10px; /* Смещение на 10px вниз */
}

/* Flag icons styling */
.pfd-meta-item .fi {
    display: inline-block;
    width: 18px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    vertical-align: middle;
    margin-top: -2px;
}

/* Meta Information */
.pfd-firm-meta {
    display: flex;
    gap: var(--pfd-space-sm);
    flex-wrap: wrap;
    margin-bottom: 0;
}

.pfd-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: var(--pfd-text-sm);
    color: var(--pfd-text-primary);
    font-weight: 500;
    background: var(--pfd-bg-secondary);
    border-radius: 999px;
    border: 1px solid var(--pfd-border-light);
    transition: var(--pfd-transition);
    line-height: 1;
    width: fit-content; /* По ширине контента */
}

.pfd-meta-item:hover {
    background: var(--pfd-bg-tertiary);
    border-color: var(--pfd-gray-300);
}

/* Убираем цветные точки */

/* Badge */
.pfd-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--pfd-space-xs);
    padding: 4px 12px;
    border-radius: var(--pfd-radius-md);
    font-size: var(--pfd-text-sm);
    font-weight: 500;
}

.pfd-badge-success {
    background: var(--pfd-success-light);
    color: #166534;
}

/* Rating Section */
.pfd-rating-section {
    display: flex;
    align-items: center;
    gap: var(--pfd-space-lg);
}

/* Compact Trustpilot Rating */
.pfd-rating-compact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border: 2px solid var(--pfd-primary);
    border-radius: 999px;
    background: white;
    transition: var(--pfd-transition);
    line-height: 1;
}

.pfd-rating-compact:hover {
    box-shadow: var(--pfd-shadow-md);
    transform: translateY(-1px);
}

.pfd-rating-number {
    font-size: var(--pfd-text-lg);
    font-weight: 700;
    color: var(--pfd-text-primary);
    line-height: 1;
}

.pfd-rating-stars-compact {
    display: flex;
    gap: 1px;
    font-size: 0.875rem;
    line-height: 1;
}

.pfd-rating-stars-compact .star {
    color: var(--pfd-primary);
}

.pfd-rating-stars-compact .star.empty {
    color: var(--pfd-gray-300);
}

.pfd-rating-count-compact {
    color: var(--pfd-primary);
    font-weight: 600;
    font-size: var(--pfd-text-sm);
    line-height: 1;
}

.pfd-rating-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid var(--pfd-gray-300);
    border-radius: 50%;
    color: var(--pfd-gray-400);
    font-size: var(--pfd-text-xs);
    font-weight: 600;
    cursor: help;
    transition: var(--pfd-transition);
    line-height: 1;
}

.pfd-rating-help:hover {
    border-color: var(--pfd-primary);
    color: var(--pfd-primary);
}

/* Visit Website Button */
.pfd-header-cta {
    margin-left: auto;
    flex-shrink: 0;
}

.pfd-visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px; /* Та же высота что у .pfd-cta-button */
    background: var(--pfd-primary);
    color: #000;
    font-size: var(--pfd-text-base);
    font-weight: 600;
    border-radius: var(--pfd-radius-md);
    text-decoration: none;
    transition: var(--pfd-transition);
    box-shadow: var(--pfd-shadow-sm);
    white-space: nowrap;
}

.pfd-visit-btn:hover {
    background: var(--pfd-primary-hover);
    color: #000;
    box-shadow: var(--pfd-shadow-md);
    transform: translateY(-1px);
}

.pfd-visit-btn svg {
    flex-shrink: 0;
}

.pfd-visit-btn-text {
    line-height: 1;
}

/* Responsive adjustments for Visit button */
@media (max-width: 768px) {
    .pfd-header-cta {
        width: 100%;
        order: 3;
        margin-left: 0;
        margin-top: var(--pfd-space-md);
    }
    
    .pfd-visit-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
}

.pfd-rating-section-old {
    display: flex;
    align-items: center;
    gap: var(--pfd-space-xl);
    padding-top: var(--pfd-space-lg);
    margin-top: var(--pfd-space-lg);
    border-top: 1px solid var(--pfd-border-light);
}

.pfd-rating-box {
    display: flex;
    align-items: center;
    gap: var(--pfd-space-md);
}

.pfd-rating-score {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pfd-primary);
    line-height: 1;
}

.pfd-rating-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pfd-stars {
    color: var(--pfd-primary);
    font-size: 1.25rem;
    letter-spacing: 2px;
    line-height: 1;
}

.pfd-rating-count {
    color: var(--pfd-text-tertiary);
    font-size: var(--pfd-text-xs);
}

.pfd-trustpilot-link {
    display: inline-flex;
    align-items: center;
    gap: var(--pfd-space-xs);
    padding: 10px 20px;
    background: var(--pfd-success);
    color: white;
    text-decoration: none;
    border-radius: var(--pfd-radius-md);
    font-weight: 500;
    font-size: var(--pfd-text-sm);
    transition: var(--pfd-transition);
    box-shadow: var(--pfd-shadow-sm);
}

.pfd-trustpilot-link:hover {
    background: #059669;
    box-shadow: var(--pfd-shadow-md);
    transform: translateY(-1px);
}

/* ========================================
   CTA BUTTON
   ======================================== */

.pfd-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--pfd-space-xs);
    padding: 14px 32px;
    background: var(--pfd-primary);
    color: #000;
    text-decoration: none;
    border-radius: var(--pfd-radius-md);
    font-weight: 600;
    font-size: var(--pfd-text-base);
    transition: var(--pfd-transition);
    box-shadow: var(--pfd-shadow-md);
    border: none;
    cursor: pointer;
}

.pfd-cta-button:hover {
    background: var(--pfd-primary-hover);
    color: #000;
    box-shadow: var(--pfd-shadow-lg);
    transform: translateY(-2px);
}

.pfd-cta-button:active {
    transform: translateY(0);
}

/* ========================================
   PROMO BANNER
   ======================================== */

.pfd-promo-banner {
    background: linear-gradient(135deg, var(--pfd-gray-900) 0%, var(--pfd-gray-800) 100%);
    color: white;
    padding: var(--pfd-space-xl);
    border-radius: var(--pfd-radius-2xl);
    margin-bottom: var(--pfd-space-xl);
    box-shadow: var(--pfd-shadow-xl);
    border: 1px solid rgba(245, 158, 11, 0.2);
    position: relative;
    overflow: hidden;
}

.pfd-promo-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.pfd-promo-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--pfd-space-xl);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.pfd-promo-text {
    flex: 1;
    min-width: 280px;
}

.pfd-promo-text h3 {
    font-size: var(--pfd-text-xl);
    margin: 0 0 var(--pfd-space-xs);
    display: flex;
    align-items: center;
    gap: var(--pfd-space-xs);
    color: var(--pfd-primary);
    font-weight: 600;
}

.pfd-promo-text p {
    color: var(--pfd-gray-200);
    margin: 0;
    line-height: 1.6;
}

.pfd-promo-code {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    padding: 4px 12px;
    border-radius: var(--pfd-radius-sm);
    font-weight: 600;
    font-size: var(--pfd-text-sm);
    color: var(--pfd-primary);
    border: 1px solid rgba(245, 158, 11, 0.3);
    margin-left: var(--pfd-space-xs);
}

/* ========================================
   TABS SYSTEM
   ======================================== */

.pfd-tabs-container {
    background: var(--pfd-bg-primary);
    border: 1px solid var(--pfd-border-light);
    border-radius: var(--pfd-radius-xl);
    overflow: hidden;
    box-shadow: var(--pfd-shadow-md);
    margin-bottom: var(--pfd-space-xl);
}

.pfd-tabs-nav {
    display: flex;
    background: var(--pfd-bg-secondary);
    border-bottom: 1px solid var(--pfd-border-light);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.pfd-tabs-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.pfd-tab-button {
    flex: 1;
    padding: 16px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--pfd-text-base);
    font-weight: 500;
    color: var(--pfd-text-secondary);
    transition: var(--pfd-transition-fast);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    position: relative;
}

.pfd-tab-button::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--pfd-primary);
    transition: var(--pfd-transition);
    transform: translateX(-50%);
}

.pfd-tab-button:hover {
    color: var(--pfd-primary);
    background: rgba(245, 158, 11, 0.05);
}

.pfd-tab-button.active {
    color: var(--pfd-primary);
    background: var(--pfd-bg-primary);
}

.pfd-tab-button.active::after {
    width: 100%;
}

.pfd-tab-content {
    display: none;
    padding: var(--pfd-space-2xl);
    animation: fadeIn 0.3s ease-in;
}

.pfd-tab-content.active {
    display: block;
}

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

/* ========================================
   INFO CARDS GRID
   ======================================== */

.pfd-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--pfd-space-md);
    margin-bottom: var(--pfd-space-md);
}

/* Full width card for desktop */
.pfd-info-card-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .pfd-info-grid {
        grid-template-columns: 1fr;
    }
    
    .pfd-info-card-full {
        grid-column: auto;
    }
}

.pfd-info-card {
    background: var(--pfd-bg-secondary);
    padding: var(--pfd-space-lg);
    border-radius: var(--pfd-radius-lg);
    border: 1px solid var(--pfd-border-light);
    transition: var(--pfd-transition);
}

.pfd-info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pfd-shadow-lg);
    border-color: var(--pfd-gray-300);
}

.pfd-info-card h4 {
    color: var(--pfd-text-primary);
    margin: 0 0 var(--pfd-space-md);
    font-size: var(--pfd-text-lg);
    font-weight: 600;
}

.pfd-info-card p,
.pfd-info-card ul {
    color: var(--pfd-text-primary);
    font-size: var(--pfd-text-sm);
    margin: 0;
    line-height: 1.7;
}

.pfd-info-card ul {
    list-style: none;
    padding-left: 0;
}

.pfd-info-card li {
    padding: var(--pfd-space-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--pfd-space-xs);
}

.pfd-info-card li::before {
    content: "✓";
    color: var(--pfd-success);
    font-weight: bold;
    font-size: var(--pfd-text-sm);
    flex-shrink: 0;
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */

.pfd-content-section {
    margin-bottom: var(--pfd-space-md);
}

.pfd-content-section h3 {
    color: var(--pfd-text-primary);
    margin: 0 0 var(--pfd-space-sm);
    font-size: var(--pfd-text-2xl);
    font-weight: 600;
    letter-spacing: -0.025em;
}

.pfd-content-section h4 {
    color: var(--pfd-text-primary);
    margin: var(--pfd-space-sm) 0 var(--pfd-space-xs);
    font-size: var(--pfd-text-xl);
    font-weight: 600;
}

.pfd-content-section p {
    color: var(--pfd-text-primary);
    line-height: 1.7;
    margin-bottom: var(--pfd-space-xs);
}

/* ========================================
   FEATURE LIST
   ======================================== */

.pfd-feature-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--pfd-space-md);
    margin: var(--pfd-space-md) 0;
}

@media (max-width: 1024px) {
    .pfd-feature-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .pfd-feature-list {
        grid-template-columns: 1fr;
    }
}

.pfd-feature-item {
    display: flex;
    align-items: center;
    gap: var(--pfd-space-sm);
    padding: var(--pfd-space-md);
    background: var(--pfd-bg-secondary);
    border-radius: var(--pfd-radius-md);
    border: 1px solid var(--pfd-border-light);
    transition: var(--pfd-transition);
}

.pfd-feature-item:hover {
    background: var(--pfd-bg-tertiary);
    transform: translateX(4px);
}

.pfd-feature-icon {
    font-size: var(--pfd-text-xl);
    flex-shrink: 0;
}

.pfd-icon-yes {
    color: var(--pfd-success);
}

.pfd-icon-no {
    color: var(--pfd-danger);
}

/* ========================================
   COUNTRIES LIST
   ======================================== */

.pfd-countries-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--pfd-space-xs);
    margin-top: var(--pfd-space-md);
}

.pfd-country-tag {
    padding: 6px 12px;
    background: var(--pfd-danger-light);
    color: #991b1b;
    border-radius: var(--pfd-radius-sm);
    font-size: var(--pfd-text-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--pfd-transition);
}

.pfd-country-tag:hover {
    background: #fecaca;
    transform: scale(1.02);
}

.pfd-country-flag {
    font-size: 1.25rem;
    line-height: 1;
}

.pfd-country-name {
    font-weight: 600;
}

/* ========================================
   DATA TABLES
   ======================================== */

.pfd-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: var(--pfd-space-lg) 0;
}

.pfd-data-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--pfd-radius-lg);
    overflow: hidden;
    box-shadow: var(--pfd-shadow-sm);
    min-width: 600px; /* Минимальная ширина для прокрутки */
}

.pfd-data-table th,
.pfd-data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--pfd-border-light);
}

.pfd-data-table th {
    background: var(--pfd-bg-secondary);
    font-weight: 600;
    color: var(--pfd-text-primary);
    font-size: var(--pfd-text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pfd-data-table tr {
    transition: var(--pfd-transition);
}

.pfd-data-table tbody tr:hover {
    background: var(--pfd-bg-secondary);
}

.pfd-data-table tbody tr:last-child td {
    border-bottom: none;
}

.pfd-leverage-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--pfd-primary-light);
    color: #92400e;
    border-radius: var(--pfd-radius-sm);
    font-weight: 500;
    font-size: var(--pfd-text-sm);
}

/* ========================================
   CHALLENGES TABLE
   ======================================== */

.pfd-challenges-table-wrapper {
    margin: var(--pfd-space-lg) 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pfd-challenges-table-container {
    background: var(--pfd-bg-primary);
    border-radius: var(--pfd-radius-lg);
    overflow: hidden;
    min-width: 900px;
    box-shadow: var(--pfd-shadow-md);
    border: 1px solid var(--pfd-border-light);
}

.pfd-table-header {
    display: grid;
    grid-template-columns: 100px 80px 80px 100px 120px 120px 100px 100px;
    gap: 12px;
    padding: 16px 20px;
    background: var(--pfd-bg-secondary);
    font-weight: 600;
    font-size: var(--pfd-text-sm);
    color: var(--pfd-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pfd-challenges-table {
    display: flex;
    flex-direction: column;
}

.pfd-challenge-row {
    display: grid;
    grid-template-columns: 100px 80px 80px 100px 120px 120px 100px 100px;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--pfd-border-light);
    transition: var(--pfd-transition);
    align-items: center;
}

.pfd-challenge-row:hover {
    background: var(--pfd-bg-secondary);
}

.pfd-challenge-row:last-child {
    border-bottom: none;
}

.pfd-price-value {
    font-weight: 600;
    color: var(--pfd-text-primary);
    font-size: var(--pfd-text-lg);
}

.pfd-old-price {
    font-size: var(--pfd-text-sm);
    color: var(--pfd-text-tertiary);
    text-decoration: line-through;
    margin-top: 2px;
}

.pfd-discount-badge {
    display: inline-block;
    background: var(--pfd-danger);
    color: white;
    padding: 2px 8px;
    border-radius: var(--pfd-radius-sm);
    font-size: var(--pfd-text-xs);
    font-weight: 600;
    margin-top: 4px;
}

.pfd-info-value {
    color: var(--pfd-text-primary);
    font-size: var(--pfd-text-sm);
}

.pfd-profit-split-container {
    width: 100%;
}

.pfd-profit-bar-container {
    width: 100%;
    height: 8px;
    background: var(--pfd-gray-200);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
}

.pfd-profit-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pfd-primary) 0%, var(--pfd-success) 100%);
    transition: width 0.3s ease;
    border-radius: 999px;
}

/* ========================================
   BUTTONS
   ======================================== */

.pfd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--pfd-space-xs);
    padding: 10px 24px;
    border-radius: var(--pfd-radius-md);
    font-weight: 600;
    font-size: var(--pfd-text-sm);
    text-decoration: none;
    text-align: center;
    transition: var(--pfd-transition);
    cursor: pointer;
    border: none;
}

.pfd-btn-primary {
    background: var(--pfd-primary);
    color: #000;
    box-shadow: var(--pfd-shadow-sm);
}

.pfd-btn-primary:hover {
    background: var(--pfd-primary-hover);
    color: #000;
    box-shadow: var(--pfd-shadow-md);
    transform: translateY(-2px);
}

.pfd-btn-primary:active {
    transform: translateY(0);
}

/* Buy button - larger with black text */
.pfd-btn-buy {
    padding: 10px 72px !important;
    min-width: 180px;
    color: var(--pfd-text-primary) !important;
    font-weight: 700;
}

.pfd-btn-buy:hover {
    color: var(--pfd-text-primary) !important;
}

/* ========================================
   CHALLENGES NOTE
   ======================================== */

.pfd-challenges-note {
    margin-top: var(--pfd-space-lg);
    padding: var(--pfd-space-md);
    background: var(--pfd-primary-light);
    border-left: 4px solid var(--pfd-primary);
    border-radius: var(--pfd-radius-md);
}

.pfd-challenges-note p {
    margin: 0;
    color: #92400e;
    font-size: var(--pfd-text-sm);
    line-height: 1.6;
}

/* ========================================
   ERROR STATE
   ======================================== */

.pfd-error {
    padding: var(--pfd-space-xl);
    background: var(--pfd-danger-light);
    color: #991b1b;
    border-radius: var(--pfd-radius-lg);
    text-align: center;
    border: 2px solid var(--pfd-danger);
    font-weight: 500;
}

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

@media (max-width: 1024px) {
    .pfd-table-header,
    .pfd-challenge-row {
        grid-template-columns: 90px 70px 70px 90px 100px 110px 90px 90px;
        gap: 10px;
        padding: 16px;
    }
    
    .pfd-rating-section {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--pfd-space-lg);
    }
}

@media (max-width: 768px) {
    .pfd-container {
        padding: 4px; /* Минимальные отступы по бокам */
    }
    
    .pfd-firm-header {
        padding: var(--pfd-space-md);
        margin-left: 4px;
        margin-right: 4px;
    }
    
    .pfd-header-content {
        flex-direction: column;
        gap: var(--pfd-space-lg);
    }
    
    .pfd-logo {
        width: 100px;
        height: 100px;
    }
    
    /* Выравнивание H1 и рейтинга */
    .pfd-header-top {
        align-items: center;
        gap: var(--pfd-space-md);
    }
    
    .pfd-firm-name {
        font-size: var(--pfd-text-3xl);
        line-height: 1.2;
    }
    
    /* Показываем только одну звезду на мобилке */
    .pfd-rating-stars-compact .star:not(:first-child) {
        display: none;
    }
    
    /* Адаптивные чипсы на мобилке */
    .pfd-firm-meta {
        flex-wrap: nowrap; /* Все чипсы в одну строку */
        gap: 6px;
        overflow-x: auto; /* Если не влезают - скролл */
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px; /* Место для скроллбара */
    }
    
    .pfd-meta-item {
        font-size: var(--pfd-text-xs);
        padding: 5px 10px;
        width: auto !important;
        flex-shrink: 0; /* Не сжимать чипсы */
        white-space: nowrap; /* Текст в одну строку */
    }
    
    .pfd-tab-content {
        padding: var(--pfd-space-md);
        overflow: visible; /* Важно для работы sticky */
    }
    
    .pfd-info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Challenges - полностью переработанный скролл */
    .pfd-challenges-table-wrapper {
        margin: 0 -16px; /* Компенсация padding родителя */
        overflow: visible;
    }
    
    .pfd-challenges-table-container {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        padding: 0 16px; /* Возвращаем padding */
    }
    
    .pfd-table-header {
        display: grid !important;
        grid-template-columns: 70px 70px 70px 70px 70px 70px 70px 90px;
        gap: 4px;
        min-width: 630px; /* Сумма всех колонок + gaps */
        background: var(--pfd-bg-tertiary);
        padding: 10px 4px;
        font-weight: 600;
        font-size: 10px;
        border-radius: var(--pfd-radius-md) var(--pfd-radius-md) 0 0;
        position: relative;
    }
    
    .pfd-table-header > div {
        padding: 0 4px;
    }
    
    /* Фиксация последней колонки в header */
    .pfd-table-header .pfd-col-actions {
        position: sticky;
        right: 0;
        background: var(--pfd-bg-tertiary);
        z-index: 12;
        box-shadow: -4px 0 8px rgba(0, 0, 0, 0.1);
        padding: 0 4px 0 8px;
        margin-right: -16px; /* Компенсация padding контейнера */
        padding-right: 16px; /* Добавляем справа */
    }
    
    .pfd-challenges-table {
        display: flex;
        flex-direction: column;
    }
    
    .pfd-challenge-row {
        display: grid !important;
        grid-template-columns: 70px 70px 70px 70px 70px 70px 70px 90px;
        gap: 4px;
        min-width: 630px; /* Сумма всех колонок + gaps */
        padding: 10px 4px;
        border-bottom: 1px solid var(--pfd-border-light);
        align-items: center;
        background: white;
        position: relative;
    }
    
    .pfd-challenge-row > div {
        padding: 0 4px;
        font-size: 11px;
    }
    
    /* Фиксация кнопки Buy в строках */
    .pfd-challenge-row .pfd-col-actions {
        position: sticky;
        right: 0;
        background: white;
        z-index: 11;
        box-shadow: -4px 0 8px rgba(0, 0, 0, 0.1);
        padding: 0 4px 0 8px;
        margin-right: -16px; /* Компенсация padding контейнера */
        padding-right: 16px; /* Добавляем справа */
    }
    
    .pfd-btn-buy {
        padding: 8px 12px !important;
        min-width: 75px !important;
        font-size: 11px;
        white-space: nowrap;
        font-weight: 700;
    }
    
    .pfd-btn {
        padding: 10px 16px;
        font-size: var(--pfd-text-sm);
    }
    
    .pfd-promo-banner {
        padding: var(--pfd-space-md);
        margin-left: 4px;
        margin-right: 4px;
    }
    
    .pfd-promo-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pfd-cta-button {
        width: 100%;
    }
    
    /* Улучшенная видимость значений */
    .pfd-price-value,
    .pfd-info-value {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .pfd-firm-name {
        font-size: var(--pfd-text-2xl);
    }
    
    .pfd-firm-meta {
        flex-direction: column;
        gap: var(--pfd-space-xs);
    }
    
    .pfd-rating-score {
        font-size: 2rem;
    }
}

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

@media print {
    .pfd-container {
        max-width: 100%;
    }
    
    .pfd-firm-header,
    .pfd-tabs-container,
    .pfd-promo-banner {
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .pfd-tab-content {
        display: block !important;
    }
    
    .pfd-tabs-nav {
        display: none;
    }
}

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

/* Focus styles */
.pfd-tab-button:focus-visible,
.pfd-btn:focus-visible,
.pfd-cta-button:focus-visible {
    outline: 2px solid var(--pfd-primary);
    outline-offset: 2px;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pfd-firm-header,
    .pfd-tabs-container,
    .pfd-info-card {
        border-width: 2px;
    }
}
