/* assets/css/pricing.css */

/* --- ZÁKLADNÍ CENÍK (Desktop) --- */
.pricing-section {
    background: var(--white);
    position: relative;
}

.pricing-container {
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out;
}

.price-table-wrapper {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    position: relative;
}

.price-table-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #00d084 100%);
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--off-white) 100%);
}

.modern-table thead tr {
    border-bottom: 2px solid var(--gray-200);
}

.modern-table th {
    padding: 20px 24px;
    text-align: left;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modern-table th.text-right {
    text-align: right;
}

.modern-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: all var(--transition-base);
}

.modern-table tbody tr:last-child {
    border-bottom: none;
}

.modern-table tbody tr:hover {
    background: var(--primary-light);
    transform: translateX(4px);
}

.modern-table td {
    padding: 24px;
    color: var(--text-primary);
    vertical-align: middle;
}

.modern-table td.text-right {
    text-align: right;
}

/* --- STYLY PRO VLAJKY A MĚNY --- */
.currency-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.currency-flag {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* Efekt při najetí na řádek tabulky */
.modern-table tbody tr:hover .currency-flag {
    transform: scale(1.1) rotate(5deg);
}

.tarif-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tarif-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.tarif-duration {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Stará třída (pro jistotu zachována) */
.price-tag {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, #00d084 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    position: relative;
}

/* NOVÁ TŘÍDA PRO CENY (aby na ni nesahal JS šablony) */
.vip-rate {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, #00d084 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    position: relative;
}

.vip-rate::after,
.price-tag::after {
    content: ' CZK';
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    -webkit-text-fill-color: var(--text-secondary);
    margin-left: 4px;
}

/* --- VIP SEKCE S IKONAMI (GRID) --- */

.vip-section {
    background: var(--secondary); /* Tmavé pozadí */
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.vip-section::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 168, 107, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.vip-card {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.vip-card .section-header h2 {
    color: var(--white);
    -webkit-text-fill-color: var(--white);
    text-shadow: none;
    margin-top: 15px;
    font-size: 3rem;
}

.vip-card .tag-line {
    background: rgba(0, 168, 107, 0.2);
    color: var(--primary);
}

/* Grid layout */
.vip-benefit-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 70px;
}

/* Společný styl pro kartu */
.vip-benefit-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: row; /* Ikona vlevo, text vpravo */
    align-items: flex-start;
    gap: 24px;
}

.vip-benefit-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 168, 107, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

/* Kontejner pro ikonu */
.vip-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.vip-benefit-item:hover .vip-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Zelená varianta (pro aktivní benefity) */
.vip-icon.green-glow {
    background: linear-gradient(135deg, rgba(0, 168, 107, 0.2) 0%, rgba(0, 168, 107, 0.1) 100%);
    border: 1px solid rgba(0, 168, 107, 0.3);
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 168, 107, 0.15);
}

/* Stříbrná varianta (pro zamčený benefit) */
.vip-icon.silver-glow {
    background: linear-gradient(135deg, #e0e4eb 0%, #eff2f6 100%);
    border: 1px solid #dce1e8;
    color: #8a94a6;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.vip-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

/* Obsah karty */
.vip-content {
    flex: 1;
}

.vip-benefit-item h4 {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.3;
}

/* Odstraněny staré tečky ::before */
.vip-benefit-item h4::before {
    display: none;
}

.vip-benefit-item p {
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* Specifická úprava pro zamčenou kartu */
.vip-benefit-item.locked {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.vip-benefit-item.locked h4 {
    color: rgba(255, 255, 255, 0.9);
}

/* Tlačítko VIP */
.vip-action {
    margin-top: 60px;
    text-align: center;
}

.btn-vip {
    padding: 18px 48px;
    font-size: 1.1rem;
    background: var(--primary);
    border-radius: var(--radius-full);
    border: none;
    color: var(--white);
    font-weight: 700;
    box-shadow: var(--shadow-green);
    transition: all var(--transition-base);
}

.btn-vip:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 168, 107, 0.4);
}

/* Poznámky pod tabulkou */
.pricing-footnotes {
    margin-top: 32px;
    padding: 24px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
}

.pricing-footnotes p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- RESPONZIVITA PRO TABLETY A MOBILY --- */

@media (max-width: 992px) {
    .vip-benefit-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vip-card .section-header h2 {
        font-size: 2.5rem;
    }
}

/* TRANSFORMACE NA KARTY (CARD VIEW) PRO MOBILY */
@media (max-width: 768px) {
    
    /* 1. Skryjeme klasickou hlavičku tabulky */
    .modern-table thead {
        display: none;
    }

    /* 2. Zrušíme tabulkové chování (vše na bloky) */
    .modern-table, .modern-table tbody, .modern-table tr, .modern-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }
    
    .price-table-wrapper {
        padding: 15px; /* Menší padding na mobilu */
    }

    /* 3. Styl pro jednu kartu (jeden řádek) */
    .modern-table tbody tr {
        background: var(--white);
        margin-bottom: 16px;
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-lg);
        box-shadow: 0 4px 12px rgba(0,0,0,0.03);
        padding: 16px;
        position: relative;
    }

    /* Vypneme hover efekt */
    .modern-table tbody tr:hover {
        transform: none;
        background: var(--white);
    }

    /* 4. Úprava buněk uvnitř karty */
    .modern-table td {
        padding: 8px 0;
        text-align: right;
        border-bottom: 1px solid var(--gray-50);
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .modern-table td:last-child {
        border-bottom: none;
    }

    /* --- Vytvoření popisků (Labels) pomocí CSS --- */
    
    /* 1. Sloupec: Měna (Vlajka + Kód) - Hlavní nadpis karty */
    .modern-table td:nth-of-type(1) {
        justify-content: flex-start;
        border-bottom: 2px solid var(--gray-100);
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    /* 2. Sloupec: Množství */
    .modern-table td:nth-of-type(2)::before {
        content: "Množství:";
        font-weight: 600;
        color: var(--text-secondary);
        font-size: 0.9rem;
    }

    /* 3. Sloupec: Nákup */
    .modern-table td:nth-of-type(3)::before {
        content: "Nakupujeme:";
        font-weight: 700;
        color: var(--text-primary); /* Zelená */
        font-size: 0.95rem;
    }

    /* 4. Sloupec: Prodej */
    .modern-table td:nth-of-type(4)::before {
        content: "Prodáváme:";
        font-weight: 700;
        color: var(--text-primary); /* Zelená */
        font-size: 0.95rem;
    }

    /* Úprava textů pro mobil */
    .vip-rate {
        font-size: 1.15rem;
    }

    .currency-wrapper {
        width: 100%;
    }

    .tarif-info {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .tarif-name {
        font-size: 1.25rem;
    }
    
    /* Skryjeme dlouhý název měny na mobilu, necháme jen kód (EUR) */
    .tarif-duration {
        display: none;
    }
    
    /* VIP Sekce úpravy */
    .vip-section {
        padding: 60px 0;
    }

    .vip-benefit-item {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .vip-icon {
        margin-bottom: 16px;
    }
}