
.ck h1,
.ck h2,
.ck h3,
.ck h4,
.ck h5,
.ck h6 {
    font-weight: normal !important;
    text-transform: initial;
    margin-top: 0 !important;
}

.ck h1 { font-size: 3.50rem !important; margin-bottom: 25.0px !important; }
.ck h2 { font-size: 2.50rem !important; margin-bottom: 22.5px !important; }
.ck h3 { font-size: 2.00rem !important; margin-bottom: 20.0px !important; }
.ck h4 { font-size: 1.75rem !important; margin-bottom: 17.5px !important; }
.ck h5 { font-size: 1.25rem !important; margin-bottom: 15.0px !important; }
.ck h6 { font-size: 1.00rem !important; margin-bottom: 12.5px !important; }

.ck h1 strong,
.ck h2 strong,
.ck h3 strong,
.ck h4 strong,
.ck h5 strong {
    font-weight: 800;
}

.ck .text-huge  { font-size: 1.8em; }
.ck .text-big   { font-size: 1.3em; }
.ck .text-small { font-size: .85em; }
.ck .text-tiny  { font-size: .7em; }


/* =============================================================
   2. LISTAS Y TABLAS — CKEditor
   ============================================================= */
.ck ul {
    margin-left: 0em !important;
    padding-left: 1em !important;
    position: relative;
}
.ck ul li {
    margin-left: 1.2em !important;
}
.ck ul ul {
    margin-left: 0em !important;
    padding-left: .5em !important;
}
.ck ol {
    margin-left: 1em !important;
    padding-left: 3em;
    position: relative;
}
.ck ol ol {
    margin-left: 0em !important;
    padding-left: 3em;
}
.ck th,
.ck td {
    vertical-align: middle;
}


/* =============================================================
   3. UTILIDADES GENERALES
   ============================================================= */
.text-white .ck *,
.ck.text-white * {
    color: white;
}

.ck.p_p_0 p {
    margin-bottom: 0;
}

.ck .image.image-style-align-center {
    margin: 0 auto;
}
.ck .image img {
    width: 100%;
    height: auto;
}

.ck blockquote {
    background-color: #f8f9fa;
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}


/* =============================================================
   4. FUENTES PERSONALIZADAS — Gardenia headers
   ============================================================= */
.font-Gardenia-headers h1,
.font-Gardenia-headers h2,
.font-Gardenia-headers h3,
.font-Gardenia-headers h4,
.font-Gardenia-headers h5,
.font-Gardenia-headers h6,
.font-gardenia-headers h1,
.font-gardenia-headers h2,
.font-gardenia-headers h3,
.font-gardenia-headers h4,
.font-gardenia-headers h5,
.font-gardenia-headers h6 {
    font-family: "Gardenia";
}


/* =============================================================
   5. BOLETINES Y BADGES
   ============================================================= */
