/* Table Styles */
.table-container {
    overflow-x: auto;
    margin-top: 1.5rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
    /* smooth scrolling on iOS */
}

table {
    width: 100%;
    border-collapse: separate;
    /* Changed for border-radius on rows/cells support if needed */
    border-spacing: 0;
    margin-bottom: 1rem;
    min-width: 600px;
    /* Ensure table doesn't squash too much on mobile, forces scroll */
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    vertical-align: middle;
}

th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    /* Keep header visible */
    top: 0;
    z-index: 10;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e8f5e9;
    /* Light green hover matching primary theme */
}

/* Link Styles in Table */
table td a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: rgba(67, 160, 71, 0.1);
    /* Light green background */
    color: var(--primary-dark);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

table td a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Add icon to links automatically */
table td a::before {
    content: "\f08e";
    /* FontAwesome External Link icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .table-container {
        padding: 0.5rem;
        margin-top: 1rem;
        box-shadow: none;
        border: 1px solid #eee;
    }

    th,
    td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    table td a {
        padding: 6px 10px;
        font-size: 0.8rem;
        width: 100%;
        /* Full width buttons on very small screens? Maybe not, keep auto */
        justify-content: center;
    }
}

/* Button Styles for Content */
.btn,
.w3-button,
.tombol a,
button.tombol {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 5px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:hover,
.w3-button:hover,
.tombol a:hover,
button.tombol:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Center utility */
.text-center {
    text-align: center;
}

.content-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
}