/* --- Pricing Grid Enhancements --- */
.pricing-section {
    padding: 80px 0;
    /* Optional: subtle background for contrast */
    background: transparent;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    /* More space between cards */
    margin-top: 50px;
    perspective: 1000px;
    /* Essential for 3D bounce if needed */
}

/* Base Card Styling - Glassmorphism Base for ERP Theme */
.pricing-card {
    background: rgba(30, 42, 54, 0.6);
    /* Slightly darker semi-transparent base */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    /* Smoother approach */
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    /* Soft shadow */
    color: #edf2f7;
    /* Very light text */
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Hover Effect: Lift & Glow */
/* NOTE: We removed the transform here to prevent any conflict with the flip container logic */
.flip-card:hover .pricing-card {
    /* transform: translateY(-10px); REMOVED to avoid confusion with flip */
    box-shadow: 0 25px 60px rgba(10, 116, 218, 0.2);
    /* Colored glow */
    border-color: rgba(255, 255, 255, 0.2);
}

/* Feature Plan Highlight */
.pricing-card.featured {
    background: rgba(10, 116, 218, 0.15);
    /* Tint with primary blue */
    border: 1px solid rgba(10, 116, 218, 0.3);
    position: relative;
}

.pricing-card.featured::before {
    content: 'MÁS POPULAR';
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--primary-color);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

/* Header & Typography */
.pricing-header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #a0aec0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-header p {
    color: #a0aec0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    min-height: 60px;
    /* Align content across cards */
}

/* Price Tag Animation */
.pricing-cost .price {
    display: block;
    font-size: 3rem;
    /* Slightly smaller to save space */
    font-weight: 800;
    color: white;
    margin-bottom: 0.2rem;
    text-shadow: 0 0 20px rgba(10, 116, 218, 0.5);
    /* Neon glow effect */
}

.pricing-cost .period {
    display: block;
    color: #a0aec0;
    /* Lighter grey */
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

/* Features List with Custom Checks */
.pricing-features-summary {
    text-align: left;
    margin: 15px 0 25px 0;
    flex-grow: 1;
    min-height: 250px;
    /* Enforce substantial space for features */
    overflow-y: auto;
    /* Custom Scrollbar for webkit */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.pricing-features-summary::-webkit-scrollbar {
    width: 4px;
}

.pricing-features-summary::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.pricing-features-summary ul {
    list-style: none;
    padding: 0;
}

.pricing-features-summary li {
    padding: 8px 0;
    /* Reduced padding */
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    /* Much lighter text for contrast */
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.pricing-features-summary li i {
    color: #48bb78;
    /* Success Green */
    margin-right: 12px;
    background: rgba(72, 187, 120, 0.2);
    border-radius: 50%;
    padding: 4px;
    /* Small circle background for check */
    font-size: 0.7rem;
    flex-shrink: 0;
    /* Prevent icon shrinking */
}

/* Buttons */
.pricing-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: auto;
    /* Ensure it sticks to bottom if flex container */
    padding-top: 20px;
}

.pricing-cta .btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 12px 10px;
    border-radius: 8px;
    /* Slightly squarer than pill */
    transition: all 0.3s ease;
}

.pricing-cta .btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.pricing-cta .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Flip Card - 3D mechanics */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
    height: 900px;
    /* Increased significantly to show more features */
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

/* Class to trigger flip via JS */
.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* SAFETY OVERRIDE: Prevent unintentional hover flips */
.flip-card:hover .flip-card-inner {
    transform: rotateY(0deg);
}

.flip-card.is-flipped:hover .flip-card-inner {
    transform: rotateY(180deg);
}


.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
    background: rgba(20, 30, 40, 0.95);
    /* Opaque back for readability */
    overflow-y: auto;
    /* Allow scroll if detailed specs are long */
    display: flex;
    flex-direction: column;
}

.pricing-features-detailed {
    text-align: left;
    padding: 0 10px;
    flex-grow: 1;
}

.feature-category h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-top: 15px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-category ul {
    list-style: none;
    padding-left: 10px;
    margin-bottom: 10px;
}

.feature-category li {
    font-size: 0.9rem;
    color: #cbd5e0;
    margin-bottom: 5px;
    display: flex;
    align-items: flex-start;
}

.feature-category li i {
    margin-top: 5px;
    margin-right: 8px;
    font-size: 0.7rem;
    color: var(--primary-color);
}