/* Price Page Styles */
.price-background {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(5, 15, 30, 0.9), rgba(2, 8, 20, 0.95));
    position: relative;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* Service Tabs */
.service-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.service-tab {
    background: rgba(15, 25, 45, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(170, 204, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.8rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
    text-align: center;
    position: relative;
    font-family: inherit;
}

.service-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(170, 204, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.service-tab.active {
    background: linear-gradient(135deg, rgba(170, 204, 255, 0.2), rgba(136, 170, 255, 0.3));
    border-color: rgba(170, 204, 255, 0.4);
    color: #aaccff;
    box-shadow: 0 5px 15px rgba(170, 204, 255, 0.15);
}

/* Active Tab Indicator */
.service-tab.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Pricing Content */
.pricing-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.pricing-content.active {
    display: block;
}

.section-title {
    text-align: center;
    color: #aaccff;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(170, 204, 255, 0.3);
    font-family: inherit;
}

/* Pricing Container - 4 cards grid */
.pricing-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 1200px) {
    .pricing-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .pricing-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .pricing-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .service-tabs {
        gap: 0.5rem;
    }
    
    .service-tab {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .pricing-container {
        padding: 0 0.5rem;
    }
    
    .service-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* Pricing Card Styles - FIXED HEIGHT */
.pricing-card {
    background: rgba(25, 35, 55, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(170, 204, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    height: 550px; /* Fixed height for all cards */
    min-height: 550px; /* Ensure minimum height */
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: rgba(170, 204, 255, 0.25);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* Card Header with Gradient Backgrounds - FIXED HEIGHT */
.card-header {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    flex-shrink: 0; /* Prevent header from shrinking */
    min-height: 110px; /* Fixed minimum height for all headers */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.pricing-card.bronze .card-header {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.9), rgba(139, 69, 19, 0.9));
}

.pricing-card.silver .card-header {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.9), rgba(128, 128, 128, 0.9));
}

.pricing-card.gold .card-header {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(218, 165, 32, 0.9));
}

.pricing-card.platinum .card-header {
    background: linear-gradient(135deg, rgba(229, 228, 226, 0.9), rgba(180, 180, 180, 0.9));
}

#additional-content .pricing-card .card-header {
    background: linear-gradient(135deg, rgba(70, 130, 180, 0.9), rgba(30, 144, 255, 0.9));
}

.card-header h1 {
    color: #ffffff;
    font-size: 1.6rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: inherit;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.6em;
}

/* Убираем ограничение по строкам для заголовков карточек в Additional Services */
#additional-content .pricing-card .card-header h1 {
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    display: block !important;
    overflow: visible !important;
    white-space: normal !important;
    max-height: none !important;
    height: auto !important;
    min-height: auto !important;
    font-size: 1.4rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.3rem !important;
}

/* Увеличиваем высоту заголовка для дополнительных услуг */
#additional-content .pricing-card .card-header {
    min-height: 140px !important;
    height: auto !important;
    padding-top: 1.2rem !important;
    padding-bottom: 1.2rem !important;
}

.card-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.6em;
}

/* Уменьшаем высоту самой карточки, чтобы компенсировать увеличение заголовка */
#additional-content .pricing-card {
    height: 520px !important;
    min-height: 520px !important;
}

/* Уменьшаем максимальную высоту features, чтобы карточка не была слишком высокой */
#additional-content .pricing-card .features {
    max-height: 200px !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    #additional-content .pricing-card .card-header h1 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
    }
    
    #additional-content .pricing-card .card-header {
        min-height: 120px !important;
        padding: 1rem 0.8rem !important;
    }
    
    #additional-content .pricing-card {
        height: 500px !important;
        min-height: 500px !important;
    }
}

@media (max-width: 480px) {
    #additional-content .pricing-card .card-header h1 {
        font-size: 1.2rem !important;
    }
    
    #additional-content .pricing-card .card-header {
        min-height: 110px !important;
        padding: 0.8rem !important;
    }
    
    #additional-content .pricing-card {
        height: 480px !important;
        min-height: 480px !important;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    #additional-content .pricing-card .card-header h1 {
        font-size: 1.1rem !important;
    }
    
    #additional-content .pricing-card .card-header {
        min-height: 100px !important;
    }
    
    #additional-content .pricing-card {
        height: 460px !important;
        min-height: 460px !important;
    }
}

/* Features List with Scroll */
.features {
    list-style: none;
    padding: 1.5rem;
    margin: 0;
    flex: 1 1 auto; /* Take available space */
    overflow-y: auto; /* Enable vertical scroll */
    min-height: 200px; /* Minimum height */
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: rgba(170, 204, 255, 0.3) rgba(255, 255, 255, 0.05); /* For Firefox */
}

/* Webkit scrollbar styles */
.features::-webkit-scrollbar {
    width: 6px;
}

