/* ================================================================
 * common.css — 사이트 공통 (font-face / header / footer / page-header / container)
 * (원본: src/common-layout.ts 의 CSS export 를 정적 파일로 분리)
 * 주의: 내용/선언 순서/우선순위를 원본 그대로 보존합니다.
 * ================================================================ */

/* ---- commonFontFaceCSS ---- */
    @font-face {
        font-family: 'Sogang University';
        src: url('/static/upload_files/SOGANGUNIVERSITYTTF.woff2') format('woff2');
        font-weight: normal;
        font-style: normal;
        font-display: swap;
    }

/* ---- commonHeaderCSS ---- */
    * {
        box-sizing: border-box;
    }
    
    html, body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }
    
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--white);
        z-index: 1000;
    }
    
    nav {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 30px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }
    
    .logo {
        font-family: 'Sogang University';
        font-size: 28px;
        font-weight: 700;
        color: var(--primary-color);
        text-decoration: none;
        padding: 20px 0;
        letter-spacing: -1px;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .logo img {
        width: 40px;
        height: 40px;
        border-radius: 10%;
        object-fit: cover;
    }
   
    .logo span {
        color: var(--accent-color);     
    }
    
    /* Search Box */
    .search-box {
        flex: 1;
        max-width: 400px;
        margin: 0 30px;
    }
    
    .search-form {
        display: flex;
        align-items: center;
        background: var(--bg-light);
        border-radius: 25px;
        overflow: hidden;
        border: 2px solid transparent;
        transition: all 0.3s;
    }
    
    .search-form:focus-within {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(44, 95, 158, 0.1);
    }
    
    .search-input {
        flex: 1;
        border: none;
        background: transparent;
        padding: 10px 20px;
        font-size: 14px;
        outline: none;
        font-family: 'Noto Sans KR', sans-serif;
    }
    
    .search-button {
        background: var(--primary-color);
        border: none;
        color: white;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 5px;
        transition: all 0.3s;
    }
    
    .search-button:hover {
        background: var(--secondary-color);
        transform: scale(1.05);
    }
    
    .nav-menu {
        display: flex;
        list-style: none;
        gap: 0;
        flex-wrap: nowrap;
        align-items: center;
    }
    
    .nav-menu > li {
        position: relative;
    }
    
    .nav-menu > li > a {
        display: flex;
        align-items: center;
        padding: 30px 20px;
        color: var(--text-dark);
        text-decoration: none;
        font-weight: 700;
        font-size: 16px;
        transition: all 0.3s;
        position: relative;
        height: 100%;
    }
    
    .nav-menu > li > a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 3px;
        background: var(--accent-color);
        transition: width 0.3s;
    }
    
    .nav-menu > li:hover > a {
        color: var(--primary-color);
    }
    
    .nav-menu > li:hover > a::after {
        width: 80%;
    }
    
    .dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 220px;
        background: var(--white);
        box-shadow: 0 8px 30px rgba(0,0,0,0.15);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        border-top: 3px solid var(--accent-color);
        list-style: none;
    }
    
    .nav-menu > li:hover .dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .dropdown li {
        border-bottom: 1px solid #f0f0f0;
        list-style: none;
    }
    
    .dropdown li:last-child {
        border-bottom: none;
    }
    
    .dropdown a {
        display: block;
        padding: 15px 25px;
        color: var(--text-dark);
        text-decoration: none;
        font-size: 14px;
        transition: all 0.3s;
    }
    
    .dropdown a:hover {
        background: var(--bg-light);
        color: var(--primary-color);
        padding-left: 30px;
    }
    
    /* Mobile Hamburger Menu */
    .mobile-menu-toggle {
        display: none;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }
    
    /* Mobile Search Toggle */
    .mobile-search-toggle {
        display: none;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        color: var(--primary-color);
        font-size: 20px;
        transition: all 0.3s;
        position: relative;
        z-index: 1002;
    }
    
    .mobile-search-toggle:hover {
        color: var(--secondary-color);
        transform: scale(1.1);
    }
    
    /* Mobile Search Overlay - Full Header Coverage */
    .mobile-search-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 80px;
        background: white;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1100;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-search-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
    
    .mobile-search-overlay .search-form {
        max-width: 100%;
        width: 100%;
        margin: 0;
    }
    
    .mobile-menu-toggle span {
        width: 30px;
        height: 3px;
        background: var(--primary-color);
        transition: all 0.3s ease;
        border-radius: 3px;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    @media (max-width: 1280px) {
        .mobile-menu-toggle {
            display: flex;
        }
        
        .mobile-search-toggle {
            display: flex;
        }
        
        .mobile-search-overlay {
            display: block;
        }
        
        .search-box {
            display: none;
        }
        
        .nav-menu {
            position: fixed;
            top: 80px;
            right: -100%;
            width: 100%;
            max-width: 400px;
            height: calc(100vh - 80px);
            background: var(--white);
            flex-direction: column;
            align-items: stretch;
            padding: 20px 0;
            transition: right 0.3s ease;
            box-shadow: -2px 0 10px rgba(0,0,0,0.1);
            overflow-y: auto;
            gap: 0;
        }
        
        .nav-menu.active {
            right: 0;
        }
        
        .nav-menu > li {
            width: 100%;
            border-bottom: 1px solid #f0f0f0;
            position: relative;
        }
        
        .nav-menu > li > a {
            display: block;
            padding: 18px 30px;
            width: 100%;
            height: auto;
            font-size: 16px;
            color: var(--text-dark);
            text-decoration: none;
            background: transparent;
            transition: background 0.3s;
        }
        
        .nav-menu > li > a:hover {
            background: var(--bg-light);
        }
        
        .nav-menu > li > a::after {
            display: none;
        }
        
        .dropdown {
            position: static;
            display: block;
            opacity: 1;
            visibility: visible;
            transform: none;
            box-shadow: none;
            border-top: none;
            min-width: auto;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            background: var(--bg-light);
            padding: 0;
        }
        
        .nav-menu > li.active .dropdown {
            max-height: 500px;
        }
        
        .dropdown a {
            display: block;
            padding: 15px 30px 15px 50px;
            font-size: 15px;
            color: var(--text-dark);
            text-decoration: none;
            border-bottom: 1px solid #e0e0e0;
            transition: background 0.3s;
        }
        
        .dropdown a:hover {
            background: #e8e8e8;
        }
        
        .dropdown a:last-child {
            border-bottom: none;
        }
    }
    
    @media (max-width: 768px) {
        nav {
            padding: 0 20px;
        }
        
        .logo {
            font-size: 24px;
        }
    }

/* ---- commonFooterCSS ---- */
    /* Body Layout for Sticky Footer */
    html {
        height: 100%;
    }
    
    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    
    /* Main content area should grow to push footer down */
    /* ⚠️ 주의: '.page-header'는 height:30px 고정이어야 하므로 flex-grow 대상에서 제외.
       이전에는 'body > div:not(header):not(footer)' 셀렉터가 .page-header까지 포함하여
       flex: 1 0 auto가 적용되었고, 그 결과 .page-header가 30px 이상으로 늘어났음.
       (특히 body 자식 div가 .page-header 와 .container 두 개인 페이지에서
        .container 컨텐츠가 작을수록 .page-header가 더 크게 늘어나는 현상 발생) */
    main, .container, body > div:not(header):not(footer):not(.page-header) {
        flex: 1 0 auto;
    }
    
    /* .page-header 는 절대 늘어나지 않도록 명시적으로 차단 */
    .page-header {
        flex: 0 0 auto;
    }
    
    /* Footer */
    footer {
        background: #2a2a2a;
        color: #ccc;
        padding: 0px 30px 8px;
        flex-shrink: 0;
        margin-top: auto;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .footer-content {
        max-width: 1400px;
        margin: 0 auto;
        padding-top: 10px;
    }
    
    .footer-title {
        color: #fff;
        font-size: 20px;
        margin-bottom: 0px;
        font-weight: 700;
        display: block;
        width: 100%;
        padding-bottom: 8px;
        border-bottom: 1px solid #444;
    }
    
    .footer-columns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        margin-top: 8px;
    }
    
    .footer-section h3 {
        color: #ccc;
        margin-bottom: 8px;
        font-size: 15px;
        /*color: #fff;
        font-size: 20px;
        margin-bottom: 15px;*/
        font-weight: 600;
    }
    
    .footer-section p {
        color: #ccc;
        margin-bottom: 8px;
        font-size: 15px;
    }
    
    .footer-section p i {
        width: 24px;
        margin-right: 8px;
        text-align: center;
    }
    
    .footer-bottom {
        max-width: 1400px;
        margin: 0 auto;
        padding-top: 8px;
        border-top: 1px solid #3a3a3a;
        text-align: center;
        font-size: 14px;
    }
    
    /* 3D Bounce Animation - Scale based */
    @keyframes bounce3d {
        0%, 100% {
            transform: scale(1);
            color: #ccc;
        }
        50% {
            transform: scale(1.05);
            color: #fff;
        }
    }
    
    @keyframes textGlow {
        0%, 100% {
            text-shadow: 0 0 5px rgba(248, 249, 250, 0.3);
        }
        50% {
            text-shadow: 0 0 15px rgba(248, 249, 250, 0.8);
        }
    }
    
    /* Phone link - PC에서는 일반 텍스트 */
    .phone-link {
        color: #ccc;
        text-decoration: none;
        cursor: default;
    }
    
    @media (max-width: 768px) {
        .footer-columns {
            grid-template-columns: 1fr;
            gap: 0px;
        }
        
        /* Phone link - 모바일에서만 버튼 스타일 */
        .phone-link {
            display: inline-block;
            padding: 12px 20px;
            background: #2a2a2a;
            color: #ccc;
            text-decoration: none;
            border-radius: 8px;
            cursor: pointer;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3),
                        inset 0 1px 0 rgba(255, 255, 255, 0.1);
            transition: all 0.2s ease;
            /*border: 1px solid #444;*/
            animation: bounce3d 2s ease-in-out infinite,
            textGlow 2s ease-in-out infinite;
        }
        
        .phone-link:active {
            transform: scale(0.98);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
                        inset 0 1px 0 rgba(255, 255, 255, 0.1);
            animation: none;
        }
    }

/* ---- commonPageHeaderCSS ---- */
    .page-header {
        margin-top: 90.4px;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        color: white;
        height:30px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        /*padding: 10px 0px;*/
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

.page-header-title {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.page-header.clickable .page-header-title {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.page-header.clickable .page-header-title:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .page-header-title {
        font-size: 20px;
    }
}

/* ---- commonContainerCSS ---- */
    .container {
        max-width: 1280px;
        width: 100%;
        margin: 0 auto;
        padding: 60px 0px;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    @media (max-width: 768px) {
        .container {
            padding: 40px 4px 60px;
            margin: 0px auto 80px;
            max-width: 100vw;
        }
    }

