/* HomePriceSection.css */

.pricing-section {
    padding: clamp(60px, 10vw, 120px) 0;
    position: relative;
    background-color: #ffffff; 
    overflow: hidden;
    z-index: 1;
}

.pricing-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px; 
    background: linear-gradient(to bottom, #ffffff 0%, transparent 100%);
    z-index: 5; 
    pointer-events: none;
}

.pricing-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px; 
    background: linear-gradient(to top, #ffffff 0%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}

.pricing-grid-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #ffffff;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, #acf6ee 1px, transparent 1px),
        linear-gradient(to bottom, #acf6ee 1px, transparent 1px);
    background-size: 4.5rem 4.5rem;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, #000 10%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, #000 10%, transparent 100%);
    opacity: 0.5;
    z-index: 2;
}

.grid-pattern-cyan {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, #14E5D1 1px, transparent 1px),
        linear-gradient(to bottom, #14E5D1 1px, transparent 1px);
    background-size: 6rem 4rem;
    mask-image: radial-gradient(ellipse 120% 55% at 50% 50%, #000 70%, transparent 110%);
    -webkit-mask-image: radial-gradient(ellipse 120% 55% at 50% 50%, #000 70%, transparent 110%);
    opacity: 0.3;
    z-index: 3;
}

.pricing-grid-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, #acf6ee 0%, #e7f0dc 40%, transparent 70%);
    opacity: 0.6;
    z-index: 1;
}

@media (min-width: 1600px) {
    .pricing-cards-grid {
        padding: 0 15%; 
    }
}

@media (max-width: 1200px) {
    .pricing-cards-grid {
        padding: 0 40px;
    }
}

.pricing-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 60px;
    padding: 0 20px;
}


@media (max-width: 768px) {
    .grid-pattern {
        background-size: 3rem 3rem; 
    }
    
    .pricing-grid-bg {
        background: radial-gradient(ellipse 100% 100% at 50% 50%, 
                    #acf6ee 0%, 
                    #e7f0dc 50%, 
                    #ffffff 100%);
    }

    .pricing-switch-container {
        gap: 10px; 
    }
    
    .uiverse-switch-wrapper {
        --switch-scale: 0.55; 
    }

    .switch-label {
        font-size: 0.9rem; 
    }

    .discount-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
}

@media (max-width: 400px) {
    .yearly-badge-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}

.pricing-section .features-main-title {
    margin-top: 25px;
}

.pricing-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Pricing Switch Styles --- */

.switch-label {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1rem;
}

.pricing-switch-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px; 
    margin-top: 30px;
    direction: rtl;
}

.yearly-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 5px; 
}

.discount-badge {
    background: var(--primary-cyan);
    color: var(--dark-teal);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
    animation: badge-float 3s ease-in-out infinite;
}



@keyframes badge-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.switch-label {
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .pricing-arrow {
        display: none; 
    }
    .discount-badge {
        margin-right: 5px;
        font-size: 0.7rem;
    }
}

/* --- Uiverse Neumorphic Switch --- */
.uiverse-switch-wrapper {
    --switch-scale: 0.7; 
    transform: scale(var(--switch-scale));
    flex-shrink: 0;
}

#pricing-toggle {
    display: none;
}

.uiverse-label {
    height: 60px;
    width: 120px;
    background-color: #ffffff;
    border-radius: 30px;
    box-shadow: inset 0 0 5px 4px rgba(255, 255, 255, 1),
                inset 0 0 20px 1px rgba(0, 0, 0, 0.488), 
                10px 20px 30px rgba(0, 0, 0, 0.096),
                inset 0 0 0 3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.4s;
}

.uiverse-label:hover {
    transform: perspective(100px) rotateX(5deg) rotateY(-5deg);
}

#pricing-toggle:checked ~ .uiverse-label:hover {
    transform: perspective(100px) rotateX(-5deg) rotateY(5deg);
}

.uiverse-label::before {
    position: absolute;
    content: "";
    height: 40px;
    width: 40px;
    border-radius: 50%;
    background-color: #000000;
    background-image: linear-gradient(130deg, var(--primary-cyan) 10%, #ffffff 11%, var(--dark-teal) 62%);
    left: 10px;
    box-shadow: 0 2px 1px rgba(0, 0, 0, 0.3),
                10px 10px 10px rgba(0, 0, 0, 0.3);
    transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#pricing-toggle:checked ~ .uiverse-label::before {
    left: 70px;
    background-image: linear-gradient(315deg, var(--dark-teal) 0%, var(--primary-cyan) 70%);
}

/* --- Pricing Cards Grid --- */
.pricing-cards-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 25px;
    margin-top: 50px;
    padding: 0 8%;
}

.price-card {
    background: white;
    padding: 40px 30px;
    border-radius: 25px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.price-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 35%; 
    background-image: 
        url('../images/price_cloud.png'), 
        linear-gradient(208deg, rgba(20, 229, 209, 0.4) 0%, rgba(231, 240, 220, 0.2) 51%, rgba(255, 255, 255, 0) 98%);
    background-position: center top;
    background-repeat: no-repeat;
    background-size: 100% auto, 100% 70%;
    opacity: 0; 
    transition: opacity 0.4s ease;
    z-index: 1; 
    pointer-events: none;
    border-radius: 25px 25px 0 0;
}

.price-card:hover::after {
    opacity: 1;
}

.card-plan-name, .card-price {
    position: relative;
    z-index: 2;
}

.price-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(7, 60, 59, 0.05);
}

.price-card.popular {
    border: 2px solid var(--primary-cyan);
    transform: scale(1.03);
    z-index: 2;
}

.popular-tag {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-cyan);
    color: white;
    padding: 5px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
}

.card-plan-name {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 20px;
}

.card-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 30px;
}

.amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--dark-teal);
    transition: all 0.3s ease;
}

.currency, .duration {
    font-size: 1rem;
    color: var(--text-sec);
    font-weight: 600;
}

.card-features {
    list-style: none;
    margin-bottom: 35px;
    flex-grow: 1;
}

.card-features li {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-features li i {
    color: var(--primary-cyan);
    font-size: 0.85rem;
}

.msg-limit {
    font-weight: 800;
    color: var(--dark-teal) !important;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    margin-top: 15px;
}

.price-btn {
    width: 100%;
    padding: 15px;
    border-radius: 50px;
    border: 1px solid var(--primary-cyan);
    background: transparent;
    color: var(--text-main);
    font-weight: 700;
    font-family: 'Cairo';
    cursor: pointer;
    transition: 0.3s;
}

.price-card.popular .price-btn {
    background: var(--primary-cyan);
    color: white;
}

.price-btn:hover {
    background: var(--primary-cyan);
    color: white;
}

@media (max-width: 992px) {
    .price-card.popular { transform: none; }
    .pricing-cards-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .pricing-cards-grid { grid-template-columns: 1fr; }
}