/* CSS específico para la ficha del animal
   Objetivo: reducir el tamaño visual del H1 manteniendo el elemento H1 en el DOM
   para no afectar la semántica y el SEO. Este archivo está enlazado desde
   animal_generar_ficha.php
*/

/* FONDO GRIS SUAVE PARA TODA LA FICHA */
body, .main-content {
    background-color: #f3f4f6 !important;
}

/* Container principal de la ficha */
.ficha-container {
    margin-bottom: 3rem;
    padding-top: 0.5rem;
}

@media (max-width: 576px) {
    .ficha-container {
        margin-bottom: 1.5rem;
        padding-left: 10px;
        padding-right: 10px;
    }
}

.pet-header {
    background: linear-gradient(135deg, #198754, #0d6efd);
    color: white;
    padding: 0.75rem; /* mobile-first: menos padding en pantallas pequeñas */
    text-align: center;
    position: relative;
}

/* Mobile-first: usa clamp() para tamaño de H1, accesible y fluido */
.pet-header h1.display-4 {
    font-size: clamp(1.1rem, 5vw, 2.5rem); /* Más pequeño en móvil */
    line-height: 1.15;
    font-weight: 700;
    margin-bottom: 0.5rem;
    word-break: break-word; /* Evita overflow en títulos largos */
    text-shadow: 0 1px 3px rgba(0,0,0,0.2); /* Sombra sutil para legibilidad */
}

/* Colorear las palabras del estado en el H1 */
.estado-text {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estados: en adopción (mate red) */
.estado-text-1 {
    color: #dc2626;
    text-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

/* Estados: reservado (azul intenso) */
.estado-text-2 {
    color: #2563eb;
    text-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* Estados: adoptado (verde intenso) */
.estado-text-3 {
    color: #059669;
    text-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.estado-text-4 {
    color: #d97706;
    text-shadow: 0 2px 4px rgba(217, 119, 6, 0.3);
}

/* Estados: perdido (gris) */
.estado-text-5 {
    color: #4b5563;
    text-shadow: 0 2px 4px rgba(75, 85, 99, 0.3);
}

/* Ajustes en puntos intermedios si se desea más control */
@media (min-width: 576px) {
    .pet-header { padding: 1.25rem; }
}
@media (min-width: 768px) {
    .pet-header { padding: 1.5rem; }
}
@media (min-width: 992px) {
    .pet-header { padding: 2rem; }
    .pet-header h1.display-4 { font-size: clamp(1.5rem, 4.2vw, 2.5rem); }
}

/* Botones de compartir superpuestos en imagen */
.share-overlay-buttons {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-overlay-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0.75;
}

.share-overlay-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
    opacity: 1;
}

.share-overlay-btn.facebook {
    background: rgba(24, 119, 242, 0.9);
}

.share-overlay-btn.facebook:hover {
    background: rgba(24, 119, 242, 1);
}

.share-overlay-btn.twitter {
    background: rgba(0, 0, 0, 0.9);
}

.share-overlay-btn.twitter:hover {
    background: rgba(0, 0, 0, 1);
}

.share-overlay-btn.whatsapp {
    background: rgba(37, 211, 102, 0.9);
}

.share-overlay-btn.whatsapp:hover {
    background: rgba(37, 211, 102, 1);
}

.share-overlay-btn.email {
    background: rgba(108, 117, 125, 0.9);
}

.share-overlay-btn.email:hover {
    background: rgba(108, 117, 125, 1);
}

/* Responsive: botones más pequeños en móvil */
@media (max-width: 576px) {
    .share-overlay-buttons {
        top: 0.5rem;
        right: 0.5rem;
        gap: 6px;
    }
    
    .share-overlay-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Responsive para badge en móvil */
@media (max-width: 576px) {
    .estado-badge {
        top: 0.5rem;
        right: 0.5rem;
        padding: 6px 12px;
        font-size: 0.7rem;
    }
}

/* --- ESTILOS PARA EL NUEVO CARRUSEL --- */
#petCarousel {
    border-radius: 0.375rem;
    overflow: hidden;
}
.carousel-inner {
    height: 260px; /* mobile-first: altura más pequeña para móviles */
    background-color: #f8f9fa;
}
.carousel-item { height: 100%; }
.carousel-item img {
    height: 100%;
    width: 100%;
    object-fit: cover; /* cover suele funcionar mejor en móviles */
    object-position: center;
}
@media (min-width: 768px) {
    .carousel-inner { height: 360px; }
}
@media (min-width: 1200px) {
    .carousel-inner { height: 450px; }
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    padding: 0.5rem;
}
.carousel-indicators [data-bs-target] {
    background-color: #198754;
}
/* --- FIN ESTILOS NUEVO CARRUSEL --- */

/* ===== BOTONES DE NAVEGACIÓN CLÁSICOS Y ELEGANTES ===== */
.navigation-buttons {
    position: relative;
    z-index: 10;
}

.nav-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.nav-btn.active {
    color: #495057;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
}

.nav-btn.disabled {
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    color: #adb5bd;
    cursor: not-allowed;
    pointer-events: none;
    border-color: rgba(173, 181, 189, 0.5);
}

.nav-btn.active:hover {
    transform: translateY(-2px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: #6c757d;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
}

.nav-btn.active:active {
    transform: translateY(0);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.1s ease;
}

.nav-btn i {
    transition: all 0.2s ease;
}

.nav-btn.active:hover i {
    transform: scale(1.1);
    color: #343a40;
}

@media (max-width: 768px) {
    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        border-radius: 6px;
    }
}

.navigation-buttons {
    animation: fadeInSlide 0.6s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-btn[title] {
    position: relative;
}

.nav-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #343a40;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

.nav-btn[title]:hover::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #343a40;
    z-index: 1001;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.nav-btn.active:focus {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(108, 117, 125, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}


.stats-section {
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.stats-section-title {
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 1px solid #000000;
    padding-bottom: 10px;
    font-size: 1.25rem;
}

/* Eliminamos .stats-list ya que ahora usamos .row */

.stats-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    min-height: 110px;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.stats-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    border-radius: 10px;
    font-size: 1.2rem;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.2);
    flex-shrink: 0;
}

.stats-icon-favorite {
    background: linear-gradient(135deg, #ec4899, #db2777);
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.2);
}

.stats-icon-contact {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.2);
}

.stats-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.stats-label {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stats-value {
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 700;
    word-break: break-word;
}

/* Responsive adjustments for stats */
@media (min-width: 768px) {
    .stats-card {
        min-height: 120px;
        padding: 18px 12px;
    }
    
    .stats-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    
    .stats-label {
        font-size: 0.75rem;
    }
    
    .stats-value {
        font-size: 1.15rem;
    }
}

.info-section {
    padding: 1.5rem;
    border: 1px solid #000000;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.salud-section-ficha {
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.salud-section-ficha .section-title {
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 1px solid #000000;
    padding-bottom: 10px;
    font-size: 1.25rem;
}

.salud-section-ficha .col-12 {
    text-align: center;
}

/* ===== CONTENEDOR 1: Protocolo Veterinario (Badges) ===== */
/* Layout is handled by Bootstrap grid (.row / .col-*). Keep only presentation styles below. */
/* If needed, use Bootstrap utilities (text-center, w-100) or add small presentation-only rules here. */

/* ===== CONTENEDOR 2: Enfermedades (Lista) ===== */
/* Each disease is listed using Bootstrap .list-group .list-group-item. Avoid layout overrides. */
.enfermedades-list {
    width: 100%;
}

.enfermedades-section-ficha {
    background-color: #ffffff;
    border: 1px solid #dc3545;
    border-top: 4px solid #dc3545;
    border-radius: 15px;
    padding: 15px;
    margin-top: 10px;
    box-shadow: 
        3px 3px 0px rgba(220, 53, 69, 0.12),
        6px 6px 0px rgba(220, 53, 69, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

.enfermedades-section-ficha .section-title {
    color: #b22222;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid #f5c6cb;
    padding-bottom: 10px;
    font-size: 1.25rem;
}

.enfermedad-item-ficha {
    background-color: #fff;
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid;
    transition: all 0.3s ease;
}

.enfermedad-item-ficha:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.enfermedad-nombre-ficha {
    font-weight: 600;
    color: #343a40;
}

.enfermedad-gravedad-ficha {
    font-size: 0.9em;
    font-style: italic;
}

.enfermedad-item-ficha.gravedad-leve {
    border-left-color: #28a745;
}
.enfermedad-item-ficha.gravedad-moderada {
    border-left-color: #ffc107;
}
.enfermedad-item-ficha.gravedad-grave {
    border-left-color: #dc3545;
}

.no-enfermedades-mensaje {
    background-color: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.temperamento-section-ficha {
    background: #ffffff;
    border-left: 1px solid #ff6b35;
    border-right: 1px solid #ff6b35;
    border-bottom: 1px solid #ff6b35;
    border-top: 4px solid #ff6b35;
    border-radius: 15px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: 
        3px 3px 0px rgba(255, 107, 53, 0.12),
        6px 6px 0px rgba(255, 107, 53, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

.temperamento-section-ficha .section-title {
    color: #ff6b35;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid #ff6b35;
    padding-bottom: 10px;
    font-size: 1.25rem;
}

.temperamento-item-ficha {
    background-color: #fff;
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    border-left: 4px solid #ff6b35;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.temperamento-item-ficha:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.temperamento-icono-ficha {
    font-size: 1.5rem;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.temperamento-info-ficha {
    flex-grow: 1;
}

.temperamento-nombre-ficha {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 2px;
}

.temperamento-descripcion-ficha {
    font-size: 0.9em;
    color: #6c757d;
    font-style: italic;
    margin: 0;
}

.temperamento-categoria-ficha {
    font-size: 0.8em;
    color: #ff6b35;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-temperamento-mensaje {
    background-color: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.historia-section-ficha {
    background: #ffffff;
    border: 1px solid #6c757d;
    border-radius: 15px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(206, 212, 218, 0.1);
    position: relative;
    overflow: hidden;
}

.historia-section-ficha::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6c757d, #495057);
}

.historia-section-ficha .section-title {
    color: #6c757d;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
    font-size: 1.25rem;
}

.contact-section {
    background: #ffffff;
    border: 1px solid #22c55e;
    border-top: 4px solid #22c55e;
    border-radius: 15px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: 
        3px 3px 0px rgba(34, 197, 94, 0.12),
        6px 6px 0px rgba(34, 197, 94, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

.contact-section-title {
    color: #16a34a;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid #bbf7d0;
    padding-bottom: 10px;
    font-size: 1.25rem;
}

/* Publisher Card */
.publisher-card {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.publisher-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.publisher-avatar {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid #16a34a;
    justify-self: center;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.2);
    display: block;
    background-color: #f8f9fa;
}

.publisher-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    align-self: center;
}

.publisher-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
    word-break: break-word;
    text-align: center;
}

.publisher-type {
    font-size: 0.875rem;
    color: #16a34a;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contact Info List */
.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 10px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.contact-info-item:hover {
    background: #f8fafc;
}

.contact-info-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.contact-info-icon.whatsapp-icon {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.contact-info-content {
    flex: 1;
    min-width: 0;
}

.contact-info-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.contact-info-value {
    font-size: 0.95rem;
    color: #1f2937;
    font-weight: 500;
    word-break: break-all;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-info-value:hover {
    color: #16a34a;
}

.contact-info-value.whatsapp-link {
    color: #25D366;
}

.contact-info-value.whatsapp-link:hover {
    color: #128C7E;
}

/* Contact Button */
.contact-button-wrapper {
    margin-top: 10px;
}

.btn-contact-publisher {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-contact-publisher:hover {
    background: linear-gradient(135deg, #15803d, #14532d);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
}

.btn-contact-publisher:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .publisher-card {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .publisher-avatar {
        width: 64px;
        height: 64px;
        border-radius: 8px;
    }
    
    .publisher-info {
        align-items: center;
    }
    
    .publisher-name {
        font-size: 1rem;
    }
    
    .publisher-type {
        justify-content: center;
        font-size: 0.8rem;
    }
    
    .contact-info-item {
        padding: 10px;
    }
    
    .contact-info-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* ===== DETALLES SECTION STYLES ===== */
.detalles-section-ficha {
    background: #ffffff;
    border: 1px solid #007bff;
    border-top: 4px solid #007bff;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 
        3px 3px 0px rgba(0, 123, 255, 0.12),
        6px 6px 0px rgba(0, 123, 255, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

.detalles-section-ficha .section-title {
    color: #007bff;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid #b3d4ff;
    padding-bottom: 10px;
    font-size: 1.25rem;
}

/* Details Info List */
.details-info-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* NEW: Grid compacto 2x2 para detalles */
.details-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Desktop: 4 columnas en una fila */
@media (min-width: 768px) {
    .details-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.details-info-item-grid {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.details-info-item-grid:hover {
    background: #f8fafc;
}

.details-info-icon-grid {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 1rem;
}

.details-info-content-grid {
    flex: 1;
    min-width: 0;
}

.details-info-label-grid {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.details-info-value-grid {
    font-size: 0.85rem;
    color: #1f2937;
    font-weight: 600;
    word-break: break-word;
    line-height: 1.2;
}

/* Responsive: 1 columna en móviles muy pequeños */
@media (max-width: 400px) {
    .details-info-grid {
        grid-template-columns: 1fr;
    }
}

/* NEW: Grid compacto 2x2 para estadísticas (mismo formato que detalles) */
.stats-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stats-info-item-grid {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.stats-info-item-grid:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stats-info-icon-grid {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 1rem;
}

.stats-info-icon-grid.stats-icon-favorite {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.stats-info-icon-grid.stats-icon-contact {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.stats-info-content-grid {
    flex: 1;
    min-width: 0;
}

.stats-info-label-grid {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.stats-info-value-grid {
    font-size: 0.9rem;
    color: #1f2937;
    font-weight: 700;
    word-break: break-word;
    line-height: 1.2;
}

/* Responsive: 1 columna en móviles muy pequeños */
@media (max-width: 400px) {
    .stats-info-grid {
        grid-template-columns: 1fr;
    }
}

/* OLD: Details Info List (mantener para compatibilidad) */

.details-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.details-info-item:hover {
    background: #f8fafc;
}

.details-info-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.details-info-content {
    flex: 1;
    min-width: 0;
}

.details-info-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.details-info-value {
    font-size: 0.95rem;
    color: #1f2937;
    font-weight: 500;
    word-break: break-word;
}

/* Responsive adjustments for details */
@media (max-width: 768px) {
    .details-info-list {
        grid-template-columns: 1fr;
    }
    
    .details-info-item {
        padding: 10px;
    }
    
    .details-info-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* ===== INICIO: Barra de navegación flotante (Sticky) ===== */
.sticky-nav-bar {
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: var(--navbar-height, 50px); /* Usa variable CSS dinámica, fallback a 50px */
    left: 0;
    right: 0;
    width: 100%;
    background-color: rgba(44, 62, 80, 0.98); /* Fondo oscuro (Menu Color) */
    padding: 0.5rem 0; /* Reducido */
    z-index: 1025; /* Por debajo del navbar (1030) */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Borde sutil claro */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); /* Sombra más marcada */
    transition: all 0.3s ease;
    margin-bottom: 1rem; /* Reducido */
}

@media (max-width: 576px) {
    .sticky-nav-bar {
        padding: 0.4rem 0;
        margin-bottom: 0.75rem;
    }
}

/* Eliminar media queries ya que ahora usamos variable dinámica */

.sticky-nav-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-nav-bar .nav-btn-sticky {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2) !important; /* Borde sutil claro */
    background-color: rgba(255, 255, 255, 0.1); /* Fondo semitransparente */
    color: #ffffff;
    border-radius: 50px; /* Píldora */
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sticky-nav-bar .nav-btn-sticky:hover {
    background-color: #ffffff;
    color: #2c3e50;
    border-color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.sticky-nav-bar .nav-btn-sticky.disabled {
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.1) !important;
    pointer-events: none;
    box-shadow: none;
}

.sticky-nav-bar .animal-name-sticky {
    flex-grow: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    flex-direction: column; /* Mobile first: stacked layout */
    justify-content: center;
    align-items: center;
    line-height: 1.2;
    padding: 0 10px;
}

.sticky-nav-bar .animal-name-main {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff; /* Blanco puro */
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.sticky-nav-bar .animal-name-sub {
    font-size: 0.85rem;
    color: #cbd5e1; /* Gris claro azulado */
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* El separador solo será visible en desktop */
.sticky-nav-bar .animal-name-separator {
    display: none;
}

/* Estilos para tablet y desktop */
@media (min-width: 768px) {
    .sticky-nav-bar .animal-name-sticky {
        flex-direction: row; /* Layout horizontal */
        white-space: normal;
    }

    .sticky-nav-bar .animal-name-main {
        font-size: 1.3rem;
        width: auto;
    }

    .sticky-nav-bar .animal-name-sub {
        font-size: 1rem;
        color: #cbd5e1;
        width: auto;
    }

    /* Mostrar separador y añadir espacios */
    .sticky-nav-bar .animal-name-separator {
        display: inline;
        font-size: 1rem;
        color: #9ca3af;
        margin: 0 0.5rem;
    }
}

/* Mobile-first: en móvil, los botones solo tienen icono */
@media (max-width: 767.98px) {
    .sticky-nav-bar .nav-btn-sticky {
        width: 44px; /* Mínimo 44px para accesibilidad táctil (WCAG) */
        height: 44px;
        border-radius: 50%; /* Círculo */
        padding: 0;
        font-size: 1.1rem;
    }
    .sticky-nav-bar .nav-btn-text {
        display: none;
    }
}

/* En desktop, mostramos el texto */
@media (min-width: 768px) {
    .sticky-nav-bar .nav-btn-icon {
        margin-right: 0.5rem;
    }
}

/* ===== ESTILOS PARA LOS TAGS DEL ANIMAL ===== */
.tags-section-ficha {
    background: #ffffff;
    border: 1px solid #007bff;
    border-top: 4px solid #007bff;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 
        3px 3px 0px rgba(0, 123, 255, 0.12),
        6px 6px 0px rgba(0, 123, 255, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

.tags-section-ficha .section-title {
    color: #007bff;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid #b3d4ff;
    padding-bottom: 10px;
    font-size: 1.25rem;
}

/* Estilos de .tag-badge-ficha y .tags-container-ficha movidos a /css/tags.css */

/* ===== RECOMENDACIONES DE ARTÍCULOS (PRIORIDAD MONETIZACIÓN) ===== */
.recommended-articles-section {
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
}

.recommended-articles-premium {
    background:
        linear-gradient(180deg, rgba(255, 247, 237, 0.95) 0%, rgba(255, 255, 255, 1) 32%),
        #ffffff;
    border: 1px solid rgba(217, 119, 6, 0.28);
    box-shadow:
        0 10px 28px rgba(217, 119, 6, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.recommended-articles-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ea580c 0%, #f59e0b 50%, #facc15 100%);
}

.recommended-articles-kicker {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .28rem .7rem;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.12);
    color: #9a3412;
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .8rem;
}

.recommended-articles-title {
    color: #b45309;
    margin-bottom: .6rem;
}

.recommended-articles-title i {
    color: #ea580c;
}

.recommended-articles-lead {
    margin: 0 0 1rem;
    color: #6b7280;
    line-height: 1.55;
    font-size: .95rem;
}

.tags-sidebar-box .tags-container {
    gap: .35rem;
}

.tags-sidebar-intro {
    margin: -.2rem 0 .65rem;
    color: #6b7280;
    line-height: 1.5;
    font-size: .88rem;
}

.tags-sidebar-intro a {
    color: #0d6efd;
    font-weight: 700;
    text-decoration: none;
}

.tags-sidebar-intro a:hover,
.tags-sidebar-intro a:focus {
    text-decoration: underline;
}

.tags-sidebar-box .tag-badge {
    padding: .38rem .62rem;
    border-width: 1px;
    border-radius: .45rem;
    font-size: .76rem;
    font-weight: 600;
    line-height: 1.2;
}

.tags-sidebar-box .tag-badge i {
    margin-right: .25rem;
    font-size: .72rem;
}

/* Removed ::before pseudo-element that created orange top line */

.recommended-articles-section .section-title {
    color: #d35400; /* Darker orange */
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 1px solid #000000;
    padding-bottom: 10px;
    font-size: 1.25rem;
}

/* Skeleton loaders */
.articles-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.skeleton-header {
    height: 24px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 12px;
    width: 70%;
}

.skeleton-text {
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 50%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Estilos de los artículos recomendados */
.recommended-article-item {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    background: white;
    padding: 16px !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
}

/* ===== CARDS COMPACTAS DE RECOMENDACIÓN ===== */
.rec-articles-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rec-article-card {
    display: flex;
    gap: 14px;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all .25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #ffffff;
    align-items: center;
}

.rec-article-card:hover {
    background: #fffafa;
    border-color: rgba(234, 88, 12, 0.3);
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.12);
    transform: translateY(-2px);
}

.rec-article-thumb-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
}

.rec-article-thumb {
    width: 85px;
    height: 85px;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rec-article-card:hover .rec-article-thumb {
    transform: scale(1.05);
}

.rec-article-thumb-placeholder {
    width: 85px;
    height: 85px;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ea580c;
    font-size: 1.5rem;
}

.rec-article-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.rec-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.rec-article-cat {
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #4b5563;
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 4px;
}

.rec-article-badge-premium {
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #fff;
    background: linear-gradient(135deg, #ea580c, #f59e0b);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.2);
}

.rec-article-badge-premium i {
    font-size: .6rem;
}

.rec-article-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rec-article-card:hover .rec-article-title {
    color: #ea580c;
}

.rec-article-summary {
    font-size: .85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rec-articles-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: 1.1rem 1rem;
    border: 1px dashed rgba(217, 119, 6, 0.35);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.75) 0%, rgba(255, 255, 255, 0.98) 100%);
    text-align: center;
}

.rec-articles-empty-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(234, 88, 12, 0.12);
    color: #c2410c;
    font-size: 1.45rem;
}

.rec-articles-empty-title {
    margin: 0;
    color: #9a3412;
    font-size: .98rem;
    font-weight: 800;
}

.rec-articles-empty-text {
    margin: 0;
    max-width: 32rem;
    color: #7c5a44;
    font-size: .88rem;
    line-height: 1.55;
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .rec-article-card {
        gap: 10px;
        padding: 10px;
        border-radius: 10px;
    }
    
    .rec-article-thumb {
        width: 75px;
        height: 75px;
    }
    
    .rec-article-thumb-placeholder {
        width: 75px;
        height: 75px;
    }
    
    .rec-article-title {
        font-size: .95rem;
    }
    
    .rec-article-summary {
        font-size: .8rem;
        line-clamp: 1;
        -webkit-line-clamp: 1; /* Less text on mobile to save vertical space */
    }
}

.recommended-article-item:hover {
    border-left-color: #ff6b35;
    background: linear-gradient(to right, #fffaf7, white);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.2);
}

.recommended-article-item .article-title {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.recommended-article-item:hover .article-title {
    color: #ff6b35;
}

.recommended-article-item .article-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.2);
}

.recommended-article-item .article-summary {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.recommended-article-item .article-relevance {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.recommended-article-item .article-relevance i {
    color: #ffc107;
    font-size: 1rem;
}

/* Link "Ver todos" */
.view-all-articles-link {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white !important;
    border: none;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 20px !important;
    transition: all 0.3s ease;
    border-radius: 8px !important;
    margin-top: 8px;
}

.view-all-articles-link:hover {
    background: linear-gradient(135deg, #ff8c42, #ffa055);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* ===============================================
   BOTONES PARA COMPARTIR EL ANIMAL
   =============================================== */

.animal-share {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 1rem;
    margin: 1rem 0 1rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #000000;
    position: relative;
    overflow: hidden;
}

/* Mobile: más compacto */
@media (max-width: 576px) {
    .animal-share {
        padding: 0.75rem;
        margin: 0.75rem 0;
        border-radius: 10px;
    }
}

/* ===============================================
   ESTADÍSTICAS COMPACTAS
   =============================================== */
.stats-compact {
    margin-bottom: 1rem;
}

.stats-compact .stats-num {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
}

.stats-compact .stats-label {
    font-size: 0.65rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

@media (max-width: 576px) {
    .stats-compact {
        padding: 0.5rem !important;
    }
    
    .stats-compact .stats-num {
        font-size: 1.1rem;
    }
    
    .stats-compact .stats-label {
        font-size: 0.6rem;
    }
}

/* ===============================================
   PUBLICADOR COMPACTO
   =============================================== */
.publisher-widget-compact {
    margin-bottom: 0;
}

.publisher-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e9ecef;
    flex-shrink: 0;
}

.publisher-info-compact {
    min-width: 0;
    flex: 1;
}

.publisher-name-compact {
    font-weight: 700;
    color: #1f2937;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.publisher-type-compact {
    font-size: 0.75rem;
    color: #6c757d;
    display: flex;
    align-items: center;
}

@media (max-width: 576px) {
    .publisher-avatar-img {
        width: 40px;
        height: 40px;
    }
    
    .publisher-name-compact {
        font-size: 0.85rem;
    }
    
    .publisher-type-compact {
        font-size: 0.7rem;
    }
}

.animal-share::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #343a40, #212529);
}

.animal-share .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.5rem;
}

@media (max-width: 576px) {
    .animal-share .section-title {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
}

.share-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.3rem;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    position: relative;
}

@media (max-width: 576px) {
    .share-buttons {
        gap: 0.4rem;
    }
    
    .share-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    color: #fff;
}

.share-btn.copy-link { background-color: #6c757d; }
.share-btn.whatsapp { background-color: #25D366; }
.share-btn.facebook { background-color: #1877F2; }
.share-btn.twitter { background-color: #1DA1F2; }
.share-btn.email { background-color: #fbbc05; }

.animal-report-section {
    background: linear-gradient(180deg, #fffefd 0%, #f6f0ed 54%, #ebe0dc 100%);
    border-radius: 22px;
    padding: 1.15rem;
    margin: 0.8rem 0 1rem;
    border: 1px solid rgba(127, 29, 29, 0.24);
    box-shadow: 0 16px 34px rgba(68, 13, 13, 0.14), inset 0 1px 0 rgba(255,255,255,0.92);
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 0.95rem;
}

.animal-report-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #7f1d1d 0%, #991b1b 48%, #b91c1c 100%);
}

.animal-report-copy {
    text-align: center;
    padding: 0.25rem 0.35rem 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(249, 245, 244, 0.95) 100%);
    border: 1px solid rgba(233, 221, 217, 0.98);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.animal-report-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.1rem 0 0.55rem;
    padding: 0.34rem 0.78rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.11), rgba(185, 28, 28, 0.07));
    color: #7f1d1d;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(127, 29, 29, 0.16);
}

.animal-report-section .section-title {
    font-size: 1.02rem;
    color: #5f1d1d;
    font-weight: 800;
    line-height: 1.2;
}

.animal-report-text {
    color: #584545;
    font-size: 0.93rem;
    line-height: 1.5;
    max-width: 33rem;
    margin-left: auto;
    margin-right: auto;
}

.animal-report-actions {
    display: flex;
}

.animal-report-button {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border: 1px solid rgba(17, 24, 39, 0.08) !important;
    border-radius: 16px;
    color: #ffffff !important;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.22);
    letter-spacing: 0.01em;
    text-shadow: none;
}

.animal-report-button:hover,
.animal-report-button:focus {
    color: #ffffff !important;
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%) !important;
    box-shadow: 0 16px 28px rgba(127, 29, 29, 0.28);
    transform: translateY(-1px);
}

.animal-report-button:active {
    transform: translateY(0);
    box-shadow: 0 10px 18px rgba(17, 24, 39, 0.2);
}

@media (max-width: 576px) {
    .animal-report-section {
        padding: 0.9rem;
        margin: 0.65rem 0 0.85rem;
        border-radius: 16px;
    }

    .animal-report-section .section-title {
        font-size: 0.95rem;
    }

    .animal-report-text {
        font-size: 0.85rem;
    }

    .animal-report-button {
        min-height: 46px;
        font-size: 0.95rem;
        border-radius: 12px;
    }
}

.ficha-feedback {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translate(-50%, 18px);
    min-width: min(92vw, 320px);
    max-width: min(92vw, 460px);
    padding: 0.8rem 1rem;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.92rem;
    text-align: center;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2000;
}

.ficha-feedback.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.ficha-feedback-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.ficha-feedback-info {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.ficha-feedback-error {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* Tooltip para el botón de copiar */
.share-btn .tooltip-text {
    visibility: hidden;
    width: 140px;
    background-color: #343a40;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -70px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9rem;
}

.share-btn .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #343a40 transparent transparent transparent;
}

.share-btn:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ===== FLECHAS DE GALERÍA (ESTILO CLÁSICO) ===== */

/* Imagen principal de la galería - Responsive */
.gallery-main-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 500px;
    object-fit: contain;
    object-position: center;
    background-color: #eef2f7;
    display: block;
}

@media (max-width: 576px) {
    .gallery-main-image {
        aspect-ratio: auto;
        height: auto;
        max-height: min(70vh, 560px);
        background-color: transparent;
    }
}

/* Contenedor de miniaturas - Responsive */
.gallery-thumbs-container {
    padding: 12px;
}

@media (max-width: 576px) {
    .gallery-thumbs-container {
        padding: 8px;
        gap: 6px !important;
    }
    
    .gallery-thumbs-container .gallery-thumb {
        width: 50px !important;
        height: 50px !important;
    }
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    font-size: 1.2rem;
}

.gallery-arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
    border-color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .gallery-arrow {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .gallery-prev { left: 10px; }
    .gallery-next { right: 10px; }
}

/* Estilos para las miniaturas de la galería */
.gallery-thumb {
    transition: all 0.2s ease;
    border: 2px solid transparent !important;
    opacity: 0.7;
}

.gallery-thumb:hover {
    opacity: 1;
}

.gallery-thumb.active {
    border-color: #ff6b35 !important; /* Naranja para resaltar */
    border-width: 3px !important;
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    z-index: 1;
}

/* --- FIN ESTILOS GALERÍA --- */

/* Nuevo contenedor para detalles y estadísticas combinados */
.detalles-stats-combined {
    margin-bottom: 10px;
}

.detalles-stats-combined .detalles-section-ficha,
.detalles-stats-combined .stats-section-inline {
    background: #ffffff;
    border: 1px solid #007bff;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.1);
    height: 100%;
}

.detalles-stats-combined .section-title {
    color: #007bff;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid #b3d4ff;
    padding-bottom: 10px;
    font-size: 1.1rem;
}

/* Compactar detalles en móviles */
@media (max-width: 576px) {
    .detalles-stats-combined .detalles-section-ficha,
    .detalles-stats-combined .stats-section-inline {
        padding: 10px;
    }
    
    .detalles-stats-combined .section-title {
        font-size: 1.1rem;
    }

    .recommended-articles-premium {
        padding: 12px;
    }

    .recommended-articles-kicker {
        font-size: .68rem;
        margin-bottom: .65rem;
    }

    .recommended-articles-lead {
        font-size: .9rem;
        margin-bottom: .85rem;
    }

    .tags-sidebar-box .tags-container {
        gap: .3rem;
    }

    .tags-sidebar-box .tag-badge {
        padding: .34rem .54rem;
        font-size: .72rem;
        border-radius: .4rem;
    }

    .tags-sidebar-box .tag-badge i {
        margin-right: .22rem;
        font-size: .68rem;
    }
}

@media (min-width: 992px) {
    .tags-sidebar-box .tag-badge {
        padding: .42rem .68rem;
        font-size: .79rem;
    }
}

/* Historia Colapsable */
.historia-section-ficha {
    margin-bottom: 15px;
}

.historia-content {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.historia-content.collapsible {
    max-height: 500px;
}

.historia-content.collapsed {
    max-height: 4.5em;
    position: relative;
}

.historia-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2em;
    background: linear-gradient(to bottom, transparent, #f8f9fa);
}

.btn-read-more {
    width: 100%;
    padding: 8px 16px;
    margin-top: 10px;
    background: white;
    border: 2px solid #6c757d;
    border-radius: 8px;
    color: #6c757d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-read-more:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-read-more i {
    transition: transform 0.3s ease;
}

/* Accordion Customization - Functional */
.accordion-flush .accordion-item {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.accordion-flush .accordion-button {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 15px 20px;
    border-radius: 12px; /* When collapsed */
    background-color: white;
    color: #495057;
}

.accordion-flush .accordion-button:not(.collapsed) {
    background-color: #f0f7ff;
    color: #0d6efd;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.accordion-flush .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,.125);
}

.accordion-body {
    padding: 20px;
    background: white;
}

/* Note: .salud-badges layout is handled by Bootstrap Row and Col classes in the template. */

.enfermedades-list h6 {
    color: #856404;
    font-weight: 600;
}

/* Botones Compartir Compactos */
.share-buttons.compact {
    gap: 0.75rem;
}

.share-buttons.compact .share-btn {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
}

/* ===============================================
   ESTILOS V5 INTEGRADA (HORIZONTAL STRIP)
   =============================================== */

/* Estilos V5 Horizontal Strip */
.v5-strip { 
    background: white; 
    padding: 20px; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    gap: 25px; 
    margin-bottom: 25px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    border: 1px solid #e9ecef;
}
.v5-thumb { 
    width: 100px; 
    height: 100px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 4px solid #f8f9fa;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.v5-details { flex: 1; min-width: 0; }
.v5-actions {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    margin-left: 0;
    margin-top: 8px;
    flex: 1 0 100%;
    width: 100%;
}
.v5-actions > * {
    margin: 0;
}
/* El dropdown principal no debe forzar 100% fuera de móvil */
.v5-actions .dropdown { width: auto; }
.v5-actions .v5-action-main-dropdown {
    flex: 1 1 auto;
    min-width: 0;
}
.v5-actions .v5-action-icon-dropdown {
    flex: 0 0 44px;
}
/* Caret nativo Bootstrap redimensionado: más grande y sutil */
.v5-actions .dropdown-toggle::after {
    border-top-width: .42em;
    border-right-width: .42em;
    border-left-width: .42em;
    vertical-align: .15em;
    opacity: .5;
}
/* Borde grueso en el botón de gestión para máxima visibilidad */
.v5-actions .dropdown-toggle {
    border-width: 2px !important;
}
.v5-actions .acciones-ficha-select,
.v5-actions .form-select { width: auto; }

.v5-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2d3748;
    margin: 0;
    line-height: 1.2;
}

.v5-intro {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #4b5563;
}

.v5-meta {
    color: #718096;
    font-size: 0.95rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.v5-badges {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    overflow: hidden;
    max-width: 100%;
}

/* Botones de acción V5 — 44px mínimo táctil (Apple HIG + Material Design 3) */
.v5-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 1rem;
}

.v5-actions .v5-contact-btn {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
}

.v5-actions .v5-action-main-dropdown .dropdown-toggle,
.v5-actions .v5-contact-btn,
.v5-actions .btn:not(.btn-outline-danger):not(.btn-outline-secondary):not(.btn-outline-warning):not(.dropdown-toggle) {
    min-height: 44px;
}

.v5-actions .v5-action-main-dropdown .dropdown-toggle {
    width: 100%;
}

/* Botones solo-icono: 44×44px cuadrados (mínimo recomendado iOS/Android) */
.v5-actions .btn-outline-danger,
.v5-actions .btn-outline-secondary,
.v5-actions .btn-outline-warning {
    width: 44px;
    min-height: 44px;
    padding-left: 0;
    padding-right: 0;
    font-size: 1.05rem;
}

/* Botón favoritos - borde rojo */
.v5-actions .btn-outline-danger {
    border-color: #dc3545 !important;
    color: #dc3545;
}

.v5-actions .btn-outline-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Botón favoritos activo - relleno rojo */
.v5-actions .btn-outline-danger.is-favorite {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    border-color: #dc3545 !important;
}

.v5-actions .btn-outline-danger.is-favorite:hover {
    background-color: #c82333 !important;
}

/* Botón compartir - borde gris */
.v5-actions .btn-outline-secondary {
    border-color: #6c757d !important;
    color: #6c757d;
}

#shareBtnMain {
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.v5-actions .btn-outline-secondary:hover {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.v5-actions .btn-outline-secondary.show,
.v5-actions .btn-outline-secondary.show:hover,
.v5-actions .btn-outline-secondary.show:focus,
.v5-actions .btn-outline-secondary:active,
.v5-actions .btn-outline-secondary:active:hover,
.v5-actions .show > .btn-outline-secondary.dropdown-toggle {
    background-color: #ffffff !important;
    color: #6c757d !important;
    border-color: #6c757d !important;
    box-shadow: none !important;
}

.v5-actions .btn-outline-secondary:focus,
.v5-actions .btn-outline-secondary:focus-visible {
    box-shadow: 0 0 0 0.18rem rgba(108, 117, 125, 0.14);
}

#shareBtnMain.show,
#shareBtnMain.show:hover,
#shareBtnMain.show:focus,
#shareBtnMain.show:active,
.show > #shareBtnMain.dropdown-toggle,
#shareBtnMain.share-btn-active,
#shareBtnMain.share-btn-active:hover,
#shareBtnMain.share-btn-active:focus,
#shareBtnMain.share-btn-active:active {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    background-color: #ffffff !important;
    color: #1f2937 !important;
    border-color: #1f2937 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.12), 0 8px 18px rgba(15, 23, 42, 0.10) !important;
    transform: translateY(-1px);
}

@media (min-width: 992px) {
    .v5-actions {
        justify-content: flex-end;
        gap: 8px;
        margin-top: 0;
        margin-left: auto;
        flex: 0 0 auto;
        width: auto;
    }

    .v5-actions .v5-action-main-dropdown {
        flex: 0 1 auto;
    }

    .v5-actions .v5-action-icon-dropdown {
        flex: 0 0 auto;
    }

    .v5-actions .v5-contact-btn,
    .v5-actions .btn:not(.btn-outline-danger):not(.btn-outline-secondary):not(.btn-outline-warning):not(.dropdown-toggle) {
        flex: 0 1 auto;
    }
}

/* Responsive V5 - Optimizado para móviles y tablets pequeñas */
@media (max-width: 991.98px) {
    .v5-strip {
        flex-direction: row;
        flex-wrap: wrap;
        text-align: left;
        padding: 10px;
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .v5-thumb {
        width: 60px;
        height: 60px;
        border-width: 2px;
        flex-shrink: 0;
    }
    
    .v5-details {
        flex: 1;
        min-width: 0; /* Permite que el texto se trunque */
    }
    
    .v5-name {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .v5-intro {
        margin-top: 2px;
        font-size: 0.78rem;
    }
    
    .v5-meta {
        font-size: 0.75rem;
        gap: 5px;
        margin-top: 3px;
        flex-wrap: wrap;
    }
    
    .v5-meta span {
        white-space: nowrap;
    }
    
    .v5-badges {
        flex-basis: 100%;
        justify-content: flex-start;
        gap: 5px;
        margin-top: 8px;
        flex-wrap: wrap;
    }
    
    .v5-badges .badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .v5-actions {
        flex-basis: 100%;
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: center;
        gap: 6px;
        margin-top: 8px;
        margin-left: 0;
        width: 100%;
    }

    .v5-actions .v5-action-main-dropdown {
        flex: 1 1 auto;
        min-width: 0;
    }
    .v5-actions .v5-action-icon-dropdown {
        flex: 0 0 44px;
    }
    .v5-actions .dropdown .dropdown-toggle {
        width: 100%;
        height: 44px;       /* fijo: no crece más de lo necesario */
        min-height: 44px;
        font-size: 1rem;    /* ≥16px evita auto-zoom en iOS */
        font-weight: 400;   /* sin negrita: más ligero y legible */
        padding: 0 10px 0 12px;
        /* Texto a la izq, chevron explícito a la der */
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    .v5-actions .acciones-ficha-select {
        flex: 1 1 0;
        min-width: 0;
        width: auto !important;
        min-height: 44px;
        font-size: 1rem;
    }

    /* Botones primarios (Contactar, etc.) crecen también */
    .v5-actions .v5-contact-btn,
    .v5-actions .btn:not(.btn-outline-danger):not(.btn-outline-secondary):not(.btn-outline-warning):not(.dropdown-toggle) {
        flex: 1 1 0;
        min-height: 44px;
        padding: 0 12px;
        font-size: 1rem;
        font-weight: 600;
        min-width: 0;
    }

    /* Botones icono: 44×44px cuadrados (mínimo táctil iOS/Android) */
    .v5-actions .btn-outline-danger,
    .v5-actions .btn-outline-secondary,
    .v5-actions .btn-outline-warning {
        flex: 0 0 44px;
        width: 44px;
        min-height: 44px;
        padding: 0 !important;
        font-size: 1.1rem;  /* icono ligeramente más grande en móvil */
    }

    .v5-actions .share-dropdown-menu {
        min-width: 220px;
    }
}

/* Pantallas muy pequeñas */
@media (max-width: 400px) {
    .v5-strip {
        padding: 8px;
        gap: 8px;
    }
    
    .v5-thumb {
        width: 50px;
        height: 50px;
    }
    
    .v5-name {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .v5-meta {
        font-size: 0.7rem;
        gap: 4px;
    }
    
    .v5-badges .badge {
        font-size: 0.6rem;
        padding: 2px 5px;
    }
    
    .v5-actions {
        gap: 4px;
    }
    
    .v5-actions .btn-lg {
        padding: 5px 6px;
        font-size: 0.7rem;
    }
    
    .v5-actions .btn-lg small {
        font-size: 0.55rem;
    }
    
    .v5-actions .btn-outline-danger,
    .v5-actions .btn-outline-secondary,
    .v5-actions .btn-outline-warning {
        flex: 0 0 40px;
        width: 40px;
        min-height: 40px;
        padding: 0 !important;
        font-size: 0.9rem;
    }
}

/* Content Boxes */
.content-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #000000;
    overflow: hidden;
}

/* Mobile: reducir padding y márgenes */
@media (max-width: 576px) {
    .content-box {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border-radius: 12px;
    }
}

.content-box .box-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

/* Mobile: títulos más compactos */
@media (max-width: 576px) {
    .content-box .box-title {
        font-size: 1.05rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
}


