/* ─── Full-width layout for plugin pages ──────────────────────── */

body.nexacademy-fullwidth-page #page.drawers .main-inner,
body.nexacademy-fullwidth-page #topofscroll {
    max-width: 100% !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

body.nexacademy-fullwidth-page #page-header,
body.nexacademy-fullwidth-page .page-header-headings,
body.nexacademy-fullwidth-page .page-context-header {
    display: none !important;
}

body.nexacademy-fullwidth-page #page-content,
body.nexacademy-fullwidth-page #region-main-box,
body.nexacademy-fullwidth-page #region-main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

.nexacademy-page {
    padding: 24px;
}

.nexacademy-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.nexacademy-header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
}

.nexacademy-filters {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.nexacademy-filter-actions {
    grid-column: span 4;

    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.nexacademy-table-wrapper {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

.nexacademy-table {
    margin-bottom: 0;
}

.nexacademy-actions {
    display: flex;
    gap: 8px;
}

.modal-content {
    border-radius: 16px;
}

.nexacademy-sede-map {
    position: relative;
    z-index: 0;
    height: 400px;
    min-height: 400px;
    width: 100%;
    border: 1px solid #d7dfe7;
    border-radius: 8px;
    overflow: hidden;
}

.nexacademy-sede-hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 0;
}

.nexacademy-hero-image {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center center;

    display: block;
}

.nexacademy-hero-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 0 80px;

    background: linear-gradient(
        90deg,
        rgba(0, 15, 45, .90) 0%,
        rgba(0, 15, 45, .65) 30%,
        rgba(0, 15, 45, .20) 60%,
        rgba(0, 15, 45, 0) 100%
    );

    color: #fff;
}

.nexacademy-hero-overlay h1 {
    margin: 0 0 12px;
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
}

.nexacademy-hero-overlay h4 {
    margin: 0;
    font-size: 1.4rem;
    color: #62bc9f;
}

@media (max-width: 768px) {

    .nexacademy-sede-hero {
        height: 320px;
    }

    .nexacademy-hero-overlay {
        padding: 0 24px;
    }

    .nexacademy-hero-overlay h1 {
        font-size: 2rem;
    }

    .nexacademy-hero-overlay h4 {
        font-size: 1rem;
    }
}

.nexacademy-sede-detail {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.nexacademy-sede-hero {
    position: relative;
    height: 500px;
}

.nexacademy-sede-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Full-width layout for plugin pages ──────────────────────── */

/* The Boost theme applies max-width on .main-inner for .pagelayout-standard;
   override it so our plugin pages span the full viewport. */
body.nexacademy-fullwidth-page #page.drawers .main-inner {
    max-width: 100% !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* #page.drawers tiene padding-top propio del tema para compensar el navbar */
body.nexacademy-fullwidth-page #page.drawers {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Ocultar el page-header (breadcrumb + h1 vacíos) en páginas full-width */
body.nexacademy-fullwidth-page #page-header {
    display: none !important;
}

body.nexacademy-fullwidth-page #page-content,
body.nexacademy-fullwidth-page #region-main-box,
body.nexacademy-fullwidth-page #region-main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/* ─── Catalog Public View ──────────────────────────────────────── */

/* Hero — dark navy base, gradient overlay; background-image added inline when configured */
.na-cat-hero {
    position: relative;
    height: 250px;
    background-color: #00112e;
    background-size: cover;
    background-position: center right;
    overflow: hidden;
}

.na-cat-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 15, 45, .95) 0%,
        rgba(0, 15, 45, .78) 40%,
        rgba(0, 15, 45, .32) 68%,
        rgba(0, 15, 45, 0)   100%
    );
    z-index: 0;
}

.na-cat-hero__overlay {
    position: relative;
    z-index: 1;
    height: 100%;
}

.na-cat-hero__title {
    font-size: 2.5rem;
    line-height: 1.15;
}

.na-cat-hero__sub {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .72);
}

/* ─── Filter bar ───────────────────────────────────────────────── */

