/* ------------------- Global Responsiveness ------------------- */

/* Base adjustments */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

.container, .site, .wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

table {
    width: 100%;
    display: block;
    overflow-x: auto;
}

/* Forms and buttons */
input, select, textarea, button {
    max-width: 100%;
    box-sizing: border-box;
}

/* Headings and text */
h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
}

/* ---------------- Responsive Breakpoints ---------------- */

/* Large tablets and small desktops */
@media (max-width: 992px) {
    .site-header, .site-footer, .sidebar, .widget-area {
        width: 100%;
        display: block;
    }

    .content-area {
        width: 100%;
        padding: 15px;
    }

    .menu, nav {
        display: flex;
        flex-wrap: wrap;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .menu, nav {
        flex-direction: column;
    }

    .sidebar {
        margin-top: 20px;
    }

    .koisua-portal-wrapper, .portal-wrapper {
        flex-direction: column;
    }
}

/* Mobile Phones */
@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .menu li, .koisua-portal-sidebar ul li a {
        padding: 12px;
    }

    .koisua-portal-content {
        padding: 15px;
    }

    table, .koisua-portal-module table {
        font-size: 12px;
    }

    .koisua-portal-module {
        padding: 15px;
    }

    input, select, textarea, button {
        font-size: 14px;
    }
}

/* Extra small phones */
@media (max-width: 400px) {
    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }

    h3 {
        font-size: 16px;
    }
}


/* ------------------- Make All Tables Responsive ------------------- */
table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table th,
table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
    word-wrap: break-word;
}

/* Horizontal scroll container */
table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

/* Optional: Zebra stripes for better readability */
table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    table th, table td {
        font-size: 14px;
        padding: 8px;
    }
}