.boletines .card-title a {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-header a {
    margin-bottom: 0 !important;
}

.tags-container .badge {
    transition: all 0.3s ease;
    background-color: none;
    color: #000000;
    border: 1px solid #00BAE8;
    font-size: 16px;
    padding: 1rem 1.5rem;
    border-radius: 0;
    font-family: "Gardenia";
    font-weight: 400;
}


/* =============================================================
   6. BUSCADOR DE RECURSOS
   ============================================================= */
.resources-filter-section {
    margin-bottom: 30px;
}

/* --- Fila principal de búsqueda --- */
.main-search-box .main-search-row button {
    margin-bottom: 0;
}
.recurso-lista form {
    border-bottom: 0 !important;
}
.main-search-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.main-search-input {
    flex: 1;
    position: relative;
    border: 1px solid #dee2e6;
}
.main-search-input input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: box-shadow 0.2s;
}
.main-search-input input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}
.main-search-input .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* --- Botón búsqueda avanzada --- */
.advanced-search-toggle {
    background: transparent;
    border: none;
    color: #4a5568;
    font-size: 0.9rem;
    padding: 10px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    transition: color 0.2s;
}
.advanced-search-toggle:hover {
    color: #4a5568;
}
.advanced-search-toggle .toggle-icon {
    transition: transform 0.3s;
}
.advanced-search-toggle.active .toggle-icon {
    transform: rotate(180deg);
}
.recurso-lista button.advanced-search-toggle {
    background: none !important;
}
.recurso-lista button.advanced-search-toggle:hover {
    border-bottom: 1px solid;
    background: none !important;
}
.advanced-filter-badge {
    background: #3CB371;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* --- Panel filtros avanzados --- */
.advanced-filters-panel {
    display: none;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
    margin-top: -8px;
    padding: 20px 24px;
    border: 1px solid #e2e8f0;
    border-top: none;
    animation: slideDown 0.3s ease;
}
.advanced-filters-panel.show {
    display: block;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.filter-field {
    display: flex;
    flex-direction: column;
}
.filter-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-field label svg {
    color: #718096;
}
.filter-field .form-control,
.filter-field .form-select {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.filter-field .form-control:focus,
.filter-field .form-select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.filter-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    grid-column: 1 / -1;
}

/* --- Rango de fechas --- */
.date-range-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    grid-column: span 2;
}
.date-range-wrapper .filter-field {
    flex: 1;
}
.date-separator {
    padding-bottom: 12px;
    color: #a0aec0;
    font-weight: 500;
}

/* --- Acciones del panel --- */
.advanced-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}
.btn-apply-filters {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-apply-filters:hover {
    color: white;
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}
.btn-clear-filters {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-clear-filters:hover {
    background: #f8fafc;
    color: #475569;
    border-color: #cbd5e1;
}

/* --- Tags de filtros activos --- */
.active-filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #edf2f7;
    border-radius: 8px;
    margin-top: 16px;
}
.active-filters-label {
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 500;
}
.filter-tag {
    background: white;
    color: #2d3748;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
}
.filter-tag-value {
    font-weight: 600;
    color: #2c5282;
}


/* =============================================================
   7. CARRUSEL Y EVENTOS
   ============================================================= */
.events .event-card .content-img {
    text-align: right;
    min-height: 272px;
}

.icon-youtube.position-absolute.top-50 {
    margin-top: -20px;
}

div#resourcesCarousel button.carousel-control-prev,
div#resourcesCarousel button.carousel-control-next {
    background: none !important;
}


/* =============================================================
   8. TARJETAS DE INICIATIVA
   ============================================================= */
.iniciativa-card-home {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 20px;
}
.iniciativa-card-home:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}
.iniciativa-card-home .card-img-top {
    transition: transform 0.3s ease;
}
.iniciativa-card-home:hover .card-img-top {
    transform: scale(1.02);
}

.iniciativa-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
}
.iniciativa-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.iniciativa-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #38a169 0%, #276749 100%);
    border-bottom: 1px solid #e2e8f0;
}
.iniciativa-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.iniciativa-card:hover .iniciativa-card-image img {
    transform: scale(1.08);
}

.iniciativa-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}
.iniciativa-region-badge {
    background: linear-gradient(135deg, #38a169 0%, #276749 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.iniciativa-date-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #1a365d;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.iniciativa-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.iniciativa-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}
.iniciativa-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.iniciativa-card-title a:hover {
    color: #38a169;
}

.iniciativa-card-excerpt {
    font-size: 0.875rem;
    color: #718096;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.iniciativa-card-action {
    margin-top: auto;
    padding-top: 16px;
}


/* =============================================================
   9. SELECTOR DE TIPOS
   ============================================================= */
.type-selector-section {
    padding: 20px 0 40px;
}

.type-selector-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px 32px;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #1e3a5f;
    border-color: #bbf7d0;
}
.type-selector-card:hover {
    transform: translateY(-8px);
    text-decoration: none;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #1e3a5f;
    box-shadow: 0 20px 40px rgba(56, 161, 105, 0.18);
}

.type-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
    background: rgba(56, 161, 105, 0.12);
    color: #31A18A;
}
.type-selector-card:hover .type-card-icon {
    transform: scale(1.1);
}

