/* 기본 스타일 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #262730;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* 사이드바 스타일 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: #f8f9fa;
    border-right: 1px solid #e0e0e6;
    transform: translateX(0);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.collapsed {
    transform: translateX(-280px);
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff4b4b;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.sidebar-toggle:hover {
    background-color: #f0f0f0;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.nav-menu {
    list-style: none;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #262730;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: #f0f0f0;
    color: #ff4b4b;
}

.nav-link.active {
    background-color: #fff5f5;
    color: #ff4b4b;
    border-left-color: #ff4b4b;
    font-weight: 600;
}

/* 메인 콘텐츠 */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

.content-wrapper {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 데스크톱 헤더 (사이드바 축소 시) */
.desktop-header {
    padding: 1rem;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e6;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.desktop-menu-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.desktop-menu-btn:hover {
    background-color: #f0f0f0;
}

.desktop-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff4b4b;
    margin: 0;
}

/* 모바일 헤더 */
.mobile-header {
    display: none;
    padding: 1rem;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e6;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}

.mobile-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff4b4b;
}

/* 사이드바 오버레이 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 페이지 헤더 */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #262730;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.page-description {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
}

/* 헤더 섹션 (홈페이지용) */
.header-section {
    text-align: left;
    margin-bottom: 2rem;
}

.subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ff4b4b;
    margin-bottom: 0.5rem;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #262730;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.description {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* 버튼 스타일 */
.button-container {
    margin-top: 20px;
}

.service-button {
    display: inline-block;
    background-color: #ff4b4b;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.service-button:hover {
    background-color: #e03e3e;
}

/* 구분선 */
.divider {
    border: none;
    height: 1px;
    background-color: #e0e0e6;
    margin: 2rem 0;
}

/* 콘텐츠 섹션 */
.content-section {
    margin-top: 2rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* 왼쪽 컬럼 */
.left-column {
    padding-right: 1rem;
}

.section-header {
    font-size: 1.75rem;
    font-weight: 700;
    color: #262730;
    margin-bottom: 1rem;
}

.content-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

.content-text p {
    margin-bottom: 1rem;
}

.service-list {
    list-style: none;
    margin: 1.5rem 0;
    padding-left: 0;
}

.service-list li {
    margin-bottom: 1rem;
    padding-left: 1rem;
    position: relative;
}

.service-list li::before {
    content: "•";
    color: #ff4b4b;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: 0;
}

.service-list strong {
    color: #262730;
    font-weight: 600;
}

/* 오른쪽 컬럼 */
.right-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 연락처 페이지 스타일 */
.contact-container {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 0.5rem;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #262730;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #555;
}

.contact-form {
    background-color: #fff;
    padding: 2rem;
    border: 1px solid #e0e0e6;
    border-radius: 0.5rem;
}

.inquiry-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #262730;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    font-size: 1rem;
    transition: border-color 0.3s;
    min-height: 250px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff4b4b;
}

.submit-btn {
    background-color: #ff4b4b;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #e03e3e;
}

/* 로딩 스피너 */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff4b4b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 푸터 스타일 */
.footer {
    margin-top: auto;
    padding: 1.5rem 2rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e6;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto 1rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

.footer-info,
.footer-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.footer-info span,
.footer-contact span {
    color: #555;
}

.footer-info strong,
.footer-contact strong {
    color: #ff4b4b;
    font-weight: 600;
}

.divider {
    color: #e0e0e6;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e6;
    color: #666;
    font-size: 0.85rem;
    max-width: 1200px;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 반응형 디자인 */
@media (min-width: 769px) {
    .mobile-header {
        display: none;
    }
    
    .desktop-header {
        display: none; /* 기본적으로 숨김, JS로 제어 */
    }
    
    .main-content.expanded .desktop-header {
        display: flex; /* 사이드바 축소 시 표시 */
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-header {
        display: flex;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .main-title {
        font-size: 2rem;
    }

    .content-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .left-column {
        padding-right: 0;
    }

    .service-list li {
        padding-left: 1.5rem;
    }

    .service-list li::before {
        left: 0.5rem;
    }

    .footer {
        padding: 1.5rem 1rem;
    }

    .footer-content {
        font-size: 0.75rem;
    }
    
    .footer-info,
    .footer-contact {
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .footer .divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.75rem;
    }

    .main-title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .description {
        font-size: 1rem;
    }

    .section-header {
        font-size: 1.5rem;
    }

    .content-wrapper {
        padding: 0.5rem;
    }
}

/* 회사 연혁 페이지 스타일 (history.html) */
.history-container {
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 1rem 0;
}

.history-list {
    position: relative;
    list-style: none;
    padding: 1rem 0 1rem 2.5rem;
    margin: 0;
}

.history-list::before {
    /* 세로 타임라인 선 */
    content: "";
    position: absolute;
    left: 28px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(180deg, #ff4b4b 0%, #ffb3b3 100%);
    border-radius: 2px;
    opacity: 0.15;
}

.history-list li {
    position: relative;
    padding: 0.85rem 1rem 0.85rem 1.25rem;
    margin-bottom: 1rem;
    background: transparent;
    border-radius: 6px;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.history-list li:hover {
    background-color: #fff7f7;
    transform: translateY(-2px);
}

.history-list li strong {
    display: inline-block;
    min-width: 72px;
    margin-right: 0.75rem;
    color: #ff4b4b;
    font-weight: 700;
}

.history-list li a {
    color: #ff4b4b;
    text-decoration: underline;
}

.history-container p {
    margin-top: 1rem;
    color: #555;
}

/* 사이드바 섹션 토글 상태를 위한 스타일 (main.js와 연동) */
.nav-section.collapsed .nav-menu {
    display: none;
}

.nav-section.expanded .nav-menu {
    display: block;
}

@media (max-width: 768px) {
    .history-list {
        padding-left: 1rem;
    }

    .history-list::before {
        left: 18px;
    }

    .history-list li::before {
        left: 10px;
    }
}

