/* ============================================
   M-PESA TILL CHARGES CALCULATOR CSS
   Page-Specific Styles
   ============================================ */

/* ============================================
   1. HERO SECTION
   ============================================ */

.till-hero-section {
    position: relative;
    width: 100%;
    padding-top: 3rem;
    padding-bottom: 60px;
    overflow: hidden;
}

.till-hero-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #00361e 0%, #004526 50%, #06613a 100%);
    z-index: -2;
}

.till-hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(100, 150, 255, 0.12), transparent 40%),
        radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.06), transparent 35%);
    z-index: 1;
}

.till-hero-header {
    position: relative;
    text-align: center;
    color: #fff;
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
    z-index: 1;
}

.till-hero-title {
    font-size: 3.3rem;
    letter-spacing: -0.018em;
    margin: 0;
    color: #ffffff !important;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.05;
    font-weight: 900;
    text-transform: uppercase;
    display: inline-block;
    transform: rotate(-0.6deg) skewY(-1deg);
}

.till-hero-subtitle-main {
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.3;
    font-weight: 600;
}

.till-hero-rotate {
    color: #f59e0b;
    font-weight: 800;
}

.till-hero-subtitle {
    max-width: 900px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.6;
}

@media (min-width: 1024px) {
    .till-hero-title {
        font-size: 3rem;
    }

    .till-hero-subtitle-main {
        font-size: 1.85rem;
    }
}

.till-hero-wave {
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 220px;
    z-index: 0;
}

.till-hero-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   2. CALCULATOR BOARD
   ============================================ */

.till-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(3rem);
}

.till-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;
}

.till-calc-main {
    margin-bottom: 1.75rem;
}

.till-calc-input {
    margin-bottom: 1.5rem;
}

.till-calc-input label {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.till-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;
}

.till-calc-input input:focus {
    outline: none;
    border-color: #004526;
    box-shadow: 0 0 0 3px rgba(0, 69, 38, 0.12);
}

.till-input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.till-calc-submit {
    width: 100%;
    padding: 1.2rem 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.75rem;
}

.till-calc-submit:hover {
    background: linear-gradient(135deg, #006837 0%, #004526 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 69, 38, 0.35);
}

.till-calc-submit:active {
    transform: translateY(0);
}

.till-result-card {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.75rem;
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .till-result-card {
        grid-template-columns: 1fr;
    }
}

.till-result-head {
    text-align: center;
    display: grid;
    gap: 0.75rem;
}

.till-result-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.till-result-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: #004526;
    line-height: 1.1;
}

.till-result-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.till-result-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    align-items: center;
    text-align: center;
}

.till-result-row span {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 600;
}

.till-result-row strong {
    font-size: 1rem;
    color: #004526;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.till-result-row--highlight {
    background: rgba(0, 69, 38, 0.05);
    border-color: #004526;
}

.till-result-row--highlight span {
    color: #6b7280;
    font-weight: 600;
}

.till-result-row--highlight strong {
    color: #004526;
    font-size: 1rem;
}

/* ============================================
   3. RATE TABLE SECTION
   ============================================ */

.rate-table-section {
    padding: 8rem 0 4rem;
    background: #f9fbf7;
}

.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: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 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-wrapper {
    overflow-x: auto;
}

.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: #f0fdf4;
}

.rate-table__highlight td {
    font-weight: 600;
}

.rate-table tbody tr:hover {
    background: #f9fafb;
}

/* ============================================
   4. 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, #e0dfd8 31px, #e0dfd8 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;
    position: relative;
}

.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;
    margin: 0 0 1rem;
}

.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;
}

@media (max-width: 768px) {
    .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;
    }
}

/* ============================================
   5. 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;
}

.limits-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.limits-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.limits-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.limits-value {
    font-size: 2rem;
    font-weight: 900;
    color: #004526;
    margin-bottom: 0.5rem;
}

.limits-description {
    font-size: 0.95rem;
    color: #6b7280;
}

/* ============================================
   6. FAQ SECTION
   ============================================ */

.faq-section {
    padding: 4rem 0;
    background: #ffffff;
}

.faq-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-heading h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.faq-heading p {
    font-size: 1.125rem;
    color: #6b7280;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #004526;
}

.faq-item[open] {
    box-shadow: 0 12px 30px rgba(0, 69, 38, 0.15);
    border-color: #004526;
}

.faq-question {
    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;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-item[open] .faq-question {
    background: #f0fdf4;
}

.faq-question span {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    flex: 1;
    padding-right: 1rem;
}

.faq-question i {
    font-size: 1.5rem;
    font-weight: 700;
    color: #004526;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item[open] .faq-question i {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: #4b5563;
    line-height: 1.7;
    font-size: 1rem;
}

.faq-answer strong {
    color: #004526;
    font-weight: 700;
}

.faq-answer[hidden] {
    display: none;
}

/* ============================================
   7. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .till-hero-section {
        padding: 3rem 0 8rem;
    }

    .till-hero-title {
        font-size: 1.875rem;
    }

    .till-hero-subtitle-main {
        font-size: 1.25rem;
    }

    .till-calc-board {
        padding: 1.5rem 1rem;
        transform: translateY(6rem);
    }

    .till-calc-title {
        font-size: 1.25rem;
    }

    .till-result-amount {
        font-size: 2rem;
    }

    .rate-table-section {
        padding: 6rem 0 3rem;
    }

    .rate-table-heading h2 {
        font-size: 1.75rem;
    }

    .rate-table-container {
        padding: 1.5rem;
    }

    .rate-table {
        font-size: 0.875rem;
    }

    .rate-table th,
    .rate-table td {
        padding: 0.75rem 0.5rem;
    }

    .article-title {
        font-size: 1.875rem;
    }

    .article-body h3 {
        font-size: 1.5rem;
    }

    .limits-grid {
        grid-template-columns: 1fr;
    }

    .faq-question span {
        font-size: 1rem;
    }

    .faq-section {
        padding: 2rem 1rem;
    }

    .faq-list {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .till-hero-section {
        padding: 3rem 0 8rem;
    }

    .till-hero-title {
        font-size: 1.875rem;
    }

    .till-calc-board {
        padding: 1.5rem 1rem;
    }

    .till-calc-input input {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }

    .till-calc-submit {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .rate-table-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}