.type-card-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    text-align: center;
}

.type-card-arrow {
    position: absolute;
    bottom: 16px;
    right: 16px;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
    color: #38a169;
}
.type-selector-card:hover .type-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

.back-to-types-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1e3a5f;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}
.back-to-types-btn:hover {
    background: #f0fdf4;
    color: #38a169;
    border-color: #38a169;
}


/* =============================================================
  10. ÁRBOL DE HERRAMIENTAS / RECURSOS
   ============================================================= */
.herramientas-tree-section {
    margin-top: 24px;
}

/* --- Bloque principal del árbol --- */
.resource-tree-block {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.resource-tree-header {
    padding: 24px 28px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-bottom: 2px solid #bbf7d0;
}

.resource-tree-thumb {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.resource-tree-thumb-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: linear-gradient(135deg, #38a169, #31A18A);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.resource-tree-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e3a5f;
}

/* --- Descripción inline con título --- */
.resource-desc-inline {
    margin-top: 6px;
}
.resource-desc-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.65;
    transition: all 0.3s ease;
}
.resource-desc-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}
.resource-desc-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.resource-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #38a169;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.2s;
}
.resource-desc-toggle:hover {
    color: #31A18A;
}
.resource-desc-toggle svg {
    transition: transform 0.3s;
}
.resource-desc-toggle.expanded svg {
    transform: rotate(180deg);
}

/* --- Etapas como botones --- */
.stage-buttons-section {
    padding: 20px 28px;
}
.stage-btn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stage-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}
.stage-btn:hover {
    transform: translateY(-4px);
    border-color: #bbf7d0;
    box-shadow: 0 10px 30px rgba(56, 161, 105, 0.15);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}
.stage-btn.active {
    background: linear-gradient(135deg, #38a169 0%, #31A18A 100%);
    color: white;
    border-color: #31A18A;
    box-shadow: 0 8px 25px rgba(56, 161, 105, 0.3);
    transform: translateY(-2px);
}

.stage-btn-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(56, 161, 105, 0.12);
    color: #31A18A;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
    transition: all 0.3s;
}
.stage-btn.active .stage-btn-number {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.stage-btn-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e3a5f;
    line-height: 1.3;
    margin-bottom: 6px;
}
.stage-btn.active .stage-btn-title {
    color: white;
}

.stage-btn-count {
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.12);
    padding: 2px 10px;
    border-radius: 10px;
}
.stage-btn.active .stage-btn-count {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.15);
}

/* --- Panel de contenido de etapa --- */
.stage-content-panel {
    display: none;
    animation: fadeInPanel 0.3s ease;
}
.stage-content-panel.active {
    display: block;
}
@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.stage-panel-desc {
    padding: 14px 20px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 16px;
    color: #64748b;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
}

/* --- Sub-etapas --- */
.tree-substage {
    border-bottom: 1px solid #e2e8f0;
}
.tree-substage:last-child {
    border-bottom: none;
}
.tree-substage-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px 14px 44px;
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #f0fdf4, #f8fafc);
    border-bottom: 1px solid #e2e8f0;
}
.tree-substage-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3CB371, #31A18A);
    flex-shrink: 0;
}
.tree-substage-title {
    flex: 1;
}
.tree-substage-count {
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 10px;
}
.tree-substage-file {
    padding: 10px 28px 10px 64px;
    background: #fafafa;
    border-bottom: 1px solid #f1f5f9;
}
.tree-file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #38a169;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
    transition: all 0.2s;
}
.tree-file-link:hover {
    background: #38a169;
    color: white;
    border-color: #38a169;
}

/* --- Herramientas como cards --- */
.tree-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    padding: 16px 28px 16px 64px;
    background: #fafbfc;
}

.tree-tool-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    position: relative;
}
.tree-tool-card:hover {
    border-color: #3CB371;
    box-shadow: 0 6px 20px rgba(60, 179, 113, 0.12);
    transform: translateY(-3px);
}

