/* ============================================
   M-PESA ATM WITHDRAW CHARGES CALCULATOR CSS
   Page-Specific Styles
   ============================================ */

/* ============================================
   1. CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   2. HERO SECTION
   ============================================ */

.atm-withdraw-hero-section {
    position: relative;
    background: linear-gradient(135deg, #004526 0%, #002d19 100%);
    padding: 4rem 0 10rem;
    overflow: hidden;
    min-height: 650px;
}

.atm-withdraw-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0, 168, 107, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.atm-withdraw-hero-header {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.atm-withdraw-hero-title {
    font-size: 3.3rem;
    font-weight: 900;
    color: #ffffff !important;
    margin: 0 0 0.85rem;
    line-height: 1.05;
    letter-spacing: -0.018em;
    text-transform: uppercase;
    display: inline-block;
    transform: rotate(-0.6deg) skewY(-1deg);
    text-shadow: none;
}

.atm-withdraw-hero-subtitle-main {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0.4rem 0 1.35rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.atm-withdraw-hero-rotate {
    color: #f59e0b;
    font-weight: 700;
    display: inline-block;
    animation: atmRotateFade 0.5s ease-in-out;
}

@keyframes atmRotateFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.atm-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;
}

.atm-withdraw-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    width: 100%;
    height: 120px;
    z-index: 1;
}

.atm-withdraw-hero-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   3. CALCULATOR BOARD
   ============================================ */

.atm-withdraw-calc-board {
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 2.75rem;
    box-shadow: 0 35px 80px rgba(0, 45, 25, 0.25);
    max-width: 920px;
    margin: -1rem auto 0;
    position: relative;
    z-index: 10;
    transform: translateY(8rem);
}

.atm-withdraw-calc-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1rem;
}

.atm-withdraw-calc-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.atm-withdraw-option-pill {
    position: relative;
    flex: 1 1 220px;
    cursor: pointer;
}

.atm-withdraw-option-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.atm-withdraw-option-pill span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.25rem;
    border-radius: 999px;
    border: 2px solid rgba(31, 41, 55, 0.08);
    background: rgba(249, 250, 251, 0.9);
    color: #1f2937;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.atm-withdraw-option-pill span i {
    color: #004526;
}

.atm-withdraw-option-pill input[type="radio"]:checked+span {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(255, 237, 213, 0.45));
    color: #92400e;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.25);
}

.atm-withdraw-option-pill input[type="radio"]:checked+span i {
    color: #b45309;
}

.atm-withdraw-calc-main {
    margin-bottom: 1.75rem;
}

.atm-withdraw-calc-input {
    margin-bottom: 1.5rem;
}

.atm-withdraw-calc-input label {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.atm-withdraw-calc-input input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    transition: all 0.3s ease;
}

.atm-withdraw-calc-input input:focus {
    outline: none;
    border-color: #004526;
    box-shadow: 0 0 0 3px rgba(0, 69, 38, 0.12);
}

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

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

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

.atm-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;
}

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

.atm-withdraw-result-error__text {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.atm-withdraw-result-head {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.atm-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;
}

.atm-withdraw-result-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: #004526;
    line-height: 1;
}

.atm-withdraw-result-list {
    display: grid;
    gap: 0.8rem;
}

.atm-withdraw-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #ffffff;
    border-radius: 0.6rem;
    border: 1px solid #e5e7eb;
}

.atm-withdraw-result-row span {
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 600;
}

.atm-withdraw-result-row strong {
    color: #004526;
    font-size: 1.125rem;
    font-weight: 700;
}

.atm-withdraw-result-row--highlight {
    background: #fef3c7;
    border-color: #f59e0b;
}

.atm-withdraw-result-row--highlight span {
    color: #92400e;
}

.atm-withdraw-result-row--highlight strong {
    color: #b45309;
}

/* ============================================
   4. RATE TABLE SECTION
   ============================================ */

.rate-table-section {
    padding: 4rem 0;
    background: #f9fafb;
}

.rate-table-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.rate-table-heading h2 {
    font-size: 2rem;
    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: 1.25rem;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 24px 50px rgba(15, 68, 44, 0.12);
    position: relative;
}

.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-note {
    font-size: 0.875rem;
    color: #d97706;
    font-weight: 600;
    background: rgba(245, 158, 11, 0.12);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
}

.rate-table-wrapper {
    overflow-x: auto;
    border-radius: 1rem;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
}

.rate-table thead {
    background: #f9fafb;
}

.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 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: #fff7ed;
}

.rate-table__highlight td {
    font-weight: 600;
}

.rate-table tbody tr:nth-child(even) {
    background: #f9fbf8;
}

.rate-table tbody tr:hover {
    background: #f9fafb;
}

/* ============================================
   5. ARTICLE CONTENT SECTION (NOTEBOOK STYLE)
   ============================================ */

.article-content-section {
    background: #f5f5f0;
    padding: 4rem 0;
}

