/* Estilos específicos para Especies Argentinas */

#contenido-especies,
#contenido-especie-detalle,
#contenido-error {
    font-family: 'Roboto', sans-serif;
}

/* Header de especies */
.header-especies {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
}

.stats-especies .stat-item {
    text-align: center;
    padding: 0 1rem;
}

.stats-especies .stat-number {
    font-weight: 700;
    color: #00ABFF !important;
}

/* Filtros */
.filtros-especies .btn {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filtros-especies .btn-outline-primary {
    border-color: #00ABFF;
    color: #00ABFF;
}

.filtros-especies .btn-outline-primary:hover,
.filtros-especies .btn-outline-primary.active {
    background-color: #00ABFF;
    border-color: #00ABFF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 171, 255, 0.3);
}

/* Grid de especies */
.especies-grid {
    margin-bottom: 3rem;
}

.especie-card .card {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.especie-card .card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.imagen-container {
    position: relative;
    border-radius: 15px 15px 0 0;
}

.categoria-badge {
    background-color: rgba(0, 171, 255, 0.9) !important;
    color: white;
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

/* Contenido de las cards */
.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.card-subtitle {
    font-style: italic;
    font-size: 0.9rem;
}

.datos-tecnicos {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 0.75rem;
}

.datos-tecnicos strong {
    color: #00ABFF;
    font-size: 0.9rem;
}

/* Botones */
.btn-primary {
    background-color: #00ABFF;
    border-color: #00ABFF;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0084cc;
    border-color: #0084cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 171, 255, 0.3);
}

.btn-outline-primary {
    border-color: #00ABFF;
    color: #00ABFF;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: #00ABFF;
    border-color: #00ABFF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 171, 255, 0.3);
}

/* Información adicional */
.info-adicional {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-especies {
        padding: 2rem 1rem;
    }



    .stats-especies {
        flex-direction: column;
        gap: 1rem !important;
    }

    .filtros-especies .btn {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }

    .especies-grid .col-sm-6 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .header-especies {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }

    /* Estilos decorativos eliminados - ahora usan pseudoelementos desde /css/portada.css */

    .filtros-especies {
        margin-left: -15px;
        margin-right: -15px;
    }

    .filtros-especies .d-flex {
        padding: 0 15px;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.especie-card {
    animation: fadeInUp 0.6s ease forwards;
}

.especie-card:nth-child(1) {
    animation-delay: 0.1s;
}

.especie-card:nth-child(2) {
    animation-delay: 0.2s;
}

.especie-card:nth-child(3) {
    animation-delay: 0.3s;
}

.especie-card:nth-child(4) {
    animation-delay: 0.4s;
}

.especie-card:nth-child(5) {
    animation-delay: 0.5s;
}

.especie-card:nth-child(6) {
    animation-delay: 0.6s;
}

.especie-card:nth-child(7) {
    animation-delay: 0.7s;
}

.especie-card:nth-child(8) {
    animation-delay: 0.8s;
}

/* === ESTILOS PARA VISTA DE DETALLE === */

/* Breadcrumb personalizado */
.breadcrumb {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: #00ABFF;
    content: "›";
    font-weight: bold;
}

/* Header de especie individual */
.especie-header .nombre-cientifico {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Imagen principal */
.imagen-principal img {
    transition: transform 0.3s ease;
}

.imagen-principal:hover img {
    transform: scale(1.02);
}

.creditos-foto .badge {
    backdrop-filter: blur(10px);
}

/* Botones de compartir */
.share-buttons .btn {
    border-radius: 20px;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.share-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Contenido HTML de la especie */
.contenido-html {
    line-height: 1.7;
}

.contenido-html h2,
.contenido-html h3,
.contenido-html h4 {
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.contenido-html h2 {
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid #00ABFF;
    padding-bottom: 0.5rem;
}

.contenido-html h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #00ABFF;
}

.contenido-html table {
    margin: 1.5rem 0;
}

.contenido-html table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.contenido-html table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.contenido-html ul,
.contenido-html ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.contenido-html li {
    margin-bottom: 0.5rem;
}

/* Navegación entre especies */
.navegacion-especies .btn {
    border-radius: 15px;
    padding: 1rem;
    text-align: left;
    transition: all 0.3s ease;
}

.navegacion-especies .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 171, 255, 0.2);
}

.navegacion-especies .btn small {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Cards del sidebar */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 15px;
    overflow: hidden;
}

.card-header {
    border-bottom: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, #00ABFF 0%, #0084cc 100%) !important;
}

.card-header.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

/* Especies relacionadas */
.especies-relacionadas .d-flex {
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 10px;
}

.especies-relacionadas .d-flex:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

/* Enlaces útiles */
.enlaces-utiles .btn {
    border-radius: 10px;
    text-align: left;
    justify-content: flex-start;
}

.enlaces-utiles .btn:hover {
    transform: translateX(5px);
}

/* === ESTILOS PARA VISTA DE ERROR === */

#contenido-error {
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.especies-sugeridas .btn {
    margin: 0.25rem;
    border-radius: 20px;
}

/* === ESTILOS ESPECÍFICOS DE DETALLE === */

#contenido-especie-detalle {
    padding: 20px 0;
}

#contenido-especie-detalle h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 26px;
    font-weight: 600;
    color: #374151;
    margin: 40px 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #3b82f6;
}

#contenido-especie-detalle .contenido-html {
    background: #f9fafb;
    padding: 30px;
    border-radius: 12px;
    margin: 20px 0;
    line-height: 1.8;
    font-size: 16px;
}

#contenido-especie-detalle .contenido-html p {
    margin-bottom: 15px;
}

#contenido-especie-detalle .contenido-html h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 25px 0 15px 0;
}