.tree-tool-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.tree-tool-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e6f9ef, #dcfce7);
    color: #38a169;
    flex-shrink: 0;
}
.tree-tool-card-title {
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.88rem;
    line-height: 1.35;
    margin: 0;
    flex: 1;
}
.tree-tool-card-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 10px;
    flex: 1;
}
.tree-tool-card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* Badges de árbol */
.tree-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}
.tree-badge-file  { background: #e3f2fd; color: #1565c0; }
.tree-badge-video { background: #fce4ec; color: #c62828; }

.tree-tool-card-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}
.tree-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}
.tree-card-btn-download {
    background: #f0fdf4;
    color: #38a169;
}
.tree-card-btn-download:hover {
    background: #38a169;
    color: white;
    border-color: #38a169;
}
.tree-card-btn-view {
    background: #eff6ff;
    color: #3182ce;
    margin-left: auto;
}
.tree-card-btn-view:hover {
    background: #3182ce;
    color: white;
    border-color: #3182ce;
}

/* Nav lateral */
.iniciativas-nav-scroll {
    max-height: 500px;
    overflow-y: scroll;
}


/* =============================================================
  11. RELACIONADOS CON INICIATIVA LOCAL
   ============================================================= */
.related-section {
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}
.related-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e3a5f;
    margin-bottom: 20px;
}
.related-section-title i {
    color: #38a169;
    font-size: 1.4rem;
}

.related-res-card {
    transition: all 0.3s ease;
    border-radius: 12px !important;
    overflow: hidden;
}
.related-res-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
    border-color: #3CB371 !important;
}

.related-res-img {
    height: 140px;
    object-fit: cover;
}
.related-res-img-placeholder {
    height: 140px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #94a3b8;
}

.related-res-type {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #38a169;
    background: #f0fdf4;
    padding: 2px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    align-self: flex-start;
}
.related-res-title {
    font-weight: 700;
    color: #1e3a5f;
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.35;
}
.related-res-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 8px;
    flex: 1;
}


/* =============================================================
  12. CONTACTO / MAPA / UBICACIONES
   ============================================================= */
.ubicacion-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.ubicacion-item {
    padding: 1rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all .25s ease;
}
.ubicacion-item:hover {
    border-color: var(--color-green-primary, #3d8e3e);
}
.ubicacion-item.active {
    color: #fff;
    border: 2px solid  #3CB371;
}
.ubicacion-item.active .ubicacion-region { color: #fff; }
.ubicacion-item.active .ubicacion-dir    { color: rgba(255, 255, 255, .85); }

.ubicacion-region {
    font-weight: 700;
    font-size: 1rem;
    color:  #fff;
    margin-bottom: .25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.ubicacion-dir {
    font-size: .875rem;
    color: #fff;
    margin: 0;
}

/* Columna del mapa */
.contacto-mapa-col {
    display: flex;
    flex-direction: column;
}
.contacto-mapa-col .ubicaciones-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.contacto-mapa-col .ubicaciones-section > .row {
    flex: 1;
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}
.contacto-mapa-col .ubicaciones-section > .row > [class*="col"] {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.mapa-wrapper {
    flex: 1;
    min-height: 420px;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
    background: #e2e8f0;
    display: flex;
    flex-direction: column;
}

.mapa-frame {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 420px;
}
.mapa-frame.active {
    display: flex;
}
.mapa-frame iframe {
    flex: 1;
    width: 100%;
    min-height: 420px;
    border: 0;
    display: block;
}

.mapa-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 420px;
    color: #718096;
    gap: .75rem;
}
.mapa-placeholder svg { opacity: .4; }
.mapa-placeholder p   { margin: 0; font-size: .9rem; }


/* =============================================================
  13. RESULTADOS DE BÚSQUEDA — resource-card-new
   ============================================================= */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}
.results-count {
    font-size: 1.1rem;
    color: #4a5568;
}
.results-count strong {
    color: #1a365d;
    font-weight: 700;
}

.resource-card-wrapper {
    height: 100%;
}
.resource-card-new {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
}
.resource-card-new:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Imagen */
.resource-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid #e2e8f0;
}
.resource-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.resource-card-new:hover .resource-card-image img {
    transform: scale(1.08);
}

/* Overlay para videos */
.resource-card-image.video-type::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: background 0.3s ease;
}
.resource-card-new:hover .resource-card-image.video-type::before {
    background: rgba(0, 0, 0, 0.4);
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.video-play-btn svg {
    width: 24px;
    height: 24px;
    color: #e53e3e;
    margin-left: 4px;
}
.resource-card-new:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background: white;
}

