/* ==========================================================================
   ALJANIA TRANSPARENCIA - PUBLIC PORTAL CSS (ELEMENTOR 1140px CONTAINER)
   ========================================================================== */

.aljania-public-transparencia-page {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #0f172a;
    background-color: #f8fafc;
}

#aljania-public-portal-root {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
}

/* TYPOGRAPHY SCALE ADJUSTMENTS */
.pub-main-title {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
}

.pub-lead-text {
    font-size: 0.975rem;
    line-height: 1.5;
    color: #475569;
    max-width: 680px;
}

.pub-kpi-num {
    font-size: 1.85rem;
    font-weight: 800;
}

.pub-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
}

/* BRANDING & CONTRAST UTILITIES */
.text-ong {
    color: #1b5e20 !important;
}

.bg-ong {
    background-color: #1b5e20 !important;
}

.bg-ong-subtle {
    background-color: #fff7ed !important;
    border: 1px solid #ffedd5 !important;
}

.text-ong-dark {
    color: #9a3412 !important;
}

.border-ong {
    border-color: #1b5e20 !important;
}

.btn-ong-orange {
    background-color: #1b5e20 !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(230, 92, 0, 0.25);
    transition: all 0.25s ease;
}

.btn-ong-orange:hover, .btn-ong-orange:focus {
    background-color: #cc5200 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(230, 92, 0, 0.35);
}

.btn-outline-ong {
    border: 2px solid #1b5e20 !important;
    color: #1b5e20 !important;
    background: transparent !important;
    font-weight: 700 !important;
    transition: all 0.2s ease;
}

.btn-outline-ong:hover {
    background-color: #1b5e20 !important;
    color: #ffffff !important;
}

/* TABLES */
/* TABLES */
#public-feed-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    font-weight: 700;
    background-color: #f1f5f9;
    padding: 0.6rem 0.5rem;
}

#public-feed-table td {
    font-size: 0.83rem;
    padding: 0.55rem 0.5rem;
}

.badge-income {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-weight: 700;
}

.badge-expense {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-weight: 700;
}

/* HIGH CONTRAST STATUS BADGES */
.badge-status-treatment {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
    font-weight: 700 !important;
}

.badge-status-recovered {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
    font-weight: 700 !important;
}

.badge-status-adoption {
    background-color: #dbeafe !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
    font-weight: 700 !important;
}

.badge-status-adopted {
    background-color: #f3e8ff !important;
    color: #5b21b6 !important;
    border: 1px solid #e9d5ff !important;
    font-weight: 700 !important;
}

.badge-status-closed {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
    font-weight: 700 !important;
}

/* VOUCHER BUTTONS */
.pub-voucher-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50% !important;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pub-voucher-icon-btn.btn-image {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.pub-voucher-icon-btn.btn-pdf {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.pub-voucher-icon-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.progress-case {
    height: 10px;
    border-radius: 10px;
    background-color: #e2e8f0;
}

/* CASE CARDS */
.case-card-pub {
    transition: all 0.25s ease;
}

.case-card-pub:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important;
}

/* DONATION MODAL OPTIONS */
.donation-channel-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.donation-channel-card:hover {
    border-color: #1b5e20;
    background: #fff7ed;
}

/* RESPONSIVE PROTECTIONS & BUTTON SHAPE CORRECTIONS */
.btn-ong-orange,
.btn-outline-ong,
.case-card-pub .btn,
.aljania-widget-casos-wrap .btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: auto !important;
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50px !important;
    line-height: 1.2 !important;
    max-width: 100% !important;
    aspect-ratio: auto !important;
}

/* STATUS BADGES ANTI-OVERFLOW */
.badge-status-treatment,
.badge-status-recovered,
.badge-status-adoption,
.badge-status-adopted,
.badge-status-closed {
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* MOBILE RESPONSIVE OVERRIDES (< 576px) */
@media (max-width: 576px) {
    .aljania-widget-casos-wrap {
        padding: 1.25rem 1rem !important;
    }
    
    .pub-main-title {
        font-size: 1.6rem !important;
    }
    
    .case-card-pub .card-body {
        padding: 1rem !important;
    }
    
    .case-card-pub img.btn-open-case-audit-modal {
        width: 100% !important;
        height: 160px !important;
    }
}

/* ==========================================================================
   SINGLE CASE DEDICATED PAGE & SHARING STYLES
   ========================================================================== */
.aljania-single-case-page {
    background-color: #f1f5f9;
    min-height: 80vh;
}

.case-gallery-thumb {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.case-gallery-thumb:hover {
    transform: scale(1.08);
    border-color: #1b5e20 !important;
}

/* ==========================================================================
   HIGH-CONTRAST READABILITY & AMPLE PADDING (HISTORIA Y BITÁCORA)
   ========================================================================== */
.case-story-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.6rem 1.85rem !important;
    color: #000000 !important;
    font-size: 1.05rem;
    line-height: 1.85;
    white-space: pre-line;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.case-story-text {
    color: #000000 !important;
    font-weight: 500 !important;
}

.case-log-modal-content-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.6rem 1.85rem !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.logbook-grid-card {
    padding: 1.35rem !important;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #1b5e20 !important;
    border-radius: 1.15rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logbook-grid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.06) !important;
}

.logbook-grid-card .logbook-desc {
    color: #000000 !important;
    font-weight: 500 !important;
    font-size: 0.94rem;
    line-height: 1.68;
}

.logbook-grid-card h6 {
    color: #000000 !important;
    font-weight: 700 !important;
}

#caseLogDetailText {
    color: #000000 !important;
    font-weight: 500 !important;
    line-height: 1.85;
    font-size: 1.05rem;
}

