/* ==================== PRICING PAGE STYLES ==================== */

/* Header Section */
.pricing-header {
    position: relative;
    padding: 8rem 2rem 4rem;
    text-align: center;
    overflow: hidden;
    /* Use same background logic as landing hero if possible, or define own */
    background: radial-gradient(circle at top center, var(--color-primary-transparent, rgba(0, 166, 81, 0.1)) 0%, transparent 70%);
}

.header-bg-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.sub-headline {
    font-size: 1.25rem;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 166, 81, 0.1);
    border-radius: 2rem;
}

.main-headline {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    max-width: 800px;
    margin: 0 auto;
}

/* Pricing Cards Section */
.pricing-cards-section {
    padding: 2rem 2rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

/* Card Styles */
.pricing-card {
    background: var(--bg-card, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 1.5rem;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

/* Featured Card (Team) */
.pricing-card.featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 30px rgba(0, 166, 81, 0.15);
    transform: scale(1.05);
    /* Base scale for featured */
    z-index: 2;
}

.featured-tag {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: bold;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    box-shadow: 0 4px 10px rgba(0, 166, 81, 0.3);
}

/* Card Content */
.pricing-card .card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 166, 81, 0.15) 0%, transparent 70%);
    top: -300px;
    left: -300px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.price-wrapper {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    direction: rtl; /* RTL direction */
    justify-content: center;
    flex-wrap: nowrap;
}

.currency {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Currency Icon (Riyal Symbol) */
.currency-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin: 0;
}

/* Theme-based icon visibility */
[data-theme="dark"] .currency-icon-dark {
    display: inline-block;
}

[data-theme="dark"] .currency-icon-light {
    display: none;
}

[data-theme="light"] .currency-icon-dark {
    display: none;
}

[data-theme="light"] .currency-icon-light {
    display: inline-block;
}

.amount {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.old-price {
    font-size: 1.5rem;
    text-decoration: line-through;
    color: var(--text-secondary);
    margin-left: 0.5rem;
    opacity: 0.7;
}

.period {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Price Separator (/) */
.separator {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0;
}

.custom-price {
    font-size: 2rem;
    /* Reduced from 2.5rem to fit better */
    font-weight: 800;
    line-height: 1.2;
    padding: 0.5rem 0;
    display: block;
}

.early-bird-badge {
    background: rgba(167, 244, 74, 0.2);
    /* Accent color transparent */
    color: var(--color-accent, #A7F44A);
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* Darken in Light Mode (using attribute selector as seen in landing.html logic) */
[data-theme="light"] .early-bird-badge {
    color: #166F66;
    /* Darker teal for better contrast */
    background: rgba(22, 111, 102, 0.1);
}

.early-bird-badge.invisible {
    visibility: hidden;
}

/* Features List */
.plan-features {
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.check-icon {
    color: var(--color-primary);
    font-weight: bold;
    flex-shrink: 0;
}

/* Actions */
.btn-plan-action {
    display: block;
    width: 100%;
    padding: 1rem;
    text-align: center;
    border-radius: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background: transparent;
}

.btn-plan-action.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.btn-plan-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-plan-action.btn-primary:hover {
    background: #008840;
    box-shadow: 0 5px 20px rgba(0, 166, 81, 0.3);
}

/* Footer Link Container */
.pricing-footer-help {
    text-align: center;
    margin-top: 8rem;
    /* Increased to 8rem for more clearance */
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    position: relative;
    z-index: 20;
    backdrop-filter: none;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Improve visibility in Dark Mode (Default) */
[data-theme="dark"] .pricing-footer-help p,
.pricing-footer-help p {
    color: #E5E7EB;
    /* Lighter gray/white for better contrast */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Specific override if light mode needs to be darker */
[data-theme="light"] .pricing-footer-help p {
    color: var(--text-secondary);
    text-shadow: none;
}

.pricing-footer-help p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.pricing-footer-help a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid rgba(0, 166, 81, 0.3);
    padding-bottom: 2px;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

.pricing-footer-help a:hover {
    border-bottom-color: var(--color-primary);
    text-shadow: 0 0 10px rgba(0, 166, 81, 0.4);
}

/* ==================== NAV PROFILE DROPDOWN (for authenticated users) ==================== */
.nav-profile-dropdown {
    position: relative;
}

.nav-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.2));
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-profile-btn:hover {
    background: var(--bg-card, rgba(255, 255, 255, 0.05));
}

.nav-profile-name {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-profile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    margin-top: 0.5rem;
    background: var(--bg-card, #1a2e2b);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 0.75rem;
    padding: 0.5rem;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .nav-profile-menu {
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nav-profile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-profile-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background 0.2s ease;
    text-align: right;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.95rem;
}

.nav-profile-item:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.05));
}

[data-theme="light"] .nav-profile-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-profile-item.logout-btn {
    color: #ef4444;
    margin-top: 0.25rem;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    padding-top: 0.75rem;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-headline {
        font-size: 2rem;
    }

    .pricing-card.featured {
        transform: none;
    }

    .nav-profile-dropdown {
        display: none;
    }
}