/* 전체 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    scroll-padding-top: 80px;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    padding-top: 20px;
}

/* 헤더 스타일 */
header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 36px;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    margin-right: 4rem;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    display: block;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 5rem;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #008385;
}

/* 메인 네비 hover 드롭다운 */
.main-nav li.has-submenu {
    position: relative;
}
.main-nav .nav-submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 180px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    display: none;
    flex-direction: column;
    gap: 0;
    z-index: 100;
}
.main-nav li.has-submenu:hover .nav-submenu,
.main-nav li.has-submenu:focus-within .nav-submenu {
    display: flex;
}
.main-nav .nav-submenu li {
    padding: 0;
}
.main-nav .nav-submenu a {
    display: block;
    padding: 10px 20px;
    font-size: 0.98rem;
    white-space: nowrap;
    color: #333;
    font-weight: 500;
}
.main-nav .nav-submenu a:hover {
    background: #f5f7fb;
    color: #008385;
}

/* 우측 네비게이션 스타일 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 0 0 auto;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 32px;
    height: 32px;
    background-size: contain;
    background-repeat: no-repeat;
    text-indent: -9999px;
}

.facebook {
    background-image: url('../images/facebook.png');
}

.kakao {
    background-image: url('../images/kakao.png');
}

.naver {
    background-image: url('../images/naver.png');
}

/* 메뉴 드롭다운 스타일 */
.menu-dropdown {
    position: relative;
    margin-left: 1rem;
}

.menu-btn {
    background-color: transparent;
    color: #333;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transition: all 0.3s;
    position: relative;
    right: 0;
}

.menu-btn:hover {
    color: #008385;
    background-color: transparent;
}

.menu-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 300px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 1rem;
    margin-top: 0.5rem;
    z-index: 1001;
}

.menu-content.show {
    display: block;
}

.menu-section {
    margin-bottom: 1.5rem;
}

.menu-section:last-child {
    margin-bottom: 0;
}

.menu-section h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #008385;
}

.menu-section ul {
    list-style: none;
}

.menu-section li {
    margin: 0.5rem 0;
}

.menu-section a {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.menu-section a:hover {
    color: #008385;
}

/* 푸터 스타일 */
footer {
    background-color: #2c2c2c;
    color: #fff;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    justify-content: flex-start;  
    text-align: left;             
    margin-left: 0;               
    padding-left: 0;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: #008385;
}

.footer-info p {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.copyright {
    margin-top: 20px;
    color: #666 !important;
}

/* 공통 버튼 스타일 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .main-nav { display: none; }

    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 1rem;
        height: 60px;
    }

    .logo { margin-right: 0; }
    .logo img { height: 36px; }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem 0;
    }

    .nav-right {
        flex-direction: row;
        width: auto;
        gap: 1rem;
    }

    .menu-content {
        position: fixed;
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
        border-radius: 15px 15px 0 0;
    }

    .social-links {
        justify-content: center;
    }

    .menu-btn {
        width: 100%;
        justify-content: center;
    }

    .footer-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .footer-info {
        text-align: center;
    }

    footer {
        padding: 30px 0;
    }

    body {
        padding-top: 40px;
    }

    .post-container {
        margin: 10px auto 30px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 30px;
    }
    .post-container {
        margin: 5px auto 20px;
    }
}

.main-blog-section {
    max-width: 1200px;
    margin: 60px auto 0 auto;
}
.main-blog-cards {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.main-blog-card {
    display: block;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 3px 16px rgba(0,0,0,0.08);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}
.main-blog-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.13);
    transform: translateY(-4px) scale(1.03);
}
.main-blog-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

/* 네비게이션 버튼 스타일 */
.nav-login-btn, .nav-logout-btn {
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
    margin-right: 1rem !important;
}

.nav-login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
}

.nav-login-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
    color: white !important;
}

.nav-logout-btn {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%) !important;
    color: #333 !important;
    box-shadow: 0 2px 8px rgba(255, 154, 158, 0.3) !important;
}

.nav-logout-btn:hover {
    background: linear-gradient(135deg, #fecfef 0%, #ff9a9e 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.4) !important;
    color: #333 !important;
}

/* 상단 유틸리티 바 스타일 */
.utility-bar {
    width: 100%;
    background: #2c2c2c;
    padding: 0;
    height: 36px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
}
.utility-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 36px;
    padding: 0 24px;
    font-size: 15px;
}
.utility-link {
    color: #fff;
    text-decoration: none;
    margin: 0 8px;
    font-weight: 400;
    transition: color 0.2s;
}
.utility-link:hover {
    color: #ffd600;
    text-decoration: underline;
}
.utility-divider {
    color: #fff;
    margin: 0 4px;
    font-size: 15px;
    opacity: 0.7;
}

#mainCarousel {
    margin-top: 116px; /* 유틸리티바(36px) + 헤더(80px) */
    /* ... */
}

.post-container {
    margin: 20px auto 40px; /* 더 줄임 */
    padding: 0 20px;
}

/* 페이지별 컨테이너/섹션 스타일은 각 페이지 CSS(about/archive/blog)에서 관리 */

@media (max-width: 768px) {
    body {
        padding-top: 40px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 30px;
    }
}

/* === 메인 페이지 카드 반응형 (modified for mobile) === */
.main-about-card,
.main-blog-card,
.main-archive-card {
  width: calc(25% - 18px);
  min-width: 220px;
}
@media (max-width: 900px) {
  .main-about-card,
  .main-blog-card,
  .main-archive-card { width: calc(50% - 12px); }
}
@media (max-width: 600px) {
  .main-about-card,
  .main-blog-card,
  .main-archive-card { width: 100%; }
} 