/* ====================== Custom Gateway Login Page Styles ========================= */

/* 기본 스타일 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root {
    /* GOU GLXP 로고 기반 컬러 팔레트 */
    --theme-navy: #15416E;
    --theme-teal: #20C997;
    --theme-lime: #A3CF34;
    --theme-gradient: linear-gradient(135deg, var(--theme-navy), var(--theme-teal));

    --text-primary: #1A2B3C;
    --text-secondary: #586878;
    --text-white: #ffffff;

    --bg-overlay: rgba(255, 255, 255, 0.1);
}

body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f7ff;
    background-image: url('bg.png');
    background-size: cover;
    background-position: center;
    overflow-x: hidden;
}

/* ====================== Main Container ========================= */

.container {
    width: 100%;
    max-width: 1400px;
    height: 100vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    gap: 40px;
}

/* ====================== Left: Branding Area ========================= */

.branding-area {
    flex: 1;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    z-index: 2;
}

.english-slogan {
    font-size: 22px;
    font-weight: 700;
    color: var(--theme-navy);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.english-slogan::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background: var(--theme-teal);
}

.big-slogan {
    font-size: 54px;
    font-weight: 800;
    line-height: 1.3;
    margin-top: 10px;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--theme-navy), var(--theme-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    word-break: keep-all;
}

/* ====================== Right: Login Grid ========================= */

.login-grid-container {
    flex: 0 0 600px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.grid-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 100%;
    height: 420px;
    box-shadow: 0 20px 60px rgba(21, 65, 110, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

/* ====================== Grid Items ========================= */

.grid-item {
    position: relative;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.grid-item:hover {
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Style: White */
.style-white {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.5);
}

.style-white:hover {
    background-color: #fff;
}

/* Style: Tint (Mint) */
.style-tint {
    background-color: rgba(32, 201, 151, 0.12);
    backdrop-filter: blur(10px);
    color: var(--theme-navy);
}

/* Style: Dark (Navy) */
.style-dark {
    background-color: var(--theme-navy);
    color: var(--text-white);
}

.item-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}

.item-sub {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 5px;
    display: block;
}

.item-icon {
    align-self: flex-end;
    font-size: 40px;
    margin-top: 20px;
}

/* SVG logo icon style */
.item-icon-svg {
    align-self: flex-end;
    width: 48px;
    height: 48px;
    margin-top: 20px;
    object-fit: contain;
}

/* Dark style: 어두운 배경 위 SVG 로고 (원본 유지, 흰 배경 로고가 자연스럽게 보임) */
.style-dark .item-icon-svg {
    opacity: 0.9;
}

/* Icon colors per style */
.style-white .item-icon { color: var(--theme-navy); }
.style-tint .item-icon { color: var(--theme-teal); }
.style-dark .item-icon { color: rgba(255,255,255,0.4); }

/* ====================== Admin Login Button ========================= */

.admin-login-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.admin-login-btn:hover {
    background-color: var(--theme-navy);
    color: white;
}

/* ====================== Modal (Login Form) ========================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(21, 65, 110, 0.4);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.login-form-box {
    background: white;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .login-form-box {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: #333;
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: var(--theme-navy);
}

.input-group {
    margin-bottom: 15px;
}

.input-group input[type="text"],
.input-group input[type="password"] {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background-color: #f8fbff;
    box-sizing: border-box;
}

.input-group input[type="text"]:focus,
.input-group input[type="password"]:focus {
    border-color: var(--theme-teal);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(32, 201, 151, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--theme-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.3s;
    text-align: center;
    text-decoration: none;
    display: block;
    box-sizing: border-box;
}

.submit-btn:hover {
    opacity: 0.9;
    color: white;
    text-decoration: none;
}

.modal-sub-links {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

.modal-sub-links a {
    color: inherit;
    text-decoration: none;
    margin: 0 10px;
}

.modal-sub-links a:hover {
    color: var(--theme-navy);
}

.modal-privacy {
    margin-top: 15px;
    text-align: center;
    font-size: 12px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.modal-privacy a {
    color: var(--theme-navy);
    text-decoration: none;
    font-weight: 700;
}

.modal-privacy a:hover {
    text-decoration: underline;
}

/* ====================== Responsive: Tablet ========================= */

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        padding: 60px 20px;
        justify-content: flex-start;
        gap: 30px;
    }

    .branding-area {
        align-items: center;
        text-align: center;
        margin-bottom: 20px;
        flex: none;
    }

    .english-slogan {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .english-slogan::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .big-slogan {
        font-size: 36px;
        text-align: center;
        margin-top: 0;
        line-height: 1.4;
    }

    .login-grid-container {
        flex: none;
        width: 100%;
        max-width: 450px;
        align-items: center;
    }

    .grid-box {
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: 1fr 1fr !important;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    .grid-item {
        padding: 20px;
        aspect-ratio: 1 / 1;
    }

    .item-title {
        font-size: 16px;
        word-break: keep-all;
    }

    .item-sub {
        font-size: 12px;
    }

    .item-icon {
        font-size: 32px;
        margin-top: 10px;
    }

    .item-icon-svg {
        width: 36px;
        height: 36px;
        margin-top: 10px;
    }

    .admin-login-btn {
        margin-top: 30px;
        background-color: white;
        color: var(--theme-navy);
        padding: 12px 30px;
        border-radius: 30px;
        font-weight: 500;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
}

/* ====================== Responsive: Mobile ========================= */

@media (max-width: 480px) {
    .container {
        padding: 40px 5%;
    }

    .big-slogan {
        font-size: 28px;
    }

    .grid-item {
        padding: 15px;
    }

    .item-title {
        font-size: 14px;
    }

    .login-form-box {
        padding: 30px 20px;
        margin: 0 15px;
    }
}
