* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans KR', sans-serif; background-color: #f8f9fa; color: #333; font-size: 15px; line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }

:root {
    --primary-color: #0d47a1;
    --secondary-color: #d32f2f;
    --accent-color: #ffc107;
    --card-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Header & Nav */
.topWrap { background: #fff; border-bottom: 1px solid #eee; width: 100%; }
.top { max-width: 1100px; margin: 0 auto; padding: 0 15px; }
header { padding: 15px 0; display: flex; justify-content: space-between; align-items: center; }
.logo { text-align: left; }
.logo img { height: 45px; }
.inner { text-align: right; }
.inner ul { display: flex; gap: 15px; font-size: 13px; color: #666; align-items: center; }

nav { background: var(--primary-color); width: 100%; position: sticky; top: 0; z-index: 1000; }
.menu { display: flex; max-width: 1100px; margin: 0 auto; }
.menu > li { position: relative; }
.menu > li > a { display: block; padding: 16px 20px; color: #fff; font-weight: 500; font-size: 15px; }
.menu > li > a:hover { background: rgba(255,255,255,0.15); }

/* 서브메뉴 */
.submenu { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 180px; box-shadow: 0 8px 20px rgba(0,0,0,0.15); border-radius: 0 0 5px 5px; z-index: 1001; }
.submenu a { display: block; padding: 12px 20px; color: #444; font-size: 14px; border-bottom: 1px solid #f5f5f5; text-align: left; }
.submenu a:hover { background: #f8f9fa; color: var(--primary-color); font-weight: bold; }

@media screen and (min-width: 921px) {
    .has-submenu:hover .submenu { display: block; }
}

/* Layout */
.contentsWrap { max-width: 1100px; margin: 30px auto; display: grid; grid-template-columns: 1fr 300px; gap: 30px; padding: 0 15px; }
.info-section { background: #fff; padding: 25px; border-radius: 12px; box-shadow: var(--card-shadow); margin-bottom: 25px; border-top: 4px solid var(--primary-color); }
.main-h1-seo { font-size: 1.7em; font-weight: 700; color: #111; margin-bottom: 10px; }

/* Ranking Cards */
.rank-list { display: flex; flex-direction: column; gap: 20px; }
.rank-card { background: #fff; border-radius: 12px; padding: 25px; display: flex; align-items: center; box-shadow: var(--card-shadow); border: 1px solid #eee; transition: 0.3s; cursor: pointer; position: relative; }
.rank-card:hover { transform: translateY(-5px); border-color: var(--primary-color); box-shadow: 0 12px 24px rgba(0,0,0,0.12); }
.rank-badge { position: absolute; top: 0; left: 0; background: #333; color: #fff; padding: 6px 15px; font-weight: bold; border-radius: 12px 0 12px 0; font-size: 14px; }
.rank-card:nth-child(-n+3) .rank-badge { background: var(--secondary-color); }

.rank-logo { width: 180px; margin-right: 30px; flex-shrink: 0; }
.rank-logo img { width: 100%; border-radius: 8px; border: 1px solid #f0f0f0; }

.rank-content { flex-grow: 1; padding-right: 120px; } 
.rank-title { font-size: 1.4em; font-weight: 700; color: #111; margin-bottom: 10px; }
.rank-desc { font-size: 1.05em; color: #555; line-height: 1.5; }

.rank-btn { position: absolute; right: 25px; bottom: 25px; background: var(--primary-color); color: #fff; padding: 10px 22px; border-radius: 30px; font-size: 14px; font-weight: 600; box-shadow: 0 4px 10px rgba(13, 71, 161, 0.2); }

/* Sidebar */
.sidebar-box { background: #fff; border-radius: 12px; padding: 25px; box-shadow: var(--card-shadow); margin-bottom: 25px; }
.sidebar-title { font-size: 1.2em; font-weight: 700; margin-bottom: 18px; border-left: 4px solid var(--primary-color); padding-left: 12px; }
.sidebar-box .pic_block { text-align: center !important; }
.sidebar-box .pic_block img { display: block; margin: 0 auto !important; max-height: 160px !important; width: auto !important; border-radius: 8px; }

/* SEO Content Area */
.seo-text-area { line-height: 1.8; color: #444; }
.seo-text-area h3 { font-size: 1.3em; margin: 30px 0 15px; color: #111; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.seo-text-area p { margin-bottom: 15px; text-align: justify; }

/* Profile & Footer */
.author-profile { background: #f9f9f9; padding: 25px; border-radius: 12px; display: flex; gap: 20px; align-items: center; margin-top: 40px; border: 1px solid #eee; }
.author-profile img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.footer-wrap { background: #1a1a1a; color: #bbb; padding: 60px 0; margin-top: 80px; text-align: center; }
.footer-links a { color: #fff; margin: 0 15px; }
.footer-info { font-size: 14px; margin-top: 20px; opacity: 0.7; }

/* Mobile Optimization */
@media screen and (max-width: 500px) {
    header { padding: 10px 0; }
    .logo img { height: 35px; }
    .inner ul { gap: 8px; font-size: 11px; }
    
    nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .menu { flex-wrap: nowrap; width: max-content; }
    .menu > li > a { padding: 12px 15px; font-size: 14px; }
    .submenu { position: absolute; width: 200px; }
    .submenu.active { display: block; }

    .contentsWrap { grid-template-columns: 1fr; gap: 20px; padding: 0 10px; }
    .rank-card { flex-direction: column; text-align: center; padding-bottom: 80px; }
    .rank-logo { width: 200px; margin: 0 auto 20px auto; }
    .rank-content { padding-right: 0; }
    .rank-btn { right: 50%; transform: translateX(50%); bottom: 20px; width: 80%; }
    .author-profile { flex-direction: column; text-align: center; }
}