.na-cat-filters-section {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.na-cat-filter-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.na-cat-filter-fields {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.na-cat-filter-field {
    min-width: 0;
}

.na-cat-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Filter labels */
.na-cat-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 5px;
    white-space: nowrap;
}

/* Inputs / custom-selects — brand focus ring */
.na-cat-input,
.na-cat-input.form-control,
.na-cat-input.custom-select {
    width: 100%;
    height: 38px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px !important;
    font-size: .93rem;
    color: #374151;
    transition: border-color .18s, box-shadow .18s;
}

.na-cat-input:focus,
.na-cat-input.form-control:focus,
.na-cat-input.custom-select:focus {
    border-color: #62bc9f;
    box-shadow: 0 0 0 3px rgba(98, 188, 159, .18);
    outline: none;
}

/* Buttons */
.na-btn-filtrar {
    background-color: #62bc9f;
    color: #fff;
    border: 1.5px solid #62bc9f;
    border-radius: 8px;
    height: 42px;
    padding: 0 22px;
    font-size: .92rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background-color .18s, box-shadow .18s;
}

.na-btn-filtrar:hover,
.na-btn-filtrar:focus {
    background-color: #4fa98a;
    border-color: #4fa98a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(98, 188, 159, .35);
}

.na-btn-borrar {
    background-color: #fff;
    color: #374151;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    height: 42px;
    padding: 0 22px;
    font-size: .92rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: border-color .18s, color .18s;
}

.na-btn-borrar:hover,
.na-btn-borrar:focus {
    border-color: #62bc9f;
    color: #62bc9f;
    background-color: #fff;
}

/* Results heading count */
.na-cat-results-title { font-size: 1.2rem; }
.na-cat-count         { color: #62bc9f; }

/* Card */
.na-cat-card {
    border-radius: 12px !important;
    overflow: hidden;
    transition: box-shadow .22s, transform .22s;
}

.na-cat-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, .13) !important;
    transform: translateY(-3px);
}

.na-cat-card-img-wrap {
    height: 210px;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
}

.na-cat-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.na-cat-card:hover .na-cat-card-img {
    transform: scale(1.04);
}

