/* REDESIGNED MOBILE STRUCTURE FOR TRADING RULES */

/* 1. Main Container Safety */
.trading-rules {
    padding: 3rem 0;
    width: 100%;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    background: var(--gray-50);
    /* Distinct background */
}

.trading-rules .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    width: 100%;
    max-width: 100%;
}

/* 2. Simplified Section Header */
.trading-rules .section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(124, 92, 255, 0.1);
    color: var(--primary);
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* 3. Card Structure Redesign (Responsive Grid) */
.rules-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 Columns on Desktop */
    gap: 1.5rem;
    width: 100%;
}

.rules-list .rule {
    display: flex;
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    margin: 0;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    /* Ensure content inside aligns safely */
    align-items: flex-start;
}

.rules-list .rule-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    margin-right: 1.25rem;
    background: var(--primary);
}

.rules-list .rule-content {
    flex: 1;
    min-width: 0;
    /* Critical for text wrapping */
}

/* Hard reset for content typography to ensure fit */
.rules-list .rule-content h4 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    word-wrap: break-word;
}

.rules-list .rule-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--gray-600);
    margin: 0;
    word-break: break-word;
    /* Prevent long strings breaking layout */
}

/* 4. Comparison/Features Grid Fix (Why Choose NewProp) */
/* Moving this here to ensure it overrides style.css */
@media (max-width: 991px) {
    .features-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .feature-card {
        margin: 0;
        width: 100%;
    }
}

/* 5. Icon Colors */
.rules-list .rule-icon.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.rules-list .rule-icon.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.rules-list .rule-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.rules-list .rule-icon.info {
    background: linear-gradient(to bottom right, #5745a5, #7757f7);
}


/* MOBILE SPECIFIC OVERRIDES (<768px) */
@media (max-width: 768px) {
    .rules-list {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
    }

    .rules-list .rule {
        flex-direction: column;
        align-items: center;
        /* Center align for mobile aesthetic */
        text-align: center;
        padding: 1.5rem;
    }

    .rules-list .rule-icon {
        margin-bottom: 1rem;
        margin-right: 0;
    }

    .trading-rules .section-label {
        width: auto;
    }
}