#contenido-especie-detalle .creditos-fotos {
    background: #e5e7eb;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    color: #4b5563;
}

/* Provincias Grid */
#contenido-especie-detalle .provincias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

#contenido-especie-detalle .provincia-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 15px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: #1f2937;
    transition: all 0.3s ease;
    text-align: center;
}

#contenido-especie-detalle .provincia-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: #3b82f6;
}

#contenido-especie-detalle .provincia-icono {
    width: 96px;
    height: 96px;
    border-radius: 12px;
    margin-bottom: 15px;
    object-fit: contain;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#contenido-especie-detalle .provincia-icono-fallback {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    border-radius: 12px;
    margin-bottom: 15px;
}

#contenido-especie-detalle .provincia-nombre {
    font-weight: 600;
    font-size: 16px;
}

/* Listado Especies Final */
#contenido-especie-detalle .especie-item-final {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#contenido-especie-detalle .especie-item-final:hover {
    background: #fff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#contenido-especie-detalle .especie-imagen-small {
    width: 70px;
    height: 52px;
    object-fit: contain;
    border-radius: 12px;
    margin-right: 15px;
    flex-shrink: 0;
    background: #f9fafb;
}

#contenido-especie-detalle .especie-info-final {
    flex: 1;
}

#contenido-especie-detalle .especie-nombre-final {
    font-weight: 600;
    font-size: 15px;
    color: #1f2937;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
}

#contenido-especie-detalle .especie-nombre-final:hover {
    color: #3b82f6;
    text-decoration: none;
}

#contenido-especie-detalle .especie-cientifico-final {
    font-style: italic;
    color: #6b7280;
    font-size: 13px;
}

/* Responsive para vista de detalle */
@media (max-width: 768px) {
    #contenido-especie-detalle .provincias-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #contenido-especie-detalle h2 {
        font-size: 22px;
    }

    .navegacion-especies .btn {
        font-size: 0.875rem;
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .navegacion-especies .col-6:last-child .btn {
        text-align: right;
    }

    .share-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .share-buttons .btn {
        width: 100%;
    }

    .imagen-principal {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .breadcrumb {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    .navegacion-especies .btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .card-body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    #contenido-especie-detalle .provincias-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Mantener 2 columnas en móvil pequeño */
        gap: 12px;
    }

    #contenido-especie-detalle .provincia-link {
        padding: 15px 10px;
    }

    #contenido-especie-detalle .provincia-icono {
        width: 60px;
        height: 60px;
    }

    #contenido-especie-detalle .provincia-nombre {
        font-size: 0.9rem;
    }

    #contenido-especie-detalle .contenido-html {
        padding: 20px;
        font-size: 15px;
    }

    #contenido-especie-detalle h2 {
        font-size: 20px;
    }

    /* Listado final más compacto en móvil */
    #contenido-especie-detalle .especie-imagen-small {
        width: 60px;
        height: 45px;
    }

    #contenido-especie-detalle .especie-nombre-final {
        font-size: 14px;
    }

    #contenido-especie-detalle .especie-cientifico-final {
        font-size: 12px;
    }
}