/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #1a1a2e; background: #f8f9fa; line-height: 1.6; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
img { max-width: 100%; height: auto; }

/* === HEADER === */
.site-header { background: #fff; border-bottom: 2px solid #e5e7eb; padding: .5rem 0; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 1.25rem; }
.logo { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.25rem; color: #1a1a2e; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.5rem; }
.logo-ext { color: #2563eb; }
.header-search { flex: 1; min-width: 180px; max-width: 400px; margin: 0 auto; position: relative; }
.header-search input { width: 100%; padding: .4rem .8rem; border: 1.5px solid #e5e7eb; border-radius: 6px; font-size: .85rem; }
.header-search input:focus { border-color: #2563eb; outline: none; }
.search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.1); display: none; z-index: 200; max-height: 400px; overflow-y: auto; }
.search-dropdown.active { display: block; }
.search-item { padding: .75rem 1rem; border-bottom: 1px solid #f3f4f6; display: flex; justify-content: space-between; align-items: center; }
.search-item:hover { background: #f0f7ff; }
.search-item .label { font-weight: 600; }
.search-item .meta { color: #6b7280; font-size: .85rem; }
.header-nav { display: flex; gap: 1rem; align-items: center; }
.header-nav a { color: #4b5563; font-weight: 500; font-size: .95rem; }
.nav-cta { background: #2563eb; color: #fff !important; padding: .4rem .8rem; border-radius: 6px; }
.nav-cta:hover { background: #1d4ed8; text-decoration: none; }

/* === HERO === */
.hero { text-align: center; padding: 3rem 0 2rem; }
.hero h1 { font-size: 2.2rem; margin-bottom: .5rem; color: #1a1a2e; }
.hero .subtitle { font-size: 1.15rem; color: #6b7280; margin-bottom: 1.5rem; }
.hero-stats { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 800; color: #2563eb; }
.hero-stat .label { font-size: .85rem; color: #6b7280; }

/* === CARDS === */
.card { background: #fff; border-radius: 12px; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; margin: 1.5rem 0; }

/* === SALARY DISPLAY === */
.salary-hero { text-align: center; padding: 2rem; background: linear-gradient(135deg, #1e40af, #2563eb); color: #fff; border-radius: 16px; margin: 1.5rem 0; }
.salary-hero .amount { font-size: 3rem; font-weight: 800; }
.salary-hero .period { font-size: 1.1rem; opacity: .85; }
.salary-hero .subtitle { opacity: .8; margin-top: .25rem; }
.salary-variants { display: flex; justify-content: center; gap: 2rem; margin-top: 1.5rem; flex-wrap: wrap; }
.salary-variant { text-align: center; }
.salary-variant .amount { font-size: 1.3rem; font-weight: 700; }
.salary-variant .label { font-size: .8rem; opacity: .75; }

/* === AGE CHART === */
.age-chart { display: flex; align-items: flex-end; gap: .5rem; height: 200px; margin: 1rem 0; }
.age-bar { flex: 1; background: #2563eb; border-radius: 6px 6px 0 0; position: relative; min-width: 40px; transition: background .2s; }
.age-bar:hover { background: #1d4ed8; }
.age-bar .bar-value { position: absolute; top: -1.5rem; left: 50%; transform: translateX(-50%); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.age-bar .bar-label { position: absolute; bottom: -1.8rem; left: 50%; transform: translateX(-50%); font-size: .7rem; color: #6b7280; white-space: nowrap; }

/* === TABLE === */
.data-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.data-table th { background: #f3f4f6; padding: .75rem; text-align: left; font-size: .85rem; color: #4b5563; border-bottom: 2px solid #e5e7eb; }
.data-table td { padding: .75rem; border-bottom: 1px solid #f3f4f6; }
.data-table tr:hover td { background: #f0f7ff; }
.data-table .salary { font-weight: 700; color: #2563eb; white-space: nowrap; }
.data-table .city-name { font-weight: 600; }
.data-table .coeff { font-size: .8rem; color: #6b7280; }
.coeff-up { color: #16a34a; }
.coeff-down { color: #dc2626; }

/* === BREADCRUMBS === */
.breadcrumbs ol { display: flex; gap: .5rem; list-style: none; font-size: .85rem; color: #6b7280; padding: 1rem 0 0; }
.breadcrumbs li:not(:last-child)::after { content: '›'; margin-left: .5rem; }
.breadcrumbs a { color: #2563eb; }

/* === SECTIONS === */
.section { margin: 2rem 0; }
.section h2 { font-size: 1.5rem; margin-bottom: 1rem; color: #1a1a2e; }
.section h3 { font-size: 1.15rem; margin-bottom: .5rem; }

/* === POPULAR GRID === */
.popular-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; }
.popular-item { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; }
.popular-item:hover { border-color: #2563eb; text-decoration: none; }
.popular-item .name { font-weight: 600; color: #1a1a2e; }
.popular-item .sal { color: #2563eb; font-weight: 700; font-size: .9rem; }

/* === LETTER NAV === */
.letter-nav { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1rem 0; }
.letter-nav a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; font-weight: 700; color: #2563eb; }
.letter-nav a:hover { background: #2563eb; color: #fff; text-decoration: none; }

/* === CALCULATOR === */
.calc-form { max-width: 500px; margin: 1rem auto; }
.calc-form label { display: block; margin-bottom: .25rem; font-weight: 600; }
.calc-form input, .calc-form select { width: 100%; padding: .75rem; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 1rem; margin-bottom: 1rem; }
.calc-form input:focus, .calc-form select:focus { border-color: #2563eb; outline: none; }
.calc-btn { background: #2563eb; color: #fff; border: none; padding: .75rem 2rem; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; width: 100%; }
.calc-btn:hover { background: #1d4ed8; }
.calc-result { text-align: center; padding: 1.5rem; background: #f0f7ff; border-radius: 12px; margin-top: 1.5rem; }
.calc-result .big { font-size: 2rem; font-weight: 800; color: #2563eb; }

/* === SEO TEXT === */
.seo-text { color: #4b5563; line-height: 1.8; }
.seo-text h2 { color: #1a1a2e; margin: 1.5rem 0 .75rem; font-size: 1.3rem; }
.seo-text p { margin-bottom: 1rem; }

/* === FOOTER === */
.site-footer { background: #1a1a2e; color: #d1d5db; padding: 3rem 0 1rem; margin-top: 3rem; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.footer-col h4 { color: #fff; margin-bottom: .75rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .4rem; }
.footer-col a { color: #9ca3af; }
.footer-col a:hover { color: #fff; }
.footer-legal { font-size: .75rem; color: #6b7280; margin-top: .75rem; line-height: 1.4; }
.footer-bottom { border-top: 1px solid #374151; margin-top: 2rem; padding-top: 1rem; text-align: center; font-size: .85rem; color: #6b7280; }

/* === GENDER === */
.big-number { font-size: 2rem; font-weight: 800; color: #2563eb; }
.card-label { font-size: .85rem; color: #6b7280; margin-top: .25rem; }
.gender-bar { display: flex; height: 28px; border-radius: 6px; overflow: hidden; margin-top: .75rem; font-size: .8rem; font-weight: 600; }
.gender-male { background: #3b82f6; color: #fff; display: flex; align-items: center; justify-content: center; }
.gender-female { background: #ec4899; color: #fff; display: flex; align-items: center; justify-content: center; }
.gender-comparison { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: .75rem 0; }
.gender-item { text-align: center; }
.gender-icon { display: block; font-size: 1.5rem; }
.gender-salary { font-size: 1.2rem; font-weight: 700; }
.gender-item.male .gender-salary { color: #3b82f6; }
.gender-item.female .gender-salary { color: #ec4899; }
.gender-gap { font-size: 1.5rem; font-weight: 800; padding: .5rem .75rem; border-radius: 8px; }
.gap-high { background: #fef2f2; color: #dc2626; }
.gap-medium { background: #fffbeb; color: #d97706; }
.gap-low { background: #f0fdf4; color: #16a34a; }

/* === HIGHLIGHT BOX === */
.highlight-box { background: #f0f7ff; border-left: 4px solid #2563eb; padding: 1rem 1.25rem; border-radius: 0 8px 8px 0; margin: 1rem 0; font-size: .95rem; }
.source { font-size: .75rem; color: #9ca3af; margin-top: .75rem; font-style: italic; }
.methodology { font-size: .85rem; color: #6b7280; }

/* === AGE BAR WRAPPER === */
.age-bar-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 50px; height: 100%; position: relative; }
.age-bar-wrapper .age-bar { width: 100%; position: relative; }
.age-bar-wrapper .bar-label { margin-top: .5rem; font-size: .75rem; color: #6b7280; }

/* === 3-COLUMN CARDS === */
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0; }
.card-center { text-align: center; }

/* === SKILLS & TAGS === */
.skill-list { list-style: none; padding: 0; }
.skill-list li { padding: .5rem 0; border-bottom: 1px solid #f3f4f6; padding-left: 1.5rem; position: relative; }
.skill-list li::before { content: '✓'; position: absolute; left: 0; color: #16a34a; font-weight: 700; }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.tag { background: #eff6ff; color: #1e40af; padding: .35rem .75rem; border-radius: 20px; font-size: .85rem; font-weight: 500; }
.tag-outline { background: transparent; border: 1px solid #d1d5db; color: #4b5563; }
.prose { line-height: 1.8; color: #374151; }
.intro-text { font-size: 1.05rem; color: #4b5563; line-height: 1.7; margin: .5rem 0 1rem; }
.seo-inline { font-size: .95rem; color: #4b5563; line-height: 1.7; }
.gender-detail { font-size: .8rem; color: #6b7280; display: block; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .header-inner { gap: .75rem; }
    .header-nav { gap: .5rem; font-size: .85rem; }
    .hero h1 { font-size: 1.6rem; }
    .salary-hero .amount { font-size: 2.2rem; }
    .card-grid { grid-template-columns: 1fr; }
    .card-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
    .popular-grid { grid-template-columns: 1fr; }
    .salary-variants { gap: 1rem; }
    .age-chart { height: 150px; }
    .data-table { font-size: .85rem; }
    .data-table th, .data-table td { padding: .5rem; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
