/* ===========================
   TENDERS — BASE / HOMEPAGE
   =========================== */
.tenders-section { padding: 20px 0; background: var(--white); }
.tenders-table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); }
.tenders-table { width: 100%; border-collapse: collapse; }
.tenders-table thead { background: var(--navy); }
.tenders-table th { padding: 16px 20px; text-align: left; color: rgba(255,255,255,0.85); font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.tenders-table tbody tr { border-bottom: 1px solid var(--gray-100); transition: var(--transition); }
.tenders-table tbody tr:last-child { border-bottom: none; }
.tenders-table tbody tr:hover { background: var(--gray-50); }
.tenders-table td { padding: 18px 20px; color: var(--gray-800); font-size: 14px; }
.tender-cat { background: rgba(60,120,180,0.1); color: var(--blue); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--radius); }
.btn-tender { display: inline-flex; align-items: center; padding: 7px 16px; background: transparent; border: 1.5px solid var(--blue); color: var(--blue); border-radius: 4px; font-size: 13px; font-weight: 600; transition: var(--transition); }
.btn-tender:hover { background: var(--blue); color: var(--white); }

/* ===========================
   TENDERS ARCHIVE — HERO
   =========================== */

.tenders-archive-hero {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--navy);
  overflow: hidden;
  padding-top: 90px;
  padding-bottom: 64px;
  height: 30vh;
  text-align: center;
}

.tenders-archive-hero .section-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.tenders-archive-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    margin: 0 0 12px;
    color: #fff;
}

.tenders-archive-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 580px;
    margin: 0 auto;
}

/* Archive section wrapper overrides homepage padding */
.tenders-archive .tenders-section {
    padding: 48px 0 80px;
    background: #f8f9fa;
}

/* ===========================
   FILTER TABS
   =========================== */

.tenders-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tenders-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 24px;
    border: 1.5px solid #d0d7e2;
    background: #fff;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.tenders-filter-tab:hover {
    border-color: #1d3557;
    color: #1d3557;
}

.tenders-filter-tab.is-active {
    background: #1d3557;
    border-color: #1d3557;
    color: #fff;
}

.tenders-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.1);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.tenders-filter-tab.is-active .tenders-filter-count {
    background: rgba(255, 255, 255, 0.25);
}

/* ===========================
   ARCHIVE TABLE OVERRIDES
   =========================== */

/* Archive table has a lighter header vs homepage navy */
.tenders-archive .tenders-table-wrap {
    border-radius: 10px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
    background: #fff;
    border: none;
}

.tenders-archive .tenders-table thead {
    background: #f0f4f8;
    border-bottom: 2px solid #e2e8f0;
}

.tenders-archive .tenders-table th {
    color: #4a5568;
    padding: 13px 18px;
    letter-spacing: 0.06em;
}

.tenders-archive .tenders-table td {
    padding: 16px 18px;
    color: #333;
}

[dir="rtl"] .tenders-table th,
[dir="rtl"] .tenders-table td {
    text-align: right;
}

/* Column widths */
.tenders-table .col-title    { min-width: 220px; }
.tenders-table .col-type     { width: 130px; }
.tenders-table .col-donor    { width: 140px; }
.tenders-table .col-deadline { width: 130px; font-size: 13px; }
.tenders-table .col-status   { width: 90px; }
.tenders-table .col-action   { width: 100px; text-align: center; }

[dir="rtl"] .tenders-table .col-action { text-align: center; }

/* Expired deadline */
.tenders-table .col-deadline.is-expired,
.tenders-table td.is-expired {
    color: #c0392b;
    font-weight: 600;
}

/* Title link */
.tender-row__title-link {
    color: #1d3557;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.tender-row__title-link:hover {
    color: #e63946;
}

.tender-row--closed .tender-row__title-link {
    color: #6b7280;
}

/* Type badge */
.tender-type-badge {
    display: inline-block;
    background: #eef2fb;
    color: #1d3557;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ===========================
   STATUS BADGES
   =========================== */

.tender-status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.tender-status-badge--open {
    background: #d4edda;
    color: #155724;
}

.tender-status-badge--closed {
    background: #f8d7da;
    color: #721c24;
}

/* ===========================
   SUBSECTION TITLE
   =========================== */

.tenders-subsection-title {
    font-size: 18px;
    font-weight: 700;
    color: #1D3557;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #3C78B4;
}

/* ===========================
   DIVIDER
   =========================== */

.tenders-divider {
    border: none;
    border-top: 1px solid rgba(28, 53, 87, 0.1);
    margin: 40px 0;
}

/* ===========================
   EMPTY STATE
   =========================== */

.tenders-empty {
    text-align: center;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tenders-empty svg {
    width: 48px;
    height: 48px;
    stroke: rgba(28, 53, 87, 0.2);
    fill: none;
    stroke-width: 1.5;
}

.tenders-empty p {
    font-size: 15px;
    color: #9CA3AF;
    margin: 0;
}

/* ===========================
   RESPONSIVE — MOBILE CARD STACK
   =========================== */

@media (max-width: 720px) {
    .tenders-archive .tenders-table-wrap {
        box-shadow: none;
        background: transparent;
    }

    .tenders-archive .tenders-table,
    .tenders-archive .tenders-table thead,
    .tenders-archive .tenders-table tbody,
    .tenders-archive .tenders-table th,
    .tenders-archive .tenders-table td,
    .tenders-archive .tenders-table tr {
        display: block;
    }

    .tenders-archive .tenders-table thead {
        display: none;
    }

    .tenders-archive .tenders-table tbody tr {
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
        margin-bottom: 16px;
        padding: 16px;
        border: none;
    }

    .tenders-archive .tenders-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
    }

    .tenders-archive .tenders-table td:last-child {
        border-bottom: none;
        padding-top: 12px;
    }

    .tenders-archive .tenders-table td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #9ca3af;
        flex-shrink: 0;
        margin-right: 12px;
    }

    [dir="rtl"] .tenders-archive .tenders-table td::before {
        margin-right: 0;
        margin-left: 12px;
    }

    .tenders-archive .tenders-table .col-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ===========================
   SINGLE TENDER
   =========================== */

.tender-hero {
    background: #1d3557;
    color: #fff;
    padding: 140px 0 60px;
}

.tender-hero__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
}

.tender-hero__back {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    width: fit-content;
}

.tender-hero__back:hover {
    color: #fff;
}

.tender-hero__title {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 800;
    margin: 0;
    color: #fff;
    line-height: 1.25;
}

/* Details strip */
.tender-details-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
}

.tender-detail-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.tender-detail-item svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.tender-detail-item--expired {
    color: #ffd166;
}

/* Body */
.tender-body {
    padding: 56px 0 80px;
    background: #fff;
}

.tender-body__inner {
    max-width: 78%;
}

.tender-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.tender-content h2,
.tender-content h3 {
    color: #1d3557;
    margin-top: 1.5em;
}

.tender-content ul,
.tender-content ol {
    padding-left: 1.5em;
}

[dir="rtl"] .tender-content ul,
[dir="rtl"] .tender-content ol {
    padding-left: 0;
    padding-right: 1.5em;
}

.tender-apply-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}
