/* assets/css/style.css */

/* 기본 스타일 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #F4F5FF;
    font-family: 'DM Sans', sans-serif;
}

/* 네비게이션 바 */
.navigation {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 72px;
    background-color: #36344D;
    padding-left: 50px;
    padding-right: 50px;
    justify-content: space-between;
}

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    width: auto;
}

.logo img {
    margin-right: 10px;
}

.spacer {
    display: flex;
    flex-direction: row;
    width: 100%;
    width: auto;
}

.login-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: end;
    width: auto;
}

.beige-text {
    color: beige;
    margin: 0;
    font-size: 16px;
}

/* 메인 컨텐츠 영역 */
.content {
    width: 100%;
    min-height: calc(100vh - 72px);  /* 네비게이션 바 높이 제외 */
}

/* 컨테이너 레이아웃 */
.container {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 72px);
}

.container-left,
.container-right {
    flex: 1;
}

.container-middle {
    flex: 2;
    padding: 40px;
}

/* 타이포그래피 */
h1 {
    font-size: 24px;
    font-weight: 700;
    color: #36344D;
    margin-bottom: 16px;
}

.description {
    font-size: 16px;
    color: #727586;
    margin-bottom: 24px;
}

/* 폼 컨테이너 */
.form-container {
    background: white;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 폼 그룹 */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #36344D;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #E1E1E1;
    border-radius: 4px;
    font-size: 14px;
    color: #36344D;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #673DE6;
    box-shadow: 0 0 0 2px rgba(103, 61, 230, 0.1);
}

.form-group small {
    display: block;
    font-size: 12px;
    color: #727586;
    margin-top: 4px;
}

.form-group input[readonly] {
    background-color: #F5F5F5;
    cursor: not-allowed;
}

/* 버튼 스타일 */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    margin: 0 10px 10px 0; /* 버튼 사이의 간격 설정 */

    background-color: #673DE6;
    color: white;
    
}

/* .button {
    background-color: #673DE6;
    color: white;
} */

.button:hover {
    background-color: #5429d6;
}

.button-secondary {
    background-color: transparent;
    border: 1px solid #673DE6;
    color: #673DE6;
}

.button-secondary:hover {
    background-color: #f8f9ff;
}

.welcome-message {
    display: flex;
    align-items: center;
    color:#f8f9ff;
    gap: 15px; /* 이름과 아이콘 사이 간격 */
}

.settings-icon {
    display: flex;
    align-items: center;
    color: #f8f9ff;
    cursor: pointer;
    transition: color 0.2s;
    padding: 15px;
    position: relative;
}

.settings-icon::after {
    content: "정보 수정";
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3); /* 70% 투명도 적용 */
    color: white;
    font-size: 13px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.settings-icon::before {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    border: 5px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.3); /* 화살표도 동일한 투명도 적용 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.settings-icon:hover {
    color: #faf7f7; /* 호버 시 아이콘 색상 */
}

.settings-icon:hover {
    color: #faf7f7;
}

.settings-icon:hover::after,
.settings-icon:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.settings-icon svg {
    width: 18px;
    height: 18px;
}

/* 메시지 스타일 */
.message {
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 4px;
    font-size: 14px;
}

.message.error {
    background-color: #FEE7E7;
    border: 1px solid #FAA;
    color: #D63939;
}

.message.success {
    background-color: #E7F5E9;
    border: 1px solid #A5D6A7;
    color: #1B8E24;
}

/* 학교 검색 자동완성 */
.school-search-container {
    position: relative;
}

.suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E1E1E1;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
}

.suggestion-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #F5F5F5;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: #F8F9FF;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: #666;
}

/* App Section */
.app-section {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.app-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.app-content {
    display: flex;
    min-height: 400px;
}

.app-image {
    flex: 1;
    background: #f0f0f0;
}

.app-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-text {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-card.reverse .app-content {
    flex-direction: row-reverse;
}

.app-text h2 {
    font-size: 1.875rem;
    margin-bottom: 1rem;
    color: #333;
}

.app-text p {
    color: #666;
    margin-bottom: 1.5rem;
}

.app-text ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.app-text li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #666;
}

.app-text li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #673DE6;
}

/* 프린터 광고 */
.printer-ad {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 1.5rem;
    background-color: #f8f8f8;
    border-radius: 8px;
}

.printer-ad a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

.printer-ad a:hover, 
.printer-ad a:visited, 
.printer-ad a:focus {
    text-decoration: none;
    color: inherit;
}

.printer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.printer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: opacity 0.2s;
}

.printer-info:hover {
    opacity: 0.8;
}

.printer-title {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.printer-icon {
    width: 48px;
    height: 48px;
    background: #ddd;
    border-radius: 8px;
}

/* Footer */
.footer {
    background-color: #36344D;
    color: white;
    padding: 1.5rem 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 로고 텍스트 처리 */
.beige-text::after {
    content: " - 선생님들을 위한 앱 누리";
}

/* 모바일 네비게이션 기본 스타일 */
.mobile-nav {
    display: none;  /* 기본적으로 숨김 */
}

/* 데스크톱 메뉴 */
.desktop-menu {
    display: flex;
    gap: 10px;
}

/* 햄버거 메뉴 토글 버튼 */
.mobile-menu-toggle {
    display: none;  /* 모바일에서만 보이도록 기본값은 none */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
    z-index: 10;
}

/* 햄버거 메뉴 막대 */
.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s linear;
}

/* 모바일 메뉴 패널 */
.mobile-menu {
    visibility: hidden;
    position: fixed;
    top: 72px;  /* 네비게이션 바 높이만큼 띄움 */
    right: 0;
    width: 250px;
    background-color: #36344D;
    padding: 20px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 1000;
}

/* 활성화된 모바일 메뉴 */
.mobile-menu.active {
    visibility: visible;
    transform: translateX(0);
}

/* 모바일 메뉴 내부 버튼 스타일 */
.mobile-menu .button {
    display: block;
    width: 100%;
    margin: 10px 0;
    background-color: #673DE6;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 4px;
    text-align: center;
    transition: background-color 0.3s ease;
}

/* 모바일 메뉴 버튼 호버 효과 */
.mobile-menu .button:hover {
    background-color: #5429d6;
}

/* 모바일 화면 미디어 쿼리 */
@media (max-width: 768px) {
    /* 로고 텍스트 수정 */
    .beige-text::after {
        content: "";
    }

    /* 데스크톱 버튼 숨기기 */
    .desktop-menu {
        display: none;
    }
    
    /* 모바일 요소 표시 */
    .mobile-nav {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }

    /* 햄버거 메뉴 활성화 시 애니메이션 */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .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 (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .footer-links {
        margin-top: 0;
    }
}

.footer-link {
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-link:hover {
    color: #d1d1d1;
}

@media (max-width: 768px) {
    .app-content {
        flex-direction: column !important;
    }

    .app-image {
        height: 250px;
    }

    .printer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .container-middle {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .container-left,
    .container-right {
        display: none;
    }
    
    .container-middle {
        padding: 16px;
    }
    
    .form-container {
        padding: 24px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 20px;
    }
    
    .form-container {
        padding: 16px;
    }
}