section.subpage_section {
    min-height: revert;
}

.subpage_container {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    word-break: keep-all;
}

@media screen and (max-width: 1500px) {
    .subpage_container {
        padding: 0 15px;
    }
}

.company_first_contents {
    padding: 0 50px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.company_first_contents img {
    max-width: 600px;
    margin-bottom: 73px;
}

span.company_first_text {
    font-weight: 400;
    font-size: 20px;
    line-height: 30px;
    word-break: keep-all;
}

section.subpage_section.company_hero {
    min-height: 550px;
    position: relative;
}

img.company_hero_img {
    position: absolute;
    z-index: -1;
    bottom: 0;
    left: 44%;
    width: 1040px;
}

@media screen and (max-width: 1200px) {
    img.company_hero_img {
        left: 33%;
    }
}

@media screen and (max-width: 840px) {
    img.company_hero_img {
        left: 37%;
        width: 733px;
    }
}

@media screen and (max-width: 640px) {
    img.company_hero_img {
        left: -67px;
        width: 550px;
    }

    section.subpage_section.company_hero {
        min-height: 770px;
    }

    span.company_first_text {
        font-size: 18px;
    }
}

section.subpage_section.company_info {
    box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.1);
    background: rgba(250, 250, 250, 1);
    min-height: 300px;
}

.company_info .subpage_container {
    margin: auto;
}

.company_second_txt_wrapper {
    padding: 50px;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

span.company_ceo_name {
    font-weight: 600;
    font-size: 45px;
    line-height: 45px;
}

span.company_ceo_text {
    font-weight: 600;
    font-size: 35px;
    line-height: 45px;
}

.company_second_text_table {
    display: flex;
    flex-direction: column;
    gap: 72px;
}

.company_second_text_row {
    display: flex;
    gap: 18px;
}

.company_second_text_col:first-child {
    font-weight: 500;
}

.company_second_text_col {
    font-weight: 400;
    font-size: 20px;
    line-height: 40px;
}

.company_second_table_wrapper {
    gap: 100px;
    display: flex;
}

.subpage_section.company_bottom {
    min-height: 650px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), url("/img/bg_company_bottom.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.subpage_container.company_bottom {
    max-width: 1400px;
    width: 100%;
    margin: auto;
    margin-top: 193px;
    display: flex;
    justify-content: center;
    gap: 79px;
}

.company_bottom_text_wrapper {
    display: flex;
    flex-direction: column;
    color: rgba(255, 255, 255, 1);
}

span.company_bottom_title {
    font-weight: 700;
    font-size: 50px;
    line-height: 65px;
    text-align: center;
    margin-bottom: 40px;
    word-break: keep-all;
}

span.company_bottom_text {
    font-weight: 400;
    font-size: 25px;
    line-height: 40px;
    text-align: center;
    word-break: keep-all;
}

@media screen and (max-width: 1100px) {
    .company_second_text_col {
        font-size: 20px;
    }

    .company_second_table_wrapper {
        gap: 70px;
    }

    .subpage_container.company_bottom {
        margin: auto;
        padding: 0 15px;
    }

    span.company_bottom_title {
        font-size: 40px;
    }

    span.company_bottom_text {
        font-size: 17px;
    }
}

@media screen and (max-width: 840px) {

    .company_ceo_name {
        font-size: 36px !important;
    }

    .company_second_text_col {
        font-size: 16px;
    }

    .company_second_table_wrapper {
        gap: 40px;
    }

    span.company_bottom_title {
        font-size: 35px;
    }

    span.company_bottom_text {
        font-size: 13px;
    }
}

@media screen and (max-width: 640px) {
    .company_second_txt_wrapper {
        flex-direction: column;
        padding: 50px 15px;
    }

    .company_second_table_wrapper {
        flex-direction: column;
        margin-top: 40px;
        gap: 20px;
    }

    .company_second_text_table {
        gap: 20px;
    }

    .subpage_container.company_bottom {
        flex-direction: column;
        margin-top: 50px;
        margin-bottom: 50px;
    }
}

.patent_grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(470px, 3fr));
    gap: 45px;
    margin-bottom: 150px;
}

.patent_grid_item {
    height: 600px;
    display: flex;
    flex-direction: column;
    padding: 60px;
    align-items: center;
    background: rgba(248, 248, 248, 1);
    justify-content: end;
    cursor: pointer;
}

