/* =============================================
   TheRealSalaries — Main Stylesheet
   Mobile-first, responsive at 768px and 1024px
   Color: Primary #0f4c3a, Accent #10b981
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif; line-height: 1.6; color: #1f2937; background: #f9fafb; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
table { border-collapse: collapse; width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .75rem; line-height: 1.3; }
p { margin: 0 0 1rem; }
a { color: #0f7556; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; overflow-x: hidden; }
main { padding-bottom: 3rem; }
.section { margin-bottom: 2rem; }
.section-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid #e5e7eb; }

/* --- Grid --- */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Header --- */
.site-header { background: #0f4c3a; color: #fff; padding: .75rem 0; position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.site-header a { color: #fff; }
.site-logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.header-nav { display: flex; align-items: center; gap: .5rem; font-size: .8rem; flex-wrap: wrap; }
.header-nav a { padding: .25rem .5rem; border-radius: 4px; transition: background .15s; }
.header-nav a:hover { background: rgba(255,255,255,.15); text-decoration: none; }
.nav-active { background: rgba(255,255,255,.2) !important; }

/* --- Breadcrumbs --- */
.breadcrumbs { background: #fff; border-bottom: 1px solid #e5e7eb; padding: .5rem 0; font-size: .8rem; color: #6b7280; }
.breadcrumbs a { color: #6b7280; }
.breadcrumbs a:hover { color: #0f7556; }
.breadcrumbs span { margin: 0 .35rem; }

/* --- Hero --- */
.hero { background: linear-gradient(135deg, #0f4c3a 0%, #10b981 100%); color: #fff; padding: 2rem 0 1.5rem; margin-bottom: 1.5rem; }
.hero h1 { font-size: 1.75rem; margin: 0 0 .25rem; font-weight: 700; }
.hero .subtitle { font-size: 1rem; opacity: .85; margin: 0; }
.hero-stats { display: flex; gap: 1.5rem; margin-top: 1rem; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat .value { font-size: 1.5rem; font-weight: 700; display: block; }
.hero-stat .label { font-size: .75rem; opacity: .7; text-transform: uppercase; letter-spacing: .05em; }

/* --- Cards --- */
.card { background: #fff; border-radius: 8px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card-header { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1.5rem; }
.stat-card { background: #fff; border-radius: 8px; padding: 1rem; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; color: #0f4c3a; }
.stat-card .stat-label { font-size: .75rem; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; }

@media (min-width: 768px) {
    .stat-cards { grid-template-columns: repeat(4, 1fr); }
}

/* --- Salary display --- */
.salary-big { font-size: 2rem; font-weight: 800; color: #10b981; }
.salary-green { color: #10b981; font-weight: 700; }
.salary-range { font-size: .85rem; color: #6b7280; }

/* --- Tables --- */
.data-table { width: 100%; font-size: .875rem; }
.data-table th { background: #f3f4f6; padding: .5rem .75rem; text-align: left; font-weight: 600; font-size: .75rem; text-transform: uppercase; color: #6b7280; letter-spacing: .05em; border-bottom: 2px solid #e5e7eb; white-space: nowrap; }
.data-table td { padding: .5rem .75rem; border-bottom: 1px solid #f3f4f6; }
.data-table tbody tr:hover { background: #f9fafb; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.5rem; max-width: 100%; }
@media (max-width: 767px) { .hide-mobile { display: none; } .show-mobile { display: table-cell; } }
@media (min-width: 768px) { .show-mobile { display: none; } }

/* --- Company/Entity List --- */
.entity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.entity-card { display: block; background: #fff; border-radius: 8px; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: box-shadow .2s; color: inherit; }
.entity-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); text-decoration: none; }
.entity-card .entity-name { font-weight: 600; font-size: .9rem; color: #0f4c3a; margin-bottom: .25rem; }
.entity-card .entity-salary { font-size: 1.1rem; font-weight: 700; color: #10b981; }
.entity-card .entity-meta { font-size: .75rem; color: #6b7280; }

@media (min-width: 768px) {
    .entity-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    .entity-grid { grid-template-columns: repeat(4, 1fr); }
}

/* --- Internal Links --- */
.internal-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.internal-links a { display: inline-block; padding: .35rem .75rem; background: #ecfdf5; color: #0f7556; border-radius: 4px; font-size: .8rem; font-weight: 500; transition: background .2s; }
.internal-links a:hover { background: #d1fae5; text-decoration: none; }

/* --- Answer box --- */
.answer-box { background: #ecfdf5; border-left: 4px solid #10b981; border-radius: 0 8px 8px 0; padding: 1.25rem; margin-bottom: 1.5rem; }
.answer-box h2 { font-size: 1.1rem; font-weight: 700; color: #0f4c3a; margin-bottom: .5rem; }
.answer-box p { font-size: 1rem; line-height: 1.7; margin: 0; }

/* --- Summary box (compare) --- */
.summary-box { background: #ecfdf5; border: 2px solid #10b981; border-radius: 8px; padding: 1.25rem; margin-bottom: 1.5rem; text-align: center; }
.summary-box .summary-text { font-size: 1.1rem; margin: 0; }

/* --- VS card --- */
.vs-card { display: flex; align-items: center; justify-content: center; gap: 1rem; background: #fff; border-radius: 8px; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: box-shadow .2s; }
.vs-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.vs-badge { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; background: #0f4c3a; color: #fff; border-radius: 50%; font-size: .7rem; font-weight: 700; flex-shrink: 0; }
.vs-company { font-weight: 600; font-size: .9rem; }

/* --- Info box --- */
.info-note { background: #eff6ff; border-left: 3px solid #3b82f6; padding: .75rem 1rem; border-radius: 0 4px 4px 0; font-size: .85rem; color: #1e40af; margin-bottom: 1rem; }
.info-note a { color: #1e40af; text-decoration: underline; }

/* --- FAQ --- */
.faq-list { margin-bottom: 2rem; }
.faq-item { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: .5rem; }
.faq-item summary { padding: .75rem 1rem; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '▼'; float: right; font-size: .7rem; color: #9ca3af; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item p { padding: 0 1rem .75rem; margin: 0; color: #6b7280; line-height: 1.7; }

/* --- Letter nav --- */
.letter-nav { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: 1.5rem; }
.letter-nav a { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; background: #ecfdf5; color: #0f7556; border-radius: 4px; font-weight: 600; font-size: .85rem; }
.letter-nav a:hover { background: #d1fae5; text-decoration: none; }
.letter-nav a.active { background: #0f4c3a; color: #fff; }

/* --- Category grouped sections --- */
.category-section { margin-bottom: 2rem; }
.category-title { font-size: 1.1rem; font-weight: 700; color: #0f4c3a; margin-bottom: .75rem; padding-bottom: .25rem; border-bottom: 1px solid #e5e7eb; }

/* --- Region list (state grouping) --- */
.region-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.region-list a { display: block; background: #fff; border-radius: 8px; padding: .75rem 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); color: inherit; }
.region-list a:hover { text-decoration: none; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.region-list .region-name { font-weight: 600; }
.region-list .region-count { font-size: .8rem; color: #6b7280; }

@media (min-width: 768px) {
    .region-list { grid-template-columns: repeat(3, 1fr); }
}

/* --- Footer --- */
.site-footer { background: #0f4c3a; color: rgba(255,255,255,.7); padding: 2rem 0; margin-top: 3rem; font-size: .8rem; }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: #fff; }
.footer-content { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.footer-section h4 { color: #fff; margin-bottom: .5rem; font-size: .85rem; }
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section li { margin-bottom: .25rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 1.5rem; padding-top: 1rem; text-align: center; }

/* --- 404 --- */
.page-404 { text-align: center; padding: 4rem 1rem; }
.page-404 h1 { font-size: 4rem; color: #0f4c3a; margin-bottom: .5rem; }
.page-404 p { font-size: 1.1rem; color: #6b7280; }

/* --- Ad Placeholders --- */
.ad-section { margin: 1.5rem 0; overflow: hidden; }
.ad-placeholder { background: #f3f4f6; border: 2px dashed #d1d5db; border-radius: 8px; padding: 2rem; text-align: center; color: #6b7280; font-size: .875rem; font-weight: 600; }

/* --- Responsive --- */
@media (min-width: 768px) {
    .hero h1 { font-size: 2.25rem; }
    .hero-stats { gap: 2rem; }
    .hero-stat .value { font-size: 2rem; }
}

@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
}

/* --- Print --- */
@media print {
    .site-header, .site-footer, .breadcrumbs, .ad-section { display: none; }
    body { background: #fff; }
}
