.portfolio_grid_lt {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.portfolio_grid_lt ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100% !important;
    box-sizing: border-box !important;
}

.portfolio_item {
    cursor: pointer;
    transition: 0.3s;
    min-width: 0;
}

.portfolio_item .item_inner {
    background: #fff;
    border: 1px solid #eee;
    overflow: hidden;
    border-radius: 1.2rem;
    transition: 0.4s;
}

.portfolio_item:hover .item_inner {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #004c97;
}

.portfolio_item .img_box {
    position: relative;
    aspect-ratio: 16/9;
    max-height: 180px;
    overflow: hidden;
}

.portfolio_item .img_box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.portfolio_item:hover .img_box img {
    transform: scale(1.1);
}

.portfolio_item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 76, 151, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.portfolio_item:hover .overlay {
    opacity: 1;
}

.portfolio_item .overlay span {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
}

.portfolio_item .txt_box {
    padding: 2.5rem 2rem;
    text-align: center;
}

.portfolio_item .txt_box h3 {
    font-size: 2.1rem;
    font-weight: 800;
    color: #222;
    margin-bottom: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portfolio_item .txt_box p {
    font-size: 1.5rem;
    color: #888;
}

/* Modal Styles */
.p_modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.p_modal_content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
    border-radius: 2rem;
    overflow: hidden;
    animation: modalScale 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modalScale {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.p_close {
    position: absolute;
    right: 2.5rem;
    top: 1.5rem;
    color: #333;
    font-size: 4rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.p_modal_body {
    display: flex;
    flex-wrap: wrap;
}

.p_modal_body .p_img {
    flex: 1 1 50%;
    background: #f0f0f0;
}

.p_modal_body .p_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.p_modal_body .p_info {
    flex: 1 1 50%;
    padding: 5rem 4rem;
}

.p_modal_body .p_info h2 {
    font-size: 3.2rem;
    font-weight: 800;
    color: #004c97;
    margin-bottom: 4rem;
    border-bottom: 2px solid #004c97;
    padding-bottom: 2rem;
}

.p_modal_body .p_info table {
    width: 100%;
    border-collapse: collapse;
}

.p_modal_body .p_info th, .p_modal_body .p_info td {
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1.7rem;
    text-align: left;
}

.p_modal_body .p_info th {
    width: 10rem;
    color: #888;
    font-weight: 600;
}

.p_modal_body .p_info td {
    color: #222;
    font-weight: 500;
}

@media (max-width: 1200px) {
    .portfolio_grid_lt ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .portfolio_grid_lt ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .p_modal_body .p_img, .p_modal_body .p_info { flex: 1 1 100%; }
    .p_modal_body .p_info { padding: 3rem; }
    .p_modal_content { margin: 10% auto; }
}

@media (max-width: 576px) {
    .portfolio_grid_lt ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
    .portfolio_item .txt_box { padding: 1.5rem 1rem; }
    .portfolio_item .txt_box h3 { font-size: 1.6rem; }
    .portfolio_item .txt_box p { font-size: 1.3rem; }
}

/* Fallback Card Design for missing images */
.no_image_box.fallback_card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    color: #fff !important;
    box-sizing: border-box;
    text-align: center;
}

.no_image_box.fallback_card .fallback_bg_logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    opacity: 0.08;
    pointer-events: none;
}

.no_image_box.fallback_card .fallback_bg_logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.no_image_box.fallback_card .fallback_icon {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: pulseIcon 3s infinite ease-in-out;
}

.no_image_box.fallback_card .fallback_icon i {
    color: #fff !important;
}

.no_image_box.fallback_card .fallback_eng {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    opacity: 0.8;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    color: #fff !important;
}

.no_image_box.fallback_card .fallback_kor {
    font-size: 1.6rem;
    font-weight: 800;
    opacity: 0.95;
    letter-spacing: -0.02em;
    background: rgba(0,0,0,0.15);
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    color: #fff !important;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.1); opacity: 1; }
}