.features::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin: 5px 0;
}

.features::-webkit-scrollbar-thumb {
    background-color: rgba(170, 204, 255, 0.3);
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.features::-webkit-scrollbar-thumb:hover {
    background-color: rgba(170, 204, 255, 0.5);
}

.features li {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.6rem 0;
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    line-height: 1.4;
    font-family: inherit;
}

.features li:last-child {
    border-bottom: none;
}

.features li::before {
    content: "✓";
    color: #aaccff;
    margin-right: 0.75rem;
    font-weight: bold;
    font-size: 1rem;
    min-width: 20px;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* Price Buttons - FIXED POSITION */
.price-buttons {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex-shrink: 0; /* Prevent buttons from shrinking */
    margin-top: auto; /* Push to bottom */
    width: 100%;
    box-sizing: border-box;
}

/* Desktop specific button styles */
@media (min-width: 769px) {
    .price-buttons {
        min-height: 110px; /* Ensure consistent height for buttons container */
    }
    
    .buy-btn, .service-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        align-items: center;
    }
}

/* Mobile specific button styles */
@media (max-width: 768px) {
    .price-buttons {
        min-height: 100px; /* Slightly smaller on mobile */
        padding: 1rem;
    }
}

.buy-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.95rem;
    text-decoration: none;
    display: flex;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    justify-content: center;
    align-items: center;
    min-height: 44px; /* Minimum touch target size for mobile */
    width: 100%;
    box-sizing: border-box;
}

.buy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.buy-btn:hover::before {
    left: 100%;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.service-btn {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    border: none;
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.95rem;
    text-decoration: none;
    display: flex;
    font-family: inherit;
    justify-content: center;
    align-items: center;
    min-height: 44px; /* Minimum touch target size for mobile */
    width: 100%;
    box-sizing: border-box;
}

.service-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
    text-decoration: none;
    color: white;
}

/* Additional Services Cards */
#additional-content .pricing-card {
    background: rgba(30, 40, 60, 0.9);
}

/* Global Loader */
.loader-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loader-overlay.active {
    display: flex;
}

.hexagon-loader {
    display: flex;
    gap: 0.5rem;
}

.hexagon-loader .hexagon {
    width: 20px;
    height: 20px;
    background: #aaccff;
    animation: pulse 1.5s ease-in-out infinite;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.hexagon-loader .hexagon:nth-child(2) {
    animation-delay: 0.2s;
}

.hexagon-loader .hexagon:nth-child(3) {
    animation-delay: 0.4s;
}

.hexagon-loader .hexagon:nth-child(4) {
    animation-delay: 0.6s;
}

.hexagon-loader .hexagon:nth-child(5) {
    animation-delay: 0.8s;
}

.hexagon-loader .hexagon:nth-child(6) {
    animation-delay: 1s;
}

.loader-text {
    color: #aaccff;
    margin-top: 1rem;
    font-size: 1.1rem;
    animation: pulse 2s ease-in-out infinite;
    font-family: inherit;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

.pricing-card {
    animation: fadeIn 0.6s ease forwards;
}

/* Utility classes */
.text-light {
    color: #ffffff !important;
}

.text-dark {
    color: #0a1428 !important;
}

/* Main Container */
.pricing-main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .pricing-main-container {
        padding: 2rem 1rem;
    }
}

/* No Data State */
.no-data {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.6);
    grid-column: 1 / -1;
}