.na-cat-card-img-placeholder {
    height: 100%;
    color: #9ca3af;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

/* Pin icon — brand green */
.na-cat-pin-icon { color: #62bc9f; flex-shrink: 0; }

/* City / venue name */
.na-cat-city        { font-size: .95rem; color: #111827; }
.na-cat-venue-name  { font-size: .83rem; }

/* Description — 3-line clamp */
.na-cat-desc {
    color: #4b5563;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card CTA button */
.na-cat-card-btn {
    border: 1.5px solid #62bc9f;
    color: #62bc9f;
    background-color: #fff;
    border-radius: 8px !important;
    font-size: .88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color .18s, color .18s;
}

.na-cat-card-btn:hover,
.na-cat-card-btn:focus {
    background-color: #62bc9f;
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .na-cat-hero         { height: 200px; }
    .na-cat-hero__title  { font-size: 1.8rem; }

    .na-cat-filter-fields { grid-template-columns: repeat(2, 1fr); }

    .na-cat-filter-actions { justify-content: flex-end; }
}

.nexacademy-sede-detail {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.nexacademy-sede-hero {
    position: relative;
    height: 500px;
}

/* ─── Admin Sedes (ns-*) ────────────────────────────────────── */

.ns-admin-page {
    padding: 28px 24px;
}

.ns-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.ns-admin-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.ns-btn-add,
.na-btn-filtrar {
    background: #62bc9f;
    border-color: #62bc9f;
    color: #fff !important;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: .92rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .18s;
    text-decoration: none;
}

.ns-btn-add:hover,
.ns-btn-add:focus,
.na-btn-filtrar:hover,
.na-btn-filtrar:focus {
    background: #62bc9f;
    border-color: #62bc9f;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(98, 188, 159, .35);
}


.ns-btn-add:hover { background: #62bc9f; color: #fff; }

.ns-admin-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .08);
    overflow: hidden;
}

.ns-admin-filters {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f3f5;
}

.ns-admin-filter-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.ns-admin-filter-field { min-width: 0; }

.ns-admin-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 5px;
    white-space: nowrap;
}

.ns-input-wrap { position: relative; }

.ns-input-wrap svg {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.ns-admin-input {
    border: 1.5px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: .92rem !important;
    color: #374151 !important;
    height: 38px !important;
}

.ns-admin-input:focus {
    border-color: #62bc9f !important;
    box-shadow: 0 0 0 3px rgba(98, 188, 159, .15) !important;
    outline: none !important;
}

.ns-admin-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.ns-autocomplete { position: relative; }

.ns-autocomplete-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
}

.ns-autocomplete.is-open .ns-autocomplete-list { display: block; }

.ns-autocomplete-option {
    padding: 8px 14px;
    font-size: .88rem;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ns-autocomplete-option:hover,
.ns-autocomplete-option.is-active {
    background: #f0faf6;
    color: #19a566;
}

.ns-autocomplete-option.is-hidden { display: none; }

.ns-autocomplete-empty {
    padding: 8px 14px;
    font-size: .85rem;
    color: #9ca3af;
}

.ns-admin-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.ns-admin-table thead th {
    background: #f9fafb;
    color: #6b7280;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    border-top: none;
}

.ns-admin-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    font-size: .92rem;
    color: #374151;
}

.ns-admin-table tbody tr:last-child td { border-bottom: none; }

.ns-admin-table tbody tr:hover td { background: #f9fafb; }

.ns-cell-name {
    display: flex;
    align-items: center;
    font-weight: 600;
}

.ns-row-icon {
    width: 36px;
    height: 36px;
    background: rgba(98, 188, 159, .12);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #62bc9f;
    flex-shrink: 0;
    margin-right: 12px;
}

.ns-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.ns-btn-edit,
.ns-btn-delete {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1.5px solid;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    transition: background .18s, color .18s;
    padding: 0;
}

.ns-btn-edit  { border-color: #62bc9f; color: #62bc9f; }
.ns-btn-edit:hover  { background: #62bc9f; color: #fff; }
.ns-btn-delete { border-color: #ef4444; color: #ef4444; }
.ns-btn-delete:hover { background: #ef4444; color: #fff; }

.ns-pagination-wrap {
    padding: 16px 24px;
    display: flex;
    justify-content: center;
}

/* ─── Sede Detail (ns-detail-*) ─────────────────────────────── */

.ns-detail-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.ns-detail-body .row > [class*="col-"] {
    min-width: 0;
}

.ns-detail-card {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .07) !important;
    margin-bottom: 20px;
    max-width: 100%;
    overflow: hidden;
}

.ns-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ns-section-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    justify-content: flex-start;
}

.ns-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(98, 188, 159, .12);
    color: #62bc9f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ns-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.ns-detail-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 10px;
}

.ns-detail-desc {
    color: #4b5563;
    line-height: 1.7;
    font-size: .95rem;
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.ns-detail-contact-text {
    color: #4b5563;
    font-size: .92rem;
    line-height: 1.6;
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.ns-detail-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-size: .92rem;
    margin-bottom: 10px;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

.ns-detail-contact-item svg { color: #62bc9f; flex-shrink: 0; }

.ns-detail-contact-item a {
    color: #62bc9f;
    text-decoration: none;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}
.ns-detail-contact-item a:hover { text-decoration: underline; }

.ns-detail-map {
    position: relative;
    z-index: 0;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}


.nexacademy-text-filter {
    height: calc(1.5em + 0.75rem + 2px) !important; 
}

/* Responsive admin + detail */
@media (max-width: 768px) {
    .ns-admin-filter-row { grid-template-columns: repeat(2, 1fr); }
    .ns-admin-page { padding: 16px; }
    .ns-detail-body { padding: 20px 16px; }
}


.na-detail-back-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #62bc9f;
    text-decoration: none;
    transition: color .15s ease, transform .15s ease;
}

.na-detail-back-custom i {
    font-size: 1.25rem;
}

.na-detail-back-custom:hover,
.na-detail-back-custom:focus {
    color: #4ea888;
    text-decoration: none;
    transform: translateX(-1px);
    outline: 0;
}

.override-custom-select {
    width: stretch !important;
}

.collapseall {
    display: none !important;
}