/* 價格方案頁面樣式 */

/* 價格方案區塊 */
.pricing-toggle {
    padding: 30px 0;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.toggle-label {
    font-weight: 600;
    position: relative;
}

.toggle-label.active {
    color: var(--primary-color);
}

.save-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-alt);
    border: 2px solid var(--text-color);
    transition: var(--transition);
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
    border: 1px solid var(--text-color);
}

input:checked + .slider:before {
    transform: translateX(30px);
    background-color: var(--secondary-color);
}

.pricing-section {
    padding: 60px 0;
    background-color: var(--bg-color);
}

.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pricing-header h2 {
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.pricing-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
}

.pricing-header p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-light);
}

.pricing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.toggle-label {
    font-weight: 600;
    margin: 0 1rem;
    cursor: pointer;
}

.toggle-label.active {
    color: var(--primary-color);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    background-color: var(--primary-color);
    border-radius: 30px;
    cursor: pointer;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

.toggle-switch.yearly::after {
    left: 32px;
}

.pricing-save {
    display: inline-block;
    background-color: rgba(50, 153, 50, 0.1);
    color: var(--success);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 1rem;
}

/* 價格方案卡片 */
.pricing-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-card {
    background-color: var(--bg-color);
    border: 2px solid var(--text-color);
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}

.pricing-card::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 100%;
    height: 100%;
    background-color: transparent;
    border: 2px solid var(--text-color);
    z-index: -1;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card:hover::after {
    transform: translate(4px, 4px);
}

.pricing-card.popular {
    border-color: var(--primary-color);
    transform: scale(1.05);
    z-index: 1;
}

.pricing-card.popular::after {
    border-color: var(--primary-color);
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-5px);
}

.pricing-badge {
    position: absolute;
    top: 0;
    right: 2rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: translateY(-50%);
    z-index: 2;
}

.pricing-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 2px solid var(--text-color);
}

.pricing-card.basic .pricing-header {
    background-color: var(--accent-color);
    color: white;
}

.pricing-card.pro .pricing-header {
    background-color: var(--primary-color);
    color: white;
}

.pricing-card.gold .pricing-header {
    background-color: var(--secondary-color);
    color: white;
}

.pricing-header h3 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.pricing-price .currency {
    font-size: 1.5rem;
    vertical-align: super;
}

.pricing-price .period {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
}

.pricing-description {
    font-size: 0.9rem;
    opacity: 0.9;
}

.pricing-features {
    padding: 2rem;
}

.pricing-features ul {
    margin: 0;
    padding: 0;
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.pricing-features li i.fa-check {
    color: var(--success);
}

.pricing-features li i.fa-times {
    color: var(--text-light);
}

.pricing-features li.highlight {
    font-weight: 600;
    color: var(--primary-color);
}

.pricing-footer {
    padding: 1.5rem 2rem;
    text-align: center;
    background-color: var(--bg-alt);
    border-top: 2px solid var(--text-color);
}

/* 比較表格 */
.pricing-comparison {
    margin-top: 5rem;
}

.comparison-header {
    text-align: center;
    margin-bottom: 3rem;
}

.comparison-header h2 {
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.comparison-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
}

.comparison-header p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-light);
}

.comparison-table-container {
    overflow-x: auto;
    margin-bottom: 3rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid var(--text-color);
}

.comparison-table th,
.comparison-table td {
    padding: 1.25rem 1.5rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.comparison-table th {
    background-color: var(--bg-alt);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.comparison-table th:first-child {
    text-align: left;
    min-width: 250px;
}

.comparison-table tr:nth-child(even) {
    background-color: var(--bg-alt);
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.comparison-table i.fa-check {
    color: var(--success);
    font-size: 1.25rem;
}

.comparison-table i.fa-times {
    color: var(--text-light);
    font-size: 1.25rem;
}

.comparison-table .highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.comparison-table .plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.comparison-table .plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.comparison-table .plan-period {
    font-size: 0.875rem;
    color: var(--text-light);
}

.comparison-table .basic-col {
    background-color: rgba(0, 102, 204, 0.05);
}

.comparison-table .pro-col {
    background-color: rgba(255, 58, 47, 0.05);
}

.comparison-table .gold-col {
    background-color: rgba(0, 0, 0, 0.05);
}

.comparison-table .feature-category {
    background-color: var(--bg-alt);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

/* FAQ區塊 */
.pricing-faq {
    margin-top: 5rem;
    padding-top: 5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.faq-header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-header h2 {
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.faq-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
}

.faq-header p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-light);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
}

.faq-item {
    border: 2px solid var(--text-color);
    margin-bottom: 1rem;
    background-color: var(--bg-color);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: var(--bg-alt);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
}

.toggle-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.faq-answer {
    display: none;
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .toggle-icon i {
    transform: rotate(45deg);
}

/* 企業方案區塊 */
.enterprise-section {
    margin-top: 5rem;
    padding: 5rem 0;
    background-color: var(--bg-alt);
    text-align: center;
}

.enterprise-content {
    max-width: 800px;
    margin: 0 auto;
}

.enterprise-content h2 {
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.enterprise-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
}

.enterprise-content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.enterprise-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.enterprise-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.enterprise-feature i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* 響應式樣式 */
@media (max-width: 992px) {
    .pricing-card.popular {
        transform: scale(1);
    }
    
    .pricing-card.popular:hover {
        transform: translateY(-5px);
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .pricing-toggle {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pricing-save {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .enterprise-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .pricing-plans {
        grid-template-columns: 1fr;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
    }
    
    .comparison-table th:first-child {
        min-width: 200px;
    }
}
