/*
 * Widgets de Comunicación (portados de gaegm).
 * gaind no carga Bootstrap: aquí va el subconjunto mínimo de rejilla/tarjetas
 * que usan las plantillas, limitado a estos widgets para no afectar al resto.
 */

/* --- Rejilla mínima --- */
.egm_widget .row,
.gaind_item_new .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}
.egm_widget [class*="col-"],
.gaind_item_new [class*="col-"] {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
}
.egm_widget .col-12 { flex: 0 0 100%; max-width: 100%; }
.egm_widget .col-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.egm_widget .col-xs-6 { flex: 0 0 50%; max-width: 50%; }
@media (min-width: 576px) {
    .egm_widget .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
}
@media (min-width: 768px) {
    .egm_widget .col-md-1 { flex: 0 0 8.3333%; max-width: 8.3333%; }
    .egm_widget .col-md-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
    .egm_widget .col-md-3, .gaind_item_new .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .egm_widget .col-md-4, .gaind_item_new .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .egm_widget .col-md-5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
    .egm_widget .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .egm_widget .col-md-7 { flex: 0 0 58.3333%; max-width: 58.3333%; }
    .egm_widget .col-md-8, .gaind_item_new .col-md-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .egm_widget .col-md-9, .gaind_item_new .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .egm_widget .col-md-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
    .egm_widget .col-md-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
    .egm_widget .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (max-width: 767px) {
    .egm_widget .col-4 { flex: 0 0 100%; max-width: 100%; }
}

/* --- Tarjetas y avisos --- */
.egm_widget .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: 4px;
    overflow: hidden;
}
.egm_widget .card-body { flex: 1 1 auto; padding: 16px 0; }
.egm_widget .card .card-body { padding: 16px; }
.egm_widget .alert { padding: 10px; border-radius: 4px; }
.egm_widget .alert-info { background-color: #b1cde1; }

/* --- Estilos de gaegm --- */
.egm_widget .gaind_item_head { font-weight: bold; font-size: 1.2em; margin: 15px 0; }
.egm_widget .gaind_item_row { margin-bottom: 15px; }
.egm_widget .gaind_item_row .title { font-weight: bold; }
.egm_widget .date { font-style: italic; color: #999; }
.egm_widget .link a { font-weight: 600; }

.egm_widget .card_img {
    height: 150px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}
.egm_widget .card_img img { width: 100%; }
.egm_widget .card_img img.noimage { width: auto; max-width: 100%; }

#cd-timeline .cd-timeline-dot { background-color: var(--nv-primary-accent, #1660a0); }
#cd-timeline .cd-timeline-content h2 { background: var(--nv-primary-accent, #1660a0); color: #fff; font-size: 15px; text-align: center; padding: 10px 15px; }
#cd-timeline .cd-date { color: var(--nv-primary-accent, #1660a0); font-size: 20px; }
#cd-timeline .comments { padding: 10px 0; }

.egm_widget.blog_widget .detail {
    margin-top: 10px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 20px;
}
.egm_widget.blog_widget .card_img img { object-fit: cover; }
.egm_widget.blog_widget .card_img { align-items: flex-start; height: auto; }
.egm_widget.blog_widget .gaind_item_row { border-bottom: 1px solid #efefef; margin-top: 30px; }
.egm_widget.blog_widget .gaind_item_row .row { align-items: center; }
.egm_widget.blog_widget .newsletter_image .card_img { height: 250px; overflow: hidden; }
.egm_widget.blog_widget .newsletter_image .card_img img { width: 100%; height: auto; }
.revista_widget .card_img { height: 350px; }

.gaind_item_new .date { font-style: italic; color: #999; margin-bottom: 10px; }
.gaind_item_new .image img { width: 100%; height: auto; }
.gaind_item_new .link a { display: inline-block; margin: 10px 15px 0 0; font-weight: 600; }

/* --- Galerías --- */
.egm_widget .media_image { margin-bottom: 20px; }
.egm_widget .media_image .image { overflow: hidden; max-height: 300px; display: flex; align-items: center; }
.egm_widget .media_image .image img { width: 100%; height: auto; }
.egm_widget .media_image video { width: 100%; height: auto; display: block; }
.egm_widget.gallery_widget .newsletter_image .card_img,
.egm_widget.videos_widget .newsletter_image .card_img { height: 250px; }
.egm_widget.gallery_widget .card_img img,
.egm_widget.videos_widget .card_img img { object-fit: cover; height: 100%; }

/* --- Colaboradores --- */
.egm_widget.contacts_widget .gaind_item_row { margin-bottom: 24px; }
.egm_widget.contacts_widget .card_img img { width: 200px; max-width: 100%; height: 60%; object-fit: contain; }
.egm_widget.contacts_widget .gaind_item_row .address,
.egm_widget.contacts_widget .gaind_item_row .mail { font-size: 0.8em; line-height: 1rem; }

/* --- Texto legal del buzón --- */
.egm_legal_text { font-size: 0.85em; color: #555; }
.egm_legal_text .egm_legal_text_title { font-weight: bold; font-size: 1.2em; margin-bottom: 10px; color: #333; }