.article-content {
    max-width: 900px;
    margin: 0 auto;
    background: #fffef8;
    position: relative;
    padding: 3rem 3rem 3rem 5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    background-image:
        linear-gradient(transparent, transparent 31px, rgba(220, 215, 200, 0.8) 31px, rgba(220, 215, 200, 0.8) 32px),
        linear-gradient(90deg, #d4534f 0, #d4534f 2px, transparent 2px);
    background-size: 100% 32px, 100% 100%;
    background-position: 0 40px, 0 0;
}

.article-content::before {
    content: '';
    position: absolute;
    left: 4rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #d4534f;
    opacity: 0.6;
}

.article-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: none;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 1rem;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.article-body {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #374151;
}

.article-body p {
    margin: 0 0 1.5rem;
}

.article-lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: #111827;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.article-body h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 2.5rem 0 1.25rem;
    line-height: 1.3;
}

.article-body h4 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #111827;
    margin: 2rem 0 1rem;
    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;
}

/* ============================================
   6. LIMITS SECTION
   ============================================ */

.limits-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #004526 0%, #006837 100%);
    position: relative;
    overflow: hidden;
}

.limits-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.limits-heading h2 {
    font-size: 2rem;
    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: 2px solid #e5e7eb;
    border-radius: 1rem;
    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: #f59e0b;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.limit-card__icon {
    width: 60px;
    height: 60px;
    background: #004526;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 12px 25px rgba(0, 46, 25, 0.25);
}

.limit-card__icon i {
    font-size: 1.5rem;
    color: inherit;
}

.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: #004526;
    margin-bottom: 0.5rem;
}

.limit-card__description {
    font-size: 0.95rem;
    color: #6b7280;
}

/* ============================================
   7. FAQ SECTION
   ============================================ */

.atm-withdraw-faq-section {
    padding: 4rem 0 5rem;
    background: linear-gradient(180deg, #f8fbf7 0%, #ffffff 100%);
}

.atm-withdraw-faq-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.atm-withdraw-faq-heading h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.atm-withdraw-faq-heading p {
    font-size: 1.125rem;
    color: #6b7280;
}

.atm-withdraw-faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.atm-withdraw-faq-item {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 0.85rem;
    margin-bottom: 1.1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 16px 30px rgba(15, 68, 44, 0.08);
}

.atm-withdraw-faq-item:hover {
    border-color: rgba(0, 69, 38, 0.55);
    transform: translateY(-3px);
}

.atm-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;
}

.atm-withdraw-faq-toggle:hover {
    background: #f9fafb;
}

.atm-withdraw-faq-toggle[aria-expanded="true"] {
    background: #ecfdf3;
}

.atm-withdraw-faq-question {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    flex: 1;
    padding-right: 1rem;
}

.atm-withdraw-faq-icon {
    font-size: 1.5rem;
    font-weight: 700;
    color: #004526;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.atm-withdraw-faq-toggle[aria-expanded="true"] .atm-withdraw-faq-icon {
    transform: rotate(45deg);
}

.atm-withdraw-faq-body {
    padding: 0 1.5rem 1.5rem;
    color: #4b5563;
    line-height: 1.7;
    font-size: 1rem;
    border-top: 1px solid rgba(229, 231, 235, 0.7);
}

.atm-withdraw-faq-body strong {
    color: #004526;
    font-weight: 700;
}

.atm-withdraw-faq-body[hidden] {
    display: none;
}

/* ============================================
   8. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .atm-withdraw-hero-section {
        padding: 3rem 0 8rem;
        min-height: 550px;
    }

    .atm-withdraw-hero-title {
        font-size: 2rem;
        transform: rotate(-0.4deg) skewY(-0.5deg);
    }

    .atm-withdraw-hero-subtitle-main {
        font-size: 1.25rem;
    }

    .atm-withdraw-hero-subtitle {
        font-size: 0.95rem;
    }

    .atm-withdraw-calc-board {
        padding: 1.75rem;
        transform: translateY(6rem);
    }

    .atm-withdraw-calc-title {
        font-size: 1.25rem;
    }

    .atm-withdraw-calc-options {
        flex-direction: column;
    }

    .atm-withdraw-option-pill {
        flex: 1 1 100%;
    }

    .atm-withdraw-result-amount {
        font-size: 2rem;
    }

    .article-content-section {
        padding: 2rem 1rem;
    }

    .article-content {
        padding: 2rem 1.5rem 2rem 3.5rem;
        background-size: 100% 28px, 100% 100%;
        background-position: 0 32px, 0 0;
    }

    .article-content::before {
        left: 3rem;
    }

    .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;
    }

    .atm-withdraw-faq-question {
        font-size: 1rem;
    }

    .rate-table-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (min-width: 1024px) {
    .atm-withdraw-hero-title {
        font-size: 3.5rem;
    }

    .atm-withdraw-hero-subtitle-main {
        font-size: 1.65rem;
    }

    .atm-withdraw-calc-board {
        max-width: 950px;
    }
}