#caseLogDetailHeading {
    color: #000000 !important;
    font-weight: 800 !important;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .case-story-box {
        padding: 1.25rem 1.25rem !important;
        font-size: 0.98rem;
        line-height: 1.75;
        border-radius: 1rem;
    }

    .case-log-modal-content-box {
        padding: 1.25rem 1.25rem !important;
        border-radius: 1rem;
    }

    .logbook-grid-card {
        padding: 1.15rem !important;
    }
}

.kpi-audit-card {
    border-radius: 1rem;
    transition: transform 0.2s ease;
}

.kpi-audit-card:hover {
    transform: translateY(-2px);
}

.btn-copy-case-link {
    transition: all 0.2s ease;
}

.case-balance-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 2px solid #bbf7d0 !important;
}

/* ==========================================================================
   WIDGET COMPARTE PARA RECAUDAR (SINGLE CASO)
   ========================================================================== */
.share-case-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1.15rem;
    padding: 0.9rem 1.1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.share-case-box:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.share-case-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #edf2f7;
}

.share-case-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.share-case-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e8f5e9;
    color: #1b5e20;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.share-case-heading {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.share-case-sub {
    font-size: 0.72rem;
    color: #64748b;
    display: block;
    line-height: 1.2;
    margin-top: 1px;
}

.share-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1b5e20;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    white-space: nowrap;
}

.share-case-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.btn-share-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 0.75rem;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-share-social i {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.btn-share-social:active {
    transform: scale(0.97);
}

.btn-share-whatsapp {
    background-color: #25D366;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
}

.btn-share-whatsapp:hover {
    background-color: #20ba59;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.btn-share-facebook {
    background-color: #1877F2;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(24, 119, 242, 0.25);
}

.btn-share-facebook:hover {
    background-color: #166fe5;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
}

.btn-share-copy {
    background-color: #ffffff;
    color: #334155 !important;
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.btn-share-copy:hover {
    background-color: #f1f5f9;
    color: #0f172a !important;
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

@media (max-width: 576px) {
    .share-case-box {
        padding: 0.85rem;
    }
    .share-case-actions {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .btn-share-social {
        height: 36px;
        padding: 0 0.25rem;
        font-size: 0.74rem;
        gap: 4px;
        border-radius: 0.6rem;
    }
    .btn-share-social i {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .aljania-single-case-page .card {
        padding: 1.15rem !important;
    }
    
    .aljania-single-case-page #main-case-image {
        max-height: 280px !important;
    }
}

/* ==========================================================================
   DONATION BUTTON RESPONSIVE
   ========================================================================== */
.btn-donate-responsive {
    font-size: clamp(0.92rem, 3.8vw, 1.15rem) !important;
    white-space: normal !important;
    line-height: 1.35 !important;
    word-break: break-word;
}

/* ==========================================================================
   SEGMENTED TABS (DONACIONES & GASTOS)
   ========================================================================== */
.case-tabs-wrapper {
    background: #f1f5f9;
    padding: 4px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
}

.case-tabs-segmented {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.case-tabs-segmented .nav-item {
    margin: 0;
}

.case-tabs-segmented .nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #475569;
    border-radius: 9999px;
    border: none;
    background: transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.case-tabs-segmented .nav-link.active {
    background: #ffffff !important;
    color: #1b5e20 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* ==========================================================================
   MOBILE CARDS FOR DONATIONS & EXPENSES (NO HORIZONTAL SCROLL)
   ========================================================================== */
.donation-card-mobile, .expense-card-mobile {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.donation-card-mobile:hover, .expense-card-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

@media (max-width: 576px) {
    .case-tabs-segmented .nav-link {
        font-size: 0.78rem;
        padding: 8px 6px;
    }
    .kpi-audit-card {
        padding: 0.9rem !important;
    }
    .kpi-audit-card .fs-4 {
        font-size: 1.25rem !important;
    }
}
