/* ============================================
   M-PESA AGENT WITHDRAW CHARGES CALCULATOR
   Page-Specific Styles
   ============================================ */

/* ============================================
   1. CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--gutter);
    box-sizing: border-box;
}

/* ============================================
   2. HERO SECTION WITH CALCULATOR
   ============================================ */

.agent-withdraw-hero-section {
    position: relative;
    background: #04351f;
    padding: 4.5rem 0 8rem;
    overflow: hidden;
    min-height: 650px;
}

.agent-withdraw-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

.agent-withdraw-hero-header {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.agent-withdraw-hero-title {
    font-size: 3rem;
    font-weight: 900;
    color: #ffffff !important;
    margin: 0 0 0.85rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    display: inline-block;
    text-shadow: none;
}

.agent-withdraw-hero-subtitle-main {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0.4rem 0 1.35rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.agent-withdraw-hero-rotate {
    color: #d0a24a;
    font-weight: 700;
    display: inline-block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agent-withdraw-hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 900px;
    margin: 0 auto 0.25rem;
    line-height: 1.6;
}

.agent-withdraw-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    width: 100%;
    height: 120px;
    z-index: 1;
}

.agent-withdraw-hero-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Calculator Board */
.agent-withdraw-calc-board {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 2.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    max-width: 860px;
    margin: 0 auto 0;
    position: relative;
    z-index: 10;
    transform: translateY(4.5rem);
}

.agent-withdraw-calc-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

.agent-withdraw-calc-main {
    margin-bottom: 2rem;
}

.agent-withdraw-calc-input {
    margin-bottom: 1.5rem;
}

.agent-withdraw-calc-input label {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.agent-withdraw-calc-input input {
    width: 100%;
    padding: 0.95rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.6rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    transition: all 0.3s ease;
}

.agent-withdraw-calc-input input:focus {
    outline: none;
    border-color: #004526;
    box-shadow: 0 0 0 3px rgba(0, 69, 38, 0.1);
}

.agent-withdraw-calc-input--error label {
    color: #b91c1c;
}

.agent-withdraw-calc-input--error input {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
    background: #fff5f5;
}

.agent-withdraw-input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.agent-withdraw-calc-submit {
    width: 100%;
    padding: 0.95rem;
    background: #004526;
    color: #ffffff;
    border: none;
    border-radius: 0.6rem;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.agent-withdraw-calc-submit i {
    font-size: 1.1rem;
}

.agent-withdraw-calc-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 69, 38, 0.22);
    background: #00592e;
}

.agent-withdraw-calc-submit:active {
    transform: translateY(0);
}

/* Results Card */
.agent-withdraw-result-card {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.agent-withdraw-result-card--error {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.agent-withdraw-result-error {
    display: grid;
    gap: 6px;
    padding: 0.85rem;
    border-radius: 0.5rem;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #7f1d1d;
    font-weight: 600;
    margin-bottom: 1rem;
}

.agent-withdraw-result-error__title {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
}

.agent-withdraw-result-error__text {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.agent-withdraw-result-head {
    text-align: center;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.25rem;
}

.agent-withdraw-result-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.agent-withdraw-result-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: #004526;
    line-height: 1;
}

.agent-withdraw-result-list {
    display: grid;
    gap: 0.75rem;
}

.agent-withdraw-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.agent-withdraw-result-row span {
    color: #6b7280;
    font-size: 0.9375rem;
    font-weight: 600;
}

.agent-withdraw-result-row strong {
    color: #004526;
    font-size: 1.125rem;
    font-weight: 700;
}

.agent-withdraw-result-row--highlight {
    background: #fef9e8;
    border-color: #e2c27a;
}

.agent-withdraw-result-row--highlight span {
    color: #8f6b1f;
}

.agent-withdraw-result-row--highlight strong {
    color: #8f6b1f;
}

/* ============================================
   3. RATE TABLE SECTION
   ============================================ */

.rate-table-section {
    padding: 4rem 0;
    background: #f6f7f9;
}

.rate-table-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.rate-table-heading h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.rate-table-heading p {
    font-size: 1.125rem;
    color: #6b7280;
}

.rate-table-container {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.rate-table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.rate-table-updated {
    font-size: 0.875rem;
    color: #6b7280;
}

.rate-table-btn {
    padding: 0.75rem 1.5rem;
    background: #004526;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rate-table-btn:hover {
    background: #006837;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 69, 38, 0.3);
}

.rate-table-wrapper {
    overflow-x: auto;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
}

.rate-table thead {
    background: #f4f6f8;
}

.rate-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rate-table th:last-child,
.rate-table td:last-child {
    text-align: right;
}

.rate-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

.rate-table td strong {
    color: #1f2937;
    font-weight: 700;
    font-size: 1.05rem;
}

.rate-table__highlight {
    background: #eef7f0;
}

.rate-table__highlight td {
    font-weight: 600;
}

.rate-table tbody tr:hover {
    background: #f5f7f8;
}

.rate-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

/* ============================================
   4. ARTICLE CONTENT SECTION - NOTEBOOK STYLE
   ============================================ */

.article-content-section {
    background: #f6f7f9;
    padding: 4rem 0;
}

.article-content {
    max-width: 720px;
    margin: 0 auto;
    background: #ffffff;
    position: relative;
    padding: 2.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-radius: 0.75rem;
    background-image: linear-gradient(#f2f4f6 1px, transparent 1px);
    background-size: 100% 32px;
}

/* Red margin line */
.article-content::before {
    content: '';
    position: absolute;
    left: 2.25rem;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 2px;
    background: #cfd6dd;
}

.article-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: none;
    position: relative;
}

.article-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 1rem;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #374151;
}

.article-body p {
    margin: 0 0 1.5rem;
}

.article-lead {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.article-body h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin: 2.25rem 0 1rem;
    line-height: 1.3;
}

.article-body h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111827;
    margin: 1.75rem 0 0.85rem;
    line-height: 1.4;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.5rem;
    padding-left: 1.75rem;
}

.article-body li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.article-body li strong {
    color: #111827;
    font-weight: 600;
}

.article-body strong {
    color: #111827;
    font-weight: 600;
}

/* ============================================
   5. LIMITS SECTION - GREEN BACKGROUND
   ============================================ */

.limits-section {
    padding: 4rem 0;
    background: #0b3b24;
    position: relative;
    overflow: hidden;
}

.limits-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.limits-heading h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.limits-heading p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
}

.limits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.limit-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.limit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.limit-card--primary {
    border-color: #0f5132;
    background: #f8fbf9;
}

.limit-card__icon {
    width: 60px;
    height: 60px;
    background: #0f5132;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #ffffff;
    font-size: 1.5rem;
}

.limit-card__icon i {
    font-size: 1.5rem;
}

.limit-card__content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.limit-card__value {
    font-size: 2rem;
    font-weight: 900;
    color: #0f5132;
    margin-bottom: 0.5rem;
}

.limit-card__description {
    font-size: 0.95rem;
    color: #6b7280;
}

/* ============================================
   6. FAQ SECTION
   ============================================ */

.agent-withdraw-faq-section {
    padding: 4rem 0;
    background: #ffffff;
}

.agent-withdraw-faq-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.agent-withdraw-faq-heading h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.agent-withdraw-faq-heading p {
    font-size: 1.125rem;
    color: #6b7280;
}

.agent-withdraw-faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.agent-withdraw-faq-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.6rem;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.agent-withdraw-faq-item:hover {
    border-color: #004526;
}

.agent-withdraw-faq-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.agent-withdraw-faq-toggle:hover {
    background: #f6f7f9;
}

.agent-withdraw-faq-toggle[aria-expanded="true"] {
    background: #f3f7f4;
}

.agent-withdraw-faq-question {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
    flex: 1;
    padding-right: 1rem;
}

.agent-withdraw-faq-icon {
    font-size: 1.25rem;
    font-weight: 700;
    color: #004526;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.agent-withdraw-faq-toggle[aria-expanded="true"] .agent-withdraw-faq-icon {
    transform: rotate(45deg);
}

.agent-withdraw-faq-body {
    padding: 0 1.5rem 1.5rem;
    color: #4b5563;
    line-height: 1.7;
    font-size: 1rem;
}

.agent-withdraw-faq-body strong {
    color: #004526;
    font-weight: 700;
}

.agent-withdraw-faq-body[hidden] {
    display: none;
}

/* ============================================
   7. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .agent-withdraw-hero-section {
        padding: 3rem 0 6rem;
        min-height: 520px;
    }

    .agent-withdraw-hero-title {
        font-size: 2rem;
    }

    .agent-withdraw-hero-subtitle-main {
        font-size: 1.25rem;
    }

    .agent-withdraw-hero-subtitle {
        font-size: 0.95rem;
    }

    .agent-withdraw-calc-board {
        padding: 1.75rem;
        transform: translateY(4rem);
    }

    .agent-withdraw-calc-title {
        font-size: 1.25rem;
    }

    .agent-withdraw-result-amount {
        font-size: 2rem;
    }

    .article-content-section {
        padding: 2rem 1rem;
    }

    .article-content {
        padding: 2rem 1.5rem;
        background-size: 100% 28px;
    }

    .article-content::before {
        left: 1.5rem;
        top: 1.25rem;
        bottom: 1.25rem;
    }

    .article-title {
        font-size: 1.875rem;
    }

    .article-body {
        font-size: 1rem;
    }

    .article-lead {
        font-size: 1.125rem;
    }

    .article-body h3 {
        font-size: 1.5rem;
        margin: 2rem 0 1rem;
    }

    .article-body h4 {
        font-size: 1.25rem;
        margin: 1.5rem 0 0.75rem;
    }

    .limits-grid {
        grid-template-columns: 1fr;
    }

    .agent-withdraw-faq-question {
        font-size: 1rem;
    }

    .rate-table-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (min-width: 1024px) {
    .agent-withdraw-hero-title {
        font-size: 3.5rem;
    }

    .agent-withdraw-hero-subtitle-main {
        font-size: 1.65rem;
    }

    .agent-withdraw-calc-board {
        max-width: 950px;
    }
}

@media (max-width: 480px) {
    .agent-withdraw-hero-section {
        padding: 2.75rem 0 4rem;
        min-height: auto;
    }

    .agent-withdraw-hero-title {
        font-size: 1.65rem;
        letter-spacing: 0;
    }

    .agent-withdraw-hero-subtitle-main {
        font-size: 1rem;
    }

    .agent-withdraw-hero-subtitle {
        font-size: 0.9rem;
    }

    .agent-withdraw-calc-board {
        transform: none;
        padding: 1.25rem;
        margin: 1.25rem auto 0;
    }

    .agent-withdraw-calc-input input {
        font-size: 1rem;
        padding: 0.85rem 1rem;
    }

    .agent-withdraw-calc-submit {
        font-size: 1rem;
        padding: 0.85rem 1rem;
    }

    .agent-withdraw-result-card {
        padding: 1.25rem;
    }

    .agent-withdraw-result-row {
        padding: 0.85rem;
    }

    .rate-table-section {
        padding: 3rem 0;
    }

    .rate-table-container {
        padding: 1.25rem;
    }

    .rate-table th,
    .rate-table td {
        padding: 0.75rem;
    }

    .article-content {
        padding: 1.75rem 1.25rem;
        background-size: 100% 26px;
    }

    .article-content::before {
        left: 1.15rem;
    }

    .limits-grid {
        gap: 1.25rem;
    }

    .limit-card {
        padding: 1.5rem;
    }

    .limit-card__value {
        font-size: 1.6rem;
    }

    .agent-withdraw-faq-toggle {
        padding: 1.1rem;
    }

    .agent-withdraw-faq-body {
        padding: 0 1.1rem 1.1rem;
    }
}
