@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, sans-serif;
    background-image: url(mond.png);
    background-color: #e7e7e7;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

#central-white-wrapper {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    flex: 1;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    background-color: #ffffff;
    height: 125px;
    flex-shrink: 0;
}

.main-content-wrapper {
    padding: 40px 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 80px;
    width: auto;
    display: block;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.header-container,
nav {
    position: relative;
    z-index: 9999;
}


.header-container {
    background-color: rgb(250, 250, 250, 1);

    width: 100%;
    padding: 30px 0;
    text-align: center;

    backdrop-filter: blur(0px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.header-container .logo h2 {
    color: #0005a0;
    font-size: 32px;
    font-weight: 900;
}

nav {
    background: linear-gradient(90deg, #003366 0%, #004080 100%);
    display: flex;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 55px;
    align-items: center;

    position: static;
    top: 0;
    z-index: 1000;
}

.nav-menu {
    list-style: none;
    display: flex;
    width: 70%;
    height: 100%;
    max-width: 1200px;

    border: none;
}

.nav-item {
    position: relative;
    flex: 1;
    height: 100%;
    text-align: center;
}

.nav-item>a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: auto;
    height: 100%;

    padding: 0 20px;

    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    margin: 0;
    transition: background 0.3s;
}

.nav-item:hover>a {
    background-color: rgba(255, 255, 255, 0.1);
}

header,
.header-container,
nav {
    position: relative;
    z-index: 9999 !important;
}

.nav-item {
    position: relative;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-align: left;
    z-index: 10000 !important;
}

.nav-item:hover .dropdown {
    display: block;
}

.dropdown-item {
    position: relative;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.dropdown-item a {
    color: #333;
    padding: 12px 15px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.dropdown-item a:hover {
    background-color: #f1f1f1;
}

.sub-dropdown {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    background-color: white;
    box-shadow: 8px 0px 16px rgba(0, 0, 0, 0.1);
    z-index: 10001 !important;
}

.dropdown-item:hover .sub-dropdown {
    display: block;
}

.has-sub>a::after {
    content: ' >';
    float: right;
    color: #ccc;
    font-size: 12px;
}

.content-box {
    max-width: 900px;
    margin: 60px auto;
    padding: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}


.main-visual-container {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border-radius: 12px;
    margin: 0;
    min-width: 0;
    overflow: hidden;
}

.main-visual-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-container {
    width: 100%;
    background-color: #1a1a1a;
    color: #cccccc;
    padding: 20px 70px;
    text-align: left;
    margin-top: auto;
}

.main-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.top-row {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
}

.middle-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.bottom-row {
    display: block;
}

.widget-box {
    min-width: 0;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    height: 100%;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #003366;
    padding-bottom: 10px;
}

.widget-header h3 {
    margin: 0;
    color: #003366;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
    letter-spacing: -0.5px;
}

.more-link {
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    font-weight: bold;
}

.more-link:hover {
    color: #003366;
}

.news-list-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 5px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.news-list-item:hover {
    background: #f9f9f9;
    color: #003366;
}

.news-item-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 15px;
    font-size: 1.05rem;
}

.news-item-date {
    color: #888;
    font-size: 0.9rem;
    white-space: nowrap;
}

.gallery-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.gallery-preview-grid.wide-gallery {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-preview-item {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #eee;
}

.gallery-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-preview-item:hover img {
    transform: scale(1.1);
}

.vertical-banner-placeholder {
    background-color: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-weight: bold;
}

@media (max-width: 768px) {

    .top-row,
    .middle-row {
        grid-template-columns: 1fr;
    }

    .gallery-preview-grid.wide-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .vertical-banner-placeholder {
        height: auto;
    }


}

.banner-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.banner-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    position: absolute;
    top: 0;
    left: 0;
}

.banner-overlay {
    height: 85%;
    width: 85%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    right: -18%;
    transform: translateY(-50%);
}

.board-main {
    margin: 10px auto;
    width: 95%;
    padding: 20px;
    text-align: center;
}

.page-description {
    text-align: left;
    color: #000000;
    font-size: 1rem;
    margin-bottom: -10px;
    padding-left: 15px;
}

.board-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 1rem;
}

.board-table th,
.board-table td {
    padding: 15px;
    font-size: 1rem;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.board-table th {
    background-color: #f8f9fa;
    border-top: 2px solid #333;
    font-weight: bold;
}

.board-table td.title-cell {
    text-align: left;
    cursor: pointer;
}

.board-table td.title-cell:hover {
    text-decoration: underline;
    color: #003366;
}

.col-num {
    width: 10%;
}

.col-title {
    width: 70%;
}

.col-date {
    width: 20%;
}

.mobile-menu-btn {
    display: none;
}

#detail-view {
    display: none;
    text-align: left;
}

.detail-header {
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.detail-info {
    color: #666;
    font-size: 0.9rem;
}

.detail-content {
    min-height: 200px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.detail-img {
    max-width: 100%;
    margin-top: 20px;
    border-radius: 5px;
}

.btn-back {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 25px;
    background: #555;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.greeting-box {
    margin: 30px auto;
    max-width: 900px;
    padding: 50px;
    text-align: center;
    position: relative;
}

.greeting-inner {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.greeting-photo {
    flex: 0 0 300px;
}

.greeting-photo img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: none;
}

.greeting-text {
    flex: 1;
    text-align: left;
    line-height: 1.8;
    font-size: 1.1rem;
}

.greeting-text-bottom {
    text-align: left;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-top: 15px;
    width: 100%;
}

.greeting-text p,
.greeting-text-bottom p {
    margin-bottom: 15px;
}

@media (max-width: 768px) {

    #central-white-wrapper {
        width: 100% !important;
        margin: 0 !important;
        max-width: 100%;
        overflow-x: hidden;
        /* Ensure no overflow within wrapper */
    }

    body {
        background: #ffffff !important;
    }

    .banner-wrapper {
        height: 120px;
    }

    .main-visual-container {
        min-height: auto !important;
        height: auto !important;
        aspect-ratio: 16/9;
        /* Use aspect ratio on mobile to prevent cropping */
    }

    .banner-bg {
        object-fit: cover;
        object-position: center center;
    }

    .banner-overlay {
        width: 80%;
        height: auto;

        top: 65%;
        right: -8%;
        transform: translateY(-50%);
        left: auto;
    }

    .header-container {
        height: auto;
        padding: 15px 0;
    }

    .logo img {
        max-height: 50px;
    }

    nav {
        height: auto;
        padding: 0;
        flex-direction: column;
    }

    .mobile-menu-btn {
        display: block;
        width: 100%;
        background: none;
        border: none;
        color: white;
        font-size: 1.1rem;
        padding: 15px;
        cursor: pointer;
        text-align: center;
        font-weight: bold;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        border: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        flex-direction: column;
    }

    .nav-item>a {
        justify-content: flex-start;
        padding: 15px 20px;
        font-size: 14px;
        width: 100%;
    }

    .dropdown {
        position: static;
        width: 100%;
        box-shadow: none;
        display: none;
        background-color: rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-item.open>.dropdown {
        display: block;
    }

    .nav-item:hover .dropdown {
        display: none;
    }

    .nav-item.open .dropdown {
        display: block;
    }

    .dropdown-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .dropdown-item a {
        color: #fff;
        padding: 12px 30px;
        width: 100%;
    }

    .dropdown-item a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .sub-dropdown {
        position: static;
        width: 100%;
        box-shadow: none;
        display: none;
        background-color: rgba(0, 0, 0, 0.2);
        padding-left: 20px;
    }

    .dropdown-item.has-sub.open>.sub-dropdown {
        display: block;
    }

    .dropdown-item:hover .sub-dropdown {
        display: none;
    }

    .dropdown-item.has-sub.open .sub-dropdown {
        display: block;
    }

    .board-main {
        padding: 10px !important;
        width: 98% !important;
    }

    .board-table th,
    .board-table td {
        padding: 10px 5px;
        font-size: 0.85rem;
    }

    .detail-title {
        font-size: 1.2rem;
    }

    .col-num {
        width: 15%;
    }

    .col-title {
        width: 60%;
    }

    .col-date {
        width: 25%;
    }

    .greeting-box {
        padding: 20px;
    }

    .greeting-inner {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .greeting-photo {
        flex: 0 0 auto;
        width: 70%;
        max-width: 150px;
        margin: 0 auto 15px auto !important;
    }

    .greeting-photo img {
        border: 2px solid #003366;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        aspect-ratio: 3 / 4;
        object-fit: cover;
        object-position: top;
    }

    .greeting-text,
    .greeting-text-bottom {
        font-size: 1rem;
    }
}