/**
 * Public pages — mobile responsive (examinations, admission, academics, etc.)
 */

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0;
    position: relative;
}

img,
video,
svg {
    max-width: 100%;
    height: auto;
}

.public-page-container,
.breadcrumb-container,
.breadcrumb-content,
.public-page-header,
.public-page-header .header-content,
main,
.surface-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.public-page-header {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    width: 100% !important;
    left: 0;
    right: 0;
}

.public-page-header .header-content {
    padding-left: 16px;
    padding-right: 16px;
    width: 100%;
    max-width: 100%;
}

.public-page-header .header-content h1 {
    font-size: clamp(24px, 6vw, 48px);
    line-height: 1.15;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.public-page-header .header-content p {
    font-size: clamp(14px, 3.5vw, 18px);
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 0 4px;
}

.public-page-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: clip;
}

.public-page-container .downloads-list,
.public-page-container .download-item {
    overflow: visible;
    min-width: 0;
}

/* Footer must not widen page */
.footer,
.footer .container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.footer-col {
    min-width: 0 !important;
}

.footer-content {
    width: 100%;
    max-width: 100%;
}

/* Bootstrap inside public pages */
.public-page-container .row {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

.public-page-container [class*="col-"] {
    min-width: 0;
    max-width: 100%;
}

/* Examinations */
.exam-layout {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.exam-tabs,
.exam-content,
.exam-item-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.exam-tab-link {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.exam-content-header h2 {
    font-size: clamp(20px, 5vw, 30px);
    word-wrap: break-word;
}

.exam-item-card h3 {
    font-size: clamp(17px, 4vw, 24px);
    word-wrap: break-word;
}

.exam-item-card p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.exam-document-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.exam-document-box .action-button {
    max-width: 100%;
}

/* Pagination — see public-website-layout.css */

/* Academics */
.academics-tabs,
.academics-content-area,
.admission-page {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.tab-btn,
.program-card,
.doc-card {
    min-width: 0;
    max-width: 100%;
}

.program-card-title,
.doc-details h4 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 991px) {
    .public-page-container {
        margin-top: 32px;
        margin-bottom: 40px;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .public-page-header {
        min-height: 200px;
        height: auto !important;
        padding: 96px 16px 32px !important;
    }

    .exam-layout {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .exam-tabs {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px;
    }

    .exam-tab-link {
        width: 100%;
        flex: none;
        min-width: 0 !important;
        padding: 14px 16px;
        font-size: 15px;
        text-align: left;
    }

    .exam-content {
        padding: 20px 16px;
    }

    .exam-document-box {
        flex-direction: column;
        align-items: stretch;
    }

    .exam-document-box .action-button {
        width: 100%;
        justify-content: center;
    }

    .academics-tabs {
        display: flex;
        flex-wrap: wrap;
        justify-content: stretch;
        gap: 8px;
        margin: 20px 0 28px;
        padding: 0;
    }

    .tab-btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 0 !important;
        padding: 12px 10px;
        font-size: 13px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }
}

@media (max-width: 768px) {
    .public-page-header {
        padding: 88px 12px 28px !important;
        min-height: 180px;
    }

    .breadcrumb-content {
        font-size: 13px;
        padding: 0 16px;
        word-wrap: break-word;
    }

    .exam-tab-link,
    .tab-btn {
        flex: 1 1 100% !important;
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
    }

    .exam-content {
        padding: 16px 12px;
    }

    .exam-item-card {
        padding: 16px;
    }

    .exam-item-meta {
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .public-page-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .public-page-header h1 {
        font-size: 22px !important;
    }
}