/* Badges */
.resource-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: end;
    z-index: 2;
}
.resource-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.resource-type-badge svg {
    width: 14px;
    height: 14px;
}
.type-video      { background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%); color: white; }
.type-documento  { background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%); color: white; }
.type-herramienta{ background: linear-gradient(135deg, #38a169 0%, #276749 100%); color: white; }
.type-default    { background: linear-gradient(135deg, #718096 0%, #4a5568 100%); color: white; }

.resource-date-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #1a365d;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.resource-lang-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Contenido */
.resource-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.resource-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}
.resource-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.resource-card-action {
    margin-top: auto;
    padding-top: 16px;
}

/* Botones de acción */
.resource-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}
.resource-action-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-download {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
}
.btn-download:hover {
    background: linear-gradient(135deg, #2c5282 0%, #3182ce 100%);
    color: white;
    transform: translateY(-2px);
}
.btn-download:hover svg {
    transform: translateY(2px);
}

.btn-view {
    background: linear-gradient(135deg, #38a169 0%, #48bb78 100%);
    color: white;
}
.btn-view:hover {
    background: linear-gradient(135deg, #48bb78 0%, #68d391 100%);
    color: white;
    transform: translateY(-2px);
}

.btn-play {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
}
.btn-play:hover {
    background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
    color: white;
    transform: translateY(-2px);
}


/* =============================================================
  14. ESTADO VACÍO
   ============================================================= */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 16px;
    border: 2px dashed #cbd5e0;
}
.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.empty-state-icon svg {
    width: 60px;
    height: 60px;
    color: #a0aec0;
}
.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}
.empty-state-text {
    color: #718096;
    margin-bottom: 24px;
}
.empty-state-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}
.empty-state-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}


/* =============================================================
  15. MEDIA QUERIES / RESPONSIVE
   ============================================================= */
@media (max-width: 768px) {

    /* Buscador */
    .main-search-row {
        flex-direction: column;
    }
    .btn-main-search {
        width: 100%;
        justify-content: center;
    }
    .filters-grid {
        grid-template-columns: 1fr;
    }
    .date-range-wrapper {
        flex-direction: column;
        grid-column: span 1;
        align-items: normal;
    }
    .date-separator {
        display: none;
    }
    .advanced-filter-actions {
        flex-direction: column;
    }
    .advanced-filter-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Selector de tipos */
    .type-selector-card {
        min-height: 180px;
        padding: 28px 20px 24px;
    }
    .type-card-icon {
        width: 64px;
        height: 64px;
    }
    .type-card-icon svg {
        width: 36px;
        height: 36px;
    }

    /* Árbol de herramientas */
    .tree-tools-grid {
        grid-template-columns: 1fr;
        padding-left: 16px;
    }
    .tree-substage-header {
        padding-left: 20px;
    }
    .tree-substage-file {
        padding-left: 20px;
    }
    .resource-tree-header {
        padding: 16px 20px;
    }
    .resource-tree-thumb,
    .resource-tree-thumb-placeholder {
        width: 48px;
        height: 48px;
    }
    .resource-tree-title {
        font-size: 1rem;
    }

    /* Stage buttons */
    .stage-btn-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .stage-btn {
        min-height: 100px;
        padding: 14px 10px;
    }
    .stage-btn-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .stage-btn-title {
        font-size: 0.82rem;
    }
    .stage-buttons-section {
        padding: 16px 16px;
    }
    .resource-desc-inline {
        margin-top: 4px;
    }

    /* Tarjetas */
    .iniciativa-card-image,
    .resource-card-image {
        height: 180px;
    }
    .results-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}