/* ============================================================
   SEARCH MODAL — Understrap / Bootstrap 4
   @author Fudo
   @date   2026-06-01
   ============================================================ */

/* Card */
.modal-body {
    background: var(--icdv-sage);
    max-width: 900px;
    width: 100%;
    margin: 5vh auto;
    padding: 100px 100px 60px;
    position: relative;
	text-align: center !important;
    z-index: 999;
}

.modal-header {
    border-bottom: none;
    padding: 0;
    text-align: center!important;
    position: relative;
	display: block;
	width: 100%;
}

.modal-title {
    font-size: 30px;
    font-weight: bold;
    color: var(--icdv-teal-dark);
    text-align: center;
    margin: 0 auto;
    padding-bottom: 40px;

}

.custom-modal-close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--icdv-teal-dark);
    font-size: 18px;
    font-weight: 200;
}
.custom-modal-close-button .close-text {
    font-size: 14px;
    font-weight: 100;
    margin-right: 4px;
}

/* Search field */
.header_search {
        width: 100%;
    max-width: 760px!important;
    margin: 0 auto;
	
}
.header_search .input-group {
    display: flex;
    width: 100%;
    background: var(--icdv-white);
    border: 1px solid #999;
}
.header_search .search-field {
    flex: 1 1 auto;
    border: none;
    padding: 16px 18px;
    font-size: 16px;
    background: transparent;
}
.header_search .search-submit {
    border: none;
    background: var(--icdv-white);
    padding: 0 18px;
    color: var(--icdv-teal-dark);
}
.header_search .search-submit i {
    font-size: 20px;
}

/* Popular topics */
.popular-topics {
    margin-top: 40px !important;
}
.section-title {
    font-size: 24px;
    font-weight: 100;
    margin: 50px 0 30px;
    color: var(--icdv-teal-dark);
    text-align: center !important;
    text-align-last: center !important;
    display: block;
    width: 100%;
}

input[type=search]:hover {
    border: 2px solid var(--icdv-white) !important;
    box-shadow: 0px 0px 2px 2px #b6bcd5 !important;
}

.modal-body .popular-topics .section-title {
    text-align: center !important;
}

/* THE GRID — 4 across */
.search-blocks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}
.search-blocks > [class*="col-"] {
    width: auto;
    max-width: none;
    flex: none;
    padding: 0;
    margin: 0;
}

input[type=search]:hover {
	border: 2px solid var(--icdv-white) !important;
    box-shadow: 0px 0px 2px 2px #b6bcd5 !important;
}

/* Boxes */
.custom-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 130px;
    background-color: var(--icdv-teal-dark);
    text-decoration: none;
    padding: 15px;
    line-height: 1.2;
    transition: background-color 0.3s ease;
}
.custom-box:hover {
    background-color: var(--icdv-teal);
}
.custom-box i {
    font-size: 1.6em;
    margin-bottom: 12px;
    color: var(--icdv-white) !important;
}
.custom-box span {
    display: block;
}
.boxtext {
    text-align: center !important;
    font-size: 16px !important;
    color: var(--icdv-white) !important;
    margin: 0 !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .modal-body {
        margin: 3vh auto;
        padding: 35px 30px;
        max-height: 90vh;
        overflow-y: auto;
    }
    .search-blocks {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .custom-box { height: auto; padding: 20px; }
    .boxtext { font-size: 15px !important; }
}

@media (max-width: 600px) {
    .modal-header,
    .modal-title {
        text-align: center !important;
        text-align-last: center !important;
        width: 100%;
        display: block;
    }
}

.popular-topics.mt-4 {
	text-align: center !important;
	text-align-last: center;
}