/* ===========================================
   AYIO Jobs - Posting Rules Page Styles
   Color-coded sections: red (prohibited),
   amber (required), green (recommended)
   All colors via CSS variables from design-system.css
   =========================================== */

/* ==================== Intro Section ==================== */

.rules-intro {
    padding: 40px 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.rules-intro-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.rules-intro-content p {
    font-size: 1.05rem;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 30px;
}

.rules-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.rules-nav-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all var(--transition);
}

.rules-nav-prohibited {
    background: var(--error-bg);
    color: var(--error-text);
    border: 2px solid var(--error-border);
}

.rules-nav-prohibited:hover {
    background: var(--error);
    color: var(--white);
    border-color: var(--error);
}

.rules-nav-required {
    background: var(--warning-bg);
    color: var(--warning-text);
    border: 2px solid var(--warning-border);
}

.rules-nav-required:hover {
    background: var(--warning);
    color: var(--white);
    border-color: var(--warning);
}

.rules-nav-recommended {
    background: var(--success-bg);
    color: var(--success-text);
    border: 2px solid var(--success-border);
}

.rules-nav-recommended:hover {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}


/* ==================== Shared Section Styles ==================== */

.rules-section {
    padding: 60px 0;
}

.rules-container {
    max-width: 860px;
    margin: 0 auto;
}

.rules-prohibited {
    background: var(--gray-50);
}

.rules-required {
    background: var(--white);
}

.rules-recommended {
    background: var(--gray-50);
}


/* ==================== Section Headers ==================== */

.section-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--gray-200);
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Red header */
.section-header-red .section-icon {
    background: var(--error-bg);
    color: var(--error);
}

.section-header-red h2 {
    color: var(--error);
}

.section-header-red {
    border-bottom-color: var(--error-border);
}

/* Amber header */
.section-header-amber .section-icon {
    background: var(--warning-bg);
    color: var(--warning);
}

.section-header-amber h2 {
    color: var(--warning);
}

.section-header-amber {
    border-bottom-color: var(--warning-border);
}

/* Green header */
.section-header-green .section-icon {
    background: var(--success-bg);
    color: var(--success);
}

.section-header-green h2 {
    color: var(--success);
}

.section-header-green {
    border-bottom-color: var(--success-border);
}


/* ==================== Prohibited Rule Cards ==================== */

.rule-card {
    display: flex;
    gap: 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 30px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border-left: 4px solid transparent;
    transition: box-shadow 0.2s;
}

.rule-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.rule-card:last-child {
    margin-bottom: 0;
}

.rule-card-red {
    border-left-color: var(--error);
}

.rule-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    margin-top: 2px;
}

.rule-card-red .rule-number {
    background: var(--error-bg);
    color: var(--error);
}

.rule-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}

.rule-body p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 12px;
}

.rule-body p:last-child {
    margin-bottom: 0;
}

.rule-body a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

.rule-body a:hover {
    text-decoration: underline;
}


/* ==================== Example Blocks ==================== */

.rule-examples {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.example-bad,
.example-good {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.example-bad {
    background: #fef2f2;
    border: 1px solid var(--error-border);
}

.example-bad strong {
    color: var(--error-text);
    display: block;
    margin-bottom: 6px;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.example-good {
    background: #f0fdf4;
    border: 1px solid var(--success-border);
}

.example-good strong {
    color: var(--success-text);
    display: block;
    margin-bottom: 6px;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.example-bad ul,
.example-good ul {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.example-bad li,
.example-good li {
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 3px;
}

.example-bad li:last-child,
.example-good li:last-child {
    margin-bottom: 0;
}


/* ==================== Required Section Cards ==================== */

.required-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.required-card {
    display: flex;
    gap: 20px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    border-left: 4px solid var(--warning);
    transition: box-shadow 0.2s;
}

.required-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.required-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    background: var(--warning-bg);
    color: var(--warning-text);
    margin-top: 2px;
}

.required-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.required-body p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin: 0;
}


/* ==================== Best Practices Tips Grid ==================== */

.tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tip-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
    border-left: 4px solid var(--success);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.tip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.tip-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.tip-card p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin: 0;
}


/* ==================== CTA Section ==================== */

.rules-cta {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
}

.rules-cta .cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.rules-cta .cta-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 15px;
}

.rules-cta .cta-content p {
    color: var(--gray-700);
    margin-bottom: 30px;
}

.rules-cta .cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.rules-cta .btn {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.rules-cta .btn-primary {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.rules-cta .btn-primary:hover {
    background: var(--navy-light);
    border-color: var(--navy-light);
}


/* ==================== Responsive ==================== */

@media (max-width: 768px) {
    .rules-section {
        padding: 40px 0;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .rule-card {
        flex-direction: column;
        gap: 12px;
        padding: 22px 20px;
    }

    .rule-number,
    .required-number {
        width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }

    .required-card {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .rules-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .rules-nav-btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.3rem;
    }

    .rule-body h3 {
        font-size: 1rem;
    }

    .rules-cta .cta-buttons {
        flex-direction: column;
    }

    .rules-cta .cta-buttons .btn {
        width: 100%;
    }
}