/* Loading State */
.loading-content {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.hexagon {
    width: 12px;
    height: 12px;
    background: #aaccff;
    animation: pulse 1.5s ease-in-out infinite;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.hexagon:nth-child(2) {
    animation-delay: 0.2s;
}

.hexagon:nth-child(3) {
    animation-delay: 0.4s;
}

/* Telegram specific styling */
#telegram-content .pricing-card.platinum .card-header {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.9), rgba(0, 100, 180, 0.9));
}

/* Bronze, Silver, Gold, Platinum specific color variations */
.pricing-card.bronze {
    border-left: 4px solid #cd7f32;
}

.pricing-card.silver {
    border-left: 4px solid #c0c0c0;
}

.pricing-card.gold {
    border-left: 4px solid #ffd700;
}

.pricing-card.platinum {
    border-left: 4px solid #e5e4e2;
}

/* Enhanced Responsive Adjustments */

/* Desktop (1200px and above) */
@media (min-width: 1200px) {
    .pricing-card {
        height: 560px;
        min-height: 560px;
    }
    
    .card-header {
        min-height: 120px;
        padding: 1.8rem 1.5rem;
    }
    
    .card-header h1 {
        font-size: 1.7rem;
        margin-bottom: 0.6rem;
    }
    
    .features {
        max-height: 260px;
    }
}

/* Tablet Landscape (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .pricing-card {
        height: 540px;
        min-height: 540px;
    }
    
    .card-header {
        min-height: 115px;
    }
    
    .card-header h1 {
        font-size: 1.5rem;
    }
    
    .features {
        max-height: 240px;
    }
}

/* Tablet Portrait (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .pricing-card {
        height: 520px;
        min-height: 520px;
    }
    
    .card-header {
        min-height: 110px;
        padding: 1.3rem 1.2rem;
    }
    
    .card-header h1 {
        font-size: 1.4rem;
        margin-bottom: 0.4rem;
    }
    
    .card-header p {
        font-size: 0.85rem;
    }
    
    .features {
        max-height: 220px;
        padding: 1.2rem;
    }
    
    .features li {
        font-size: 0.85rem;
        padding: 0.5rem 0;
    }
    
    .buy-btn, .service-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile (480px to 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    .pricing-card {
        height: 500px;
        min-height: 500px;
    }
    
    .card-header {
        min-height: 100px;
        padding: 1.2rem 1rem 0.8rem;
    }
    
    .card-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }
    
    .card-header p {
        font-size: 0.85rem;
    }
    
    .features {
        max-height: 200px;
        padding: 1rem;
    }
    
    .features li {
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }
    
    .buy-btn, .service-btn {
        padding: 0.8rem;
        font-size: 0.9rem;
        min-height: 40px;
    }
}

/* Small Mobile (below 480px) */
@media (max-width: 479px) {
    .pricing-card {
        height: 480px;
        min-height: 480px;
    }
    
    .card-header {
        min-height: 90px;
        padding: 1rem 0.8rem 0.6rem;
    }
    
    .card-header h1 {
        font-size: 1.4rem;
        margin-bottom: 0.3rem;
    }
    
    .card-header p {
        font-size: 0.8rem;
    }
    
    .features {
        max-height: 180px;
        padding: 0.8rem;
    }
    
    .features li {
        font-size: 0.8rem;
        padding: 0.3rem 0;
    }
    
    .price-buttons {
        padding: 0.8rem;
        min-height: 90px;
    }
    
    .buy-btn, .service-btn {
        padding: 0.7rem;
        font-size: 0.85rem;
        min-height: 38px;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
}

/* Extra Small Mobile (below 360px) */
@media (max-width: 359px) {
    .pricing-card {
        height: 460px;
        min-height: 460px;
    }
    
    .card-header {
        min-height: 85px;
        padding: 0.9rem 0.7rem 0.5rem;
    }
    
    .card-header h1 {
        font-size: 1.3rem;
    }
    
    .card-header p {
        font-size: 0.75rem;
    }
    
    .features {
        max-height: 160px;
    }
    
    .features li {
        font-size: 0.75rem;
    }
    
    .buy-btn, .service-btn {
        padding: 0.6rem;
        font-size: 0.8rem;
        min-height: 36px;
    }
}

/* Ensure buttons don't overflow on very long text */
.buy-btn, .service-btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fix for Firefox scrollbar */
@supports (scrollbar-width: thin) {
    .features {
        scrollbar-width: thin;
        scrollbar-color: rgba(170, 204, 255, 0.3) rgba(255, 255, 255, 0.05);
    }
}

/* Card content alignment fix */
.pricing-card {
    display: flex;
    flex-direction: column;
}

/* Ensure consistent button alignment across all cards */
.price-buttons {
    align-self: stretch;
}

/* Fix for long header text overflow */
.card-header h1, .card-header p {
    width: 100%;
}

/* Стили для сообщения о необходимости авторизации - ИСПРАВЛЕННЫЕ */
.auth-required-message {
    display: none;
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 8px 25px rgba(170, 204, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-required-message.active {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

.auth-required-message h3 {
    margin: 0 0 1rem 0;
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.auth-required-message p {
    margin: 0.8rem 0;
    opacity: 0.9;
    font-size: 1.1rem;
    line-height: 1.5;
}

.auth-required-message .auth-buttons {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-required-message .auth-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
    min-width: 120px;
}

.auth-required-message .auth-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для заблокированных кнопок */
.buy-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.5), rgba(118, 75, 162, 0.5)) !important;
}

.buy-btn[data-tooltip] {
    position: relative;
}

.buy-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(51, 51, 51, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 8px;
    font-size: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Адаптивность для сообщения о авторизации */
@media (max-width: 768px) {
    .auth-required-message {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .auth-required-message h3 {
        font-size: 1.5rem;
    }
    
    .auth-required-message p {
        font-size: 1rem;
    }
    
    .auth-required-message .auth-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .auth-required-message .auth-btn {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .auth-required-message {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .auth-required-message h3 {
        font-size: 1.3rem;
    }
    
    .auth-required-message p {
        font-size: 0.9rem;
    }
}