/* ==========================================================================
   Mobile overrides for the dpss theme
   ========================================================================== */

/*
 * Team section: remove underline from person-name links.
 */
.team .team-item .name {
    text-decoration: none;
    border-bottom: none;
}

.editor-content .team .team-item .name {
    text-decoration: none;
    border-bottom: none;
}

.editor-content .team .team-item .name:hover {
    text-decoration: none;
    border-bottom: none;
}

.team .team-item .name .person-name {
    text-decoration: none;
    border-bottom: none;
}

/* Team page: extra <div> between .row.team-row and .col-md-4 breaks BS5 flex */
.team .team-row > div {
    display: flex;
    flex-wrap: wrap;
}

/* ==========================================================================
   Profile page (KMU-style person page)
   ========================================================================== */
.page-content.gov-container { padding: 0 15px; }
.page-content .page-title { text-align: center; }
.page-content .heading-1 { font-size: 22px; font-weight: 600; font-family: ProbaPro; margin: 0; padding-bottom: 15px; }
.page-content .divider { border: 0; border-top: 1px solid #d3d5d9; margin-bottom: 20px; }

/* Profile photo */
.page-content .team .team-item .photo {
    width: 120px !important;
    height: 120px !important;
    background-color: transparent;
    background-position: center top !important;
}

/* Profile name */
.page-content .team .team-item .name {
    color: #000;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
}

/* ==========================================================================
   Editor content tables — responsive on mobile
   ========================================================================== */
.editor-content h2 {
    background: #234161;
    color: #fff;
    padding: 12px 16px;
    margin: 20px 0 0;
    border-radius: 8px 8px 0 0;
    font-size: 16px;
    font-weight: 600;
    font-family: ProbaPro;
}

.editor-content h2:first-child { margin-top: 0; }
.editor-content h2 + table { margin-top: 0; border-top: none; border-radius: 0 0 8px 8px; }

.editor-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    font-size: 13px;
    table-layout: fixed;
}

.editor-content table colgroup { display: none; }

.editor-content table tr:first-child td {
    background: #3a6a9e;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 8px 10px;
    border-color: #4a7ab0;
}

.editor-content table td {
    padding: 8px 10px;
    border: 1px solid #e9ecef;
    vertical-align: top;
    line-height: 1.4;
    word-wrap: break-word;
}

.editor-content table tr:nth-child(even):not(:first-child) { background: #f8f9fa; }
.editor-content table[border] { border: none; }
.editor-content { overflow-x: auto; }

/* ==========================================================================
   Editor content document lists — card-style
   ========================================================================== */
.editor-content > ul,
.editor-content > div > ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.editor-content > ul > li,
.editor-content > div > ul > li {
    background: #fff;
    border: 1px solid #dee2e6;
    border-left: 4px solid #2d5ca6;
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.editor-content > ul > li > a,
.editor-content > div > ul > li > a {
    color: #2d5ca6;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    display: block;
}

.editor-content > ul > li > a:hover,
.editor-content > div > ul > li > a:hover { text-decoration: underline; }

.editor-content > ul > li > a::before,
.editor-content > div > ul > li > a::before {
    content: "\f1c1";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 8px;
    color: #c0392b;
    font-size: 13px;
}

/* Nested sub-links */
.editor-content > ul > li > ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.editor-content > ul > li > ul > li { margin: 0; padding: 0; border: none; background: none; }

.editor-content > ul > li > ul > li > a {
    display: inline-flex;
    align-items: center;
    background: #eef2f8;
    color: #2d5ca6;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.editor-content > ul > li > ul > li > a::before {
    content: "\f019";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 6px;
    font-size: 10px;
}

/* ==========================================================================
   Header — mobile-specific
   ========================================================================== */
header .header-bg { background: rgb(35, 65, 97); padding: 0px 0px 20px; }

/* Slide-out menu: fixed overlay, not in document flow */
header .menu-for-small-devices {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1050;
    background-color: #304d7c;
    visibility: hidden;
}

header .menu-for-small-devices.active {
    visibility: visible;
}

/* When menu open, hide the header bar and logo behind it */
body.active header .sticky-top .header-top { visibility: hidden; }
body.active .main-title { visibility: hidden; }

/* ==========================================================================
   Search form — mobile
   ========================================================================== */
#mobileSearchForm {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    padding: 20px 15px 30px;
    background-color: rgb(39, 48, 67);
    z-index: 2001;
}

#mobileSearchForm label {
    width: 100%;
    color: #fff;
    display: block;
    font-family: ProbaPro;
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 15px;
}

#mobileSearchForm .input {
    width: 100%;
    display: block;
    background-color: #fff;
    height: 50px;
    border: none;
    border-radius: 4px;
    color: #000;
    padding-left: 12px;
    margin-top: 10px;
    font-size: 16px;
}

#mobileSearchForm .search-btn {
    display: block;
    height: 50px;
    width: 100%;
    margin-top: 15px;
    text-align: center;
    font-family: ProbaPro;
    font-weight: 600;
    background: rgb(255, 227, 88);
    border: none;
    border-radius: 4px;
    font-size: 16px;
}

#mobileSearchForm .close-icon {
    width: 21px;
    height: 21px;
    cursor: pointer;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center center;
    background-image: url('../images/icons/icn-closemenu.png');
    margin-bottom: 15px;
}

/* ==========================================================================
   Mobile menu
   ========================================================================== */
header .menu-container .menu a,
header .menu-container .menu button.showSubmenu {
    display: block;
    color: #fff;
    font-size: 100%;
    font-family: ProbaPro;
    font-weight: 600;
    padding: 12px 15px;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

header .menu-container .menu a:hover,
header .menu-container .menu button.showSubmenu:hover {
    color: rgb(255, 227, 88);
    text-decoration: underline;
}

/* ==========================================================================
   Mobile page title
   ========================================================================== */
.heading-1 {
    font-size: 20px;
    line-height: 1.3;
    word-wrap: break-word;
}

/* ==========================================================================
   News cards — mobile
   ========================================================================== */
.news__item--inner { overflow-x: hidden; }
.news__item--inner img { max-width: 100%; height: auto; }

/* ==========================================================================
   Breadcrumbs — compact on mobile
   ========================================================================== */
.main-breadcrumbs {
    font-size: 13px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 0;
}

/* ==========================================================================
   General mobile fixes
   ========================================================================== */

/* Prevent horizontal overflow */
body {
    overflow-x: hidden;
}

.wrapper {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* Fix content padding */
.news__wrapper {
    padding: 0 10px;
}

/* Child page list on mobile */
.child-pages-list a {
    font-size: 16px !important;
}

/* ==========================================================================
   lowvision overrides
   ========================================================================== */
body.lowvision header .header-bg { background: none !important; }
body.lowvision .search-form { background-color: #fff; }
