/* cnae — Directorio por actividad CNAE (shared by cnae_index and cnae_detail) */

.section-cnae {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    overflow-x: clip;
}

/* ---- Breadcrumb ---- */
.cnae-breadcrumb-section {
    background: #F9FAFB;
    padding: 8px 0 0;
}

.cnae-breadcrumb-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 80px;
}

.cnae-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-family: var(--skin-font-primary);
    font-size: 14px;
    color: var(--skin-text-muted);
}

.cnae-breadcrumb__item { color: var(--skin-text-muted); text-decoration: none; }
.cnae-breadcrumb__item:hover { text-decoration: underline; }
.cnae-breadcrumb__item--current { font-weight: 600; color: var(--skin-dark-900); }
.cnae-breadcrumb__sep { margin: 0 8px; }

/* ---- Main section ---- */
.cnae-main-section {
    background: #F9FAFB;
    padding: 40px 80px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 1440px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
}

.cnae-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 1280px;
}

.cnae-header__title {
    font-family: var(--skin-font-display);
    font-size: 36px;
    font-weight: 700;
    line-height: 44px;
    color: var(--skin-dark-900);
    text-align: center;
    margin: 0;
}

.cnae-header__subtitle {
    font-family: var(--skin-font-primary);
    font-size: 16px;
    color: var(--skin-text-muted);
    text-align: center;
    margin: 0;
}

.cnae-header__code {
    display: inline-block;
    padding: 4px 12px;
    background: var(--skin-brand-navy);
    color: #fff;
    border-radius: 20px;
    font-family: var(--skin-font-primary);
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
}

/* ---- Sectors grid (index page) ---- */
.cnae-sectors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 1280px;
}

/* ---- Card ---- */
.cnae-card {
    background: var(--skin-bg-surface);
    border-radius: 16px;
    box-shadow: 0px 1px 4px 1px rgba(10, 13, 18, 0.08);
    overflow: hidden;
}

.cnae-card__title {
    font-family: var(--skin-font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--skin-dark-900);
    padding: 20px 24px 14px;
    margin: 0;
    border-bottom: 1px solid rgba(9, 30, 66, 0.07);
}

/* ---- CNAE list ---- */
.cnae-list {
    display: flex;
    flex-direction: column;
}

.cnae-list__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    text-decoration: none;
    border-bottom: 1px solid rgba(9, 30, 66, 0.05);
    transition: background 0.1s;
}

.cnae-list__item:last-child { border-bottom: none; }
.cnae-list__item:hover { background: var(--skin-bg-page); }

.cnae-list__code {
    flex-shrink: 0;
    font-family: var(--skin-font-primary);
    font-size: 12px;
    font-weight: 700;
    color: var(--skin-brand-navy);
    background: rgba(30, 44, 124, 0.08);
    padding: 2px 7px;
    border-radius: 4px;
    min-width: 36px;
    text-align: center;
}

.cnae-list__name {
    font-family: var(--skin-font-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--skin-brand-navy);
}

/* ---- Content layout (detail page) ---- */
.cnae-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 1280px;
}

/* ---- Companies table ---- */
.cnae-table {
    width: 100%;
    border-collapse: collapse;
}

.cnae-table__th {
    font-family: var(--skin-font-primary);
    font-size: 13px;
    font-weight: 600;
    color: var(--skin-brand-navy);
    text-align: left;
    padding: 12px 24px;
    border-bottom: 2px solid rgba(9, 30, 66, 0.10);
}

.cnae-table__th--loc { width: 180px; }

.cnae-table__row {
    border-bottom: 1px solid rgba(9, 30, 66, 0.06);
    transition: background 0.1s;
}

.cnae-table__row:last-child { border-bottom: none; }
.cnae-table__row:hover { background: var(--skin-bg-page); }

.cnae-table__td {
    font-family: var(--skin-font-primary);
    font-size: 14px;
    padding: 10px 24px;
    vertical-align: middle;
    color: var(--skin-dark-900);
}

.cnae-table__td--loc {
    font-size: 13px;
    color: var(--skin-text-muted);
}

.cnae-table__link {
    color: var(--skin-brand-navy);
    text-decoration: none;
    font-weight: 500;
}

.cnae-table__link:hover { text-decoration: underline; }

/* ---- Pagination ---- */
.cnae-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(9, 30, 66, 0.07);
}

.cnae-pagination__btn {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--skin-bg-surface);
    border: 1px solid rgba(9, 30, 66, 0.14);
    border-radius: 8px;
    color: var(--skin-dark-900);
    text-decoration: none;
    font-family: var(--skin-font-primary);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
}

.cnae-pagination__btn:hover { background: var(--skin-bg-page); }
.cnae-pagination__btn--disabled { opacity: 0.4; pointer-events: none; }

.cnae-pagination__info {
    font-family: var(--skin-font-primary);
    font-size: 14px;
    color: var(--skin-text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .cnae-main-section { padding: 32px 40px 60px; }
    .cnae-breadcrumb-inner { padding: 0 40px; }
    .cnae-sectors { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .cnae-main-section { padding: 24px 16px 48px; }
    .cnae-breadcrumb-inner { padding: 0 16px; }
    .cnae-header__title { font-size: 26px; line-height: 32px; }
    .cnae-table__th--loc, .cnae-table__td--loc { display: none; }
}