.patent_grid_item:hover {
    scale: 1.05;
    transition: all 0.3s ease;
}

.patent_grid_item img {
    max-width: 90%;
    max-height: 350px;
}

.patent_grid_item span {
    font-weight: 400;
    font-size: 25px;
    line-height: 25px;
    margin-top: 65px;
}

@media screen and (max-width: 640px) {
    .patent_grid {
        display: flex;
        flex-direction: column;
    }

    .patent_grid_item {
        height: revert;
        padding: 40px;
    }

    .patent_grid_item img {
        max-height: 330px;
    }

    .patent_grid_item span {
        margin-top: 20px;
    }
}

.search_area_total {
    display: flex;
    max-width: 1500px;
    width: 100%;
}

.total_area {
    display: flex;
    color: rgba(221, 221, 221, 1);
    font-weight: 600;
    font-size: 25px;
    line-height: 25px;
    margin-bottom: 50px;
}

span.total_number {
    color: rgba(0, 0, 0, 1);
}

.subpage_table_board table {
    width: 100%;
    max-width: 1500px;
    border-collapse: collapse;
}

.subpage_table_board table thead {
    border-bottom: 2px solid black;
    padding: 20px 20px;
}

.subpage_table_board table thead th {
    padding: 20px 20px;
}

.subpage_table_board table tr td{
    padding: 20px 20px;
    border-bottom: 1px solid #d8d8d8;
}

#pagenation_area {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 100px auto;
}

#pagenation_area2 {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 100px auto;
}

.pagenation li {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    padding: 0 20px;

    font-weight: 400;
    font-size: 20px;
}

.pagenation li:first-child,
.pagenation li:last-child {
    width: 50px;
    height: 50px;
    margin: 0 20px;
    border-radius: 50px;
    background-color: transparent;
    color: rgba(0,0,0,0.3);
}

.pagenation li:first-child a,
.pagenation li:last-child a {
    color: rgba(0,0,0,0.3);
}

.pagenation li.active {
    background-color: transparent;
    color: black;
    font-weight: 600;
}

.pagenation li.disabled {
    pointer-events: none;
    cursor: default;
}

.pagenation li.disabled a {
    color: rgba(0,0,0,0.1);
}







.gallery_grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(345px, 4fr));
    gap: 40px;
}

.gallery_grid_item {
    display: flex;
    flex-direction: column;
}

.gallery_grid_item_img_box {
    aspect-ratio: 1 / 1;
    border-radius: 30px;
    background: rgba(248, 248, 248, 1);
    position: relative;
    margin-bottom: 40px;
    overflow: hidden;
}

.gallery_grid_item_img_box:hover {
    scale: 1.05;
    transition: all 0.3s ease;
}

img.gallery_grid_item_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    border-radius: 30px;
}

