/* Table page template */

.page-content--table {
    font-size: 1rem;
    line-height: 1.7;
    color: #222;
}

.page-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.page-content--table table {
    width: 100%;
    min-width: 640px;
    margin: 0 auto 1.5rem;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 50, 98, 0.08);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.page-content--table table th,
.page-content--table table td {
    border: 1px solid #d7dee8;
    padding: 0.75rem 1rem;
    vertical-align: middle;
    text-align: left;
}

/* Başlık: thead/th (Excel içe aktarım) veya manuel tabloda ilk satır */
.page-content--table table th,
.page-content--table table thead td,
.page-content--table table:not(:has(thead)) > tbody > tr:first-child > td,
.page-content--table table:not(:has(thead)) > tr:first-child > td,
.page-content--table table:not(:has(thead)) > tr:first-child > th {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border-color: var(--primary-dark);
}

.page-content--table table thead tr,
.page-content--table table:not(:has(thead)) > tbody > tr:first-child,
.page-content--table table:not(:has(thead)) > tr:first-child {
    border-bottom: 3px solid var(--secondary-color);
}

/* Zebra: thead varsa tüm tbody satırları; yoksa ilk satır hariç */
.page-content--table table:has(thead) tbody tr:nth-child(even) td,
.page-content--table table:not(:has(thead)) > tbody > tr:nth-child(odd):not(:first-child) td,
.page-content--table table:not(:has(thead)) > tr:nth-child(odd):not(:first-child) td {
    background: #f8fafc;
}

.page-content--table table:has(thead) tbody tr:hover td,
.page-content--table table:not(:has(thead)) > tbody > tr:not(:first-child):hover td,
.page-content--table table:not(:has(thead)) > tr:not(:first-child):hover td {
    background: #eef4fa;
}

.page-content--table table thead tr:hover th,
.page-content--table table thead tr:hover td,
.page-content--table table:not(:has(thead)) > tbody > tr:first-child:hover > td,
.page-content--table table:not(:has(thead)) > tr:first-child:hover > td,
.page-content--table table:not(:has(thead)) > tr:first-child:hover > th {
    background: var(--primary-light);
}

.page-content--table img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 1.5rem;
}

.page-content--table p {
    margin-bottom: 1rem;
}

@media (max-width: 767px) {
    .page-content--table table th,
    .page-content--table table td {
        padding: 0.55rem 0.75rem;
        font-size: 0.9rem;
    }

    .page-content--table table th,
    .page-content--table table thead td,
    .page-content--table table:not(:has(thead)) > tbody > tr:first-child > td,
    .page-content--table table:not(:has(thead)) > tr:first-child > td,
    .page-content--table table:not(:has(thead)) > tr:first-child > th {
        font-size: 0.85rem;
    }
}
