/*
 * gmp-frontend.css
 * Estilos para la parte pública de la Galería Micológica Pro.
 * v14.18 - CSS Ajustado para logo sólido.
 */

/* =========================================
 * 1. MIGAS DE PAN (Fuera de la tarjeta)
 * =========================================
 */
.gmp-breadcrumbs-wrapper {
    margin-bottom: 10px; margin-left: 2px;
    font-size: 0.8rem; color: #777; font-weight: 500; line-height: 1;
    margin-top: 0 !important; padding-top: 10px;
}
.gmp-breadcrumbs-wrapper a { text-decoration: none; color: #555; transition: color 0.2s; }
.gmp-breadcrumbs-wrapper a:hover { color: #000; text-decoration: underline; }
.gmp-breadcrumbs-wrapper .separator { margin: 0 5px; color: #bbb; }

/* =========================================
 * 2. TARJETA PRINCIPAL (Ficha Individual)
 * =========================================
 */
.gmp-ficha-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15), 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 40px;
    border-left-width: 10px; border-left-style: solid;
    border-top: 1px solid #e0e0e0; border-right: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0;
}
.gmp-ficha-header {
    padding: 15px 25px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.gmp-ficha-title { margin: 0 !important; font-size: 1.6rem !important; font-weight: 800 !important; font-style: italic; line-height: 1.2; }
.gmp-header-badge { font-weight: 800; font-size: 0.85rem; text-transform: uppercase; padding: 6px 12px; border-radius: 4px; backdrop-filter: blur(2px); box-shadow: 0 2px 4px rgba(0,0,0,0.1); white-space: nowrap; }

/* CUERPO */
.gmp-ficha-body-wrapper {
    display: flex; flex-wrap: wrap; background-color: #e6e7e8; padding: 15px 25px 25px 25px; gap: 30px;
}

/* COLUMNA DATOS (Con Marca de Agua) */
.gmp-ficha-col-datos { 
    flex: 1 1 300px; min-width: 280px; 
    position: relative; 
    z-index: 1;
}

.gmp-ficha-col-media { flex: 1 1 350px; min-width: 300px; }
@media (max-width: 768px) { .gmp-ficha-body-wrapper { flex-direction: column; gap: 25px; } }

/* --- MARCA DE AGUA (LOGO) AJUSTADA --- */
.gmp-watermark-logo {
    position: absolute;
    top: 8%; 
    transform: translateY(-50%);
    right: 10px; 
    width: 160px;
    height: auto;
    /* Eliminada opacidad y mezcla para usar logo sólido */
    pointer-events: none;
    z-index: 0; 
}

/* =========================================
 * 3. COLORES SEMÁFORO (Global)
 * =========================================
 */
.gmp-style-mortal, .gmp-style-toxico { border-color: #dc2626; }
.gmp-style-mortal .gmp-ficha-header, .gmp-style-toxico .gmp-ficha-header { background: linear-gradient(to bottom, #ef4444 0%, #991b1b 100%); }
.gmp-style-mortal .gmp-ficha-title, .gmp-style-toxico .gmp-ficha-title { color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.gmp-style-mortal .gmp-header-badge, .gmp-style-toxico .gmp-header-badge { color: #fff; border: 1px solid rgba(255,255,255,0.5); background: rgba(255,255,255,0.15); }

.gmp-style-comestible, .gmp-style-coccion { border-color: #16a34a; }
.gmp-style-comestible .gmp-ficha-header, .gmp-style-coccion .gmp-ficha-header { background: linear-gradient(to bottom, #22c55e 0%, #14532d 100%); }
.gmp-style-comestible .gmp-ficha-title, .gmp-style-coccion .gmp-ficha-title { color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.gmp-style-comestible .gmp-header-badge, .gmp-style-coccion .gmp-header-badge { color: #fff; border: 1px solid rgba(255,255,255,0.5); background: rgba(255,255,255,0.15); }

.gmp-style-nocomestible { border-color: #ca8a04; }
.gmp-style-nocomestible .gmp-ficha-header { background: linear-gradient(to bottom, #facc15 0%, #854d0e 100%); }
.gmp-style-nocomestible .gmp-ficha-title { color: #000 !important; text-shadow: none; }
.gmp-style-nocomestible .gmp-header-badge { color: #000; border: 1px solid rgba(0,0,0,0.2); background: rgba(255,255,255,0.4); }

.gmp-style-neutral { border-color: #999; }
.gmp-style-neutral .gmp-ficha-header { background: linear-gradient(to bottom, #e5e5e5 0%, #9ca3af 100%); }
.gmp-style-neutral .gmp-ficha-title { color: #333 !important; text-shadow: none; }
.gmp-style-neutral .gmp-header-badge { color: #333; border: 1px solid rgba(0,0,0,0.2); }

/* =========================================
 * 4. DATOS Y TAXONOMÍA
 * =========================================
 */
.gmp-taxonomy-list { list-style: none; padding: 0; margin: 0 0 15px 0; position: relative; z-index: 1; }
.gmp-taxonomy-list li { margin-bottom: 2px; display: flex; align-items: baseline; line-height: 1.1; }
.gmp-label { font-size: 0.75rem; text-transform: uppercase; color: #888; font-weight: 700; min-width: 75px; letter-spacing: 0.5px; }
.gmp-value-bold { font-weight: 700; color: #444; }
.gmp-data-main { margin-top: 10px; position: relative; z-index: 1; } .big-name-row { margin-bottom: 12px; }
.gmp-species-name { font-size: 1.5rem; font-weight: 800; font-style: italic; color: #000; line-height: 1.2; }
.gmp-species-author { font-size: 0.95rem; font-weight: 400; color: #666; font-style: normal; margin-left: 6px; }
.gmp-value-italic { font-weight: 600; font-style: italic; color: #444; }

/* Botones Ficha */
.gmp-buttons-row { margin-top: 25px; display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.gmp-mini-btn {
    display: inline-block; font-size: 0.75rem; padding: 8px 16px; background-color: #2271b1; color: #fff !important; text-decoration: none !important; border-bottom: none !important; border-radius: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; border: none; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: all 0.2s ease; cursor: pointer;
}
.gmp-mini-btn:hover { background-color: #135e96; color: #fff !important; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.25); }
.gmp-mini-btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,0.2); }

/* =========================================
 * 5. GALERÍA MULTIMEDIA
 * =========================================
 */
.gmp-gallery-item { border-radius: 4px; border: 1px solid #ddd; overflow: hidden; cursor: pointer; position: relative; background: #fff; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.gmp-gallery-item:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.15); border-color: #999; }

/* CASO 1: UNA SOLA FOTO (Se ve grande) */
.gmp-gallery-single { width: 100%; }
.gmp-gallery-single .gmp-gallery-item { width: 100%; height: auto; border: none; box-shadow: none; }
.gmp-gallery-single .gmp-img-cover { width: 100%; height: auto; display: block; border-radius: 4px; }

/* CASO 2: REJILLA DE FOTOS (Se ven pequeñas) */
.gmp-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.gmp-gallery-grid .gmp-gallery-item { aspect-ratio: 1 / 1; }
.gmp-gallery-grid .gmp-img-cover { width: 100%; height: 100%; object-fit: cover; }

/* --- CAMBIO v14.15: Soporte para tag VIDEO --- */
.gmp-gallery-grid video.gmp-img-cover, 
.gmp-gallery-single video.gmp-img-cover,
.gmp-imagen-container video.gmp-img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gmp-video-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 1.5rem; text-shadow: 0 1px 3px rgba(0,0,0,0.6); pointer-events: none; opacity: 0.9; }

/* =========================================
 * 7. SHORTCODE (LISTADO + FILTROS)
 * =========================================
 */
.gmp-gallery-main-title { text-align: center; font-size: 2.2rem; font-weight: 900; text-transform: uppercase; margin-bottom: 25px; letter-spacing: 1px; margin-top: 50px; color: #000; }
.gmp-brand-gradient { background: linear-gradient(to right, #ef4444 0%, #991b1b 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gmp-filters-container { background-color: #f9f9f9; border-bottom: 2px solid #e0e0e0; padding: 10px 15px; margin-bottom: 30px; border-radius: 6px; display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: 15px; }
.gmp-filter-alphabetic { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex-grow: 1; }
.gmp-filter-link { display: inline-block; padding: 3px 6px; background: #dbeafe; border: 1px solid #ccc; text-decoration: none !important; border-bottom: none !important; color: #2271b1; border-radius: 3px; font-weight: 700; font-size: 0.8rem; min-width: 22px; text-align: center; transition: all 0.2s; margin-right: 0; }
.gmp-filter-link:hover { background: #2271b1; color: #fff; border-color: #2271b1; }
.gmp-filter-link.active { background: #2271b1; color: #fff; border-color: #2271b1; }
.gmp-filter-all-btn { background: #444; color: #fff; border-color: #444; padding: 3px 10px; margin-right: 8px; font-size: 0.8rem; }
.gmp-filter-all-btn.active { background: #2271b1; border-color: #2271b1; }
.gmp-filter-forms { display: flex; gap: 8px; flex-wrap: nowrap; align-items: center; flex-shrink: 0; }
.gmp-filter-taxonomy select { font-size: 0.85rem; padding: 0 5px; border: 1px solid #ccc; border-radius: 4px; height: 32px; max-width: 140px; }
.gmp-filter-search input[type="search"] { font-size: 0.85rem; padding: 0 8px; border: 1px solid #ccc; border-radius: 4px; height: 32px; max-width: 120px; }
.gmp-filter-search input[type="submit"] { font-size: 0.9rem; padding: 0 10px; height: 32px; line-height: 1; background: #2271b1; color: white; border: none; cursor: pointer; border-radius: 4px; }
@media (max-width: 1100px) { .gmp-filters-container { flex-wrap: wrap; } .gmp-filter-forms { margin-left: auto; margin-top: 10px; } }

/* GRID TARJETAS */
.gmp-especies-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 25px; padding: 0; list-style: none; margin: 30px 0; }
.gmp-especie-item { background: #fff; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: box-shadow 0.2s ease; border-top: 6px solid #ccc; position: relative; }
.gmp-especie-item.gmp-style-mortal, .gmp-especie-item.gmp-style-toxico { border-top-color: #dc2626; }
.gmp-especie-item.gmp-style-comestible, .gmp-especie-item.gmp-style-coccion { border-top-color: #16a34a; }
.gmp-especie-item.gmp-style-nocomestible { border-top-color: #ca8a04; }
.gmp-especie-item:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.12); }
.gmp-imagen-container { aspect-ratio: 4 / 3; width: 100%; overflow: hidden; position: relative; cursor: pointer; background: #f0f0f0; }
.gmp-img-cover { width: 100% !important; height: 100% !important; object-fit: cover !important; transition: transform 0.3s ease; display: block; }
.gmp-especie-item:hover .gmp-img-cover { transform: scale(1.05); }
.gmp-title-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 15px 10px; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%); text-align: center; pointer-events: none; display: flex; align-items: flex-end; justify-content: center; min-height: 60px; }
.gmp-especie-title { font-size: 1rem !important; font-weight: 700; font-style: italic; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.8); display: block; margin: 0; line-height: 1.3; }

/* =========================================
 * 8. LIGHTBOX PRO
 * =========================================
 */
.gmp-lightbox-overlay { position: fixed; z-index: 100000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.95); display: none; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.gmp-lightbox-overlay.active { display: flex; }
.gmp-lightbox-content { position: relative; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; padding-bottom: 50px; }

/* ESTRUCTURA FIGURE */
.gmp-lightbox-figure {
    margin: 0;
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 85vh;
}

.gmp-lightbox-img { max-width: 100%; max-height: 85vh; object-fit: contain; box-shadow: 0 0 30px rgba(0,0,0,0.8); cursor: zoom-in; display: block; }
.gmp-lightbox-img.zoomable { cursor: grab; }
.gmp-lightbox-img.zoomable:active { cursor: grabbing; }
.gmp-lightbox-video { max-width: 100%; max-height: 85vh; }

/* PIE DE FOTO (Lightbox) */
.gmp-photo-credit {
    display: block; width: 100%; text-align: right; color: #ccc; font-size: 0.85rem; font-style: italic; margin-top: 8px; font-weight: 300; opacity: 0.8;
}

.gmp-lightbox-counter { position: absolute; top: 20px; left: 25px; color: rgba(255,255,255,0.7); font-size: 0.9rem; font-weight: 500; z-index: 100003; pointer-events: none; }
.gmp-lightbox-close, .gmp-lightbox-nav { position: absolute; width: 44px; height: 44px; background: rgba(255,255,255,0.1); border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color 0.2s ease; z-index: 100003; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.1); font-size: 1.5rem; line-height: 1; user-select: none; }
.gmp-lightbox-close:hover, .gmp-lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.gmp-lightbox-close { top: 20px; right: 25px; font-size: 2rem; }
.gmp-lightbox-prev { top: 50%; left: 20px; transform: translateY(-50%); }
.gmp-lightbox-next { top: 50%; right: 20px; transform: translateY(-50%); }
.gmp-lightbox-prev:hover { transform: translateY(-50%); }
.gmp-lightbox-next:hover { transform: translateY(-50%); }
.gmp-lightbox-caption-bar { position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%); text-align: center; pointer-events: none; z-index: 100002; min-height: 80px; display: flex; align-items: flex-end; justify-content: center; }
.gmp-lightbox-caption { margin: 0; font-size: 1.3rem; font-weight: 800; font-style: italic; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.gmp-text-mortal, .gmp-text-toxico { color: #ff4d4d; }
.gmp-text-comestible, .gmp-text-coccion { color: #4ade80; }
.gmp-text-nocomestible { color: #facc15; }
.gmp-text-neutral { color: #ffffff; }
.ui-autocomplete { background: #fff; border: 1px solid #ccc; max-height: 200px; overflow-y: auto; overflow-x: hidden; z-index: 9999; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border-radius: 4px; padding: 0; margin: 0; list-style: none; }
.ui-menu-item { padding: 0; margin: 0; }
.ui-menu-item-wrapper { display: block; padding: 8px 12px; cursor: pointer; font-size: 0.9rem; color: #333; }
.ui-menu-item-wrapper:hover, .ui-menu-item-wrapper.ui-state-active { background-color: #2271b1; color: #fff; border: none; margin: 0; }
img.gmp-img-fallback { object-fit: contain !important; width: 100%; height: 100%; background-color: #ffffff; padding: 10px; }

/* =========================================
 * 11. VENTANA MODAL (QUICK VIEW)
 * =========================================
 */
.gmp-modal-overlay { position: fixed; z-index: 99990; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.gmp-modal-overlay.active { display: flex; opacity: 1; }
.gmp-modal-wrapper { background: #fff; width: 90%; max-width: 1000px; max-height: 90vh; border-radius: 8px; position: relative; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.5); transform: translateY(20px); transition: transform 0.3s ease; will-change: transform; }
.gmp-modal-overlay.active .gmp-modal-wrapper { transform: translateY(0); }
.gmp-modal-close { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: transparent !important; border: none; font-size: 2.5rem; font-weight: 700; color: rgba(255,255,255,0.9); text-shadow: 0 1px 3px rgba(0,0,0,0.3); cursor: pointer; z-index: 100; padding: 0; box-shadow: none !important; transition: transform 0.2s ease, color 0.2s ease; transform-origin: center center; }
.gmp-modal-close:hover { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.6); transform: rotate(90deg); background: transparent !important; }
.gmp-modal-content .gmp-ficha-card { margin-bottom: 0; box-shadow: none; border: none; }
.gmp-modal-content .gmp-ficha-header { padding-right: 70px !important; padding-top: 20px; }
.gmp-modal-spinner { padding: 50px; text-align: center; font-size: 1.2rem; color: #666; }
@media (max-width: 768px) { .gmp-modal-wrapper { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; } }
.gmp-modal-nav { position: fixed; top: 54%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.9); color: #333; font-size: 2rem; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 99995; border: 1px solid #ddd; transition: all 0.2s ease; user-select: none; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.gmp-modal-prev { left: 20px; } .gmp-modal-next { right: 20px; }
.gmp-modal-nav:hover { background: #dc2626; color: white; border-color: #dc2626; box-shadow: 0 4px 8px rgba(0,0,0,0.3); }
@media (max-width: 768px) { .gmp-modal-nav { top: 42%; width: 30px; height: 30px; font-size: 1.1rem; background: rgba(255,255,255,0.85); border: 1px solid rgba(0,0,0,0.1); } .gmp-modal-prev { left: 2px; } .gmp-modal-next { right: 2px; } }
.gmp-lightbox-overlay { z-index: 100000 !important; }
.gmp-lightbox-close, .gmp-lightbox-nav { z-index: 100005 !important; }

/* RESET TEMA */
.single-micologica_especie .entry-title, .single-micologica_especie .post-title, .single-micologica_especie .page-title, .single-micologica_especie .entry-meta, .single-micologica_especie .posted-on, .single-micologica_especie .byline, .single-micologica_especie .ast-post-meta, .single-micologica_especie .post-meta, .single-micologica_especie header.entry-header { display: none !important; }
.single-micologica_especie .site-content { padding-top: 0 !important; }
.single-micologica_especie article, .single-micologica_especie .entry-content, .single-micologica_especie .ast-article-single { margin-top: 0 !important; padding-top: 0 !important; }

/* =========================================
 * 12. PIE DE FOTO/VÍDEO EN FICHA (v14.10.1)
 * =========================================
 */
/* Lógica inteligente: Ocultar en rejilla */
.gmp-gallery-grid .gmp-card-credit {
    display: none; 
}

/* Mostrar en modo single con icono alineado */
.gmp-gallery-single .gmp-card-credit {
    display: flex;              /* Usamos flex para alinear icono y texto */
    align-items: center;        /* Centrado vertical exacto */
    justify-content: flex-end;  /* Todo alineado a la derecha */
    font-size: 0.75rem;
    color: #666;
    margin-top: 5px;
    margin-right: 2px;
    line-height: 1;             /* Línea más compacta */
    padding-bottom: 5px;
    font-weight: 400;
}

/* Estilo específico para el icono Dashicon dentro del crédito */
.gmp-card-credit .dashicons {
    font-size: 14px;
    width: auto;
    height: auto;
    margin-right: 4px; /* Separación entre icono y texto */
    color: #888;       /* Un gris un poco más claro para el icono */
}

/* En móvil, ajustamos el tamaño */
@media (max-width: 480px) {
    .gmp-gallery-single .gmp-card-credit {
        font-size: 0.7rem;
    }
    .gmp-card-credit .dashicons {
        font-size: 13px;
    }
}