span.gallery_grid_item_title {
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 25px;
    line-height: 25px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

span.gallery_grid_item_date {
    font-weight: 500;
    font-size: 20px;
    line-height: 20px;
    color: rgba(128, 128, 128, 1);
}

.map_box_wrapper {
    display: flex;
    width: 100%;
    background: rgba(248, 248, 248, 1);
    margin-bottom: 150px;
    overflow: hidden;
    border-radius: 50px;
}

.map_box_info {
    display: flex;
    flex-direction: column;
    padding: 50px;
    width: 37%;
    max-height: 500px;
}

img.map_icon {
    width: 45px;
    align-self: end;
    margin-bottom: 56px;
}

.map_info_text {
    display: flex;
    flex-direction: column;
}

span.map_info_first {
    font-weight: 700;
    font-size: 20px;
    line-height: 20px;
    color: rgba(129, 29, 33, 1);
    margin-bottom: 30px;
}

span.map_info_title {
    font-weight: 700;
    font-size: 45px;
    line-height: 40px;
    margin-bottom: 10px;
}

span.map_info_address {
    font-weight: 400;
    font-size: 20px;
    line-height: 40px;
    margin-bottom: 70px;
}

span.map_info_phone_strong {
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 10px;
}

span.map_info_phone {
    font-weight: 300;
}

.map_box {
    width: 63%;
}

@media screen and (max-width: 640px) {
    .map_box_wrapper {
        flex-direction: column;
    }

    .map_box_info {
        width: 100%;
        padding: 40px;
    }

    span.map_info_address {
        font-size: 18px;
        margin-bottom: 40px;
    }

    .map_box {
        width: 100%;
        height: 350px;
    }
}

.gallery_grid.fr3 {
    grid-template-columns: repeat(auto-fill, minmax(470px, 3fr));
    gap: 38px;
}

a.gallery_grid_item.fr3 {
    position: relative;
    aspect-ratio: 1 / 1;
    align-items: center;
    padding: 40px;
    background: rgba(248, 248, 248, 1);
    justify-content: end;
}

img.gallery_grid_item_img_3fr_button {
    width: 50px;
    position: absolute;
    right: 35px;
    top: 35px;
    opacity: 0;
}

a.gallery_grid_item.fr3:hover img.gallery_grid_item_img_3fr_button {
    opacity: 1;
}

a.gallery_grid_item.fr3:hover {
    scale: 1.05;
    transition: all 0.3s ease;
    border: 3px solid rgba(129, 29, 33, 1)
}

img.gallery_grid_item_img_3fr {
    max-width: 80%;
    max-height: 70%;
    margin: auto;
}

span.gallery_grid_item_title.fr3 {
    font-weight: 600;
    font-size: 25px;
    line-height: 25px;
    text-align: center;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

@media screen and (max-width: 640px) {
    .gallery_grid.fr3 {
        display: flex;
        flex-direction: column;
    }
}




/* ===== 기본(PC) ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;               /* 화면 가장자리 여백 */
}

.modal-overlay.is-open {
    display: flex;
}

/* 화면 높이 초과 시 모달 내부 스크롤 */
.modal-dialog {
    width: 1100px;
    max-width: 100%;
    max-height: calc(100vh - 48px); /* overlay padding 고려 */
    overflow: auto;                 /* 내부 스크롤 */
    background: #fff;
    border-radius: 28px;
    position: relative;
    padding: 56px;
}

.modal-dialog.dev {
    width: 600px;
}

.modal-close {
    position: sticky; /* 스크롤해도 상단에 남게 */
    top: 0;
    margin-left: auto;
    display: block;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    font-size: 34px;
    line-height: 44px;
    cursor: pointer;
    color: #111;
}

/* PC: 2열 */
.modal-body {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 48px;
    align-items: start;
}

.modal-dialog.dev .modal-body {
    display: contents;
}

.modal-left img {
    width: 100%;
    height: 420px;
    object-fit: contain;
    border-radius: 14px;
}

.modal-right {
    align-self: center;
}

h2#modalTitle {
    text-align: left;
    font-weight: 700;
    font-size: 40px;
    line-height: 40px;
}

/* 텍스트 */
.modal-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
}

.modal-dl dd {
    margin: 0;
    font-weight: 500;
    font-size: 20px;
}

.modal-dl dt {
    font-weight: 700;
    font-size: 20px;
}

.modal-divider {
    height: 1px;
    background: #ddd;
    margin: 20px 0 30px;
}

.modal-dl .row {
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 16px;
    padding: 10px 0;
}

.modal-dl .row.dev {
    display: grid;
    grid-template-columns: revert;
    gap: 16px;
    padding: 10px 0;
}

.modal-dl dt { font-weight: 700; color: #222; }
.modal-dl dd { margin: 0; color: #444; }

/* ===== Tablet ===== */
@media (max-width: 1024px) {
    .modal-dialog {
        width: 920px;
        padding: 36px;
        border-radius: 22px;
    }

    .modal-body {
        grid-template-columns: 360px 1fr;
        gap: 28px;
    }

    .modal-left img {
        height: 360px;
    }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 14px;
    }

    .modal-dialog {
        width: 100%;
        padding: 18px;
        border-radius: 18px;
        max-height: calc(100vh - 28px);
    }

    /* 모바일: 1열로 쌓기 */
    .modal-body {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modal-left img {
        height: 320px; /* 모바일에서 너무 크지 않게 */
        margin-bottom: 30px;
    }

    .modal-dl .row {
        grid-template-columns: 90px 1fr;
        gap: 10px;
    }

    .modal-dl .row.dev {
        grid-template-columns: revert;
    }

    .modal-dl dd {
        font-size: 16px;
    }

    .modal-dl dt {
        font-size: 16px;
    }
}

/* ===== Small Mobile ===== */
@media (max-width: 420px) {
    .modal-left img { height: 180px; }
    .modal-dl .row { grid-template-columns: 94px 1fr; }
    .modal-dl .row.dev {
        grid-template-columns: revert;
    }
}
